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 03-04-2003 09:23 PM

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

Boofo 03-04-2003 09:27 PM

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

Boofo 03-04-2003 09:32 PM

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

chr@nox 03-04-2003 09:34 PM

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

sonic3d 03-04-2003 09:37 PM

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

l8er
sonic

chr@nox 03-04-2003 10:47 PM

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?

Boofo 03-04-2003 11:00 PM

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

Mutt 03-05-2003 08:09 PM

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

Boofo 03-05-2003 08:15 PM

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

Mutt 03-05-2003 08:22 PM

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.


All times are GMT. The time now is 07:07 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.01123 seconds
  • Memory Usage 1,758KB
  • 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
  • (3)bbcode_php_printable
  • (3)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