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?


All times are GMT. The time now is 01: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.01100 seconds
  • Memory Usage 1,728KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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