Hi Everyone,
I would like to submit a few changes to the extension "Menu Random Picture". But the project has been inactive since 2014 and I can't contact the owner.
How can I submit patches/fixes in such a case?
Thanks
Roman
Offline
Hello
We can set you as a co-author of the plug-in thus allowing you to publish new releases
I notify my colleagues
Offline
First I notify JanisV, then if we don't any answer soon you will be promoted. Don't hesitate to Up this thread next week or in two weeks.
Offline
Hi!
You are absolutely free for submit any changes
Offline
JanisV wrote:
Hi!
You are absolutely free for submit any changes
Hi
Nice to see you again. So we set him as a co-author or you want to receive the changes and then publish yourself?
@romanf you need ten post or maybe 11 to be able to contact forum members from their profile
Offline
OK... so'll work on post more... ;)
-Roman
Offline
JanisV wrote:
Hi!
You are absolutely free for submit any changes
How do I best sumit the changes?
-Roman
Offline
Hi :-)
@romanf I add you as co-author
Offline
Thanks. But I'm waiting for JanisV to answer first. As he seems to be still active, I don't want to publish anyhting without his checking and confirmation. :)
-Roman
Offline
Ok, as I don't receive an answer from JanisV yet, here is a diff of what I changed:
-------------------
diff -r MenuRandomPhoto_orig/admin.php MenuRandomPhoto/admin.php
22c22
< $conf['MRP']['delay'] = $_POST['delay'];
---
> $conf['MRP']['delay'] = $_POST['delay']*1000;
diff -r MenuRandomPhoto_orig/main.inc.php MenuRandomPhoto/main.inc.php
4c4
< Version: 2.7.b
---
> Version: 2.7.c
7a8
> Fixes: romanf
240,241d240
<
< ?>
\ No newline at end of file
Only in MenuRandomPhoto: mrp.js
diff -r MenuRandomPhoto_orig/template/admin.tpl MenuRandomPhoto/template/admin.tpl
38c38
< <input type="number" size="2" maxlength="3" name="delay" id="delay" value="{$MRP.delay}" min="0" max="10000" style="width: 60px;"> {'milliseconds'|translate}
---
> <input type="number" size="2" maxlength="4" name="delay" id="delay" value="{$MRP.delay/1000}" min="1" style="width: 60px;"> {'seconds'|translate}
diff -r MenuRandomPhoto_orig/template/menu_random_photo.js.tpl MenuRandomPhoto/template/menu_random_photo.js.tpl
16,59c16,17
<
< $(function() {
< $('#imrp_ill0').width({$data.blockHeight});
< $('#imrp_ill0').height({$data.blockHeight});
<
< 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']);
<
< var nextFaderPos = 1;
< var duration = 400;
< var pause = false;
<
< $('#imrp_ill0 img').after('<img id="irmbRPicImg">');
< $('#imrp_ill0 img').eq(1).hide();
< $('#imrp_ill0 img')[1].src = randomPict[1]['thumb'];
< $('#imrp_ill0 img').css('position', 'absolute');
<
< $('#imrp_ill0').hover(function() {
< pause = true;
< },function() {
< pause = false;
< });
<
< function doRotate() {
< if ($('#imrp_ill0 img')[1].complete) {
< if(!pause) {
< $('#imrp_ill0 img').first().fadeOut(duration, function() {
< nextFaderPos = (nextFaderPos + 1) % randomPict.length;
< $('#imrp_ill0 img')[1].src = randomPict[nextFaderPos]['thumb'];
< });
< $('#imrp_ill0 img').first().insertAfter($('#imrp_ill0 img').eq(1)); // swap
< $('#imrp_ill0 img').first().fadeIn(duration);
< setTimeout(function() {
< $('#imrp_ill0 a').attr("href", randomPict[nextFaderPos]['link']);
< }, duration/3);
< }
< }
< }
<
< var rotate = setInterval(doRotate, {$data.delay});
< }
< });
---
> var MRP_blockHeight={$data.blockHeight};
> var MRP_delay={$data.delay};
diff -r MenuRandomPhoto_orig/template/menu_random_photo.tpl MenuRandomPhoto/template/menu_random_photo.tpl
1a2
> {combine_script id="MRPscript" require="jquery" path="plugins/MenuRandomPhoto/mrp.js"}
----------------
Main idea is to split the menu_random_photo.js.tpl into a template part which will be expanded by smarty and a fix javascript part (mrp.js) which will be combined and has jQuery as a prerequisite.
The rest is just minor edits (like delay in seconds instead of milliseconds and removal of max delay).
-Roman
Offline
Whats the content from mrp.js?
I remove $(function() { ... } in menu_random_photo.js.tpl completely?! An add
var MRP_blockHeight={$data.blockHeight};
var MRP_delay={$data.delay};
?
The deleteted part into mrp.js?
=> Don't work for me ...
Idea when your fix becomes official? :)
Last edited by WuppiGER (2017-03-28 14:13:17)
Offline
I am still waiting for an answer from Original Author... :(
I can send you the fixed files if you send me your email.
-Roman
Offline
ddtddt wrote:
Hi :-)
@romanf I add you as co-author
Thanks. Is there any way for me to see how the previous versions were uploaded (as ZIP, using the SVN, ...)?
I was able to check-out the current version via SVN but could not commit changes. Do I need another account for the SVN than for the forum?
Thanks
Roman
Offline
romanf wrote:
ddtddt wrote:
Hi :-)
@romanf I add you as co-authorThanks. Is there any way for me to see how the previous versions were uploaded (as ZIP, using the SVN, ...)?
I was able to check-out the current version via SVN but could not commit changes. Do I need another account for the SVN than for the forum?
Thanks
Roman
I Thinks by SVN
http://piwigo.org/dev/browser/extension … andomPhoto
If you want, I can give you permission on SVN for MenuRandomPhoto
Offline