View Full Version : 10 per page to 12 per page?
nbramley
31st of May 2005 (Tue), 20:41
I have EE set to display 4 thumbnails per page and noticed that it displays 4 thumbs on the first row, 4 on the second and only 2 on the third row. How do I change the "10 per page" to "12 per page" in the drop down menu and in the list.php display page?
Thanks,
Neil
lost
31st of May 2005 (Tue), 22:46
I think I can help you but first please let me know which page you are using to make this change. ex. Miscellaneous Setting or something similar, or the file name of the page at the end of the URL. It would be *.php I need the * part.
nbramley
1st of June 2005 (Wed), 06:12
I'm not exactly sure where the code would have to be changed... I'm going to guess and say in the /gallery/list.php file???
lost
1st of June 2005 (Wed), 08:35
Ok I misunderstood what you were asking. I thought you were talking about the Index page. If I understand correctly you are talking about the Gallery thumbnail display. Correct?
If that is the case that can be changed by going in to the gallery administrator and clicking on "Misc. Settings" under the settings menu list on the left.
Go down to the second tab called "Photo Browser Settings". The second drop down box in that tab is the "display" default. You can set it to 10, 20, 30, 40, 50, 100, 500, or all.
Any thing beyond that will require code changes and Pekka would need to help you with.
Hope it helps,
Lost
nbramley
1st of June 2005 (Wed), 09:24
Ya, I want the 10, 20, 30, 40, 50, 100, 500, or all to be changed to 12, 24, 36, 48, 60, etc... All numbers should be divisible by 4 so that the list.php page is always 4 thumb across by whatever # down...
thanks anyway...
Taligent
1st of June 2005 (Wed), 10:00
Hi Neil,
Open list.php and search for:
$form_perpage_html
In that section is the code for per-page photo selection:
ee_option_plain ("10",$perpage,ee_translate_A($translated["10_per_page"]));
ee_option_plain ("20",$perpage,ee_translate_A($translated["20_per_page"]));
ee_option_plain ("30",$perpage,ee_translate_A($translated["30_per_page"]));
ee_option_plain ("40",$perpage,ee_translate_A($translated["40_per_page"]));
ee_option_plain ("50",$perpage,ee_translate_A($translated["50_per_page"]));
ee_option_plain ("100",$perpage,ee_translate_A($translated["100_per_page"]));
Just change the numbers to whatever you'd like. You can also add more choices to the list if you'd like.
HTH,
Nikhil
nbramley
1st of June 2005 (Wed), 10:51
I tried changing the 10 per page to 12, but it didn't work... the text "10 per page" in the drop down list has dissappeared as well.
ee_option_plain ("12",$perpage,ee_translate_A($translated["12_per_page"]));
ee_option_plain ("20",$perpage,ee_translate_A($translated["20_per_page"]));
ee_option_plain ("30",$perpage,ee_translate_A($translated["30_per_page"]));
ee_option_plain ("40",$perpage,ee_translate_A($translated["40_per_page"]));
ee_option_plain ("50",$perpage,ee_translate_A($translated["50_per_page"]));
ee_option_plain ("100",$perpage,ee_translate_A($translated["100_per_page"]));
hmmm...
HMetal
1st of June 2005 (Wed), 11:28
I tried changing the 10 per page to 12, but it didn't work... the text "10 per page" in the drop down list has dissappeared as well.
ee_option_plain ("12",$perpage,ee_translate_A($translated["12_per_page"]));
ee_option_plain ("20",$perpage,ee_translate_A($translated["20_per_page"]));
ee_option_plain ("30",$perpage,ee_translate_A($translated["30_per_page"]));
ee_option_plain ("40",$perpage,ee_translate_A($translated["40_per_page"]));
ee_option_plain ("50",$perpage,ee_translate_A($translated["50_per_page"]));
ee_option_plain ("100",$perpage,ee_translate_A($translated["100_per_page"]));
hmmm...
You also need to create/add the text translation for the option. Do this for each global.php file in the language directories.
e.g.
To add the translation for English, edit the file languages/eng/globals.php and insert the following code:
$translated["12_per_page"] = "12 per page";
Again, do this for the other directories (fin, ger, ita) so that if someone uses one of those languages, they'll also see the 12 per page option text.
Taligent
1st of June 2005 (Wed), 11:37
Oops - thanks for fixing my oversight, HMetal...
nbramley
1st of June 2005 (Wed), 12:09
I made the changes and it works... however! When I link to this exhibition, it still only displays 10 thumbs per page. I have to click on "12 per page" to refresh it to 12. I am assuming I still need to change the 10 to 12 somewhere else???
Pekka
1st of June 2005 (Wed), 15:22
I made the changes and it works... however! When I link to this exhibition, it still only displays 10 thumbs per page. I have to click on "12 per page" to refresh it to 12. I am assuming I still need to change the 10 to 12 somewhere else???
That 10 is the default setting which is set either in SCRIPT_settings.php or EDITOR_exhibition.php in code block
<b>and display</b> <select name="perpage" <?php ee_popuphelp("perpage"); ?>>
<option value="10"<?php if ($s_perpage=="10") print " selected"; ?> >10</option>
<option value="20"<?php if ($s_perpage=="20") print " selected"; ?>>20</option>
<option value="30"<?php if ($s_perpage=="30") print " selected"; ?>>30</option>
<option value="40"<?php if ($s_perpage=="40") print " selected"; ?>>40</option>
<option value="50"<?php if ($s_perpage=="50") print " selected"; ?>>50</option>
<option value="100"<?php if ($s_perpage=="100") print " selected"; ?>>100</option>
<option value="500"<?php if ($s_perpage=="500") print " selected"; ?>>500</option>
<option value="999999"<?php if ($s_perpage=="999999") print " selected";
nbramley
1st of June 2005 (Wed), 17:54
I couldn't find a SCRIPT_settings.php file, but found that code and changed it in the EDITOR_exhibition.php file. I'm getting the same problem when I link to the exhibition, it displays 10 thumbs as the default... I have to click on "12 per page" to refresh it. There must be somewhere else I have to change the 10 to a 12...
Pekka
1st of June 2005 (Wed), 19:04
Sorry it's In "EDITOR_settings.php"....
After you've edited it, you will need to save settings in misc settings editor.
nbramley
1st of June 2005 (Wed), 19:30
IT WORKED! THANKS GUYS!
TO RECAP:
You must change the following files:
1) list.php
2) global.php
3) EDITOR_exhibition.php
4) EDITOR_settings.php
5) SAVE "MIsc. Settings" in EE admin panel
nbramley
15th of June 2005 (Wed), 09:31
When you are viewing the photo.php page and click on "Gallery Browser" it defaults to 20 per page... where do I have to change this???
vBulletin® v3.6.12, Copyright ©2000-2012, Jelsoft Enterprises Ltd.