The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
Note: This hack will only work on PHP 4.0.5 and higher. Sorry for all the others (anyone still using these old versions?!).
Anyhow, this is a great little hack, and most importantly very very fun for the masses. It gives your users the ability to use {bbusername} in their post, and it will mysteriously be changed into the viewer's username when he reads the page. Demo: FireFly <!-- auto name hack --> You can detect this hack is in action by viewing the HTML source of the page. You will see <!-- auto name hack --> next to the name in the source. You can this hack used in action here as well: https://vborg.vbsupport.ru/showthrea...threadid=35192 This hack also contains a small optimization to vBulletin, which removes a lot of calls to str_replace() and replaces that with only one (which is why this hack only works with PHP 4.0.5 and up). Have fun, I know you will. Show Your Support
|
Comments |
#92
|
||||
|
||||
Yes I'm absolutely sure. I did exactly as I said and it worked. It sounds like another hack of yours is causing the problem. I don't have any other hacks so that may be the difference.
|
#94
|
||||
|
||||
Ah ha, I found it. Ok, here it is:
PHP Code:
|
#95
|
||||
|
||||
Replace this:
Code:
$findwords=array(0 => '{bbusername}'); $replacewords=array(0 => "$bbuserinfo[username]"); $i=1; $findwords=array(0 => '{getmicrostats}'); $replacewords=array(0 => $microstats); $i=1; Code:
$findwords = array( 0 => '{bbusername}', 1 => '{getmicrostats}' ); $replacewords = array( 0 => $bbuserinfo['username'], 1 => $$microstats ); $i = 2; |
#96
|
||||
|
||||
Nice response time, man! That area of the code now looks like this:
PHP Code:
Btw, I also had to get rid of one of the $'s before microstats.... |
#97
|
||||
|
||||
Make sure $bbuserinfo is still in the global line in dovars().
|
#98
|
||||
|
||||
Thanks!! You are a bloody genius! Works now! W000000t!
|
#99
|
||||
|
||||
Waait a second. It only works in the title, not in the post itself.... It doesn't show up in the post, but if you click Edit then it has the username inserted there.... But it still doesn't work in the post.
|
#100
|
||||
|
||||
See the thread by smachol in this forum "Fix replacement" thing.
|
#101
|
|||
|
|||
would it be possible to make it work in certain forums for example forumid 57 and 58?
|
#102
|
||||
|
||||
LOL
|
#103
|
|||
|
|||
Quote:
i tried this, but now the joke works only for admins, they see their username instead of {bbusername }. all other users now see the variable instead of their usernames? is there a possibility to limit the posting of replacements only to special usergroups? LaNder |
#104
|
|||
|
|||
For some reason i couldnt fin the first line in the txt file in my functions.php ?
im using 2.24 and i think thats why, would it be possible to update this hack? thanks |
#105
|
||||
|
||||
Its not working by me...
I am on 2.2.5... I did remove the line according to Smachol... and I did try the =bbusername= in functions.php and when posting. I do not get the unsername displayed... just {bbusername} Is it to send an email too? |
#106
|
||||
|
||||
ok, I added this and it works ok except for one thing, when I add the {bbusername} to the subject it works, but in the actual post it doesnt work.
Help Please |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|