Forum Activity for @ultrajam

SteveX
@ultrajam
09/26/16 08:24:11AM
2,584 posts

Tinymce upimg Images and validation


Using Jamroom

Images uploaded using the editor need some way of specifying Alt text for each image, or at least using the image name as Alt text.

All images added using tinymce give these using the w3 validator:
Quote: error An “img” element must have an “alt” attribute, except under certain conditions. For details, consult guidance on providing text alternatives for images.

warning The “border” attribute is obsolete. Consider specifying “img { border: 0; }” in CSS instead.

updated by @ultrajam: 12/26/16 10:33:31AM
SteveX
@ultrajam
09/26/16 07:44:26AM
2,584 posts

jrImage with original size, width="original" appears in html


Using Jamroom

It's actually the smarty function output I'm seeing, and the image data isnt available there

Looks like I can deal with this in the template by passing in "width=false height=false" for "original" images:
{if $micro_image_display_size == "original"}
	<a href="{$jamroom_url}/{$murl}/image/micro_image/{$_item_id}/original" data-lightbox="images" title="{$micro_title|jrCore_entity_string}">{jrCore_module_function function="jrImage_display" module="ujMicroSite" type="micro_image" item_id=$_item_id size="original" class=$micro_image_class crop=$micro_image_crop alt=$micro_title width=false height=false}</a>{else}
	<a href="{$jamroom_url}/{$murl}/image/micro_image/{$_item_id}/1280" data-lightbox="images" title="{$micro_title|jrCore_entity_string}">{jrCore_module_function function="jrImage_display" module="ujMicroSite" type="micro_image" item_id=$_item_id size=$micro_image_display_size|default:"xxlarge" class=$micro_image_class crop=$micro_image_crop alt=$micro_title}</a>{/if}
SteveX
@ultrajam
09/26/16 07:02:30AM
2,584 posts

jrImage with original size, width="original" appears in html


Using Jamroom

From jrImage/include.php:
    // See what size we are getting
    if (!isset($_post['_3'])) {
        $_post['_3'] = 'icon';
    }
    $_sz = jrImage_get_allowed_image_widths();
    if (!isset($_sz["{$_post['_3']}"])) {
        if (isset($_post['debug'])) {
            jrCore_notice('CRI', "invalid image size - must be one of: " . implode(',', array_keys($_sz)));
        }
        jrImage_display_default_image($_post, $_conf);
    }
    $_post['width'] = $_sz["{$_post['_3']}"];

For all other image sizes $_sz["{$_post['_3']}"] will be the number, but for original images it will be "original" as that is handled differently in jrImage_get_allowed_image_widths()
SteveX
@ultrajam
09/26/16 06:52:28AM
2,584 posts

jrImage with original size, width="original" appears in html


Using Jamroom

Hi michael.

No, they don't seem to, if I choose xxxlarge I get width="800". It looks like that is coming from jrImage_get_allowed_image_widths()
SteveX
@ultrajam
09/26/16 04:18:02AM
2,584 posts

jrImage with original size, width="original" appears in html


Using Jamroom

Now that we can use "original" as an image size, that can end up as the width of an image, which does not validate:

<img src="http://academicskills.uwe.ac.uk/workbooks/image/micro_image/17957/original/crop=none" width="original" alt="Temporary folder" class="ujdefault iloutline img-responsive center-block">

Quote: error - error Bad value “original” for attribute “width” on element “img”: Expected a digit but saw “o” instead.

updated by @ultrajam: 12/26/16 12:08:05AM
SteveX
@ultrajam
09/26/16 02:39:59AM
2,584 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,584 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,584 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,584 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,584 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
  62