jrPoll embed and jrUpimg_allowed

SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
The only way I can get jrPoll to appear in the tinymce popup embed window is to comment out the jrUpimg_allowed condition.

Tried integrity check, empty caches etc, but unless I comment that out it will not appear.

Looking at jrUpimg quota config, there is no quota setting appearing under the quota tab, although the stub is there in quota.php.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)

updated by @ultrajam: 02/15/15 07:36:49PM
brian
@brian
10 years ago
10,149 posts
SteveX:
The only way I can get jrPoll to appear in the tinymce popup embed window is to comment out the jrUpimg_allowed condition.

Tried integrity check, empty caches etc, but unless I comment that out it will not appear.

Looking at jrUpimg quota config, there is no quota setting appearing under the quota tab, although the stub is there in quota.php.

I will check this out.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
10 years ago
10,149 posts
I just tested here and am not seeing any issues. Make sure you're running 1.0.7 - the Quota Config section is definitely not a stub...


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net

updated by @brian: 01/13/15 11:35:28AM
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I meant the quota config for jrImage, there doesn't seem to be anywhere to set allowed for quota for images - quota_jrUpimg_allowed. I am guessing that is why jrPoll embed tab doesn't appear for me (logged in as admin).


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
10 years ago
10,149 posts
SteveX:
I meant the quota config for jrImage, there doesn't seem to be anywhere to set allowed for quota for images - quota_jrUpimg_allowed. I am guessing that is why jrPoll embed tab doesn't appear for me (logged in as admin).

OK let me make sure I understand what you're reporting: jrUpimg appears to be preventing the jrPoll module from showing up in the Media Embed section of the TinyMCE editor? And it appears to be related to non-existant quota access that is being checked in that module?

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Yes that's it.

function jrPoll_tinymce_popup_listener($_data, $_user, $_conf, $_args, $event)
{ fdebug("jrPoll_tinymce_popup_listener",$_user); if (isset($_user['quota_jrUpimg_allowed']) && $_user['quota_jrUpimg_allowed'] == 'on') {
With this in the jrPoll listener function, $_user is printed to the debug log, but there is no $_user['quota_jrUpimg_allowed'] in the array. And I can find no setting anywhere to change that.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
10 years ago
7,791 posts
Thats an error. It should be jrPoll not jrUpimg. jrUpimg is a module for uploading images directly from the editor. Its unrelated to jrPoll.

We'll get that fixed up. Thanks.
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
Ok, thanks Michael and Brian. :)

I’ve got a few notes on things I’ve noticed looking through code and validation. None of them are important or cause errors (apart from validation) so I’ll post them here rather than creating separate threads (unless you really want separate threads):

———————

In each of the the section templates, if there is no title entered <a id=""></a> is printed in the html which causes a validation error.
This can be fixed with a check:
{if $doc_title_url}<a id="{$doc_title_url}"></a>{/if}

———————

In item_category_index.tpl
{jrCore_lang module="jrDocs" id="53" default="Documentation" assign="lang_documentaton"}
{jrCore_page_title title="`$lang_documentaton` - `$category` - `$profile_name`"}
lang_documentaton looks like a typo, although obviously it works ok.

———————

jrDocs_item_index_order_button
we get alt="" on an a tag, fails validation

———————

And a typo in jrEmbed
The language string in en-US.php is
$lang[1]  = 'Embed this Media';
Whilst the default text in tabs.tpl is
<title>{jrCore_lang module="jrEmbed" id="1" default="Insert Media"}</title>

———————

Also, I’m wondering if jrBlog may be missing a quota.php file - it was there as a stub until jrBlog-release-1.0.10 but hasn’t appeared in the past 3 releases. Maybe other code has changed and a quota.php stub is no longer needed?

———————


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
michael
@michael
10 years ago
7,791 posts
It was a typo. Fixed now in Polls 1.0.8. Its in the marketplace now.

Thanks Steve.
michael
@michael
10 years ago
7,791 posts
SteveX:
Ok, thanks Michael and Brian. :)

I’ve got a few notes on things I’ve noticed looking through code and validation. None of them are important or cause errors (apart from validation) so I’ll post them here rather than creating separate threads (unless you really want separate threads):

———————

In each of the the section templates, if there is no title entered <a id=""></a> is printed in the html which causes a validation error.
This can be fixed with a check:
{if $doc_title_url}<a id="{$doc_title_url}"></a>{/if}

———————

In item_category_index.tpl
{jrCore_lang module="jrDocs" id="53" default="Documentation" assign="lang_documentaton"}
{jrCore_page_title title="`$lang_documentaton` - `$category` - `$profile_name`"}
lang_documentaton looks like a typo, although obviously it works ok.

———————

jrDocs_item_index_order_button
we get alt="" on an a tag, fails validation

———————

And a typo in jrEmbed
The language string in en-US.php is
$lang[1]  = 'Embed this Media';
Whilst the default text in tabs.tpl is
<title>{jrCore_lang module="jrEmbed" id="1" default="Insert Media"}</title>

Separate thread not required, I'll go get these fixed up now. Thanks steve.

SteveX:...Also, I’m wondering if jrBlog may be missing a quota.php file - it was there as a stub until jrBlog-release-1.0.10 but hasn’t appeared in the past 3 releases. Maybe other code has changed and a quota.php stub is no longer needed?...

Yeah if its only the 'active' setting for quotas, you can skip the quota.php file and just use an _init() function.

This is the init function for jrPoll (It has a quota.php file too.) but _init() looks like this:

    // Let the core System know we are adding action, pending, max item and quota Support
    $_options = array(
        'label' => 'Can Create Polls',
        'help'  => 'If checked, users in this quota will be able to create Polls.'
    );
    jrCore_register_module_feature('jrCore', 'quota_support', 'jrPoll', 'on', $_options);

That translates into the config variable $_conf['quota_jrPoll_allowed'] .

Any additional fields needed would go into the quota.php file. Or if you can use the quota.php file to not use that register feature function. Think the reason was to avoid having blank functions in quota.php, but there might have been another reason. Can't remember off the top of my head.
michael
@michael
10 years ago
7,791 posts
SteveX:...In item_category_index.tpl
{jrCore_lang module="jrDocs" id="53" default="Documentation" assign="lang_documentaton"}
{jrCore_page_title title="`$lang_documentaton` - `$category` - `$profile_name`"}
lang_documentaton looks like a typo, although obviously it works ok....

That looks fine to me. Its just a variable name. "Take the language string for jrDocs #53 and assign it to a variable called $lang_documentation.". Right after that $lang_documentation is used. No issue.


SteveX:...
jrDocs_item_index_order_button
we get alt="" on an a tag, fails validation
Where is this? I couldn't find it. Thanks.

The others are fixed.
SteveX
SteveX
@ultrajam
10 years ago
2,584 posts
I discovered the lang_documentaton one after a while of scratching my head and checking my spelling dozens of times - couldn't see why it wasn't working, until I saw that I had to misspell it in order for it to work.

Not sure about jrDocs_item_index_order_button or why it has no alt text, I noticed it in the html output rather than in the code.


--
¯\_(ツ)_/¯ Education, learning resources, TEL, AR/VR/MR, CC licensed content, panoramas, interactive narrative, sectional modules (like jrDocs), lunch at Uni of Bristol. Get in touch if you share my current interests or can suggest better :)
brian
@brian
10 years ago
10,149 posts
SteveX:
Not sure about jrDocs_item_index_order_button or why it has no alt text, I noticed it in the html output rather than in the code.

I know how this works so will check it out.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
brian
@brian
10 years ago
10,149 posts
This actually should not even be an ALT - should be a TITLE, so I will fix it.

Thanks!


--
Brian Johnson
Founder and Lead Developer - Jamroom
https://www.jamroom.net
michael
@michael
10 years ago
7,791 posts
SteveX:
I discovered the lang_documentaton one after a while of scratching my head and checking my spelling dozens of times - couldn't see why it wasn't working, until I saw that I had to misspell it in order for it to work.

Not sure about jrDocs_item_index_order_button or why it has no alt text, I noticed it in the html output rather than in the code.
Ah its a spelling mistake in the variable. I see that now. Didn't before. "documentation" is missing the "i".

Tags