Forum Activity for @ultrajam

SteveX
@ultrajam
07/31/18 04:13:12AM
2,587 posts

X-Frame-Options header set in jrCore_send_response_and_detach()


Jamroom Developers

I want to allow profile owners to specify where a page from their profile can be embedded - whitelisted iframe embeds.

Currently I have to allow all pages throughout the site using jrCore_disable_xframe or none because of 'X-Frame-Options: SAMEORIGIN' being overridden in jrCore/lib/form.php jrCore_send_response_and_detach()

In my default view function I want to check HTTP_REFERER against the whitelist and set the X-Frame-Options header to allow the page to appear in an iframe.

So would it be possible to allow for a check in jrCore_send_response_and_detach to see if X-Frame-Options have already been set? There is already a check for Content-Type so it would work the same as that.

        if ($_tmp && is_array($_tmp)) {
            foreach ($_tmp as $header) {
                if (stripos($header, 'Content-Length') !== 0) {
                    header($header);
                    if (stripos($header, 'Content-Type') === 0) {
                        $cont = true;
                    }
                    if (stripos($header, 'X-Frame-Options') === 0) {
                        $xframe = true;
                    }
                }
            }
        }
        else {
            $_tmp = array();
        }
        if (!$cont) {
            header("Content-Type: text/html; charset=utf-8");
        }
        if (!isset($_conf['jrCore_disable_xframe']) && !$xframe) {
            header('X-Frame-Options: SAMEORIGIN');
        }

Thanks!
updated by @ultrajam: 11/01/18 10:23:31PM
SteveX
@ultrajam
07/31/18 01:16:57AM
2,587 posts

list chart by genre


Design and Skin Customization

Yes, you can use search and other jrCore_list parameters: https://www.jamroom.net/the-jamroom-network/documentation/module-developer-guide/89/jrcore-list
Quote: search="audio_genre = Rock"
SteveX
@ultrajam
06/15/18 08:48:34AM
2,587 posts

After Marketplace update errors in console


Using Jamroom

Updating modules, after the Marketplace update I keep having to refresh the update page to update the next item.
An error is written to the Firefox Web Console:
Quote: ReferenceError: jrMarket_update_item is not defined[Learn More]

updated by @ultrajam: 09/16/18 08:00:51PM
SteveX
@ultrajam
06/14/18 04:01:21AM
2,587 posts

Conditional Form Fields


Jamroom Developers

If you just want to show/hide fields depending on value you can add javascript to the form.
The field name will be the field's id, and the table row you want to show/hide is the parents parent. There is more to do if it's an image field etc, but for most field types this:
	$_options = array(
		'show' => 'show',
		'hide' => 'hide'
	);
    $_tmp = array(
        'name'      => 'mymodule_show_hide',
        'label'     => 'show or hide the checkbox field',
        'help'      => 'help!',
        'type'      => 'select',
        'options'	=> $_options,
        'required'  => false
    );
    jrCore_form_field_create($_tmp);
    
    // Checkbox shown or hidden depending on above
    $_tmp = array(
        'name'      => 'mymodule_target',
        'label'     => 'check this',//777
        'help'      => 'check this help',//777
        'type'      => 'checkbox',
        'default'   => 'off',
        'validate'  => 'onoff'
    );
    jrCore_form_field_create($_tmp);

    $_tmp = array('
    if ($("#mymodule_show_hide").val() == "hide") {
		$("#mymodule_target").parent().parent().hide();
		$("#mymodule_target").val("off");
    }
    $("#mymodule_show_hide").change(function(){
    	if ($(this).val() == "hide") {
			$("#mymodule_target").parent().parent().hide();
			$("#mymodule_target").val("off");
    	} else {
			$("#mymodule_target").parent().parent().show();
    	}
    });
    ');
    jrCore_create_page_element('javascript_ready_function',$_tmp);
SteveX
@ultrajam
06/12/18 01:15:42PM
2,587 posts

Help removing pager


Using Jamroom

That doesn't seem right.

Check that you are looking at the right template (by putting "XXXXXXXX" into the template right before the jrCore_list function).

Then check that there isn't a pager in the template after the one you are looking at.
SteveX
@ultrajam
06/12/18 10:11:52AM
2,587 posts

Help removing pager


Using Jamroom

It's in the jrCore_list function, but I had expected to see pager=true in there. Try removing this:
page=$_post.p
If that doesn't work try adding pager="false"
SteveX
@ultrajam
06/10/18 11:55:03PM
2,587 posts

How to Change names of icons and titles


Using Jamroom

In the Admin Control Panel (ACP) you can edit all of the language strings for each module and skin. Click on the Lang tab in the ACP
SteveX
@ultrajam
06/10/18 04:14:09PM
2,587 posts

Regarding Youtube


Installation and Configuration

Try removing the spaces from the urls.

If that doesn't work copy and paste the generated html (use the browser's View Source and search the page for "iframe"). When you paste it here on the forum you need to put it within code brackets or it won't show - click the BBCode Help button for help (it's below the text box next to the Attach File button).

Then paste the whole iframe code from the smarty template (also within code brackets).
  6