4images Forum & Community
Welcome, Guest. Please login or register.
Did you miss your activation email?
December 08, 2016, 01:03:39 AM

Login with username, password and session length
Search:     Advanced search
Togle to toolbar
Translate this page with =>
Translate this page >
* Home Help Search Login Register
 
+  4images Forum & Community
|-+  4images Modifications / Modifikationen
| |-+  Mods & Plugins (Releases & Support) (Moderators: mawenzi, Rembrandt)
| | |-+  [Mod] Make "Images Per Page" a jump menu
0 Members and 1 Guest are viewing this topic. « previous next »
Pages: [1] Print
This topic has not yet been rated!
Author Topic: [Mod] Make "Images Per Page" a jump menu  (Read 20798 times)
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 31

Did u ever stop to think and then forget to start?


View Profile
« on: January 28, 2003, 02:17:37 AM »

This modifies the HTML form that allows the user to set the number of images to display per page.  It makes it behave the same way as the category dropdown list.

When the user selects a category from the category_dropdown_form.html, the choice is made without having to click a "Go" button.  This mod makes the setperpage_dropdown_form.html behave the same way.  The user will not have to click a "Go" button.

Open includes/page_header.php.
1
2
3
4
5
6
7
8
9

//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
// Original 4images code
// $setperpage_dropdown = "\n<select name=\"setperpage\" class=\"setperpageselect\">\n";

// Make this a jumpbox
$setperpage_dropdown = "\n<select name=\"setperpage\" onchange=\"if (this.options[this.selectedIndex].value != 0){ forms['imagesperpage'].submit() }\" class=\"setperpageselect\">\n";
Logged

Jasondavis
Full Member
***
Offline Offline

Posts: 157

Thank You
-Given: 0
-Receive: 0


View Profile
« Reply #1 on: January 28, 2003, 06:38:19 AM »

i tried this and nothing happens, when I click go it still works normal way, but just picking a # nothing happens
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #2 on: January 28, 2003, 07:11:19 AM »

it wont work, untill u either delete whole button from /setperpage_dropdown_form.html template =>
1
<INPUT type="submit" value="{lang_go}" class="button" name="submit" />
or delete
Quote  [Expand]
name="submit"
from that button.  Wink
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
pietg
Jr. Member
**
Offline Offline

Posts: 86

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #3 on: January 28, 2003, 11:30:35 AM »

Is it also possible to make it just a list instead of a jumpbox?

Piet
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #4 on: January 28, 2003, 01:01:13 PM »

by default setperpage_dropdown is just a list.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
pietg
Jr. Member
**
Offline Offline

Posts: 86

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #5 on: January 28, 2003, 01:06:25 PM »

I know it is a list but instead of making it available in the form of a jumpbox, I would like to present the list in the left table.

Piet
Logged
V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #6 on: January 28, 2003, 01:30:26 PM »

I'm not quet understand what do u mean by "jumpbox".
perpage_dropdown form generated from template setperpage_dropdown_form.html
category sellect dropdown generated from template category_dropdown_form.html
so, each one could be called seporately, with tags {setperpage_dropdown_form} and {category_dropdown_form}
so, it's up to u where do u want display them.
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
pietg
Jr. Member
**
Offline Offline

Posts: 86

Thank You
-Given: 0
-Receive: 0


View Profile WWW
« Reply #7 on: January 28, 2003, 03:57:30 PM »

Sorry, but what I ment is that the list is displayed without the triangle-button. So that isn't a dropdown-list(box) but a "fixed" list.

Is this better explained?

Piet
Logged
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 31

Did u ever stop to think and then forget to start?


View Profile
« Reply #8 on: January 28, 2003, 04:30:54 PM »

Quote from: V@no   [Expand]
it wont work, untill u either delete whole button from /setperpage_dropdown_form.html template =>
1
<INPUT type="submit" value="{lang_go}" class="button" name="submit" />
or delete
Quote  [Expand]
name="submit"
from that button.  Wink
Sounds like I left something out.  I was tired when I posted last night.  I'll recheck what I did when I get home after work and post again.
Logged

V@no
If you don't tell me what to do, I won't tell you where you should go :)
Administrator
4images Guru
*****
Offline Offline

Posts: 17849

Thank You
-Given: 47
-Receive: 564

mmm PHP...


View Profile WWW
« Reply #9 on: January 28, 2003, 10:09:56 PM »

I know almost nothing about javascript or html, but I've never seen anywhere something what u asking for, exept when it used 'dropdown menu' javascript.
u can try search for it on www.hotscripts.com
Logged

Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)
bernd
Full Member
***
Offline Offline

Posts: 214

Thank You
-Given: 0
-Receive: 1


View Profile
« Reply #10 on: January 28, 2003, 11:46:04 PM »

OK, the solution is simple: the form has to have a name  Surprised

So, put this into the file 'setperpage_dropdown_form.html' which is to be found within your template folder
1
<form method="post" name="imagesperpage" action="{self}">

also while you are there you can remove as suggested by V@no from this
1
<INPUT type="submit" value="{lang_go}" class="button" name="submit" />
the
1
name="submit"

Then go to the includes/page_header.php and do the changes as posted by Chris. It works for me!

cheers,
Bernd
« Last Edit: March 09, 2005, 03:05:41 AM by Chris » Logged
Chris
4images Moderator
4images Guru
*****
Offline Offline

Posts: 4487

Thank You
-Given: 0
-Receive: 31

Did u ever stop to think and then forget to start?


View Profile
« Reply #11 on: January 29, 2003, 01:12:46 AM »

Thanks for pointing out my omission guys.  Yep, I left out the change I did to the html template.  Here is my set_perpage_dropdown_form.html
1
2
3
4
5
6
7
8
<table border="0" cellspacing="0" cellpadding="0">
  <form method="post" name="imagesperpage" action="{self}">
    <tr>
      <td>{lang_images_per_page}&nbsp;</td>
      <td>{setperpage_dropdown}</td>
    </tr>
  </form>
</table>
Logged

Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.088 seconds with 19 queries.