The Arcive of vBulletin Modifications Site. |
|
|
Alphabetical Search Menu for your vBulletin page
This tutorial will help you make an alphabetical search menu similar to what we see in memberlist.php I had been looking for this for quite some time, opened a thread too but no help. Now, after some little programming homework I find it quite easy. Hope few of you find this useful.
1. First, we create a template for our product titled alphamenu and copy this code into it. HTML Code:
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center"> <tr align="center"> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=A">A</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=B">B</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=C">C</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=D">D</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=E">E</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=F">F</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=G">G</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=H">H</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=I">I</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=J">J</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=K">K</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=L">L</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=M">M</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=N">N</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=O">O</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=P">P</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=Q">Q</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=R">R</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=S">S</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=T">T</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=U">U</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=V">V</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=W">W</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=X">X</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=Y">Y</a></td> <td class="alt2" width="3%"><a href="page.php?do=alphasearch&ltr=Z">Z</a></td> </tr> </table> PHP Code:
PHP Code:
By: http://tech6.com |
|
#2
|
|||
|
|||
|
do not understand that part of -> So, in our usual vbulletin page.php, we will create a sub-called alphasearch and copy the code below for this. Sure, it would require editing to suit your needs, so read the comments.
and where it can help? pa of creating for instance in the cinema section of my forum? |
|
#3
|
||||
|
||||
|
very useful. Thanks
|
|
#4
|
||||
|
||||
|
PHP Code:
$letter is assigned the value from $_GET['ltr'] and then directly used in the DB query without sanitizing it. Is that safe ? |
|
#5
|
||||
|
||||
|
Have edited the code. I think its safe now.
|
|
#6
|
|||
|
|||
|
Caution: This "Tutorial" does NOT describe a WORKING mod and does not work as written. It is COMPLETELY based on a "theoretical" model and is completely worthless as a realtime MOD that just needs to be "tweaked". Not sure what the author was thinking when he called it a tutorial?
|
|
#7
|
||||
|
||||
|
Quote:
Quote:
|
|
#8
|
||||
|
||||
|
thank you!
|
![]() |
|
|