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)
-   -   [you] vbcode (https://vborg.vbsupport.ru/showthread.php?t=49458)

Chris M 03-02-2003 05:57 PM

Heh...

Seems like a cool hack!:)

I'll be sure to install it and check it out when I get my machine back up and running!:)

Satan

Steve123 03-02-2003 10:19 PM

yeh..

how would u get it to work in the navbar..

it shows [you] in the navbar :)

Boofo 03-02-2003 10:25 PM

Quote:

Originally posted by Steve123
yeh..

how would u get it to work in the navbar..

it shows [you] in the navbar :)

I've got a partial fix for it where it will show you (or whatever word you change it to in the second preg-replace statement) instead of [you], but I can't get it to replace it with the username yet. I am working on it and will release the fix as soon as I come up with it. ;)

Steve123 03-02-2003 10:27 PM

yeh i was about to go in and have a look myself..

if i figure it out ill tell ya :P

whats ya partial fix?

Boofo 03-02-2003 10:43 PM

Completed working code for the forum navbar (if you make a forum with the [you] in it (like "[you]'s Personal Forum"). Thanks to Xenon for pointing out something I missed, that was really, really stupid of me. ;)

In admin/functions.php, find:

PHP Code:

function makenav($id,$idtype="forum",$highlightlast=1) {
  global 
$DB_site,$nav_url,$nav_title,$session,$threadcache

and replace it with:

PHP Code:

function makenav($id,$idtype="forum",$highlightlast=1) {
  global 
$DB_site,$nav_url,$nav_title,$session,$threadcache,$bbuserinfo

then find:

PHP Code:

      $nav_url="forumdisplay.php?s=$session[sessionhash]&forumid=$id";
      
$nav_title=$foruminfo[title]; 

and BELOW it add:

PHP Code:

    if ($bbuserinfo[userid]>0) {
        
$nav_title preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $nav_title);
    } else {
        
$nav_title preg_replace("/(\[)(you)(])/siU""you"$nav_title);
    } 


traekwon 03-02-2003 11:13 PM

Is there anyway to make it so when the user quotes your post it doesn't show up as [you]?

I believe in FireFly's /me hack when you quoted a post it didn't come up as /me.

Steve123 03-02-2003 11:20 PM

hhahahaa..

ive had the remove the damn thing..

with 25 ppl online... as soon as i added all hell broke loose..

o wells... its an evil hack..

Boofo 03-03-2003 12:01 AM

Quote:

Originally posted by traekwon
Is there anyway to make it so when the user quotes your post it doesn't show up as [you]?

I believe in FireFly's /me hack when you quoted a post it didn't come up as /me.

Simple fix.

In the newreply.php, find:

PHP Code:

    eval("\$message = \"".gettemplate("quotereply",1,0)."\";"); 

and ABOVE it add:

PHP Code:

    if ($bbuserinfo[userid]>and $bbuserinfo[usergroupid]!=6) {
        
$pagetext trim(preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $pagetext));
    } else if (
$bbuserinfo[usergroupid]!=6) {
        
$pagetext trim(preg_replace("/(\[)(you)(])/siU""you"$pagetext));
    } 

I did it this way so the Admin could still see it as [you] in case there was ever any question about it.

Boofo 03-03-2003 03:54 AM

Mutt, you were right, there are almost too many changes to make to make this not show up in all of the places it can show up. :) I just got through spending the last 2 hours finding all of the places it can show up. I think I have them all nailed now. The only place left is the forum navbar. Still working on that one. Here is a list of all the files that need to be edited.

functions.php - 4 edits
showthread.php - 3 edits
index.php - 2 edits
usercp.php - 1 edit
forumdisplay.php - 3 edits
newreply.php - 1 edit
search.php - 1 edit
member.php - 1 edit
private.php - 3 edits
private2.php - 1 edit

Boofo 03-03-2003 01:44 PM

The navbar fix is working now in the post below if anyone is still interested. ;)

https://vborg.vbsupport.ru/showthrea...&postid=360359


All times are GMT. The time now is 06:54 AM.

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.01091 seconds
  • Memory Usage 1,755KB
  • 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
  • (6)bbcode_php_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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