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
  #12  
Old 02-28-2003, 09:27 AM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I text filed it up, let me know if that does it for you

how do I edit the directions in the hack DB? I don't see an edit button
Reply With Quote
  #13  
Old 02-28-2003, 09:39 AM
Kars10's Avatar
Kars10 Kars10 is offline
 
Join Date: Jun 2002
Location: Germany/Franken
Posts: 748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Brilliant!! Works like a charm!!

[high]* Kars10 klicks install! [/high]
Reply With Quote
  #14  
Old 02-28-2003, 10:19 AM
afterlab's Avatar
afterlab afterlab is offline
 
Join Date: Oct 2001
Location: Dallas, TX
Posts: 327
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just in time for April Fools jokes too.
Reply With Quote
  #15  
Old 02-28-2003, 11:05 AM
Automated Automated is offline
 
Join Date: Sep 2002
Posts: 266
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

LOL, very cool idea
Reply With Quote
  #16  
Old 02-28-2003, 11:10 AM
Xenon's Avatar
Xenon Xenon is offline
 
Join Date: Oct 2001
Location: Bavaria
Posts: 12,878
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Mutt: there should be an editbutton beside the new post and new thread button on the top of the thread
Reply With Quote
  #17  
Old 02-28-2003, 11:19 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great hack.

2 questions:

How can we add color to the name?
Is there a way to get this to work with thread titles?
Reply With Quote
  #18  
Old 02-28-2003, 12:50 PM
Aaron1's Avatar
Aaron1 Aaron1 is offline
 
Join Date: Oct 2002
Location: Amsterdam
Posts: 200
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is great!
Although many users on my board are getting paranoid with it.
I really needed to explain whenever i post:

Hey [you] where's my money?

ps: No i, haven't received any addtional money with it
Reply With Quote
  #19  
Old 02-28-2003, 07:56 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

My god, I made this yesterday and all hell has broken out on my board. there has been more posting today than ever before. all the lurkers came out to find out why everyone is flaming them. it's the funiiest thing. I recieved all inds of emails and phone calls. My site is a Howard Stern Fan Site and High Pitch Eric called today very upset because Joey Boots was talking ++++ about him all night and everyone is picking on him. It was too much. I had tears in my eyes trying to explain the whole thing to him. It was too damn funny. I hope I don't lose members over this.

I'll be playing with it and giving it some options. I'm going to set it so you can limit the [you] tag to just mods/admin plus make it so you can limit it to specific forums. I have a prank forum that this will be perfect for. I'm going to look into adding profile field info also. didn't even look at the code yet, but something like [you]user title[/you] or [you]birthday[/you]. If it's reasonable, I'll be sure to include custom profile fields and limit the working field to just those viewable in the profile.

this hack is evil.

I've also been asked to get it working for thread titles. I'll look into it. Would be fun, but not sure it would be worth it. thread titles are used in so many places like your profile, the search page, etc. Seems like alot of edits would be necessary.

PS - with so many people upset about the recent flaming against [you] I've started a poll to see you will be banned. Joey Boots or [you]. Maybe I'm going to far, but it's so funny.
Reply With Quote
  #20  
Old 02-28-2003, 11:59 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, here they are. The edits for the thread titles and the post titles. If I forgot to post any other needed areas here, let me know. I also have code needed if you have Logician's Download thread hack, PPN's vb Last title hack and the threadintro hack (by nicksaunders) if anyone needs those fixes.

In functions.php, find:

PHP Code:
    // do posts from ignored users
    
if (($ignore[$post[userid]] and $post[userid] != 0)) {
        eval(
"\$retval = \"".gettemplate("postbit_ignore")."\";");
    } else {
        eval(
"\$retval = \"".gettemplate("postbit")."\";");
    }
    return 
$retval;

Add this code ABOVE it:

PHP Code:
    if ($bbuserinfo[userid]>0) {
        
$post[title] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $post[title]);
    } else {
        
$post[title] = preg_replace("/(\[)(you)(])/siU""you"$post[title]);
    } 
In forumdisplay.php, find:

PHP Code:
eval("\$forumdisplaybits .= \"".gettemplate('forumdisplaybit')."\";"); 
ABOVE it add:

PHP Code:
    if ($bbuserinfo[userid]>0) {
    
$thread[title] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $thread[title]);
        
$thread[description] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $thread[description]);
    } else {
    
$thread[title] = preg_replace("/(\[)(you)(])/siU""you"$thread[title]);
        
$thread[description] = preg_replace("/(\[)(you)(])/siU""you"$thread[description]);
    } 
In search.php, find:

PHP Code:
      if ($searchresult[attach]>0) {
        
$paperclip="<img src=\"https://vborg.vbsupport.ru/images/paperclip.gif\" alt=\"$searchresult[attach] Attachment(s)\" border=\"0\">";
      } else {
        unset(
$paperclip);
      } 
BELOW it add:

PHP Code:
    if ($bbuserinfo[userid]>0) {
    
$searchresult[pagetext] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $searchresult[pagetext]);
        
$searchresult[posttitle] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $searchresult[posttitle]);
        
$searchresult[threadtitle] = preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $searchresult[threadtitle]);
    } else {
    
$searchresult[pagetext] = preg_replace("/(\[)(you)(])/siU""you"$searchresult[pagetext]);
        
$searchresult[posttitle] = preg_replace("/(\[)(you)(])/siU""you"$searchresult[posttitle]);
        
$searchresult[threadtitle] = preg_replace("/(\[)(you)(])/siU""you"$searchresult[threadtitle]);
    } 
For the Profile page:

In member.php, find:

PHP Code:
      $getperms=getpermissions($getlastpost[forumid]);
      if (
$getperms[canview]) {
        
$lastposttitle=$getlastpost[title]; 
BELOW it add:

PHP Code:
    if ($bbuserinfo[userid]>0) {
        
$lastposttitle preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $lastposttitle);
    } else {
        
$lastposttitle preg_replace("/(\[)(you)(])/siU""you"$lastposttitle);
    } 
Reply With Quote
  #21  
Old 03-02-2003, 10:47 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Wow thanks for that piece of code Boofo. Didn't realise you know so much PHP

- miSt
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:53 PM.


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.05106 seconds
  • Memory Usage 2,334KB
  • Queries Executed 25 (?)
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
  • (8)bbcode_php
  • (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
  • (3)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_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