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

thats why I didn't want to touch the subject. just way to many places to miss something and with little payback.

as for fixing the quote, yeah it's do-able and might be funny but quoting the message is sortof how people figure out it's not about them. I think I like it though and will do it. I made this forum controlable (on in some of in others like the IMG tag) and when I finish the cp I'll re-post. (right now, I just set the var via phpmyadmin so I could turn it off everywhere except our prank forum.)
Reply With Quote
  #33  
Old 03-04-2003, 09:27 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have about every base covered for this in vbulletin. If you want to check the file out, let me know, It's about 20K.

Being able to turn it off and on per forum would be great!
Reply With Quote
  #34  
Old 03-04-2003, 09:32 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is there a way to have this set up so only certain usergroups can use it? I can edit the code in functions.php, I suppose.
Reply With Quote
  #35  
Old 03-04-2003, 09:34 PM
chr@nox chr@nox is offline
 
Join Date: Nov 2001
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

first of all, great hack! thanx alot

second..

isn't it easy to make it so to use the forum stuff?

so $forum[useyou] for example?

if you want i can post the changes for it

Greetings,

Chratnox
Reply With Quote
  #36  
Old 03-04-2003, 09:37 PM
sonic3d's Avatar
sonic3d sonic3d is offline
 
Join Date: Jan 2002
Location: Chicago
Posts: 301
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

can u send me the file or upload it somewhere so i can download it. thanx.

l8er
sonic
Reply With Quote
  #37  
Old 03-04-2003, 10:47 PM
chr@nox chr@nox is offline
 
Join Date: Nov 2001
Posts: 34
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Boofo
Is there a way to have this set up so only certain usergroups can use it? I can edit the code in functions.php, I suppose.
u can use if ($bbusergroup == 6 or $bbusergroup == 5) right?
Reply With Quote
  #38  
Old 03-04-2003, 11:00 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 chr@nox


u can use if ($bbusergroup == 6 or $bbusergroup == 5) right?
If you mean if ($bbuserinfo[usergroupid] == 6 or $bbuserinfo[usergroupid]== 5), I thought about doing that but the idea to allow it in certain forums sounds better though.
Reply With Quote
  #39  
Old 03-05-2003, 08:09 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hey people, I finished the cp so you can turn it on/off but it is working and I'll get directions written asap.

just wanted to throw out a couple other ideas/mods to you

these also work if you wanted to get real crazy
PHP Code:
            $bbcode preg_replace("/(\[)(youemail)(])/siU"$bbuserinfo[email], $bbcode);
            
$bbcode preg_replace("/(\[)(youhome)(])/siU"$bbuserinfo[homepage], $bbcode);
            
$bbcode preg_replace("/(\[)(youtitle)(])/siU"$bbuserinfo[usertitle], $bbcode);
            
$bbcode preg_replace("/(\[)(youbday)(])/siU"$bbuserinfo[birthday], $bbcode);
            
$bbcode preg_replace("/(\[)(youarea)(])/siU"$bbuserinfo[field2], $bbcode);
            
$bbcode preg_replace("/(\[)(yousex)(])/siU"$bbuserinfo[field7], $bbcode);
            
$bbcode preg_replace("/(\[)(youint)(])/siU"$bbuserinfo[field3], $bbcode); 
you'd have to modify the custom fields to fit your site, but this should give you the basic idea. All profile fields including custom fields can be used!!

if you'd like to give your staff a little help

you can change this line
PHP Code:
$bbcode preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $bbcode); 
to this
PHP Code:
if ($bbuserinfo[usergroupid]==|| $bbuserinfo[usergroupid]==|| $bbuserinfo[usergroupid]==7) {
                
$bbcode preg_replace("/(\[)(you)(])/siU""<b><i><a title=\"[you] code\">".$bbuserinfo[username]."</a></i></b>"$bbcode);
            } else {
                
$bbcode preg_replace("/(\[)(you)(])/siU"$bbuserinfo[username], $bbcode);
            } 
that way mods and admins will see the name in bold and mousing over gives you notice that it's the [you] code

PS - if you wanted to restrict usage to certain usergroups, bbuserinfo wouldn't do it. you'd need to check the usergroupid of the person who posted. bbuserinfo is for the person reading the post
Reply With Quote
  #40  
Old 03-05-2003, 08:15 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Be looking forward to the update.

If you use all of these, wouldn't you have to go through all of the places to parse it out like with the first code? And I take it this goes in the functions.php with the first code, right?

Quote:
$bbcode = preg_replace("/(\[)(youemail)(])/siU", $bbuserinfo[email], $bbcode);
$bbcode = preg_replace("/(\[)(youhome)(])/siU", $bbuserinfo[homepage], $bbcode);
$bbcode = preg_replace("/(\[)(youtitle)(])/siU", $bbuserinfo[usertitle], $bbcode);
$bbcode = preg_replace("/(\[)(youbday)(])/siU", $bbuserinfo[birthday], $bbcode);
$bbcode = preg_replace("/(\[)(youarea)(])/siU", $bbuserinfo[field2], $bbcode);
$bbcode = preg_replace("/(\[)(yousex)(])/siU", $bbuserinfo[field7], $bbcode);
$bbcode = preg_replace("/(\[)(youint)(])/siU", $bbuserinfo[field3], $bbcode);
Reply With Quote
  #41  
Old 03-05-2003, 08:22 PM
Mutt's Avatar
Mutt Mutt is offline
 
Join Date: Nov 2001
Posts: 331
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

just add those line right after

$bbcode = preg_replace("/(\[)(you)(])/siU", $bbuserinfo[username], $bbcode);

thats it

now for you it might be a ton more because you added it to subjects as well.
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 05:41 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.04429 seconds
  • Memory Usage 2,320KB
  • 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
  • (3)bbcode_php
  • (3)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_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