4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Chris 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.
//-----------------------------------------------------
//--- 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";
-
i tried this and nothing happens, when I click go it still works normal way, but just picking a # nothing happens
-
it wont work, untill u either delete whole button from /setperpage_dropdown_form.html template =>
<INPUT type="submit" value="{lang_go}" class="button" name="submit" />
or delete name="submit"
from that button. :wink:
-
Is it also possible to make it just a list instead of a jumpbox?
Piet
-
by default setperpage_dropdown is just a list.
-
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
-
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.
-
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
-
it wont work, untill u either delete whole button from /setperpage_dropdown_form.html template =><INPUT type="submit" value="{lang_go}" class="button" name="submit" />
or delete 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.
-
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
-
OK, the solution is simple: the form has to have a name :o
So, put this into the file 'setperpage_dropdown_form.html' which is to be found within your template folder
<form method="post" name="imagesperpage" action="{self}">
also while you are there you can remove as suggested by V@no from this <INPUT type="submit" value="{lang_go}" class="button" name="submit" />
the name="submit"
Then go to the includes/page_header.php and do the changes as posted by Chris. It works for me!
cheers,
Bernd
-
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
<table border="0" cellspacing="0" cellpadding="0">
<form method="post" name="imagesperpage" action="{self}">
<tr>
<td>{lang_images_per_page} </td>
<td>{setperpage_dropdown}</td>
</tr>
</form>
</table>