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)

Steve Machol 04-08-2002 05:08 AM

Yes, you just make the two changes to functions.php. Although it doesn't specifically say to 'save' and 'reupload', I thought those steps were pretty obvious. Hence, that's what I did. ;)

Fallout2man 04-08-2002 06:40 AM

Would there possibly be a way of doing this, but instead of having to quote the person it actually replaced the variable in the user's post to whomever was viewing the thread?

Editor 04-08-2002 09:57 AM

Nope...we've followed the steps (and tried the ==bbusername== opion) on vB 2.2.5, and no luck. Nothing comes up where the username is meant to.

-=dm=- 04-08-2002 01:42 PM

Im using v2.2.4 now its not working anymore:(
I have also used the fix from smachol...

Steve Machol 04-08-2002 04:25 PM

Quote:

Originally posted by Editor
Nope...we've followed the steps (and tried the ==bbusername== opion) on vB 2.2.5, and no luck. Nothing comes up where the username is meant to.
It works on my 2.2.5 forum. All I did was follow FireFly's instructions exactly. You can check it out for yourself:

http://www.optiboard.com/forums/show...&threadid=4330

Fallout2man 04-08-2002 05:37 PM

But is there any way to integrate it with the sessionhash cookies so that it displays the username in the post according to the cookie on your computer? This hack could really be much more fun if it actually didn't require quoting to use.

Steve Machol 04-08-2002 07:00 PM

What do you mean? This hack doesn't require any quoting. :confused:

Steve Machol 04-09-2002 07:33 PM

All you need to do is make the two changes in functions.php that FireFly posted in the first message in this thread. Then to use the hack, just use {bbusername} in a post.

If that doesn't work for you then I have no idea what to tell you. This ain't that complicated.

CeleronXL 04-09-2002 07:36 PM

Do you need to set replacements or something? It's not working for me.....

CeleronXL 04-09-2002 09:29 PM

Hmm.... I installed it and it disabled the vBMicrostats.... It also still didn't work though and I uninstalled. Are you sure there's no more than those two steps...? No replacements or anything?

Steve Machol 04-09-2002 09:33 PM

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.

Hwulex 04-10-2002 02:50 PM

Excellent.
It didn't work to start with, but I made the changes pointed out by Zaphod (here) and it works a treat.

Be interesting to see how the guys react :D (here)

CeleronXL 04-10-2002 06:27 PM

Ah ha, I found it. Ok, here it is:

PHP Code:

  $findwords=array(=> '{bbusername}');
  
$replacewords=array(=> "$bbuserinfo[username]");
  
$i=1;

  
$findwords=array(=> '{getmicrostats}');
  
$replacewords=array(=> $microstats);
  
$i=1;

  while (
$var=$DB_site->fetch_array($vars) and $i++) {
    if (
$var['findword']!="") {
      
$findwords[$i]=$var['findword'];
      
$replacewords[$i]=$var['replaceword'];
    }
  } 

The microstats and the bbusername hack interfere with eachother. To fix this, what should I do? Should I change the $i=; value on them or something? I'm not very good with this, but someone should know a way to set them each as their own thing.

Admin 04-10-2002 06:34 PM

Replace this:
Code:

  $findwords=array(0 => '{bbusername}');
  $replacewords=array(0 => "$bbuserinfo[username]");
  $i=1;

  $findwords=array(0 => '{getmicrostats}');
  $replacewords=array(0 => $microstats);
  $i=1;

With this:
Code:

        $findwords = array(
                0 => '{bbusername}',
                1 => '{getmicrostats}'
        );
        $replacewords = array(
                0 => $bbuserinfo['username'],
                1 => $$microstats
        );
        $i = 2;


CeleronXL 04-10-2002 06:45 PM

Nice response time, man! That area of the code now looks like this:

PHP Code:

    $findwords = array(
        
=> '{bbusername}',
        
=> '{getmicrostats}'
    
);
    
$replacewords = array(
        
=> $bbuserinfo['username'],
        
=> $microstats
    
);
    
$i 2;

  while (
$var=$DB_site->fetch_array($vars) and $i++) {
    if (
$var['findword']!="") {
      
$findwords[$i]=$var['findword'];
      
$replacewords[$i]=$var['replaceword'];
    }
  }
  
$newtext=str_replace($findwords,$replacewords,$newtext); 

So the Microstats works again, but the {bbusername} just shows up as a blank space in the post..... =/ Is there anything I need to change in the lower portion of the code (beginning with "while ($var=.....").

Btw, I also had to get rid of one of the $'s before microstats....

Admin 04-10-2002 06:52 PM

Make sure $bbuserinfo is still in the global line in dovars().

CeleronXL 04-10-2002 06:55 PM

Thanks!! You are a bloody genius! Works now! W000000t! :D

CeleronXL 04-10-2002 10:35 PM

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.

Admin 04-11-2002 10:10 AM

See the thread by smachol in this forum "Fix replacement" thing.

Slynderdale 04-17-2002 11:31 AM

would it be possible to make it work in certain forums for example forumid 57 and 58?

Admin 04-24-2002 08:56 AM

LOL :D

LaNder 04-27-2002 02:42 PM

Quote:

Originally posted by FireFly
It's possible to limit this hack to admins, yes.
Replace this:
Code:

  $replacewords=array(0 => "$bbuserinfo[username]<!-- auto name hack -->");
with this:
Code:

  $replacewords=array(0 => iif($bbuserinfo['usergroupid']==6,"$bbuserinfo[username]<!-- auto name hack -->",'{bbusername}'));


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

Robouk5 04-27-2002 10:04 PM

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

bandersen 05-10-2002 03:26 PM

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?

zeedy2k 05-19-2002 02:58 PM

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

Admin 05-19-2002 03:12 PM

Have you installed the "Fix" from smachol?

zeedy2k 05-20-2002 10:51 PM

call me dumb of whatever, but I can seem to find smachol's fix,

Anyone got the Direct URL to it?

zeedy2k 05-20-2002 11:10 PM

found it

Boofo 05-21-2002 05:04 AM

I tried to install this but I have the midrostats hack installed so I couldn't find the code I needed to change like it is in the text file. Also, what is the $fullpm part of the code it needs to replace? That wasn't in there at all. Does anyone know how I can do this with microstats installed on 2.2.5? :)

Code:

global $DB_site,$replacementsetid,$gzipoutput,$gziplevel,$newpmmsg,$fullpm;

zeedy2k 05-21-2002 05:32 PM

Did anyone fix this so only an admin can have the ability to post using it but everyone can view it?

zeedy2k 05-22-2002 04:13 PM

Anyone?

Vivi Ornitier 06-11-2002 12:26 AM

can we fix this hack for vb 2.2.6? This hack is one of the best hacks and i need it again!

Boofo 06-11-2002 12:43 AM

Just install the hack and don't tell your users you have it. If they don't know the variable you are using, they can't use it. :)

Quote:

Originally posted by zeedy2k
Did anyone fix this so only an admin can have the ability to post using it but everyone can view it?

Admin 06-11-2002 11:03 AM

What part of it doesn't work, Vivi?

Vivi Ornitier 06-11-2002 10:17 PM

well it's not working on these forums currently, so there must be something wrong with it being integrated into 2.2.6. if u use {bbusername} it's just displays that, and not the username.

Steve Machol 06-11-2002 10:57 PM

It doesn't work on these forums because FireFly uninstalled the hack. it does work on my 2.2.6 forum. Here it is in action as part of my April Fool's joke on my members:

http://www.optiboard.com/forums/show...&threadid=4330

If you read through this thread you would have noticed that you may need to apply this hack as well:

https://vborg.vbsupport.ru/showthrea...ht=replacement

cteselle 06-17-2002 09:28 PM

I'm having an interesting problem with this hack on my 2.2.6 installation. This hack will work in the subject line, but not the body of the message. This worked just fine in my previous 2.2.2 installation.

Any ideas?

Steve Machol 06-17-2002 09:38 PM

I can't say I have the same problem. It's works fine on my 2.2.6 forum. Did you apply the second hack I listed in my previous message?

cteselle 06-17-2002 10:16 PM

:nervous:

That did the trick!

Thanks!

Talisman 11-04-2002 04:02 AM

Just installed the =bbusername= variation to this hack.

(Heaven help us.)

:banana:


All times are GMT. The time now is 10:54 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.01284 seconds
  • Memory Usage 1,827KB
  • 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
  • (5)bbcode_code_printable
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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