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)
-   -   Reader's name inside post (+) (https://vborg.vbsupport.ru/showthread.php?t=35220)

Admin 02-18-2002 10:00 PM

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. :D
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. :D

Scott MacVicar 02-19-2002 11:54 AM

a classic lets see if it can provide the same type of amusement we have on other boards :p

TWTCommish 02-19-2002 11:57 AM

'Zactly. This hack is completely useless from a practical standpoint. However, I could use a good laugh. :D :up:

EDIT: yeck...those lines in the text file have to be removed...I either have to copy the code and then weed them all out and such, or re-type it. :(

Admin 02-19-2002 12:06 PM

I realize this hack is useless, but I think it's fun nonetheless.

Chris, gotcha'. Updated the file. :)

TWTCommish 02-19-2002 12:10 PM

File looks the same to me...also, I installed it, all my replacement variables jacked up and my board looked like a rainbow, so I uninstalled it...

Lesane 02-19-2002 12:56 PM

Great fun hack, thanks :up:

Admin 02-19-2002 01:39 PM

TWTCommish, the file is updated, you were probably just getting a cached version of it.
Install the hack again and do exactly what it says.

TWTCommish 02-19-2002 01:41 PM

Yep, got it working around 10 minutes after posting that.

Admin 02-19-2002 01:44 PM

Good. :)

TWTCommish 02-19-2002 03:07 PM

I tried to get this same effect with the email notifications (those are sort of a dead give-away)...by sticking this code...

Code:

              $emailsubject = str_replace('{bbusername}', $bbuserinfo[username], $emailsubject);
              $emailmsg    = str_replace('{bbusername}', $bbuserinfo[username], $emailsubject);

...before this code...

Code:

mail($toemail,$emailsubject,$emailmsg,"From: \"$bbtitle Mailer\" <$webmasteremail>");
...in newreply.php. No go, though. What's wrong?

hondastyle 02-19-2002 03:32 PM

Okay, I'm easily amused... I'll admit it.
I installed this hack and posted a message that reads "{bbusername}, you are my favorite user. I wish everyone else on here was like you..."

I'm dying laughing as the responses start to appear. The hardest part is the anticipation of how long it is going to take until people start to catch on.

Too funny - thanks for the laugh ;)

Admin 02-19-2002 03:54 PM

TWTCommish, you are using the wrong variable in the second lind.

hondastyle - hehe. :D Care to give us the link? :)

TWTCommish 02-19-2002 04:15 PM

D'oh, my bad. The email subject part doesn't work either, though. :( Any idea what the problem is?

M.Smith 02-19-2002 04:54 PM

the first piece of code i have to find isnt in my function.php and i havent edited it :noid:

Bald Bouncer 02-19-2002 05:09 PM

Ah I get it now....I suddenly thought I was populiar after reading this thread :D

nafae 02-19-2002 06:06 PM

Quote:

Originally posted by FireFly

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. :D

Does it go SPEEDIER!?

Radon3k 02-19-2002 06:12 PM

That's awesome...Thanks for yet another great hack FireFly! :)

Remi 02-19-2002 07:14 PM

Thank you for this nice hack

But is there a way to hide "Unregisterd" if the user is not loged in.

Kumaro 02-19-2002 08:45 PM

^^^ lol...yeah same here. I have a question, Is it possible to put this in a template? So if I wanted to include the readers name in a template....is that possible?

Steve Machol 02-19-2002 08:51 PM

This is going to be a great hack to use on April Fool's Day! :D

-=dm=- 02-19-2002 10:36 PM

cool thanx

Twig Deez 02-19-2002 10:41 PM

works like a charm, thanks! :)

ptbyjason 02-19-2002 11:45 PM

I am enjoying confusing my moderators right now, after I finally tell them what is going on, we are going to have some fun on the board. For now I am keeping this little secret all to myself.

hondastyle 02-19-2002 11:55 PM

Quote:

Originally posted by FireFly
TWTCommish, you are using the wrong variable in the second lind.

hondastyle - hehe. :D Care to give us the link? :)

Doh! It was in my admin section.... but my regular users are the next victims... I'll be back with the link after I get it posted... muwahahahaaaa!

Psychdrone 02-20-2002 12:38 AM

Quote:

Originally posted by Kumaro
^^^ lol...yeah same here. I have a question, Is it possible to put this in a template? So if I wanted to include the readers name in a template....is that possible?
yes me too?

And FF, pat yourself on the back, for another amusing hack:)

hondastyle 02-20-2002 12:54 AM

Okay, read it and weep:
http://www.hondastyle.com/forums/sho...?threadid=3068

Mind you, my moderators gave it away a bit (i got 'em good in the moderator's forum...) But I suspect I'll still catch enough off-guard to make it worth my while.. lol ;)

Chris

techno 02-20-2002 01:05 AM

hmmm... I keep getting that really bright rainbow looking web page too...?? Whats the deal with that?

zajako 02-20-2002 07:00 AM

this hack is extremely useful for rping boards. You can set up actions like for ex. IRC chat rooms
(Typed) /me jumps
(displayed) *Zajako jumps
you get the picture.
I think its great FireFly

Lucky 02-20-2002 09:29 AM

You got a big 5 star rating.

Thanks for the laugh.

SWFans.net 02-20-2002 10:28 AM

Hehe, it even works in topic titles. :D

And I think I may actually have a practical use for it at our forums. A great deal of our members are role players with multiple names. I may add that into the templates for forumdisplay to let people know exactly what name they are logged in as. :)

Thanks for the nice hack Firefly.

pdatoon 02-20-2002 11:42 AM

+-------------------------------------------------------------------------------------------------+
| In functions.php, find this code: |
+-------------------------------------------------------------------------------------------------+
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg,$fullpm;
+-------------------------------------------------------------------------------------------------+

I'm running 2.2.2 regular and i dont have the fullpm at the end of the line. Mine is just:
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg;

pdatoon 02-20-2002 12:09 PM

help!

I installed the hack and then got all kind of errors, i removed it but still get errors. When i loggout, it says :


"Database error in vBulletin 2.2.2:

Invalid SQL: UPDATE session SET lastactivity=,location='/pdaforum/member.php?s=&action=logout' WHERE sessionhash='553368d684ae4aa1b92856c41f9703af'
mysql error: You have an error in your SQL syntax near 'location='/pdaforum/member.php?s=&action=logout' WHERE sessionhash='553368d684ae' at line 1

mysql error number: 1064

Date: Wednesday 20th of February 2002 05:56:28 AM
Script: http://www.pdafrance.com/pdaforum/pd...&action=logout
Referer: http://www.pdafrance.com/pdaforum/index.php?s=
"
and the who's online doesnt show people in the board anymore :(

pdatoon 02-20-2002 12:26 PM

man i dont know what happened.
I had to reupload a bunch of files.
I think it kept corrupting the files on the server.

very weird :rolleyes:

SWFans.net 02-20-2002 08:48 PM

I wonder if there wouldn’t be a way to add to this a tiny bit and insert random usernames for replacement variables in posts?

SWFans.net 02-20-2002 08:49 PM

Quote:

Originally posted by pdatoon
+-------------------------------------------------------------------------------------------------+
| In functions.php, find this code: |
+-------------------------------------------------------------------------------------------------+
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg,$fullpm;
+-------------------------------------------------------------------------------------------------+

I'm running 2.2.2 regular and i dont have the fullpm at the end of the line. Mine is just:
global $DB_site,$replacementsetid,$gzipoutput,$gziplevel, $newpmmsg;

I think some of the variables ($fullpm) that are in that line are from other hacks. I just added the bbusername variable to my line in functions.php and it worked great.

Tim Wheatley 02-20-2002 09:10 PM

Why is this is ANY way useless??

If you have an important new bit of info which EVERYONE should read - put their username in the title - LOL

techno 02-20-2002 11:04 PM

ok, I'm still having problems with this hack. This is the first hack i have ever had problems with, so I am absolutely clueless as to what is going wrong. The pages load, but there all bright and rainbow colored. Most of the .gifs are missing, and at the very top left it says {html doctype}...or something like that.

I am using the version of vB that has the .php3 extension....could that cause any problems?

Psychdrone 02-20-2002 11:31 PM

Quote:

Originally posted by techno
ok, I'm still having problems with this hack. This is the first hack i have ever had problems with, so I am absolutely clueless as to what is going wrong. The pages load, but there all bright and rainbow colored. Most of the .gifs are missing, and at the very top left it says {html doctype}...or something like that.

I am using the version of vB that has the .php3 extension....could that cause any problems?

I bileve that if you actually read the first line
FF, said something like this

Quote:

Note: This hack will only work on PHP 4.0.5 and higher. Sorry for all the others (anyone still using these old versions?!).

techno 02-20-2002 11:54 PM

yes, but i noticed that someone else had the same problem earlier and seems to have gotten it fixed.

Sharp 02-21-2002 01:26 AM

Ahem....testing... {bbusername} :D Neato hack...


All times are GMT. The time now is 04:44 PM.

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.01370 seconds
  • Memory Usage 1,814KB
  • 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
  • (2)bbcode_code_printable
  • (6)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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