View Full Version : [you] vbcode
<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=38069&highlight=vbcode" target="_blank">Inspired by FireFly's /me vB Code</a>
When reading the /me hack thread I started laughing at the idea of a [you] tag. This isn't much of a hack, but it was fun. Put [you] in the thread and it is replaced by the person's name who is reading the thread. if it is a guest, [you] is simply replace by the word you.
I had to change this to a text file to avoid problems. Should be fine now
*lol* A brilliant mix of the "/me" hack and the "{bbusername}" hack - it sounds. :D
* Rose installs
[you] grins
Link14716
02-28-2003, 01:05 AM
This seems to function almost identically to the {bbusername} hack, but still fun nevertheless. ;)
gameplanetz
02-28-2003, 02:25 AM
very nice, indeed. :)
Vivi Ornitier
02-28-2003, 04:14 AM
this si good, the bbusername one didn't work on the newer forums for some reason but this does! hella nice!
Erwin
02-28-2003, 04:20 AM
Hey! Nice! :)
Slynderdale
02-28-2003, 05:15 AM
Originally posted by Vivi Ornitier
this si good, the bbusername one didn't work on the newer forums for some reason but this does! hella nice!
I had that problem, but I changed it to [bbusername] instead and it works fine.
Kars10
02-28-2003, 07:21 AM
Don?t works here!!
First of all, can?t find that line on 2.2.9:
$bbcode=str_replace("'", "'", $bbcode);
- i have only this line:
$bbcode=str_replace("'", "\'", $bbcode);
- and that line:
$bbcode=str_replace("\\'", "'", $bbcode);
The [you] won?t work when i place your code under that lines... :(
Kars10
02-28-2003, 07:24 AM
Ahhh, there is the problem. Your code gets parsed here. My first line looks like " /" , and my second line " //" ...
Please place your instruction in a textfile.
Steve123
02-28-2003, 08:36 AM
dont work here..
it just shows [you]
I text filed it up, let me know if that does it for you
how do I edit the directions in the hack DB? I don't see an edit button
Kars10
02-28-2003, 09:39 AM
Brilliant!! Works like a charm!!
* Kars10 klicks install! :)
afterlab
02-28-2003, 10:19 AM
Just in time for April Fools jokes too. ;)
Automated
02-28-2003, 11:05 AM
LOL, very cool idea :p
Xenon
02-28-2003, 11:10 AM
@Mutt: there should be an editbutton beside the new post and new thread button on the top of the thread :)
Boofo
02-28-2003, 11:19 AM
Great hack. ;)
2 questions:
How can we add color to the name?
Is there a way to get this to work with thread titles?
Aaron1
02-28-2003, 12:50 PM
This is great!
Although many users on my board are getting paranoid with it.
I really needed to explain whenever i post:
Hey [you] where's my money?
ps: No i, haven't received any addtional money with it :)
My god, I made this yesterday and all hell has broken out on my board. there has been more posting today than ever before. all the lurkers came out to find out why everyone is flaming them. :) it's the funiiest thing. I recieved all inds of emails and phone calls. My site is a Howard Stern Fan Site and High Pitch Eric called today very upset because Joey Boots was talking ++++ about him all night and everyone is picking on him. It was too much. I had tears in my eyes trying to explain the whole thing to him. It was too damn funny. I hope I don't lose members over this.
I'll be playing with it and giving it some options. I'm going to set it so you can limit the tag to just mods/admin plus make it so you can limit it to specific forums. I have a prank forum that this will be perfect for. I'm going to look into adding profile field info also. didn't even look at the code yet, but something like [you]user title or birthday. If it's reasonable, I'll be sure to include custom profile fields and limit the working field to just those viewable in the profile.
this hack is evil. ;)
I've also been asked to get it working for thread titles. I'll look into it. Would be fun, but not sure it would be worth it. thread titles are used in so many places like your profile, the search page, etc. Seems like alot of edits would be necessary.
PS - with so many people upset about the recent flaming against [you] I've started a poll to see you will be banned. Joey Boots or [you]. Maybe I'm going to far, but it's so funny.
Boofo
02-28-2003, 11:59 PM
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:
// 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:
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:
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]);
}
In search.php, find:
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:
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:
$getperms=getpermissions($getlastpost[forumid]);
if ($getperms[canview]) {
$lastposttitle=$getlastpost[title];
BELOW it add:
if ($bbuserinfo[userid]>0) {
$lastposttitle = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $lastposttitle);
} else {
$lastposttitle = preg_replace("/(\[)(you)(])/siU", "you", $lastposttitle);
}
Dean C
03-02-2003, 10:47 AM
Wow thanks for that piece of code Boofo. Didn't realise you know so much PHP :)
- miSt
Chris M
03-02-2003, 05:57 PM
Heh...
Seems like a cool hack!:)
I'll be sure to install it and check it out when I get my machine back up and running!:)
Satan
Steve123
03-02-2003, 10:19 PM
yeh..
how would u get it to work in the navbar..
it shows [you] in the navbar :)
Boofo
03-02-2003, 10:25 PM
Originally posted by Steve123
yeh..
how would u get it to work in the navbar..
it shows [you] in the navbar :)
I've got a partial fix for it where it will show you (or whatever word you change it to in the second preg-replace statement) instead of [you], but I can't get it to replace it with the username yet. I am working on it and will release the fix as soon as I come up with it. ;)
Steve123
03-02-2003, 10:27 PM
yeh i was about to go in and have a look myself..
if i figure it out ill tell ya :P
whats ya partial fix?
Boofo
03-02-2003, 10:43 PM
Completed working code for the forum navbar (if you make a forum with the [you] in it (like "[you]'s Personal Forum"). Thanks to Xenon for pointing out something I missed, that was really, really stupid of me. ;)
In admin/functions.php, find:
function makenav($id,$idtype="forum",$highlightlast=1) {
global $DB_site,$nav_url,$nav_title,$session,$threadcache ;
and replace it with:
function makenav($id,$idtype="forum",$highlightlast=1) {
global $DB_site,$nav_url,$nav_title,$session,$threadcache ,$bbuserinfo;
then find:
$nav_url="forumdisplay.php?s=$session[sessionhash]&forumid=$id";
$nav_title=$foruminfo[title];
and BELOW it add:
if ($bbuserinfo[userid]>0) {
$nav_title = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $nav_title);
} else {
$nav_title = preg_replace("/(\[)(you)(])/siU", "you", $nav_title);
}
traekwon
03-02-2003, 11:13 PM
Is there anyway to make it so when the user quotes your post it doesn't show up as [you]?
I believe in FireFly's /me hack when you quoted a post it didn't come up as /me.
Steve123
03-02-2003, 11:20 PM
hhahahaa..
ive had the remove the damn thing..
with 25 ppl online... as soon as i added all hell broke loose..
o wells... its an evil hack..
Boofo
03-03-2003, 12:01 AM
Originally posted by traekwon
Is there anyway to make it so when the user quotes your post it doesn't show up as [you]?
I believe in FireFly's /me hack when you quoted a post it didn't come up as /me.
Simple fix.
In the newreply.php, find:
eval("\$message = \"".gettemplate("quotereply",1,0)."\";");
and ABOVE it add:
if ($bbuserinfo[userid]>0 and $bbuserinfo[usergroupid]!=6) {
$pagetext = trim(preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $pagetext));
} else if ($bbuserinfo[usergroupid]!=6) {
$pagetext = trim(preg_replace("/(\[)(you)(])/siU", "you", $pagetext));
}
I did it this way so the Admin could still see it as [you] in case there was ever any question about it.
Boofo
03-03-2003, 03:54 AM
Mutt, you were right, there are almost too many changes to make to make this not show up in all of the places it can show up. :) I just got through spending the last 2 hours finding all of the places it can show up. I think I have them all nailed now. The only place left is the forum navbar. Still working on that one. Here is a list of all the files that need to be edited.
functions.php - 4 edits
showthread.php - 3 edits
index.php - 2 edits
usercp.php - 1 edit
forumdisplay.php - 3 edits
newreply.php - 1 edit
search.php - 1 edit
member.php - 1 edit
private.php - 3 edits
private2.php - 1 edit
Boofo
03-03-2003, 01:44 PM
The navbar fix is working now in the post below if anyone is still interested. ;)
https://vborg.vbsupport.ru/showthread.php?action=showpost&postid=360359
thats why I didn't want to touch the subject. just way to many places to miss something and with little payback.
as for fixing the quote, yeah it's do-able and might be funny but quoting the message is sortof how people figure out it's not about them. I think I like it though and will do it. I made this forum controlable (on in some of in others like the IMG tag) and when I finish the cp I'll re-post. (right now, I just set the var via phpmyadmin so I could turn it off everywhere except our prank forum.)
Boofo
03-04-2003, 09:27 PM
I have about every base covered for this in vbulletin. If you want to check the file out, let me know, It's about 20K. ;)
Being able to turn it off and on per forum would be great! :)
Boofo
03-04-2003, 09:32 PM
Is there a way to have this set up so only certain usergroups can use it? I can edit the code in functions.php, I suppose. ;)
chr@nox
03-04-2003, 09:34 PM
first of all, great hack! thanx alot :)
second..
isn't it easy to make it so to use the forum stuff?
so $forum[useyou] for example?
if you want i can post the changes for it
Greetings,
Chratnox
sonic3d
03-04-2003, 09:37 PM
can u send me the file or upload it somewhere so i can download it. thanx.
l8er
sonic
chr@nox
03-04-2003, 10:47 PM
Originally posted by Boofo
Is there a way to have this set up so only certain usergroups can use it? I can edit the code in functions.php, I suppose. ;)
u can use if ($bbusergroup == 6 or $bbusergroup == 5) right?
Boofo
03-04-2003, 11:00 PM
Originally posted by chr@nox
u can use if ($bbusergroup == 6 or $bbusergroup == 5) right?
If you mean if ($bbuserinfo[usergroupid] == 6 or $bbuserinfo[usergroupid]== 5), I thought about doing that but the idea to allow it in certain forums sounds better though. :)
hey people, I finished the cp so you can turn it on/off but it is working and I'll get directions written asap.
just wanted to throw out a couple other ideas/mods to you
these also work if you wanted to get real crazy
$bbcode = preg_replace("/(\[)(youemail)(])/siU", $bbuserinfo[email], $bbcode);
$bbcode = preg_replace("/(\[)(youhome)(])/siU", $bbuserinfo[homepage], $bbcode);
$bbcode = preg_replace("/(\[)(youtitle)(])/siU", $bbuserinfo[usertitle], $bbcode);
$bbcode = preg_replace("/(\[)(youbday)(])/siU", $bbuserinfo[birthday], $bbcode);
$bbcode = preg_replace("/(\[)(youarea)(])/siU", $bbuserinfo[field2], $bbcode);
$bbcode = preg_replace("/(\[)(yousex)(])/siU", $bbuserinfo[field7], $bbcode);
$bbcode = preg_replace("/(\[)(youint)(])/siU", $bbuserinfo[field3], $bbcode);
you'd have to modify the custom fields to fit your site, but this should give you the basic idea. All profile fields including custom fields can be used!!
if you'd like to give your staff a little help
you can change this line
$bbcode = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $bbcode);
to this
if ($bbuserinfo[usergroupid]==5 || $bbuserinfo[usergroupid]==6 || $bbuserinfo[usergroupid]==7) {
$bbcode = preg_replace("/(\[)(you)(])/siU", "<b><i><a title=\"[you] code\">".$bbuserinfo[username]."</a></i></b>", $bbcode);
} else {
$bbcode = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $bbcode);
}
that way mods and admins will see the name in bold and mousing over gives you notice that it's the [you] code
PS - if you wanted to restrict usage to certain usergroups, bbuserinfo wouldn't do it. you'd need to check the usergroupid of the person who posted. bbuserinfo is for the person reading the post
Boofo
03-05-2003, 08:15 PM
Be looking forward to the update. ;)
If you use all of these, wouldn't you have to go through all of the places to parse it out like with the first code? And I take it this goes in the functions.php with the first code, right?
$bbcode = preg_replace("/(\[)(youemail)(])/siU", $bbuserinfo[email], $bbcode);
$bbcode = preg_replace("/(\[)(youhome)(])/siU", $bbuserinfo[homepage], $bbcode);
$bbcode = preg_replace("/(\[)(youtitle)(])/siU", $bbuserinfo[usertitle], $bbcode);
$bbcode = preg_replace("/(\[)(youbday)(])/siU", $bbuserinfo[birthday], $bbcode);
$bbcode = preg_replace("/(\[)(youarea)(])/siU", $bbuserinfo[field2], $bbcode);
$bbcode = preg_replace("/(\[)(yousex)(])/siU", $bbuserinfo[field7], $bbcode);
$bbcode = preg_replace("/(\[)(youint)(])/siU", $bbuserinfo[field3], $bbcode);
just add those line right after
$bbcode = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $bbcode);
thats it
now for you it might be a ton more because you added it to subjects as well.
Kars10
03-05-2003, 08:32 PM
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
Originally posted by Mutt
just add those line right after
$bbcode = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $bbcode);
thats it
Thank you. ;)
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:
And it still works. What do you think, [you]? Do you like it?
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:
if (in_array($bbuserinfo[usergroupid], array(5, 6, 7))) {
$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. ;)
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?
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:
// 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:
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:
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]);
}
In search.php, find:
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:
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:
$getperms=getpermissions($getlastpost[forumid]);
if ($getperms[canview]) {
$lastposttitle=$getlastpost[title];
BELOW it add:
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]
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
Originally posted by dnd
hi boofo
i mean the navbar which shows above the posts in showthrad.php
Here you go. ;)
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]);
}
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?
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));
}
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
03-05-03 at 09:27 PM dnd said this in Post #46 (https://vborg.vbsupport.ru/showthread.php?postid=361786#post361786)
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 [you] 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.
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
Yesterday at 10:46 PM MetalGearMaster said this in Post #63 (https://vborg.vbsupport.ru/showthread.php?postid=415161#post415161)
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. ;)
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]);
}
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
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!
Awesome Hack:)
* jp2 installs
Limpkinw
11-24-2003, 02:27 AM
Has anyone figured this out?
Thanks
Well, you got the big title part fixed, but not the actual navigation..... see picture
MGM out
Angelus
12-26-2003, 03:14 PM
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?
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.