Author |
Message |
kenspa
Hangin' Around
![](modules/Forums/images/avatars/gallery/075.gif)
Joined: Sep 24, 2005
Posts: 48
Location: Spain
|
Posted:
Mon Jun 18, 2018 7:13 am |
|
Hi all,
Not sure whether this forum refers to RN Gallery or not, but the case is I've spent quite a long time trying to make the album edit in RN Gallery to work with no luck.
in album.php, there are two functions related to edit existing albums:
Add new images (Where you can add) and the Current images (where you can delete) in an album. When the call is made to edit the album it only shows the current images and there's no way to trigger the "Add new images" no matter what I did:
I tried to play around the $add variable to make it '1' when it is called on some lines, then successfully the function will retrieve the images of a user with 0 $albid and show the Add new images table but not the current images in that album when switching to Current images anymore!!
Lines I changed in editalbum function:
php Code:
$path = 'modules.php?name=' . $module_name . '&op=' . $op . '&albid=' . $calbid;
if ($add == 1) {
$where = 'WHERE i.`albid` = 0 AND i.`user` = \'' . $db->sql_escape_string($usr) . '\'';
echo '<input type="hidden" name="add" value="' , $add , '" />' , PHP_EOL;
} else {
$where = 'WHERE i.`albid` = \'' . $calbid . '\'';
}
albimglist($where, $path, $add);
|
to:
php Code:
$path = 'modules.php?name=' . $module_name . '&op=' . $op . '&albid=' . $calbid;
if ($op = 'editalbum' && $add == 1) {
$where = 'WHERE i.`albid` = 0 AND i.`user` = \'' . $db->sql_escape_string($usr) . '\'';
echo '<input type="hidden" name="add" value="' , $add , '" />' , PHP_EOL;
albimglist($where, $path, $add=1);
} elseif ($op = 'editalbum' && $add == 0) {
$where = 'WHERE i.`albid` = \'' . $calbid . '\' AND i.`user` = \'' . $db->sql_escape_string($usr) . '\'';
albimglist($where, $path, $add);
}
|
I'm using Raven nuke 2.51, on spanish lang
Any hints are much appreciated
Thanks |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
Site Admin
![](modules/Forums/images/avatars/201442295664a46e4575d46.jpg)
Joined: Aug 22, 2007
Posts: 1775
|
Posted:
Mon Jun 18, 2018 8:30 am |
|
This is my module and I guess we had the discussion about it to long but I will try it again.
1. Go to /admin.php?op=confrngal and check the version, which you are using - type it here, please!
2. Revert your changes because you will destroy the module with this kind of uncontrolled edits.
Edit: I guess I found the issue. It seems this is an relict from a older version.
Open 'modules/Gallery/includes/albums.php' and find:
php Code:echo ' [ <a href="' , $path , '&add=1">' , _RNGAL_ALBUM_ADDNEWIMAGES , '</a> ]' , PHP_EOL;
|
Change it to:
php Code:echo ' [ <a href="modules.php?name=' , $module_name , '&op=add&albid=' , $albid , '">' , _RNGAL_ALBUM_ADDNEWIMAGES , '</a> ]' , PHP_EOL;
|
|
_________________ Only registered users can see links on this board! Get registered or login!
Last edited by neralex on Sat Jun 23, 2018 6:03 am; edited 1 time in total |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kenspa
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 18, 2018 2:26 pm |
|
Hi Neralex and thank you so much for your reply. Yes, we had a talk about this long ago, and I reverted all the changes to the original in the package as you indicated. I wasn't able to deal with this issue then.
Now, I've had enough time to understand the structure of the Gallery, which looks amazing to me (the best I found to work on php nuke), and I'm back to solve this problem.
The version I'm using is 1.3
And changing the link you posted did not solve the issue, but rather it takes me to the add image function with the targeted album already in the input. What I wanted and meant is:
I tried it on your site yesterday and it works as it is intended to do
I uploaded another pic, and went to My Albums/ Edit
modules.php?name=Gallery&op=editalbum&albid=xx
There, on top of the table you can see: [Current] Images [Add new], and by default it opens a table with the current pics in this album with the function of Title-pic and delete. Now if you click on [Add new] it opens another table where you can see the user images which are not asigned to any album and that you can add as many as you want to that specific album ( same table when you create a new album).
I think it's got something to do with:
albimglist($where, $path, $add); AND albimglist($where, $path, $add=1);
On your site it works perfectly till yesterday. I checked it again on your site before posting this, and it seems you've changed your album.php to the link you have posted, because this time it takes me to add image I mentioned above!!
Thanks again for any reply ![Cool](modules/Forums/images/smiles/icon_cool.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 18, 2018 2:54 pm |
|
ahhh, now I got you. It seems we are lost in translation. I changed it back on my media-site. Sorry but this module is very old (2012) and it needs a whole recoding on some points like that. I uploaded my albums.php from my media-site, please try it and let me know, if it works for you.
https://gist.github.com/neralex/a3a7245102bd48e730c57adf2b756355 |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kenspa
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 18, 2018 3:12 pm |
|
Wow!! Now it works like a charm!!!!
I'm not gonna ask you what you changed, I'll try to figure it out
But I do have a little question:
What does:
COUNT(`id`) as gid_count
stand for in the the query in editalbum function??
Thanks a lot |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Mon Jun 18, 2018 3:33 pm |
|
It counts only the ids of the query-loop - it seems its not really needed there but as I state it, I have to go deeper in the code to optimize it. If you should get an SQL error for that, then try to remove it. This file is made for my own website but it seems I missed something to put it in the download-package. I will test it in the next days. I removed it and I updated the GIST-file.
I will create a fixed version for RN252 on php7. There I will fix some issues and after that I will create a new version for RavenCMS.
RN252 is a php7-ready BETA version, based on RN251. If you are able to run an local test server on your local computer, then keep an eye on it but take care - its a BETA.
https://github.com/neralex/RavenNuke
On Windows are existing some tools for local test-servers like xampp, ampp, wamp etc. I'm using WAMP since some years with great results.
http://www.wampserver.com/en/
http://wampserver.aviatechno.net/ |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
kenspa
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 19, 2018 4:59 am |
|
That's great. At the moment I'm not able to move to php7, but I´ll tell you if I had the opportunity to.
Now I will be working on shortlinks that are missing for RN Gallery v 1.3, I can post them here if you want me to.
Cheers ![Smile](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
neralex
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Tue Jun 19, 2018 9:36 am |
|
I don't need more shortlinks for this module because all public links are ready. Shorted links which are only available as user or as admin are not needed. Don't forget for what shortlinks were made. If you want do it for your site ok but its not needed to post it here, because this not the support forum for this module. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|