vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Forum Display Enhancements - Thread Listing by Letter with ABC Navigation Menu (https://vborg.vbsupport.ru/showthread.php?t=211943)

Chadi 04-23-2009 01:05 PM

Quote:

Originally Posted by Darat (Post 1797367)
Just been trying this on a forum in which we have it set to display all the threads back to the beginning but your Mod only seems to be pulling up threads for the last 30 days?

That has nothing to do with the mod, but your forum settings.

If you look at my live demo, it shows literally all threads per letter.

HS2005 04-23-2009 04:22 PM

Awesome modification, lucky i found this one by a very helpfull friend.
I installed it and nominated it!!!!

This hack could use some small improvements meaning:
- An option to show stickies in letter or not.

And i was wondering if you could merge more forumid's.
Example: i have 2 forumid's with posts but i want to show them both by letter. When you click the letter A form example you will see the threads from forumid1 + forumid2.
Can this be done by HTML?
Greetings:)

Chadi 04-23-2009 04:38 PM

Quote:

Originally Posted by HS2005 (Post 1797575)
Awesome modification, lucky i found this one by a very helpfull friend.
I installed it and nominated it!!!!

This hack could use some small improvements meaning:
- An option to show stickies in letter or not.

And i was wondering if you could merge more forumid's.
Example: i have 2 forumid's with posts but i want to show them both by letter. When you click the letter A form example you will see the threads from forumid1 + forumid2.
Can this be done by HTML?
Greetings:)

I'm not a programmer, don't know how this can be done sorry. I simply shared what someone helped me with. Maybe someone else knows, share it here and I'll update the mod post.

HS2005 04-23-2009 04:45 PM

Quote:

Originally Posted by Chadi (Post 1797316)
I don't know how, but if someone else does please share and I'll update it.

forumdisplay.php?f=137&letter=0
forumdisplay.php?f=137&letter=1
forumdisplay.php?f=137&letter=[

and so on :)
Forumid marked in red, must be your forumid!!!
Just add another table from 0 till 9 in html and your fine :)

Chadi 04-23-2009 04:52 PM

Quote:

Originally Posted by HS2005 (Post 1797589)
forumdisplay.php?f=137&letter=0
forumdisplay.php?f=137&letter=1
forumdisplay.php?f=137&letter=[

and so on :)
Forumid marked in red, must be your forumid!!!
Just add another table from 0 till 9 in html and your fine :)

Thanks. Actually I was thinking of one link that shows all numbers such as "0-9". Do you know how this can be done?

HS2005 04-23-2009 05:02 PM

One link with a dropdown menu? Something like that.
Just click on # and a dropdown menu comes with 0 till 9 :)
Do you mean that?

MrKramer 04-23-2009 05:08 PM

works great thank you

Chadi 04-23-2009 05:21 PM

Quote:

Originally Posted by HS2005 (Post 1797608)
One link with a dropdown menu? Something like that.
Just click on # and a dropdown menu comes with 0 till 9 :)
Do you mean that?

Basically, the same way each letter has its own column in the table - I'd like to add a "0-9" column before letter A in the same table. What would the link look like in that case? It should show all threads that begin with a number, any number.

lolo? 04-23-2009 05:57 PM

Quote:

Originally Posted by Chadi (Post 1797621)
Basically, the same way each letter has its own column in the table - I'd like to add a "0-9" column before letter A in the same table. What would the link look like in that case? It should show all threads that begin with a number, any number.

i think ist great all number in the same column

inciarco 04-23-2009 07:58 PM

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

Code:

}
at the End.


Step 4.

ENJOY !!! :D


My Best Regards.

:)


All times are GMT. The time now is 03:43 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01432 seconds
  • Memory Usage 1,798KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (7)bbcode_code_printable
  • (7)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete