Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Color/Font In Posts Editable Via Profile Details »»
User Color/Font In Posts Editable Via Profile
Version: 1.00, by ShadowOne ShadowOne is offline
Developer Last Online: Aug 2012 Show Printable Version Email this Page

Category: Show Thread Enhancements - Version: 3.6.x Rating:
Released: 01-10-2008 Last Update: Never Installs: 70
Template Edits
 
No support by the author.

Whats Up,
I was looking for something like this and couldnt find it for 3.6. But i do give most of the credit to gio~logist for the idea even though i knew how to do this, dont wanna look like im taking credit for something i didnt do.Its like his for 3.5 except i added a color wheel link pop up. I dont have alot of coding experience, but template mods are not hard. Just wanted to kinda share this.

Details: Allows users to edit their font color and their font type for when they post. It also puts a link where your users can find a colorwheel next to the description!

Installation: 5 Mins

First Thing You Need To Do:
Code:
Go to User Profile Fields > Add New User Profile Field

Choose:  Single-Line Text Box

Title: Font Color In Posts

Description: This will be your font color when posting.  (Ex: #000000 is black)<br /> <a href="http://html-color-codes.info/" onclick="window.open('http://html-color-codes.info/');
return false;" target="newWin"><b>Click Here For Color Codes</b></a>

Max length of allowed user input: 7

Click Save!


Second Thing You Need To Do:
Code:
Go to User Profile Fields > Add New User Profile Field

Choose: Single-Line Text Box

Title: Font In Posts

Description: This font will appear when posting. (Example: Verdana)

Max length of allowed user input: 15

Click Save!
Last Edit your postbit or postbit legacy Template whichever one you use.
Find this code:
Code:
$post[message]
Replace it with this code:
Code:
<if condition="$post['fieldX'] != '' OR $post['fieldX'] != ''">

<font style="font-family:$post[fieldX]; color:$post[fieldX];">$post[message]</font>

 <else />

$post[message]

</if>
Be sure to edit the X's with whatever field these are or this will not work! To edit, go to:
Profile > Edit Profile and it will probably be somewhere towards the bottom.

PLEASE CLICK INSTALL

ENJOY!

SCREENSHOT: The Red Blur Is The Link For The Colorwheel

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 04-06-2008, 03:50 PM
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Location: Chicago
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChU v2 View Post
Very good idea, I'm going to try and tweak the code a little bit for usergroup permissions and other options, if you don't mind
My version here: https://vborg.vbsupport.ru/showthread.php?t=175282
Reply With Quote
  #43  
Old 04-20-2008, 11:45 AM
za3bour's Avatar
za3bour za3bour is offline
 
Join Date: Sep 2007
Location: Damascus-Syria
Posts: 18
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

does is support font size ?
Reply With Quote
  #44  
Old 09-21-2008, 04:41 AM
xtracate xtracate is offline
 
Join Date: Feb 2008
Posts: 1
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is wonderful, I cannot tell you how helpful this is I was pulling my hair out trying to make font colors work.

Thanks so much for this.
Reply With Quote
  #45  
Old 02-17-2009, 09:36 AM
woffie's Avatar
woffie woffie is offline
 
Join Date: Jan 2009
Location: Michigan
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This works for 3.8 also. I am trying to figure out how to add font size. And, you can do a dropdown menu for the font. It makes it much easier for the members to choose a font.
Reply With Quote
  #46  
Old 02-22-2009, 01:51 AM
woffie's Avatar
woffie woffie is offline
 
Join Date: Jan 2009
Location: Michigan
Posts: 264
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Not sure if anyone can help me here. I did get this to work on 3.8.1. I tried to add font size and got some success, but not complete success.

I create a profile field called font size. I did a drop down menu just like I did for the font. A little different than this mod, but it makes it much easier for the members instead of writing in the font. Anyway. I changed the code to the following

PHP Code:
<if condition="$post['field10'] != '' OR $post['field12'] != '' OR $post['field13'] != ''"> <font style="font-size:$post[field13]; font-family:$post[field12]color:$post[field10]; ">$post[message]</font> <else /> $post[message] </if> 
That replaces
$post[message]
in postbit or postbit legacy

It works if you post in the quick reply, but when the page is refreshed, it goes back to normal. It is not staying the font size. I am not a coder at all. I just tried to duplicate what was done for the other two fields. If anyone can tell me what is wrong with the code, I would greatly appreciate it.
Reply With Quote
  #47  
Old 02-22-2009, 11:31 PM
Bigpheonix Bigpheonix is offline
 
Join Date: Feb 2009
Posts: 3
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks, i like it a lot
Reply With Quote
  #48  
Old 03-26-2009, 02:45 AM
oldfart22 oldfart22 is offline
 
Join Date: Mar 2008
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

First off I'm not at all a coder but messed with this for days till I got font size to work.. I made a 3rd custom field for the font size and added to the code.. Its working fine for me..

Title = Font Size In Posts
Description = This font size will appear when posting. Example: 2pt, 3pt, 4pt, 5pt, 6pt, 7pt
Max length = 15
Field Length = 25
Single-Line Text Box
Field Required = no
Field Searchable on Members List = yes
Show on Members List = yes

Last Edit your postbit or postbit legacy Template whichever one you use.
Find this code:

Code:
$post[message]Replace it with this code:

Code:
Code:
<div id="post_message_$post[postid]">
			$ad_location[ad_showthread_firstpost_start]
			<if condition="$post['fieldx']!= '' OR $post['fieldx']!= '' OR $post['fieldx']!= ''">
<font style="font-family:$post[fieldx];color:$post[fieldx];font style="font-size:$post[fieldx];">$post[message]</font> <else />
$post[message]

</if>

	</div>


When you edit the font size in usercp enter value like this <font size = 3pt> Not sure if you need the pt or not but it works for me..
Reply With Quote
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 07:08 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.05259 seconds
  • Memory Usage 2,288KB
  • 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
  • (5)bbcode_code
  • (1)bbcode_php
  • (1)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
  • (2)pagenav_pagelink
  • (8)post_thanks_box
  • (8)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (8)post_thanks_postbit_info
  • (7)postbit
  • (8)postbit_onlinestatus
  • (8)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