forum.coppermine-gallery.net

Support => cpg1.5.x Support => cpg1.5 miscellaneous => Topic started by: heavensportal on January 07, 2013, 10:38:26 pm

Title: drop down menu listings
Post by: heavensportal on January 07, 2013, 10:38:26 pm
I was wondering if there would be a way to set the "edit file" drop down menu to be like the one when we upload an image.

That one makes it so much easier for the members and admins to find the albums in our large gallery

I have included the images to see the listing...would like edit to show like upload
Title: Re: drop down menu listings
Post by: Αndré on January 08, 2013, 11:31:56 am
I also don't like the discontinuity of the album drop down boxes at different places. I'll try to fix this as soon as possible. Please reply to this post, as I can maintain such things better in my mailbox.
Title: Re: drop down menu listings
Post by: phill104 on January 08, 2013, 02:40:23 pm
I agree, that would be a much nicer layout.
Title: Re: drop down menu listings
Post by: heavensportal on January 08, 2013, 11:38:38 pm
It would be wonderful to have it done so that the drop menus all over concerning the albums were the same...seeing them in the layout chosen vs alphabetical is grand.

Will wait for you and tell the members you are working on it.

Thanks so very much, will you post the "recipe" to edit the files or do another update for the gallery?
Title: Re: drop down menu listings
Post by: Αndré on January 09, 2013, 09:05:00 am
I'll try to add it to cpg1.5.22, but I can also post the code changes (or a link to the SVN repository where you'll see what exactly has been changed).
Title: Re: drop down menu listings
Post by: heavensportal on January 09, 2013, 09:59:24 am
if you posted the file/code to change I could do it here---if not to complicated otherwise yes the link to see what the changes are would be great and then having the update too is wonderful
Title: Re: drop down menu listings
Post by: Αndré on January 09, 2013, 02:01:07 pm
The main code change has been committed in SVN revision 8524. I also fixed some minor related things in SVN revisions 8521 and 8522. Unfortunately I haven't found out how to post direct links to the changes in our new SVN web client.
Title: Re: drop down menu listings
Post by: phill104 on January 09, 2013, 02:28:44 pm
Yes, I've not yet worked that out either. I'll try and spend a bit more time tonight.


http://sourceforge.net/p/coppermine/code/8521/
http://sourceforge.net/p/coppermine/code/8522/
http://sourceforge.net/p/coppermine/code/8524/

Title: Re: drop down menu listings
Post by: heavensportal on January 09, 2013, 10:01:53 pm
wow, what you have done looks very intricate. When will the 1.5.21 update be ready---no rush just curious.

setting the view to side by side I think the one on the left is the original and the one on the right is the edited one, am I safe to assume that the edits if copy pasted into the original will make it so in the gallery, once all edits have been done that is.

Sorry to ask such newbie questions but I am trying to learn...slow at best.
Title: Re: drop down menu listings
Post by: Αndré on January 09, 2013, 10:34:20 pm
am I safe to assume that the edits if copy pasted into the original will make it so in the gallery, once all edits have been done that is.
That's how it is supposed to work.
Title: Re: drop down menu listings
Post by: heavensportal on January 09, 2013, 10:40:42 pm
yay, then when you get done with edits -- if no upgrade yet -- then I can attempt to do the edits to our gallery...lol

atempt being the key word.
Title: Re: drop down menu listings
Post by: Αndré on January 10, 2013, 07:04:29 am
Unless someone finds a bug, those edits are final regarding this issue.
Title: Re: drop down menu listings
Post by: heavensportal on January 10, 2013, 09:38:35 am
ok, thanks for letting me know. I will do the edits in our test gallery over the weekend.

You have a great weekend.
Title: Re: drop down menu listings
Post by: heavensportal on January 11, 2013, 07:05:10 pm
It's me again.....I got an error:

Critical error
There was an error while processing a database query

now I may have not done the right code.

was I supposed to do the entire edits from the 1st link or the last link which had only the first section of edits and none of the rest.
Title: Re: drop down menu listings
Post by: heavensportal on January 11, 2013, 07:05:49 pm
forgot to add that most of the albums work just a few are getting that error.
Title: Re: drop down menu listings
Post by: heavensportal on January 11, 2013, 07:21:29 pm
well after beating myself up I found my error came out of operator malfunction...I forgot to update the database. You would thing after doing the update and edits to 3 galleries I would have remembered that...lol

I did the edits from the 3rd link and also the manual edit for comment notifications to member when they get a comment on their images

Thanks again for this touchup, it looks grand and I am sure the members will like the continuity of the lists.
Title: Re: drop down menu listings
Post by: heavensportal on January 12, 2013, 11:31:20 pm
OK, me again

I have always claimed the gremlins reside in my forum and it may be true!

Problem:

Everything worked grand immediately after the editing (I did the new gallery update too prior to editing) the lists were showing in category style for members and admins.


TODAY:

got many pm's and answer to my thread at my forum of change and the regular members (which are allowed to post in all but 1 album category due to  age restriction and must be manually added)

was informed that sometime later the entire list disappeared totally for them -- leaving only the choice for uploads as their own personal gallery only.

I ran update database numerously and still the listing did not show all albums at all (I have a non admin account to use for checking), admins (with and without showing admin controls) still saw all but not members


I then redid the functions, original file to revert. Got normalcy but then did this to the edits:

from your first link:

original has:

Code: [Select]
$result = cpg_db_query("SELECT c.cid, c.rgt, c.name FROM {$CONFIG['TABLE_ALBUMS']} AS a RIGHT JOIN {$CONFIG['TABLE_CATEGORIES']} AS c ON a.category = c.cid WHERE c.cid = " . USER_GAL_CAT . " OR a.owner = ". USER_ID . " ORDER BY lft");

your edit:
       
Code: [Select]
        $result = cpg_db_query("SELECT DISTINCT c.cid, c.rgt, c.name FROM {$CONFIG['TABLE_ALBUMS']} AS a RIGHT JOIN {$CONFIG['TABLE_CATEGORIES']} AS c ON a.category = c.cid WHERE c.cid = " . USER_GAL_CAT . " OR a.owner = ". USER_ID . " ORDER BY lft");


original is lacking the word "DISTINCT"

I reverted it to original then left the other two edits in the file.

so far one of the members has reported that she sees the listings in categorized order (like upload area) so am tentatively awaiting to see what they say.

will keep you informed of the progress but hope that will work now.
Title: Re: drop down menu listings
Post by: Αndré on January 13, 2013, 08:19:07 pm
Can you please post a test user account so we can have a look at your gallery, how it's structured and so on? I added the DISTINCT because I got some category dupes (causing album dupes) in the list. Maybe I haven't looked close enough at the entire code, but as we just select category values in that query, I supposed that we don't need category row dupes. At least it fixed an issue I had in my testbed.
Title: Re: drop down menu listings
Post by: heavensportal on January 14, 2013, 02:27:25 am
regular member or admin...should I pm you the information?
Title: Re: drop down menu listings
Post by: heavensportal on January 16, 2013, 06:37:11 am
I have waited to see if you wish to be pm'd the test account information but went to your profile and see no way to do so, sorry.

In order to view the forum -- it is accessible to all to view but nothing else: http://thefantasiesattic.net/attic/cpg/index.php

Please let me know if that is what you wanted.

I have been having members (the more eyes the better) watch out for dupes anywhere...whether it be albums or images and so far nobody has seen any.
Title: Re: drop down menu listings
Post by: Αndré on January 16, 2013, 04:13:00 pm
Please post the login data of a regular member as a reply to this thread. Your gallery currently runs without the DISTINCT from the cpg1.5.22 code, right?
Title: Re: drop down menu listings
Post by: phill104 on January 16, 2013, 04:27:05 pm
Just another question to add, did you update to 1.5.22 or did you just apply the changes above?
Title: Re: drop down menu listings
Post by: heavensportal on January 16, 2013, 06:36:34 pm
user: cpgtester
pw: testing

very simple cause will delete once done.

yes I did the edits AFTER updating to 1.5.22

It seems to be running fine without the DISTINCT in the code

Am I right that even though our gallery is member only for everything, members nor admin can post a link at all in the comment section.
Title: Re: drop down menu listings
Post by: heavensportal on January 16, 2013, 07:05:00 pm
I also forgot to mention that this section you wrote for 1.6x file is not present in  1.5.22. I think I was supposed to remove it but since not there I did not have to.

Code: [Select]
               // construct a category hierarchy string breadcrumb style
   $elements = array();
foreach ($cats as $cat) {
           $elements[] = $cat['name'];
        }
        $hierarchy = implode(' - ', $elements);

Title: Re: drop down menu listings
Post by: Αndré on January 17, 2013, 12:57:02 pm
members nor admin can post a link at all in the comment section
http://forum.coppermine-gallery.net/index.php/topic,55415.msg270618.html#msg270618


this section you wrote for 1.6x file is not present in  1.5.22.
Code: [Select]
               // construct a category hierarchy string breadcrumb style
   $elements = array();
foreach ($cats as $cat) {
           $elements[] = $cat['name'];
        }
        $hierarchy = implode(' - ', $elements);
This section has been removed both in cpg1.5.x and cpg1.6.x in SVN revision 8521 (http://sourceforge.net/p/coppermine/code/8521/).
Title: Re: drop down menu listings
Post by: Αndré on January 17, 2013, 01:41:33 pm
It seems to be running fine without the DISTINCT in the code
I currently don't see a reason why it shouldn't work with the stock cpg1.5.22 code. Please undo your modification (i.e. restore the DISTINCT and try again). Maybe there's also something wrong with your category tree. To fix any possible issue, please go to the category manager and rebuild the tree be moving any category one position up or down (of course you can move it to its old location subsequently).
Title: Re: drop down menu listings
Post by: heavensportal on January 17, 2013, 11:20:29 pm
 :o

Well are you ready?

I deleted the functions.inc.php file from the server, went to the gallery and sure enough it said it needed it. Then I uploaded a totally fresh one from the zip update, went to the gallery and it is functioning again.

Now the weird thing ... going to the menus in the gallery --- edit file information and uploads --- and they are in categorized order.

No edits to the file for this --- the only edit I just now did was insert the code change to make favorites show last added image first.


Again this is with 1.5.22 fresh file no listing order code in at all...

Were these codes edited in the 1.5.22 file already, without my needing to do it?
Title: Re: drop down menu listings
Post by: phill104 on January 17, 2013, 11:33:20 pm
Yes, that was mentioned earlier on in this thread and also in the 1.5.22 announcement.
Title: Re: drop down menu listings
Post by: heavensportal on January 17, 2013, 11:51:45 pm
good lord, sorry guys for wasting your time. I -- at the time I asked did not have this version and just proceeded to do the edits after updating.

Thanks so very very much for your patience with this old woman.
Title: Re: drop down menu listings
Post by: Αndré on January 18, 2013, 12:25:51 pm
So if this thread is solved, please
tag your answer as "solved" by clicking on the "Topic Solved" button on the bar at the left hand side at the bottom of your thread.
Title: Re: drop down menu listings
Post by: heavensportal on January 18, 2013, 11:27:30 pm
was testing since my server is crazy and when one behaves/installs perfectly the others do not and they are like twins...all alike.

yes it is solved and we are so very happy.
Title: Re: drop down menu listings
Post by: Αndré on January 21, 2013, 11:18:17 am
For your information: there seems to be an issue with the new drop-down boxes if you allow guests upload to upload to public albums. More information and discussion here (http://forum.coppermine-gallery.net/index.php/topic,75905.0.html).
Title: Re: drop down menu listings
Post by: heavensportal on January 21, 2013, 11:03:38 pm
I am marking it solved unless it affects galleries that only members can upload to. Although guests can view the gallery they can not do anything else, just look. Thanks for telling me.