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)

Kars10 03-05-2003 08:32 PM

Quote:

that way mods and admins will see the name in bold and mousing over gives you notice that it's the [you] code
Thats cool!!
Thank you very much!! :)

Boofo 03-05-2003 09:31 PM

Quote:

Originally posted by Mutt
just add those line right after

$bbcode = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $bbcode);

thats it



Thank you. ;)

Quote:

now for you it might be a ton more because you added it to subjects as well.
You created a Monster with this hack. LOL

Boofo 03-05-2003 10:38 PM

Ran into a snag with the replacements that allows for the admins and mods to mouseover the code. Now, if you put [you] between another vbcode (like in the spoiler vbcode hack, it parses the code but makes it go outside the button. Like this code:

[DISABLE][SPOILER=Change this to whatever you like]And it still works. What do you think, [you]? Do you like it?[/SPOILER][/DISABLE]

This part:

Boofo? Do you like it?')">

is outside the spoiler tag now. It parsed the [you] ok (the Boofo part) but throws that and everything after it outside the spoiler tag button. Here is the code I am using in the functions.php:

PHP Code:

    if (in_array($bbuserinfo[usergroupid], array(567))) {
       
$bbcode preg_replace("/(\[)(you)(])/siU""<b><i><a title=\"[you] vbcode\">".$bbuserinfo[username]."</a></i></b>"$bbcode);
    } else if (
$bbuserinfo[userid]>0) {
       
$bbcode preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $bbcode);
    } else {
       
$bbcode preg_replace("/(\[)(you)(])/siU""you"$bbcode);
    } 

Any ideas how to fix that? I like the mouseover and would like to keep it. ;)

dnd 03-05-2003 11:07 PM

Hi

great hack but regarding the addon of the titles the [you] code if only working for the post titles

whin i create a new thread with the title [you] it doesn't show the user name

ex: vb > sports > [you]


any help?

Quote:

Originally posted by Boofo
Ok, here they are. The edits for the thread titles and the post titles. If I forgot to post any other needed areas here, let me know. I also have code needed if you have Logician's Download thread hack, PPN's vb Last title hack and the threadintro hack (by nicksaunders) if anyone needs those fixes.

In functions.php, find:

PHP Code:

    // do posts from ignored users
    
if (($ignore[$post[userid]] and $post[userid] != 0)) {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    }
    return 
$retval;


Add this code ABOVE it:

PHP Code:

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

In forumdisplay.php, find:

PHP Code:

eval("\$forumdisplaybits .= \"".gettemplate('forumdisplaybit')."\";"); 

ABOVE it add:

PHP Code:

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

In search.php, find:

PHP Code:

      if ($searchresult[attach]>0) {
        
$paperclip="<img src=\"https://vborg.vbsupport.ru/images/paperclip.gif\" alt=\"$searchresult[attach] Attachment(s)\" border=\"0\">";
      } else {
        unset(
$paperclip);
      } 

BELOW it add:

PHP Code:

    if ($bbuserinfo[userid]>0) {
    
$searchresult[pagetext] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $searchresult[pagetext]);
        
$searchresult[posttitle] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $searchresult[posttitle]);
        
$searchresult[threadtitle] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $searchresult[threadtitle]);
    } else {
    
$searchresult[pagetext] = preg_replace("/(\[)(you)(])/siU""you"$searchresult[pagetext]);
        
$searchresult[posttitle] = preg_replace("/(\[)(you)(])/siU""you"$searchresult[posttitle]);
        
$searchresult[threadtitle] = preg_replace("/(\[)(you)(])/siU""you"$searchresult[threadtitle]);
    } 

For the Profile page:

In member.php, find:

PHP Code:

      $getperms=getpermissions($getlastpost[forumid]);
      if (
$getperms[canview]) {
        
$lastposttitle=$getlastpost[title]; 

BELOW it add:

PHP Code:

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



Boofo 03-05-2003 11:15 PM

This is only a small listing of the changes to make to catch all of the places it can pop up. I am still finding them one by one. Are you referring to the navbar?

Here are the ones for the forumdisplay:

--------------------
In forumdisplay.php, find:
--------------------

eval("\$forumdisplaybits .= \"".gettemplate('forumdisplaybit')."\";");

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

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

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

eval("\$forumbits .= \"".gettemplate("forumdisplay_forumbit_level$depth $tempext")."\";");

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

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

--------------------
Still in forumdisplay.php (for the <title>), find:
--------------------

eval("dooutput(\"".gettemplate('forumdisplay')."\" );");

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

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

dnd 03-06-2003 01:27 AM

hi boofo

i mean the navbar which shows above the posts in showthrad.php

DaveRobbo 03-06-2003 08:53 PM

Sheeeeeesh ... this thread is getting hard to read ... are all these extras from page 2 onwards being added back into the original hack txt file? Or do I have to install the hack and then trawl through a kazillion pages of extras?

Davie

Boofo 03-06-2003 09:09 PM

Quote:

Originally posted by dnd
hi boofo

i mean the navbar which shows above the posts in showthrad.php

Here you go. ;)

Quote:

For the forum navbar replacement:

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));
}

--------------------
In forumdisplay.php, find:
--------------------

eval("\$forumdisplaybits .= \"".gettemplate('forumdisplaybit')."\";");

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

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

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

eval("\$forumbits .= \"".gettemplate("forumdisplay_forumbit_level$depth $tempext")."\";");

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

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

--------------------
Still in forumdisplay.php (for the <title>), find:
--------------------

eval("dooutput(\"".gettemplate('forumdisplay')."\" );");

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

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

dnd 03-06-2003 10:09 PM

Thanks Boofo

i did that but it only shows the user name in titles on forumsdisplay.php but inside the thread the navbar or the title of the first post shows the code [you] !!

Boofo 03-06-2003 10:26 PM

dnd, this you do this yet?

Quote:

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));
}

dnd 03-07-2003 01:54 AM

yes :( i did that

Boofo 03-07-2003 03:12 AM

Let me check my code over as soon as I finish this hack I am working on. I will have it finished tonight or tomorrow and then I will find the piece of code you need. It works on mine but I've done so many changes, I don't remember off the top of my head where that one is parsed at. I'll find it and get it to you. ;)

Webdork 03-07-2003 06:52 AM

Great hack. Very very funny. My board is now in chaos...

Boofo 03-19-2003 08:58 AM

Quote:

03-05-03 at 09:27 PM dnd said this in Post #46
hi boofo

i mean the navbar which shows above the posts in showthread.php

Do you still need the code for the navbar? I took that part of the navbar out on my site but I can put together the code for you if you still need it. Let me know. ;)

sonic3d 04-01-2003 11:33 PM

hey boofo can u give me the the file for every edit?

l8er
sonic

Chris M 04-09-2003 03:08 PM

Hey Boofo!:)

This hack: Is someone going to add all the extras into a file for it? Plus all the other ones I am sure people have made...:)

Cheers;)

Satan

Boofo 04-09-2003 03:16 PM

Alot of where you have to add the code is what hacks you have installed. I am still finding small areas that I have missed. I can put together what I have so far, but it will still need tweaking according to what hacks you have installed.

Tenpit 04-19-2003 02:30 AM

How would you restrict this so that it can only be used in a certain forum?

Btw, this is a great hack, v.funny :)

Thanks

Tenpit 04-19-2003 11:21 PM

Also, how about if i registered a new user and called it [you].

How could i make it so anyone viewing posts by that user would appear they made the post?

Chris M 04-19-2003 11:35 PM

@Tenpit - I pointed this out to Boofo;)

I think he said the way to cure it was to put [disable][you][/disable] in the banned usernames list;):)

Satan

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!

jp2 11-20-2003 02:08 PM

Awesome Hack:)
[high]* jp2 installs[/high]

Limpkinw 11-24-2003 02:27 AM

Has anyone figured this out?
Thanks

Quote:

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

MGM out


Angelus 12-26-2003 03:14 PM

Quote:

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

MGM out


bei mir geht es leider auch nicht, habe alles versucht aber ohne erfolg :( ich nutze das vBulletin 2.2.9

help me

bologna.com 07-07-2006 01:25 PM

Sorry to resurrect this hack... But is there a way to get this to work for 3.0? File names have changed, text within the new file names have changed. Where would I look to make these changes with the 3.0 set up?


All times are GMT. The time now is 04:19 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.01400 seconds
  • Memory Usage 1,878KB
  • 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
  • (9)bbcode_php_printable
  • (12)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (34)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