![]() |
[you] hack
Is there a chance of someone being able to port over this hack or the original author doing it. Also maybe with the option to limit its use by usergroup.
https://vborg.vbsupport.ru/showthrea...8&page=1&pp=15 |
LOL. Weird. I was just coming here to request that.
|
In includes/functions.php find:
PHP Code:
PHP Code:
|
Great! Thank You.
|
Thanks saved me the trouble of making it :)
|
Now anyway so you can edit a post and it not get all screwed up? As in not lock in your username instead of {bbusername}
|
Where will this all work at? Just in posts? Any way to get it to work in thread titles, too?
|
Quote:
|
Great! How about the seach page? ;)
NTLDR, how would I add this code to this? It has the microstats hack in it. // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! // ! MicroStats Hack for vB 3.0 Gamma By: Apoco ! // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! function process_replacement_vars($newtext, $sendheader = 1) { // parses replacement vars global $DB_site, $vboptions, $style, $stylevar, $newpmmsg, $_SERVER, $microstats; 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); } $newtext = str_replace(('{microstats}'), $microstats, $newtext); // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! return $newtext; } |
Try using:
PHP Code:
|
In case anyone asks, to make it work for [ you ] instead, replace the appropriate line with this:
PHP Code:
|
Thanks guys!!!
I know I may be getting picky now but... In the vB2 version I had, the [you] code was left in the reply. This made it easy to see if someone typed really your name, or used the [you] code. In this version, the [you] code is replaced w/ my name in the reply. Anyway to keep the [you] in there when replying instead? Did that even make sense? Previously, when hitting reply, one could see if a person was really talking to you or using the [you] code. |
If you wanted to do this, it would require removal of the original [ you ] hack and modifications to the bbcodeparse php file. However, the you hack would no longer work in thread titles if you did this. If you want people to know the difference, you could try formatting... eg:
$replacementvars['/\[you\]/i'] = "<i>$bbuserinfo['username']</i>"; or something BTW, NTLDR, thanks for sharing. It was quite a fun prank =) |
Quote:
Find: PHP Code:
PHP Code:
|
Link: I don't think that worked, but it may be because I can't explain it.
Is it possible that when someone quotes another person, they see the [you] in the quote instead of their own name? EDIT: and it looks like it only works in the thread title once. When I post a thread, my name is in the title. Other users only see my name too. |
Quote:
PHP Code:
|
Quote:
|
It should replace it on any page, anywhere as long as the page goes through process_replacement_vars(), which all the main vB (forum) pages that output something do.
@flypaper, I'm a bit confused as to how you'd like this to work. |
Anyway to fix it so you won't see {bbusername} in the email that gets sent if you are subscribed to the thread? ;)
|
Untested as usual, in includes/functions.php find:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
|
I can't find any of the code you said to search for in the functions.php.
EDIT: I found the code in functions_newpost.php. It seems to work except for the thread title in the message and the Subject of the message. Can those be fixed? |
Quote:
(original post with [you] hack): flypaper is cool. (post quoted for reply w/ current hack): flypaper is cool. (post quoted for reply w/ vb2 hack): [you] is cool. Personally, I think it works better if the [you] code shows up in the quoted post. Hopefully, that makes sense now. Either way, I really appreciate the help. |
Quote:
|
@Boofo, sorry I meant functions_newpost.php ;)
For the [you] part I think he means [you] appears and isn't the next to get the username. To fix thread titles, find again in functions_newpost.php: PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
PHP Code:
in newreply.php find: PHP Code:
PHP Code:
|
This:
PHP Code:
Also, I put this: PHP Code:
PHP Code:
|
Yes and yes ;)
|
Thank you and thank you, sir. ;)
|
Quote:
I enjoy watching my users abuse the n00bs. That's fun to me. |
Quote:
|
NTLDR, one last area. Can we get this to work for the forum names in the archive display?
|
That would require a fair bit of modding has none of the archive is passed through the replacement vars function. If I get time I'll take a look.
|
Quote:
|
Quote:
|
Thanks guy's I love this hack it's got to be the funniest ever
|
Any chance for someone to make this work on 3.0.9 ?
I just tested the code and it gave me a parse error from somewhere else. |
All times are GMT. The time now is 05:36 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|