vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   [you] vbcode (https://vborg.vbsupport.ru/showthread.php?t=49458)

ryancooper 04-23-2003 06:08 PM

Man o Man i didn;t know such a little hack could cause so much trouble. In one day my site is in a uproar for this. I had to remove it LOL

Awesome hack though.

SmEdD 05-24-2003 03:38 AM

Why can't someone make a complete files a txt file and upload it. Instead of reading 5 pages on codes.

MGM 07-04-2003 02:46 AM

Hey Boofo, I think dnd means that in a thread, at the top, it doesn't display the username but instead [you], look at the picture below to see what I mean. Ignore the big title part of it

MGM out

Boofo 07-04-2003 07:00 PM

Quote:

Yesterday at 10:46 PM MetalGearMaster said this in Post #63
Hey Boofo, I think dnd means that in a thread, at the top, it doesn't display the username but instead [you], look at the picture below to see what I mean. Ignore the big title part of it

MGM out

You have to add it to the navbar and the thread title in the showthread.php. Try the following and let me know if that takes care of it. ;)

Code:

For the forum navbar replacement:

Still in functions.php, find:
-------------------

function makenav($id,$idtype="forum",$highlightlast=1) {
  global $DB_site,$nav_url,$nav_title,$session,$threadcache;


-------------------
REPLACE it with:
--------------------

function makenav($id,$idtype="forum",$highlightlast=1) {
  global $DB_site,$nav_url,$nav_title,$session,$threadcache,$bbuserinfo;

-------------------
Find:
-------------------

      $nav_url="forumdisplay.php?s=$session[sessionhash]&forumid=$id";
      $nav_title=$foruminfo[title];

-------------------
AFTER it add:
--------------------

        if ($bbuserinfo['userid']>0) {
                $nav_title = trim(preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $nav_title));
        } else {
                $nav_title = trim(preg_replace("/(\[)(you)(])/siU", "you", $nav_title));
        }

-------------------
For the forumjump replacement:

Still in functions.php, find:
-------------------

      if (!$hideprivateforums) {
        $forumperms['canview']=1;
      }

--------------------
ABOVE it add:
--------------------

        if ($bbuserinfo[userid]>0) {
                $forum[title] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $forum[title]);
        } else {
                $forum[title] = preg_replace("/(\[)(you)(])/siU", "you", $forum[title]);
        }

--------------------
In showthread.php (for <title>):

Find:
--------------------

eval("dooutput(\"".gettemplate("showthread")."\");");

--------------------
ABOVE it add:
--------------------

        if ($bbuserinfo[userid]>0) {
                $thread[title] = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $thread[title]);
        } else {
                $thread[title] = preg_replace("/(\[)(you)(])/siU", "you", $thread[title]);
        }


MGM 07-04-2003 08:56 PM

Well, you got the big title part fixed, but not the actual navigation..... see picture

MGM out

Boofo 07-04-2003 10:13 PM

It's in the navbar section of the functions.php somewhere. the code I gave you should work for that.

lasto 08-29-2003 05:29 PM

for such a small hack its certainly turned into a monster

does they put any server load on the site or additional queries as theres a lot of files to edit so want to know before i do.

cheers

Dataforce 09-01-2003 09:54 PM

is it possible to limit this to only admins?

the Lamers on the baord have started using it to scare the n00bs

xug 10-12-2003 11:59 PM

Quote:

Originally Posted by Boofo
It's in the navbar section of the functions.php somewhere. the code I gave you should work for that.

I still have this problem with the navbar and would like to see a fix, any help is highly appreciated.

zsmom 10-25-2003 10:14 PM

Haha! Love it!

Thanks!


All times are GMT. The time now is 08:17 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.01483 seconds
  • Memory Usage 1,740KB
  • 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
  • (1)bbcode_code_printable
  • (2)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