Forum Activity for @ultrajam

SteveX
@ultrajam
09/26/16 02:39:59AM
2,589 posts

Jamroom to XMPIE uStore Bridge


Jamroom Developers

I got a little way towards LDAP authentication before I hit other problems with doing that.

This might help with making a connection and running a search

function ujLDAPauth_db_get_item_listener($_data, $_user, $_conf, $_args, $event)
{ global $_post; if (isset($_post['module']) && $_post['module'] == 'jrUser' && $_post['option'] == 'login_save') { $ip_address = 'xxxxxxxxx'; // ip address $port = 'xxxxx'; // port $ldappass = 'xxxxxxxx'; // your ldap password $ldaprdn = 'CN=svc-lookup,OU=Services,DC=subdomain,DC=domain,DC=com'; // your domain name // LDAP lookup $ds = ldap_connect($ip_address,$port); // must be a valid LDAP server! //fdebug("ds",$ds);// OK if ($ds) { //$r = ldap_bind($ds); // this is an "anonymous" bind, typically bind to ldap server with user / pass $ldapbind = ldap_bind($ds, $ldaprdn, $ldappass); // verify binding if ($ldapbind) { fdebug("LDAP bind successful...");// OK } else { fdebug("LDAP bind failed...");// OK } // Searching for username a34-jones // echo "Searching for (sn=S*) ..."; // Search surname entry //$sr = ldap_search($ds, "DC=subdomain,DC=domain,DC=com", "cn=a34-jones"); // echo "Searching for (sn=C*) ..."; // Search surname entry // $sr=ldap_search($ds, "DC=subdomain,DC=domain,DC=com", "(uid=a34*)"); // //echo "Search result is " . $sr . "<br />"; // fdebug("search result (uid=a34*)",$sr);// OK // // fdebug( "Number of entries returned is " . ldap_count_entries($ds, $sr) . "<br />", $sr);// OK // // $sr=ldap_search($ds, "DC=subdomain,DC=domain,DC=com", "(sn=jo*)"); // // fdebug("search result for sn=jo*",$sr);// OK // // $sr=ldap_search($ds, "DC=subdomain,DC=domain,DC=com", "(sn=a34*)"); // // fdebug("search result (sn=a34*)",$sr);// OK // ldap_set_option($ds, LDAP_OPT_REFERRALS, 0); $sr=ldap_search($ds, "DC=subdomain,DC=domain,DC=com", "cn=a34-jones"); if (!$sr) { $err_number = ldap_errno($ds); $err_txt = ldap_err2str($err_number); } fdebug("error", $err_txt, "search result sn=J*",$sr); $info = ldap_get_entries($ds, $sr); fdebug( "Data for " . $info["count"] . " items returned:<p>",$info); // for ($i=0; $i<$info["count"]; $i++) { // echo "dn is: " . $info[$i]["dn"] . "<br />"; // echo "first cn entry is: " . $info[$i]["cn"][0] . "<br />"; // echo "first email entry is: " . $info[$i]["mail"][0] . "<br /><hr />"; // } // Closing connection ldap_close($ds); } } else { return $_data; } return $_data; }
SteveX
@ultrajam
09/20/16 01:09:29PM
2,589 posts

Automated tool to reset user password and send an email notification.


Using Jamroom

I would send them a link:
yoursite.com/user/forgot
SteveX
@ultrajam
09/20/16 11:40:13AM
2,589 posts

What do you love about Jamroom 5 right now?


Off Topic

Every time I use it (quite often), I'm glad that I made that colour picker form field.
SteveX
@ultrajam
09/19/16 04:25:44PM
2,589 posts

how to set [s] bbcode for "strikethrough" site-wide?


Design and Skin Customization

In the ACP go to jrCore > Templates then Modify the form_editor.tpl template.
yoursite.com/core/template_modify/template=form_editor.tpl

Find the line:
    toolbar1: "formatselect | fontselect fontsizeselect forecolor {if $strong} bold{/if}{if $em} italic{/if}{if $span} underline{/if} removeformat | {if $span || $div} alignleft{/if}{if $span || $div} aligncenter{/if}{if $span || $div} alignright{/if}{if $span || $div} alignjustify |{/if}{if $ul && $li} bullist numlist |{/if}{if $div} outdent indent |{/if} undo redo | link unlink anchor pagebreak{if $table} table{/if}{if $hr} hr{/if} | code preview fullscreen{if $jrembed || $jrsmiley} |{/if}{if $jrembed} jrembed{/if}{if $jrsmiley} jrsmiley{/if}"
and add strikethrough as the first item.

Then return to the Templates page (/core/admin/templates) check the Active checkbox for that template, scroll down and save.

Then empty your browser cache and your site cache and the strikethrough button should appear as the first button in the toolbar.

Then edit the template again to put the button wherever you want it to appear.
updated by @ultrajam: 09/19/16 04:28:51PM
SteveX
@ultrajam
09/16/16 05:11:32AM
2,589 posts

FILE MODULE-Allowing Offsite Downloads


Design and Skin Customization

I have just tried this on my site using Safari on my iphone and the pdf opens without a problem, offering the choice of adding it to mail, notes, iBooks, etc.

I don;t have allow all domains in jrCore global config either.

Are you using some kind of puppy fence?
updated by @ultrajam: 09/16/16 05:12:55AM
SteveX
@ultrajam
09/16/16 03:05:01AM
2,589 posts

Video Album button title


Using Jamroom

On a new install of the video module (no videos yet) the Create Album button has the title "Video". Shouldn't that be Create Album or Albums?
updated by @ultrajam: 12/18/16 04:50:28PM
SteveX
@ultrajam
09/15/16 12:30:45AM
2,589 posts

Nervous about re-sizing images


Using Jamroom

Create a copy of your site, then reduce the image size, then check the results.

If your results are generally acceptable (decompressing will affect different images in different ways) then make a backup so you have copies of all images, then go for it.

Make sure you have that backup so it is reversible.
SteveX
@ultrajam
09/13/16 03:23:27PM
2,589 posts

What causes a Youtube video to show the embed code instead of the video?


Using Jamroom

Have you installed and enabled the URLScan module?

You need to do that in order for the url to be converted to show the video.
SteveX
@ultrajam
09/09/16 04:27:03PM
2,589 posts

Scroll To Top Button not working on all the pages


Using Jamroom

pch:
Can someone just confirm me if the code I used above is correct.
Thanks.

I'd need to set up a test using your code to tell you if it works or not.

You already have that test on your system. Does it work?
SteveX
@ultrajam
09/09/16 01:26:30PM
2,589 posts

Bootstrap


Jamroom Developers

Buttons are the same as icons if you are using them in your skin. We use them like that here:
http://academicskills.uwe.ac.uk/has/workbooks/has-low/7205/academic-skills

But it's going to mean a lot of js and css if you want to "override" the core buttons. To do that you'd probably be better off using the less or sass features of bootstrap to restyle the core html. I stuck with the page submit and cancel buttons jamroom styling as it was a time-saving corner to cut.

You can replace core form fields by overriding them in your skin. e.g. place a file jrCore_page_notice.tpl in your active skin directory, copy in the contents of /modules/jrCore/templates/page_notice.tpl and then edit the html to suit your site's needs.

If you are going to restyle core form fields my best advice would be to avoid the ACP altogether - use jrAdminSkin to always use jrElastic in the ACP and then modify your jrElastic header and footer to more or less match your skin. Only admins see the Elastic look anyway, users see your custom skinned forms in the profile views.

You will have to deal with the differences between Jamroom and Bootstrap variable naming (like "error" in Jamroom and "danger" in Bootstrap, so the jrCore_page_notice.tpl might look like this:
{* page_notice shows notices, warnings, errors and success messages under a page_banner *}
{* NOTE: This is NOT SHOWN for AJAX response *}
{* $notice_label will contain the actual notice level - i.e. "error, "success", "warning", "notice" and in bootstrap: "danger, "success", "warning", "info" *}

{if $notice_type == 'success'}{assign var='alert_type' value=' alert-success'}{elseif $notice_type == 'error'}{assign var='alert_type' value=' alert-danger'}{elseif $notice_type == 'warning'}{assign var='alert_type' value=' alert-warning'}{elseif $notice_type == 'notice'}{assign var='alert_type' value=' alert-info'}{/if}
    <div id="page_notice" class="page_notice alert{$alert_type} alert-block">
    	<button type="button" class="close" data-dismiss="alert">×</button>
    	<strong>{$notice_label}!</strong>   {$notice_text}
    </div>

updated by @ultrajam: 09/09/16 01:35:31PM
  63