Theme: stripped (see mrp-1.png)
Config see mrp-2.png
MRP works... mrp-3.png
:(
-Roman
Offline
What you show works for me as well. Now go on the page of the photo, not on the page of albums :-) I mean on picture.php
Offline
Ah, ok, now I see it.
Let's see if I understand correctly:
1. main.inc.php is included/required because MRP is active
2. In main.inc.php -> MRP_blockmanager_apply() --> template/menu_random_photo.tpl is included (but this also means that a block must be present, correct?)
3. In main.inc.php -> MRP_end_page_header() --> template/menu_random_photo.js.tpl is NOT included --> so MRP_blockHeight will not be defined.
4. menu_random_photo.tpl includes mrp.js --> this references MRP_blockHeight which does not exist.
Is this correct?
If so, then shouldn't the test in MRP_blockmanager_apply() be the same as in MRP_end_page_header() to achieve "include either both or none"?
-Roman
Offline
Ok, I have put in some protection code at the beginning of mrp.js and created a new release.
For me this works now. Can you confirm? :)
-Roman
Offline
Hello Romanf,
I don't understand this part of mrp.js :
var randomPict = MRP_Opt['pictures'];
if (randomPict.length > 1 && $("#mbRandomPhoto").length > 0)
{
$('#imrp_ill0 a').attr("href", randomPict[0]['link']);
$('#imrp_ill0 img').attr("src", randomPict[0]['thumb']);
var randomPict = MRP_Opt['pictures'];
if (randomPict.length > 1)
{
$('#imrp_ill0 a').attr("href", randomPict[0]['link']);
$('#imrp_ill0 img').attr("src", randomPict[0]['thumb']);
why your assign randomPict two time with same value? And doing the same condition with randomPict.length ?
- Maxime
Offline
Aww. Thanks for pointing this out! Was a copy/paste error due to my total laymans'ness with SVN... <blush>
Thanks
Roman
Offline
Hello romanf,
Thanks you roman !
Their is an other issue in main.inc.php, why are you displaying an error message to all users on the main page, if we have no picture in the gallery ? I think you should display it only if the user is an administrator.
Maxime,
Last edited by maximebrmd (2017-10-05 16:54:44)
Offline
Hi Maxime,
You are right. I'll have to research how to check for that... :-\
-Roman
Offline