View Full Version : vB3 [you] Code Hack
Boofo
03-19-2004, 10:00 PM
vB3 [you] Code Hack
Version 1.1
(By Boofo)
What does this hack do?
This hack will take the [you] code and replace it with the user's name who is veiwing the thread, forum or archive on your site.
Credits:
A big thanks goes out to Mutt for his original idea and version of this hack for vB2. I would also like to thank NTLDR for his invaluable help with the main core of this code.
Version Information:
Version 1.0 --Initial release
Version 1.1 --Fixed bug where the archive/global.php code would not parse until $bbuserinfo was added to the global statement.
Installation overview:
Files to edit: (4)
--includes/functions.php
--includes/functions_newpost.php
--archive/index.php
--archive/global.php
NOTE: Support will only be provided to those who click the install button. ;)
heh nice timing and a nice hack ;) Cheers
very nice idea! will use this.
Giveit2u43
03-20-2004, 02:21 AM
Nice hack, thanks a lot.. will come in very handy for sections of my forums.
alkatraz
03-20-2004, 02:33 AM
I just want to put a little FYI out there for people who have never used this hack on your board.
I had it installed and it was all fun and games until my "naughty" users figured out how to use it and before I knew it there was "I heard [you] sucks" type threads all over the place and in peoples sigs. Some of my "computer dumb" users couldn't figure out that it was a code, even after explaining it to them, and got REALLY pissed off at the members and me (the webmaster) for messages they thought were directed at them.
It can be a fun hack and does a fantastic job of getting peoples attention, but if your userbase isn't computer savvy I would pass this one up.
Any chance this hack could be made to work for admin/mods only?
Boofo
03-20-2004, 03:29 AM
I just want to put a little FYI out there for people who have never used this hack on your board.
I had it installed and it was all fun and games until my "naughty" users figured out how to use it and before I knew it there was "I heard [you] sucks" type threads all over the place and in peoples sigs. Some of my "computer dumb" users couldn't figure out that it was a code, even after explaining it to them, and got REALLY pissed off at the members and me (the webmaster) for messages they thought were directed at them.
It can be a fun hack and does a fantastic job of getting peoples attention, but if your userbase isn't computer savvy I would pass this one up.
Any chance this hack could be made to work for admin/mods only?
Just do what I did on my site. Change YOU to something only you and the staff knows (like worship or dogbone or whatever you choose). ;)
Boofo
03-20-2004, 03:31 AM
heh nice timing and a nice hack ;) Cheers
Then please click the install button. ;)
gmarik
03-20-2004, 04:50 AM
original one!
Beermonster
03-20-2004, 12:04 PM
Got to be my favourite hack :D
thanks
ryancooper
03-20-2004, 12:13 PM
Just do what I did on my site. Change YOU to something only you and the staff knows (like worship or dogbone or whatever you choose). ;)
Will that work? When a person hits the reply button won't they see the code you specified?
Beermonster
03-20-2004, 12:18 PM
Will that work? When a person hits the reply button won't they see the code you specified?
In the last one I had installed, no it didn't show up :D
Boofo
03-20-2004, 03:06 PM
Will that work? When a person hits the reply button won't they see the code you specified?
Beermonster's right. When they hit the reply button, the code is already parsed. They will see their name and not the code itself.
ShutDown23
03-20-2004, 05:35 PM
I am going to install - great hack. I used this on my old forum that was none vbulletin and had the same problem as alkatraz, but I will do what Boofo suggested. THANKS! :nervous:
Boofo
03-20-2004, 06:07 PM
original one!
I have to ask ... do you ever hit the install button on any hacks you install? ;)
SaN-DeeP
03-20-2004, 06:11 PM
Boofo you finally did it :)
GReat work m8 :)
Pleaes put some nice screenies of it too :)
As a reference to people, who mite not understand this nice hack ;)
Sandy...
Boofo
03-20-2004, 06:14 PM
Boofo you finally did it :)
GReat work m8 :)
Pleaes put some nice screenies of it too :)
As a reference to people, who mite not understand this nice hack ;)
Sandy...
Thank you, Sandy. ;)
Don't forget to click the install button, my friend. ;)
As far as a screenshot goes, that's kind of hard to do since it would only show my name, anyway. Any idea how to do it to show what you mean? ;)
ryancooper
03-20-2004, 11:15 PM
Beermonster's right. When they hit the reply button, the code is already parsed. They will see their name and not the code itself.
That's awesome!! Thanks for a great hack! Will be installing this ASAP!
Ryan :nervous:
Boofo
03-21-2004, 01:39 AM
That's awesome!! Thanks for a great hack! Will be installing this ASAP!
Ryan :nervous:
No problem. Don't forget the install button. ;)
SaN-DeeP
03-21-2004, 06:40 AM
Thank you, Sandy. ;)
Don't forget to click the install button, my friend. ;)
As far as a screenshot goes, that's kind of hard to do since it would only show my name, anyway. Any idea how to do it to show what you mean? ;)
just show users, how this awesome thing would work.
show them 2 images. first [you] code on normal forums.
and [you] code after installting ur hack.
tell them whenever someone else views you code. readers will see there name in it instead of the you code..
possibly including a big image. which has cut-outs of everything included.
i havent yet done the upgrade. else i would have done that small thing for ya bro...
Best of Luck again for this nice hack :)
Best Regards,
Sandy...
Osmosis
03-21-2004, 09:00 AM
This version seems infinitely more complex than the original.
clicks install
Boofo
03-21-2004, 09:13 AM
Not really, as the version that was released for vB2 had a lot more that needed to go with it to accomplish what this version does. This version covers everything, whereas the vB2 version only covered the message area. ;)
TheComputerGuy
03-21-2004, 11:49 AM
Sweet stuff! April's Fools Joke here I come!
You rock man...and I clicked the install button~
SmasherMaster
03-21-2004, 11:51 PM
AWESOME. Wonderful hack! :D
* SmasherMaster hits install
Does anyone know how to make this work with multiquote installed also?
Boofo
03-22-2004, 06:23 PM
If you list the piece of code that needs to be changed here, I'm sure we can help you get it sorted out. ;)
I'm not really sure what part that needs to be changed.
There are two files that's been changed; showthread.php and newreply.php
2 templates have been changed and one have been added.
In here's the instructionfile.
https://vborg.vbsupport.ru/attachment.php?attachmentid=15536
Boofo
03-22-2004, 07:39 PM
Have you even tried to install the [you] hack yet? Go ahead and in stall it and if you run into any problems, then post them here. That hack should not interfere with this hack in any way. ;)
Have you even tried to install the [you] hack yet? Go ahead and in stall it and if you run into any problems, then post them here. That hack should not interfere with this hack in any way. ;)
I posted about this beause I ran into problems. ;)
Boofo
03-22-2004, 07:49 PM
Then you need to post the code that is giving you problems here so we can sort it out. ;) That hack doesn't even touch the same code as this hack as far as I can tell.
moley
03-24-2004, 02:05 PM
very nice hack I had it on my old vb2.
Boofo
03-24-2004, 06:41 PM
I had it on vB2. also, but it is alot easier on vB3. On vB2, I had to catch every place it could possibly turn up and replace the code there instead of catching it all in one or two places with vB3. ;)
/me was wondering if anyone would be able to provide a htl version of this hack as it helps to keep track of your hacks so much. thanks a lot in advance
8472
Boofo
03-25-2004, 11:01 AM
Sorry, I don't use the HTL hack. Don't really like it. ;)
ok thanks a lot for the fast reply though =)
Boofo
03-25-2004, 11:06 AM
No problem. Besides, since this hack really isn't that big, I saw no need for anyone to convert it to HTL. ;)
Jadelit
03-26-2004, 08:05 AM
Nice.. Installed
Boofo
03-26-2004, 08:08 AM
You need to reapply the code. The only way this could happen is if you copy and pasted the code wrong. ;)
Jadelit
03-26-2004, 08:11 AM
Yeah, I just did that... Works like a charm.
:)
Boofo
03-26-2004, 08:27 AM
Ahhh, you changed your message on me. That's ok, as long as you got it working. ;)
Erwin
04-01-2004, 10:11 AM
Great hack! :)
Boofo
04-01-2004, 10:16 AM
Thank you, would-have-been-my-boss-if-you-were-still-an-Admin-here. ;)
Are you planning on using this to abuse and torture your members this April Fool's day?
Because if you are, it works great for that! ;)
Erwin
04-01-2004, 10:17 AM
It would be better if Unregistered users see a particular name instead of unregistered, since that gives the game away. :) But cool... trying it out now since it's April 1...
Boofo
04-01-2004, 10:36 AM
I'm sure you could do a conditional in the functions.php code for that. ;)
SpeedysWorld
04-01-2004, 11:56 AM
/me Loves this hack! I wille be clicking install when I get home, just getting a list together of the hacks I am going to be installing tonight.
- SpeedysWorld
BarBeQue
04-07-2004, 05:47 PM
* BarBeQue clicks install
works great! nice and easy hack, although the archive edits made me fall asleep ;)
Boofo
04-07-2004, 05:55 PM
Without those edits, the hack wouldn't fool anyone. They would be able to see the [you] code. ;)
msimplay
04-08-2004, 11:31 AM
change unregistered into guest ?
Boofo
04-08-2004, 11:57 AM
You can do that right below the code in the functions.php. ;)
Bro_Joey_Gowdy
04-08-2004, 01:30 PM
/me clicks install
Great Hack
Toneboy
04-10-2004, 01:33 AM
Just taken a look at the code for this. Looks a lot more comprehensive than the vB2 version. Nice work.
Will install when my eyes aren't totally bloodshot. :)
Boofo
04-10-2004, 10:22 AM
That's the best time to install. If you mess up, you don't really care then. LOL
Don't forget the install button when you install it. ;)
Toneboy
04-10-2004, 08:19 PM
Installed with fresh eyes. :)
Clicked install - tested, and all working great. Thanks.
nice job mate
i will try this 1 out :P
Boofo
04-17-2004, 01:32 PM
nice job mate
i will try this 1 out :P
Don't forget the install button, my friend. ;)
EDIT: You beat me to it. LOL
BarBeQue
04-18-2004, 11:40 AM
Don't forget the install button, my friend.
I see you saying that on several places...
How do you see who installed what hack?
Or is it something only the orig hack poster can see?
Boofo
04-18-2004, 09:28 PM
I see you saying that on several places...
How do you see who installed what hack?
Or is it something only the orig hack poster can see?
If I tell you how I know, then I have to kill you! ;)
Actually, the original hack author can see it only in his hack threads, but Mods here can see it everywhere.
I use it to gauge whether or not updates and additions to my hacks are warranted. If there are very few installs, usually it isn't worth the effort to add or update the hack with new features. It there are many installs, then it it worth the time and effort involved to update or add new features since the hack is being used by so many people.
It's also a nice way to thank someone who has taken the time to supply a hack and support it. ;)
Mr. HillBilly
04-22-2004, 11:10 PM
Great hack boofo, will click install I get it on my board.
Just to let you know,
Code in archive/index.php has changed in 3.0.1
In your .txt file you have,
echo "\t<li><a href=\"t-$thread[threadid]\" d=\"$thread[lastpost]\">$thread[title]</a></li>\n";
Should be
echo "\t<li><a href=\"t-$thread[threadid].html\" d=\"$thread[lastpost]\">$thread[title]</a></li>\n";
Also, code in archive/global.php has changed
Your .txt file has,
echo "$indent<li><a href=\"f-$forumid\">$forum[title]</a></li>\n";
should be:
echo "$indent<li><a href=\"f-$forumid.html\">$forum[title]</a></li>\n";
Also in the .txt file, you have,
echo "$indent<li>$forum[title]</li>\n";
should be
echo "$indent<li><strong>$forum[title]</strong></li>\n";
and you have,
$navarray[] = "<a href=\"f-$forumid\">" . $forumcache["$forumid"]['title'] . "</a>";
should be
$navarray[] = "<a href=\"f-$forumid.html\">" . $forumcache["$forumid"]['title'] . "</a>";
Advanced warning for people who install this: Remember to add [you] to the restricted username list...a user on my board registered [you] and lots of members got very confused very quickly ;)
*clicks install*
Sanity
08-15-2004, 08:48 AM
Run into problems with "functions_newpost.php" - [you]-code wont parse in message body. Iam running vB 3.02.
Great hack anyway.
aranthorn
08-19-2004, 06:05 PM
doesn't work on 3.0.3. As far as I can tell, there is no
echo print_archive_navigation($foruminfo); in 3.0.3 index.php
andrew67
11-01-2004, 09:06 AM
Nope there's not.
Also does this work for thread titles? Assuming it worked for vb3.0.3
aranthorn
11-01-2004, 05:03 PM
<a href="https://vborg.vbsupport.ru/showthread.php?t=68832" target="_blank">https://vborg.vbsupport.ru/showthread.php?t=68832</a>
Boofo
11-01-2004, 08:55 PM
https://vborg.vbsupport.ru/showthread.php?t=68832
You'd better check to make sure that is going to work everywhere. I was going to do it that way in my version but there were too many places that you can't catch with the way you are doing it. ;)
andrew67
11-01-2004, 09:14 PM
I've actually got similar code to that at the moment but it doesn't work on thread titles.
Boofo
11-01-2004, 09:21 PM
I've actually got similar code to that at the moment but it doesn't work on thread titles.
Mine works on thread, forum and archive titles. True, I haven't updated it for 3.0.3 yet as I am not running that version and don't plan to upgrade until new versions stop coming out so frequently. ;)
It should be very easily adaptable though. ;)
eXtremeTim
01-01-2005, 06:11 AM
I used the following code in functions.php instead of the code you provided.
if (THIS_SCRIPT != editpost) {
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
}
$replacementvars['/\[test\]/i'] = "This is just a test.";
Reason I did this is so that its not parsed on editpost so that when you edit a post that contains it you dont have that nice problem of it locking in on your name. Also so you can tell when other users are using it faster and easier. The reason for the [test] code is since that it will allways be looking for something to parse out so on edit post you would get an error becuase there would be nothing to parse out since the error checking code was removed when this hack was installed.
Boofo
01-01-2005, 07:33 AM
I used the following code in functions.php instead of the code you provided.
if (THIS_SCRIPT != editpost) {
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
}
$replacementvars['/\[test\]/i'] = "This is just a test.";
Reason I did this is so that its not parsed on editpost so that when you edit a post that contains it you dont have that nice problem of it locking in on your name. Also so you can tell when other users are using it faster and easier. The reason for the [test] code is since that it will allways be looking for something to parse out so on edit post you would get an error becuase there would be nothing to parse out since the error checking code was removed when this hack was installed.
Exactly what part of the code did you replace with this in functions.php? There is a big block of code there. ;)
eXtremeTim
01-01-2005, 02:51 PM
If you have the hack installed replace the following with the code I posted above:
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
If you are doing a fresh install replace the following
function process_replacement_vars($newtext, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!empty($style['replacements']))
{
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
// this is WAY too slow!
//$newtext = strtr($newtext, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$newtext = str_replace(array_keys($replacementvars), $replacementvars, $newtext);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$newtext = preg_replace(array_keys($replacementvars), $replacementvars, $newtext);
}
return $newtext;
}
with
function process_replacement_vars($newtext, $sendheader = 1)
{
// parses replacement vars
global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $debug;
static $replacementvars;
if (connection_status())
{
exit;
}
// do vBulletin 3 replacement variables
if (!isset($replacementvars))
{
$replacementvars = unserialize($style['replacements']);
}
if (THIS_SCRIPT != editpost) {
global $bbuserinfo;
$replacementvars['/\[you\]/i'] = $bbuserinfo['username'];
}
$replacementvars['/\[test\]/i'] = "This is just a test.";
// this is WAY too slow!
//$newtext = strtr($newtext, $replacementvars);
// using str_replace() has case-sensitivity issues...
//$newtext = str_replace(array_keys($replacementvars), $replacementvars, $newtext);
// this is slower than str_replace() but is case-insensitive, so we'll use it.
$newtext = preg_replace(array_keys($replacementvars), $replacementvars, $newtext);
return $newtext;
}
This was the hack i was looking for when i installed the /me hack. :nervous: Very nice hack, Boofo! And I clicked install too. ;)
DeMiNe0
02-09-2005, 10:33 AM
updated for 3.0.6 yet?
Christine
05-17-2005, 01:28 AM
Anyone have this running on 3.0.7?
Steve F
08-06-2005, 07:14 AM
Installed on 3.07, thanks for sharing, had good fun on my forums :devious:
sebbe
06-06-2006, 12:47 PM
This doesn't work on vB 3.5 right?
Has anyone tried this on 3.6.8?
insolentmuse
10-09-2007, 07:06 PM
Has anyone tried this on 3.6.8?
Did you try this?
PassatWorld
03-28-2008, 07:46 PM
3.6.8
Im getting:
XML Error: syntax error at Line 1
Boofo
03-28-2008, 08:46 PM
Try the 3.7 version.
jediteknoman
04-02-2008, 03:41 AM
I'm interested to try this out, do you guys have any screenshots to show me what this does?
robbiefritz
01-01-2009, 02:01 PM
Try the 3.7 version.
I was unable to find the modification for 3.7?
Brandon Sheley
01-01-2009, 02:16 PM
I was unable to find the modification for 3.7?
it's in the graveyard ;)
Roxie
01-10-2009, 11:53 PM
Need this back. =(
vBulletin® v3.8.12 by vBS, Copyright ©2000-2024, vBulletin Solutions Inc.