Thank You For Sharing This Very Useful Plugin.
You don't need to have Installed Nor Active the Product you Mentione, nor to Limit the Code Per Forum, but is Possible to Include a Code on the FORUMDISPLAY Template as Follows for all Forums, and even to add an Additional If to limit the Forum IDs where to Include the Code.
In this Code I've Used the Code "?f=$foruminfo[forumid]" to Specify the Number of the Forum, as vBulletin does on the FORUMDISPLAY Template, so that Way you Don't Need to Change that Number Per Desired Forum.
I've Added the "ALL" Option as well as the "W" Letter (you have repeated the "Y"), the "?" (for Boards in Spanish), and the Numbers "0" to "9" at the Right of the List, and I've also Set colspan="38" on the First Row of the Table for all the Added Columns.
I've also Added Usergroup Permissions, for Groups 2,5,6,7 but you can also Add other usergroups separating them by comma where the "2,5,6,7" is. Remember to Change them on the Template Code as well as on the Plugin Code (if you Use the Plugin Usergroup Conditional).
I've also Added the Conditional "$show['threadslist']" to Display the Navigation Menu Only on the Forums that have Thread Listed in them (There's No Sense in Including it on Categories where You Can't Post Threads, but you can remove the " and $show['threadslist']" if you wish).
I've Unified the Alt1 and Alt2 Classes, to Use in both cases the Code style=“padding:5px;text-align:center” because in some cases it has been using width="3%" for the Alt2; (I think it look better that way but Anyone can Choose the Other Option if Desired just Setting the Following Code for the Alt2 Cells.
Code:
<td class="alt2" width="3%">
Note: There's an Error on Your Code for NON-vBSEO Users, You're Using "
/forumdisplay.php" and it should be "
?forumdisplay.php" with an "
?" and not the "
/".
Step 1.
Install the Product (Only this Product, first 3 Steps on Specified Process).
Quote:
1. Go to admincp > manage products
2. Click "[Add/Import Product]"
3. Upload plug-in attached.
|
Step 2.
On
FORUMDISPLAY Template:
Below
Code:
<!-- / sub-forum list -->
</if>
and
Above (is the same location than the one previously specified as
Below, to Add the Code in Only One Location of the Template)
Code:
<if condition="$show['threadslist']">
<!-- threads list -->
(If you Wish Another Location then Use the Location you Wish on that Template).
Add
(Change the "yourdomain.com" for the URL of your Forum).
Code:
<!-- Begin Letter ABC Navigation -->
<if condition="in_array($bbuserinfo[usergroupid], array(2,5,6,7)) and $show['threadslist']">
<table class="tborder" cellpadding="6" cellspacing="1" border="0" width="100%" align="center">
<td colspan="38" height="16" class="thead">
<strong>Search topics by first letter</strong><tr align="center">
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]">All</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=a">A</a></td>
<td class="alt1" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=b">B</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=c">C</a></td>
<td class="alt1" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=d">D</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=e">E</a></td>
<td class="alt1" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=f">F</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=g">G</a></td>
<td class="alt1" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=h">H</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=i">I</a></td>
<td class="alt1" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=j">J</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=k">K</a></td>
<td class="alt1" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=l">L</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=m">M</a></td>
<td class="alt1" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=n">N</a></td>
<td class="alt2" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=?">?</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=o">O</a></td>
<td class="alt2" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=p">P</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=q">Q</a></td>
<td class="alt2" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=r">R</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=s">S</a></td>
<td class="alt2" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=t">T</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=u">U</a></td>
<td class="alt2" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=v">V</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=w">W</a></td>
<td class="alt2" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=x">X</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=y">Y</a></td>
<td class="alt2" style="padding:5px;text-align:center">
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=Z">Z</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=0">0</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=1">1</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=2">2</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=3">3</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=4">4</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=5">5</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=6">6</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=7">7</a></td>
<td class="alt1" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=8">8</a></td>
<td class="alt2" style=“padding:5px;text-align:center”>
<a rel="nofollow" href="http://yourdomain.com/forumdisplay.php?f=$foruminfo[forumid]&letter=9">9</a></td>
</tr>
</table>
<br />
</if>
<!-- End Letter ABC Navigation -->
Step 3. If You Wish to Set Permissions on the Plugin.
On Admin Control Panel - Plugins and Products - Edit Plugins
Edit
Plugin "
Add Where Letter"
Replace with
Code:
if (is_member_of($vbulletin->userinfo, explode(',','2,5,6,7')))
{
if(isset($_GET['letter'])){
$vbulletin->input->clean_GPC('r', 'letter', TYPE_STR);
$letter = $db->escape_string($vbulletin->GPC['letter']);
$hook_query_where .= " AND LEFT(thread.title, 1) = '$letter'";
}
}
This Simply Adds
Code:
if (is_member_of($vbulletin->userinfo, explode(',','2,5,6,7')))
{
at the Beginning
and
at the End.
Step 4.
ENJOY !!! :D
My Best Regards.
:)