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)

Mutt 02-28-2003 09:27 AM

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

Kars10 02-28-2003 09:39 AM

Brilliant!! Works like a charm!!

[high]* Kars10 klicks install! :)[/high]

afterlab 02-28-2003 10:19 AM

Just in time for April Fools jokes too. ;)

Automated 02-28-2003 11:05 AM

LOL, very cool idea :p

Xenon 02-28-2003 11:10 AM

@Mutt: there should be an editbutton beside the new post and new thread button on the top of the thread :)

Boofo 02-28-2003 11:19 AM

Great hack. ;)

2 questions:

How can we add color to the name?
Is there a way to get this to work with thread titles?

Aaron1 02-28-2003 12:50 PM

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 :)

Mutt 02-28-2003 07:56 PM

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.

Boofo 02-28-2003 11:59 PM

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);
    } 


Dean C 03-02-2003 10:47 AM

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

- miSt


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.01206 seconds
  • Memory Usage 1,771KB
  • 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
  • (8)bbcode_php_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
  • (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