Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases

Reply
 
Thread Tools
[you] vbcode Details »»
[you] vbcode
Version: 1.00, by Mutt Mutt is offline
Developer Last Online: Mar 2013 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-27-2003 Last Update: Never Installs: 38
 
No support by the author.

<a href="https://vborg.vbsupport.ru/showthread.php?s=&threadid=38069&highlight=vbcode" target="_blank">Inspired by FireFly's /me vB Code</a>

When reading the /me hack thread I started laughing at the idea of a [you] tag. This isn't much of a hack, but it was fun. Put [you] in the thread and it is replaced by the person's name who is reading the thread. if it is a guest, [you] is simply replace by the word you.

I had to change this to a text file to avoid problems. Should be fine now

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #22  
Old 03-02-2003, 05:57 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #23  
Old 03-02-2003, 10:19 PM
Steve123 Steve123 is offline
 
Join Date: Sep 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeh..

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

it shows [you] in the navbar
Reply With Quote
  #24  
Old 03-02-2003, 10:25 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #25  
Old 03-02-2003, 10:27 PM
Steve123 Steve123 is offline
 
Join Date: Sep 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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?
Reply With Quote
  #26  
Old 03-02-2003, 10:43 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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);
    } 
Reply With Quote
  #27  
Old 03-02-2003, 11:13 PM
traekwon traekwon is offline
 
Join Date: Mar 2002
Posts: 46
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #28  
Old 03-02-2003, 11:20 PM
Steve123 Steve123 is offline
 
Join Date: Sep 2002
Posts: 105
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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..
Reply With Quote
  #29  
Old 03-03-2003, 12:01 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #30  
Old 03-03-2003, 03:54 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #31  
Old 03-03-2003, 01:44 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:45 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05949 seconds
  • Memory Usage 2,315KB
  • Queries Executed 27 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_php
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete