Go Back   vb.org Archive > vBulletin Modifications > vBulletin 3.8 Modifications > vBulletin 3.8 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Advanced [YOU] BB Code (with options) by BOP5 Details »»
Advanced [YOU] BB Code (with options) by BOP5
Version: 0.92, by BirdOPrey5 (Senior Member) BirdOPrey5 is offline
Developer Last Online: Aug 2023 Show Printable Version Email this Page

Category: Miscellaneous Hacks - Version: 3.8.x Rating:
Released: 11-27-2010 Last Update: 12-06-2010 Installs: 27
Supported Uses Plugins
Re-useable Code Translations Is in Beta Stage  

Developer: BirdOPrey5 - https://vborg.vbsupport.ru/member.php?u=258922

Tested With vBulletin 3.8.x and 4.0.8, may work with older and newer versions.
VB 4.x Thread: https://vborg.vbsupport.ru/showthread.php?t=254373

Demo: http://www.juot.net/forums/showthread.php?t=47856

This mod introduces the [YOU] "BB Code." When a user types in [YOU] the forum will replace it with the Username of the User currently viewing the forum. For example if you make a post that says "[YOU] was here." and your username is BirdOPrey5 you will see, after submitting the post, "BirdOPrey5 was here." Meanwhile at the same time another user, say Joe 113, will see "Joe 113 was here."

Why do this? The most prevalent reason is just to mess with people, use your imagination on how... But there can be some legitimate uses too. I have a "Welcome" thread on my forum that Welcome's every user by name. They will see a sticky in my off-topic with their username to make them feel special- eventually they'll figure out it was the [you] code, but not for a while usually.

I have marked this mod both as BETA and Reusable Code. THIS IS A STABLE BETA and I run it on my forum without incident. It is a BETA because there are some minor missing features I'll detail a little later. However it works for my needs so it's not a priority for me to further develop. The code is reusable in hopes someone with more time and skill might finish everything and/or expand upon it.

There are other [YOU] BB Codes but what makes this one special is:
  • It's "Advanced" - There are settings in vBulletin options to enable, disable, block, and make users immune to this code.
  • You can set a phrase to be displayed to guests/unregistered users who otherwise would simply see "Unregistered" in place of [you].
  • This [YOU] code works in search result thread titles, including "New Posts." Some other [you] codes don't work here.
  • [YOU] works in Signatures

Usage is simple... just type [you] or [YOU] into any of the following locations:
  • A Post or Thread Title
  • The Body of a Post (Message)
  • Your Signature
  • Your User title
  • Polls

---INSTALLATION INSTRUCTIONS---

This isn't a true BB Code, it's a mod that acts LIKE a BB Code.

In Admin CP go to Plugins & Products -> Manage Products -> Add/Import Product
Click on "Choose File" and browse to the product XML file that is included in this .zip.
Click on "Import" and let the file import.

You MUST go to the Mod Options to Enable this Mod and set its settings. It is OFF by default.
In Admin CP go to vBulletin Options -> Advanced [YOU] Settings (near the bottom)
Choose "Yes" to enable the mod.

In settings you can set:
Block Usergroups - Any usergroups you enter here will not be allowed to use the [YOU] code in their posts, signatures, or user titles. If they attempt to use [YOU] everyone will simply see [YOU] - no replacement will be made.

Disable [YOU] in Selected Forums - If you don't want to enable [YOU] in certain forums enter their forum ids here. If anyone uses [YOU] in these forums the other users will see [YOU] - no replacement will be made.

[YOU] for Guests - This is the name, or word, you want unregistered/not logged in/guest users to see if they come across a post that uses [YOU]. In other [you] BB Codes guests would simply see "Unregistered" - now you can make it anything. I suggest simply "you."

Immune Usergroups - Anyone in the immune usergroups will always see the code [YOU] no matter who uses it or where. This is useful possibly for mods or admins who don't want to risk being fooled by this code.

---LIMITATONS OF THIS BETA---

The main limitation of this Beta is that the option "Block Usergroups From Using [YOU]" isn't fully implemented. It WILL block [YOU] from working in their posts and signatures, which is most important- but in certain areas like "New Post Preview" and "Review" the block doesn't work. This isn't a big deal because the other users of the forum will never have the [YOU] code work on posts by blocked users, but for the user who is blocked it may be confusing. If they view a preview of their post they will see the [YOU] code working but when they submit it, it won't work.

I couldn't get this working in this version because it would require another database query (or at least changing an existing one) and that is beyond my ability at the moment. I hope to fix this one day, unless someone else comes along and does it first.

Also when previewing your signature in your User CP you will see the [YOU] code in the signature, however it WILL work correctly in posts with the signature attached.

Please Mark as Installed if you use this.

As always use this mod at your own risk. I strongly suggest backing up your site before making any changes.

Update - 11/28/2010 - Updated to V 0.91 - Added 1 plugin for breadcrumbs
Update - 12/7/2010 - Updated to 0.92 - Added 2 plugins to work in Polls (Questions and Options)

Install as normal, Allow Overwrite = Yes

Download Now

File Type: zip Advanced YOU BB Code by BOP5.zip (4.8 KB, 94 views)

Screenshots

File Type: png ss_advyouadmin.png (58.2 KB, 0 views)
File Type: png ss_advyou.png (249.1 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
m7sen

Comments
  #2  
Old 11-28-2010, 07:31 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Reserved.
Reply With Quote
  #3  
Old 12-07-2010, 03:55 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Updated to v 0.92 - Added plugins to let [you] work in poll questions and options.
Reply With Quote
  #4  
Old 12-13-2010, 08:53 PM
Blueracer66's Avatar
Blueracer66 Blueracer66 is offline
 
Join Date: Sep 2008
Location: San Jose, California
Posts: 80
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*Installed. Excellent!* I just installed this on my board at http://allconsolegamers.com/ and seems to be working well!
Reply With Quote
  #5  
Old 01-07-2011, 12:58 PM
BirdOPrey5's Avatar
BirdOPrey5 BirdOPrey5 is offline
Senior Member
 
Join Date: Jun 2008
Location: New York
Posts: 10,610
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To get [YOU] to work in VB Advanced CMPS "Recent Threads" requires a manual file edit since hooks aren't available... also it will convert all [YOU] codes, it won't be able to be restricted by usergroup- but I find this is a lot better than nothing.

In your /modules/ directory edit your recentthreads.php file.

Find the line:
PHP Code:
            {
                
// The vB preview function can be intensive w/ long strings, so let's try to save some overhead
                
$thread['preview'] = substr($thread['preview'], 0, ($vbulletin->options['threadpreview'] * 10));
            } 
It's around line 246 in VBA version 3.2.2...
And directly under that put:
PHP Code:

//[YOU] Code in Recent Threads 
   //Replace [YOU] (uppercase)
   
$thread['title'] = str_replace("[YOU]"$vbulletin->userinfo['username'], $thread['title']);

   
//Replace [you] (lowercase)
   
$thread['title'] = str_replace("[you]"$vbulletin->userinfo['username'], $thread['title']); 
I suggest saving a backup of the original file just in case, but it's working fine for me.
Reply With Quote
  #6  
Old 06-14-2012, 04:25 AM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I just have to say that this tag is amazingly fun! I installed it right before April Fools this year for a specific purpose that day. We had a couple of threads get started that day that are still going, and going, and going.... all these users that no one had ever heard of and they are all posting and wondering why they see their name in a thread title! So much fun! (I did have to modify the code to make it only work in a couple of threads after some users realized how to use it in a negative way though. ) Thanks.
Reply With Quote
Благодарность от:
BirdOPrey5
Reply


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 03:18 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.04142 seconds
  • Memory Usage 2,307KB
  • Queries Executed 22 (?)
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
  • (2)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (6)post_thanks_box
  • (2)post_thanks_box_bit
  • (6)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit
  • (6)post_thanks_postbit_info
  • (5)postbit
  • (3)postbit_attachment
  • (6)postbit_onlinestatus
  • (6)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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete