The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Default BBCode formatting for user's posts (LITE VERSION) Details »» | ||||||||||||||||||||||||||||
Default BBCode formatting for user's posts (LITE VERSION)
Developer Last Online: Nov 2013
Quote:
Version 1.02: Regular expression bug with colors and fonts fixed. Version 1.01: Regular expression for "Default BBCode" field edited to support fonts with spaces in them. ADDITIONAL FEATURES -choose in your user CP whether to see any default BBCode at all 1 Product install 2 Custom profile fields 1 Template edit (in 2 templates) 2 Plugin edits INSTALLATION INSTRUCTIONS 1. Download the product and import it. 2. Add two custom profile fields: Profile field type: Single-line textbox Title: Default BBCode Description: You may choose to make a default BBCode formatting for each post. Allowed tags: [b] [i] [u] [left] [right] [center] [font] [color] [size] Please type in only the opening tags. Max length of allowed user input: Doesn't really matter, but make sure it's enough Display size: 25 Field Required: No Field Editable by User: Yes Private Field: Yes Field Searchable on Members List: No Show on Members List: No Regular expression: ^(\[(b|i|u|left|right|center|font|color|size)(\=(\'|") ?(#[0-9a-fA-F]+)?[\w\s]+)?('|")?\])*$ Display Page: Options: Other (Here you can edit the description and regular expression to allow or disallow BBCode - in the regular expression, just make sure to separate all of them with |.) Profile field type: Single-selection radio buttons Title: Show Default BBCode? Description: Selecting no will cause all posts to be displayed without users' automatic BBCode formatting. Options: Yes No Set Default: Yes Field Required: No Field Editable by User: Yes Private Field: Yes Field Searchable on Members List: No Show on Members List: No Allow user to input their own value for this option: No Display Page: Options: Thread Viewing 3. Make the following edits: ############## TEMPLATE EDITS ################### In postbit and postbit_legacy FIND Code:
$post[message] Code:
<if condition="$post['dbbcopen'] AND ($bbuserinfo['field234'] == 'Yes')">$post[dbbcopen]</if> $post[message] <if condition="$post['dbbcclose'] AND ($bbuserinfo['field234'] == 'Yes')">$post[dbbcclose]</if> ################## PLUGIN EDITS ################## After installing the product, you will have to edit the following plugins: Set default BBCode for post preview Default BBCode setup Find "field6" in both of them and replace it with your "Default BBCode" field. At this point the installation should be complete. Enjoy! Show Your Support
|
Comments |
#2
|
||||
|
||||
Not bad there.
|
#3
|
||||
|
||||
So it's working for you?
|
#4
|
|||
|
|||
Hi,
Installed it on my forum. But it change all hisotry threads with default font settings which is not good as thats not what user want. They may want to use default settings in most of their threads but not all 1000s of threads they made in last 4-5 years. Obvious solution is to go for other thread which does provide this functionality that is allow it in thread to select/deselect this option. But I hope you will manage to add this functionality as part of plug-in. Its easy to manage a plug-in than code modifications. Looking foward to see future versions of this hack. Regards, |
#5
|
||||
|
||||
I've gotten better at this, so I might be able to get the full functionality into a product - we'll see about it. Thanks for the comment.
|
#6
|
||||
|
||||
ive been interested in something like this for some time now ... but im new to it all and need to ask ...
Quote:
|
#7
|
||||
|
||||
does this still work with 3.6?
Quote:
|
#8
|
||||
|
||||
how do i find my default bbcode?
|
#9
|
||||
|
||||
duh, took me a few ... er, i mean ... a little while, but i figure it out. its the field number that you assign to it when you make it in the profile options. lol. :tired:
|
#10
|
||||
|
||||
i got a problem ... i have my default font set up. i no longer change my font to my prefered font when i make a post.
when i view my own posts my new default shows up, but when others view my posts it shows up like the font your reading now. can you help me fix it so everyone sees the font ive chosen for default? (considering that they have chosen "yes" to "show default font?" in the user cp) nevermind ... i had the permissions set to private in the control panel ... works like a charm now except that unregistered or users not logged in dont see the users default font. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|