vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   What is this mod/code change? (https://vborg.vbsupport.ru/showthread.php?t=245043)

93Corvette 06-22-2010 04:25 AM

What is this mod/code change?
 
I want to change my "New Post" button on my navbar to say "Display post for previous:"

This would have a pull down that would allow you to select:
All Posts
1 Day
7 Days
2 Weeks
1 Month
3 Months
6 Months
1 Year

Here is a picture of what I want, however this one is on a phpbb website (not vbulletin).

https://vborg.vbsupport.ru/external/2010/06/19.png

Boofo 06-22-2010 04:48 AM

I just did this for my site and took it down. After getting 135 queries to do a search for all of my own posts, I decided it wasn't worth it.

93Corvette 06-23-2010 11:51 PM

Quote:

Originally Posted by Boofo (Post 2057278)
I just did this for my site and took it down. After getting 135 queries to do a search for all of my own posts, I decided it wasn't worth it.

Thanks for the info.... Maybe that's why I can never find anything about this mod....

Boofo 06-23-2010 11:55 PM

It's easy to do but if you get very many people using it, it will load up the server terribly.

93Corvette 06-25-2010 01:48 AM

Quote:

Originally Posted by Boofo (Post 2058526)
It's easy to do but if you get very many people using it, it will load up the server terribly.

Can you post the code you used? For some reason I can't find any info on making a pull-down....

Boofo 06-25-2010 02:02 AM

Well, I would if I still had it. I got rid of it after I uninstalled it, sorry. But I can give you the outline code for it if that will help.

Make a template called: user_links

and add this but with your links added:

Code:

<li class="popupmenu">
        <a href="javascript://" class="popupctrl">Your drop down menu name</a>
        <ul class="popupbody popuphover">
                <li>some link here</a></li>
                <li>some link here</a></li>
                <li>some link here</a></li>
                <li>some link here</a></li>
        </ul>
</li>


Then add a plugin to the parse_templates hook with the following code:

Code:

$newTemplate = vB_Template::create('user_links'); 
$template_hook[navbar_after_faq] .= $newTemplate->render();


And another plugin to the cache_templates hook with the following code:

Code:

$cache[] = 'user_links';


All times are GMT. The time now is 02:46 AM.

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.02840 seconds
  • Memory Usage 1,724KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (6)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete