vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Quick question (https://vborg.vbsupport.ru/showthread.php?t=50833)

DWZ 03-26-2003 07:37 AM

Quick question
 
Hey everyone,

I've been planing on using FireFly's Reader's name inside post hack for April Fools on my users.

Now I wanted to make a small edit to it which I asked in the thread but didn't get any response, which is fine, I can understand that no one cares much for that hack.

I was just hopeing someone could look over my code.

now the thing is, I only want this hack to work for one user. So, I was thinking I could replace this:
PHP Code:

 $replacewords=array(=> "$bbuserinfo[username]"); 

with this:
PHP Code:

  $replacewords=array(=> iif($bbuserinfo['userid']==xxxx,"$bbuserinfo[username]",'=bbusername=')); 

(I'm using Zaphod's edit to use =bbusername=)

Any idea if that could work?

Thanks :)

Chris Gwynne 03-26-2003 08:11 AM

If you only want it to work for ONE user, then why not just put in his/her name instead lol....

DWZ 03-26-2003 09:39 AM

No, I mean that I only want one user to be able to use the =bbusername= command.

i.e. when this special member does it, it works as it normaly would, whoever reads it sees their own nickname.

However, if anyone else tries to do it, it won't work, it will just display =bbusername=

mr e 03-26-2003 03:34 PM

use $post[username] instead

DWZ 03-26-2003 07:06 PM

Quote:

Today at 03:34 AM mr e said this in Post #4
use $post[username] instead
huh? wouldn't that come up with the posters username?

DWZ 03-27-2003 09:07 PM

No one knows? I thought it would be fairly easy question...

mr e 03-27-2003 09:24 PM

no i meant like this
PHP Code:

$replacewords=array(=> iif($post['userid']==xxxx,"$bbuserinfo[username]",'=bbusername=')); 

even though i used the userid just now, which is probably better


All times are GMT. The time now is 05:41 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.01797 seconds
  • Memory Usage 1,736KB
  • 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
  • (3)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete