The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Personal Font/Color in Posts Details »» | |||||||||||||||||||||||||
Personal Font/Color in Posts
by gio~logist Allow users to change what color/font their posts are in threads Via UserCP [high]Step 1[/high] [high]Go to User Profile Fields >> Add New User Profile Field[/high] Choose A "Single-Line Text Box" [high]Title:[/high] "Your Font Color In Posts" [high]Description:[/high] This is the color of the font in which will appear in your posts. (Ex: #ff0000 is red) [high]Display Size:[/high] 11 [high]Max length of allowed user input:[/high] 8 [high]HIT SAVE[/high] [high]Step 2[/high] [high]Go to User Profile Fields >> Add New User Profile Field[/high] Choose A "Single-Line Text Box" [high]Title:[/high] "Your Font In Posts" [high]Description:[/high] This is the font in which will appear in your posts. (Ex: Tahoma) [high]Display Size:[/high] 15 [high]Max length of allowed user input:[/high] 20 [high]HIT SAVE[/high] [high]Step 3[/high] Now go to edit your postbit template and search for this code: HTML Code:
$post[message] HTML Code:
<if condition="$post['fieldx'] != '' OR $post['fieldx'] != ''"> <font style="font-family:$post[fieldx]; color:$post[fieldx];">$post[message]</font> <else /> $post[message] </if> [high]HIT SAVE[/high] [high]AND WE'RE DONE![/high] [high]Addons Already Made[/high] Glowing Posts For Mods, S.Mods, and Admins [high]Planned Addons For Next Release[/high] - Nothing So Far Feel Free to Post Any Ideas/Suggestions Supporters / CoAuthors Show Your Support
|
Comments |
#72
|
||||
|
||||
Hey I studied all replies here and combinded it one step more.
In your post bit, find the <!-- message --> bars and take it from there with the code below to replace the whole section. Code:
<!-- message --> <div id="post_message_$post[postid]"> <if condition="$post['fieldX'] != '' OR $post['fieldY'] != '' AND is_member_of($bbuserinfo, Z)"> <font style="font-family:$post[fieldX]; color:$post[fieldY];">$post[message]</font> </div> <else /> $post[message] </if> </div> <!-- / message --> Meaning, long as your a active status in "x" usergroup, it will then display your other font edits. I tested it out, fully works, changed all my posts etc, then tested it when I removed the usergroup status, and back to default everything went. =) I "might" add bold or italic function to it too. I know I could ALSO do mod/admin type setups.. however, I rather not force my mods/admins to be stuck with what I give em. Then glow looks ugly some.. not to mention most everyone on forums is a FireFox user. Anyways hope this can help someone too. =) |
#73
|
|||
|
|||
Thanks Mysticales,
working now |
#74
|
|||
|
|||
Is there a chance we have this hack for vb 3.60
|
#75
|
|||
|
|||
Not working for me in 3.5.4, have posted my postbit template here with the changed code in red.... can anyone tell me where I am going wrong please???
Thanks. <!-- post #$post[postid] --> <if condition="$show['spacer']"> $spacer_open <div id="edit$post[postid]" style="padding:0px 0px $stylevar[cellpadding]px 0px"> <if condition="!$post['islastshown']"><!-- this is not the last post shown on the page --></if> </if> <table class="tborder" id="post$post[postid]" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center"> <tr> <td class="thead" $post[scrolltothis]> <div class="normal" style="float:$stylevar[right]"> <if condition="$show['postcount']">#<a href="showpost.php?$session[sessionurl]p=$post[postid]&postcount=$post[postcount]" target="new" rel="nofollow" id="postcount$post[postid]" name="$post[postcount]"><strong>$post[postcount]</strong></a> </if> <if condition="$show['reputationlink']"><a href="reputation.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/reputation.gif" alt="<phrase 1="$post[username]">$vbphrase[add_to_xs_reputation]</phrase>" border="0" /></a> </if> <if condition="$show['reportlink']"><a href="report.php?$session[sessionurl]p=$post[postid]" rel="nofollow"><img class="inlineimg" src="$stylevar[imgdir_button]/report.gif" alt="$vbphrase[report_bad_post]" border="0" /></a> </if> $post[iplogged] <if condition="$show['inlinemod']"> <input type="checkbox" name="plist[$postid]" id="plist_$postid" style="vertical-align:middle; padding:0px; margin:0px 0px 0px 5px" value="$post[checkbox_value]" onclick="inlineMod.toggle(this)" /> </if> </div> <div class="normal"> <!-- status icon and date --> <a name="post$post[postid]"><img class="inlineimg" src="$stylevar[imgdir_statusicon]/post_$post[statusicon].gif" alt="$post[statustitle]" border="0" /></a> <if condition="!$show['announcement']"> $post[postdate]<if condition="!$show['detailedtime']">, $post[posttime]</if> <else /> <phrase 1="$post[startdate]" 2="$post[enddate]">$vbphrase[x_until_y]</phrase> </if> $post[firstnewinsert] <!-- / status icon and date --> </div> </td> </tr> <tr> <td class="alt2" style="padding:0px"> <!-- user info --> <table cellpadding="0" cellspacing="$stylevar[cellpadding]" border="0" width="100%"> <tr> <if condition="$show['avatar']"><td class="alt2"><a href="member.php?$session[sessionurl]u=$post[userid]"><img src="$post[avatarurl]" $post[avwidth] $post[avheight] alt="<phrase 1="$post[username]">$vbphrase[xs_avatar]</phrase>" border="0" /></a></td></if> <td nowrap="nowrap"> <!-- vbPlaza start --> <div id="postmenu_$post[postid]" <if condition="$post['namestyle']">style="$post[namestyle]"</if>> <!-- vbPlaza end --> <if condition="$show['profile']"> <a class="bigusername" href="member.php?$session[sessionurl]u=$post[userid]">$post[musername]</a> $post[onlinestatus] <script type="text/javascript"> vbmenu_register("postmenu_$post[postid]", true); </script> <else /> $post[musername] </if> </div> <!-- vbPlaza start --> <if condition="$post['usertitle']"><div class="smallfont" <if condition="$post['titlestyle']">style="$post[titlestyle]"</if>>$post[usertitle]</div></if> <!-- vbPlaza end --> <if condition="$post['rank']"><div class="smallfont">$post[rank]</div></if> </td> <td width="100%"> </td> <td valign="top" nowrap="nowrap"> <div class="smallfont"> <if condition="$post['joindate']"><div>$vbphrase[join_date]: $post[joindate]</div></if> <if condition="$post['field2']"><div>$vbphrase[location_perm]: $post[field2]</div></if> <if condition="$post['age']"><div>$vbphrase[age]: $post[age]</div></if> <div> <!-- vbPlaza start --> <if condition="$show['pointsinpostbit']"><br /> $vbphrase[vbbux_points]: $post[points]<br /> $vbphrase[vbbux_bank]: $post[bank]<br /> <phrase 1="$vbphrase[vbbux_points]">$vbphrase[vbbux_total_points]</phrase>: $post[totalpoints]<br /> <a href="vbplaza.php?do=donate&userid=$post[userid]">$vbphrase[vbplaza_donate]</a><br /> </if> <!-- vbPlaza end --> </div> <if condition="$show['reputation']"><if condition="$show['reppower']">$vbphrase[reppower]: $post[reppower] </if><div>$post[reputationdisplay]</div></if> <div>$post[icqicon] $post[aimicon] $post[msnicon] $post[yahooicon] $post[skypeicon]</div> <if condition="$show['sports_icons']"><div>$post[sportsicons]</div><br /></if> <!-- vbPlaza start --> <if condition="$post['giftsdisplay']"><div class="smallfont">$post[giftsdisplay]</div></if> <if condition="$post['ribbonsdisplay']"><div class="smallfont">$post[ribbonsdisplay]</div></if> <!-- vbPlaza end --> </div> </td> </tr> </table> <!-- / user info --> </td> </tr> <tr> <td class="alt1" id="td_post_$post[postid]"> <!-- message, attachments, sig --> <if condition="$show['messageicon'] OR $post['title']"> <!-- icon and title --> <div class="smallfont"> <if condition="$show['messageicon']"><img class="inlineimg" src="$post[iconpath]" alt="$post[icontitle]" border="0" /></if> <if condition="$post['title']"><strong>$post[title]</strong></if> </div> <hr size="1" style="color:$stylevar[tborder_bgcolor]" /> <!-- / icon and title --> </if> <!-- message --> <div id="post_message_$post[postid]"><if condition="$post['field23'] != '' OR $post['field24'] != ''"> <font style="font-family:$post[field24]; color:$post[field23];">$post[message]</font> + ++++ <else /> $post[message] </if>]</div> <!-- / message --> <if condition="$show['attachments']"> <!-- attachments --> <div style="padding:$stylevar[cellpadding]px"> <if condition="$show['thumbnailattachment']"> <fieldset class="fieldset"> <legend>$vbphrase[attached_thumbnails]</legend> <div style="padding:$stylevar[formspacer]px"> $post[thumbnailattachments] </div> </fieldset> </if> <if condition="$show['imageattachment']"> <fieldset class="fieldset"> <legend>$vbphrase[attached_images]</legend> <div style="padding:$stylevar[formspacer]px"> $post[imageattachments] </div> </fieldset> </if> <if condition="$show['imageattachmentlink']"> <fieldset class="fieldset"> <legend>$vbphrase[attached_images]</legend> <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0"> $post[imageattachmentlinks] </table> </fieldset> </if> <if condition="$show['otherattachment']"> <fieldset class="fieldset"> <legend>$vbphrase[attached_files]</legend> <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0"> $post[otherattachments] </table> </fieldset> </if> <if condition="$show['moderatedattachment']"> <fieldset class="fieldset"> <legend>$vbphrase[attachments_pending_approval]</legend> <table cellpadding="0" cellspacing="$stylevar[formspacer]" border="0"> $post[moderatedattachments] </table> </fieldset> </if> </div> <!-- / attachments --> </if> <if condition="$post['signature']"> <!-- sig --> <div> <br /> $post[signature] </div> <!-- / sig --> </if> <if condition="$show['postedited']"> <!-- edit note --> <div class="smallfont"> <hr size="1" style="color:$stylevar[tborder_bgcolor]" /> <em> <phrase 1="$post[edit_username]" 2="$post[edit_date]" 3="$post[edit_time]">$vbphrase[last_edited_by_x_on_y_at_z]</phrase>. <if condition="$post['edit_reason']">$vbphrase[reason]: $post[edit_reason]</if> </em> </div> <!-- / edit note --> </if> <div align="$stylevar[right]"> <!-- controls --> <if condition="$post['editlink']"> <a href="$post[editlink]" name="vB::QuickEdit::$post[postid]"><img src="$stylevar[imgdir_button]/edit.gif" alt="$vbphrase[edit_delete_message]" border="0" /></a> </if> <if condition="$post['forwardlink']"> <a href="$post[forwardlink]"><img src="$stylevar[imgdir_button]/forward.gif" alt="$vbphrase[forward_message]" border="0" /></a> </if> <if condition="$post['replylink']"> <a href="$post[replylink]" rel="nofollow"><img src="$stylevar[imgdir_button]/<if condition="$post['forwardlink']">reply_small<else />quote</if>.gif" alt="$vbphrase[reply_with_quote]" border="0" /></a> </if> <if condition="$show['quickreply'] AND !$show['threadedmode']"> <a href="$post[replylink]" rel="nofollow" id="qr_$post[postid]" onclick="return false"><img src="$stylevar[imgdir_button]/quickreply.gif" alt="$vbphrase[quick_reply_to_this_message]" border="0" /></a> </if> <if condition="$show['moderated']"> <img src="$stylevar[imgdir_misc]/moderated.gif" alt="$vbphrase[moderated_post]" border="0" /> </if> <!-- / controls --> </div> <!-- message, attachments, sig --> </td> </tr> </table> <!-- post $post[postid] popup menu --> <div class="vbmenu_popup" id="postmenu_$post[postid]_menu" style="display:none"> <table cellpadding="4" cellspacing="1" border="0"> <tr> <td class="thead">$post[username]</td> </tr> <if condition="$show['profile']"> <tr><td class="vbmenu_option"><a href="member.php?$session[sessionurl]u=$post[userid]">$vbphrase[view_public_profile]</a></td></tr> </if> <if condition="$show['pmlink']"> <tr><td class="vbmenu_option"><a href="private.php?$session[sessionurl]do=newpm&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_private_message_to_x]</phrase></a></td></tr> </if> <if condition="$show['emaillink']"> <tr><td class="vbmenu_option"><a href="sendmessage.php?$session[sessionurl]do=mailmember&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[send_email_to_x]</phrase></a></td></tr> </if> <if condition="$show['homepage']"> <tr><td class="vbmenu_option"><a href="$post[homepage]"><phrase 1="$post[username]">$vbphrase[visit_xs_homepage]</phrase></a></td></tr> </if> <if condition="$show['search']"> <tr><td class="vbmenu_option"><a href="search.php?$session[sessionurl]do=finduser&u=$post[userid]" rel="nofollow"><phrase 1="$post[username]">$vbphrase[find_all_posts_by_x]</phrase></a></td></tr> </if> <if condition="$post['userid'] AND $show['member']"> <tr><td class="vbmenu_option"><a href="profile.php?$session[sessionurl]do=addlist&userlist=buddy&u=$post[userid]"><phrase 1="$post[username]">$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr> </if> </table> </div> <!-- / post $post[postid] popup menu --> <if condition="$show['spacer']"> </div> $spacer_close </if> <!-- / post #$post[postid] --> |
#76
|
|||
|
|||
<!-- message -->
<div id="post_message_$post[postid]"><if condition="$post['field23'] != '' OR $post['field24'] != ''"> <font style="font-family:$post[field23]; color:$post[field24];">$post[message]</font> + ++++ <else /> $post[message] </if>]</div> <!-- / message --> you use this. if your font field number 23 , color 24.. or change numbers. |
#77
|
||||
|
||||
I have made a "slight" modification.
As most of you know, when making the "New profile field" use the option "Single drop down menu" and for the list. (See below) Then "Set Default, Yes, But No First Blank Option" Then just do your normal title, desc etc, and in the options field, paste this list. Code:
DoNotUse Arial Arial Black Arial Narrow Book Antiqua Century Gothic Comic Sans MS Courier New Franklin Gothic Medium Garamond Georgia Impact Lucida Console Lucida Sans Unicode Microsoft Sans Serif Palatino Linotype System Tahoma Times New Roman Trebuchet MS Verdana Code:
<!-- message --> <div id="post_message_$post[postid]"> <if condition="is_member_of($post, X)"> <if condition="$post['fieldY] != 'DoNotUse' OR $post['fieldZ'] !=' '"> <font style="font-family:$post[fieldY]; color:$post[fieldZ];"> $post[message] </font></div></if> <else /> $post[message] </div> </if> <!-- / message --> I may update again if I add bold and italic options to the list, but so far, my Premium users are loving this exclusive feature. =) OCT 17 2006 Update: I updated the above code. This time.. I believe it is stable, I changed it to look at the POSTERS usergroup vs the bbuser flag which caused some issues... The change? Well... BEFORE it turned out that ONLY members OF that allowed usergroup were able to see others with custom font/color, whereas regular users/guests would only see black. Which was in error. Now ANYONE can see the "allowed" usergroups custom color/font. Long as the user of the "x" post is part of the "x" assigned usergroup, the forums will pull the data from that users field profile on custom font/color and apply it. If they are not part of the "x" allowed group, then it will just be a normal looking post. So NOW its working as intended for a special or paid usergroup, where everyone else can see they have custom stuff, but cant use it themselves unless they are also in that group. |
#78
|
|||
|
|||
How would you be able to add the bold or italics feature, but without having to type in "yes" in a text box? Is it possible to do it so you'd have yes and no radio buttons?
Like this: Bold Font? oYes oNo |
#79
|
||||
|
||||
Does this work with 3.6?
|
#80
|
|||
|
|||
Any chance of getting this updated for vB 3.6.x??
|
#81
|
|||
|
|||
Quote:
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|