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
Control User Post Font via Profile Options Details »»
Control User Post Font via Profile Options
Version: 1.00, by ChU v2 ChU v2 is offline
Developer Last Online: Oct 2013 Show Printable Version Email this Page

Category: New Posting Features - Version: 3.6.x Rating:
Released: 04-05-2008 Last Update: Never Installs: 34
Template Edits
Re-useable Code Code Changes Translations  
No support by the author.

This will allow your member's to control their font options like: color, type, size, bold, italic, underline. They can access this by going to their UserCP and selection Edit Options.

Unfortunately without a product, I could not incorporate Usergroup permissions. I tried everything I know. Anyone is more then welcome to introduce some options that could make that work or make a product!

This idea was thought from this modification: here

Refer to the attached text file for instructions.

Please Click Install!

Show Your Support

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

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

Quote:
Originally Posted by imported_mindcrime View Post
I'm having some issue installing this. Where in the template? The postbit for all of the templates that are on the site?

Also, with regard to the fields. I have put them into the code as they are (font face, color, etc.) and still not working.
It says specifically in the instructions where to place the code. You should FIND and ADD BELOW.

Add the code in the right spot and you should be fine.
Reply With Quote
  #13  
Old 04-14-2008, 12:28 AM
imported_mindcrime imported_mindcrime is offline
 
Join Date: Jan 2005
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ChU v2 View Post
It says specifically in the instructions where to place the code. You should FIND and ADD BELOW.

Add the code in the right spot and you should be fine.
I added it into the legacy postbit as was referred to in shadow's post. The instructions with this mod state edit template but not where.

I put it in presumably where it is supposed to be, however, it is not working. Could you please be more specific for us code-tarded folks. Thanks. Also, can you clarify - the instructions say:

FIND:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

REPLACE WITH:
Reply With Quote
  #14  
Old 04-14-2008, 08:38 AM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes, that would be handy!

Searching templates for the code
PHP Code:
<div id="post_message_$post[postid]">$post[message]</div
shows two templates that contain this code:
postbit and postbit_legacy

postbit works.

I only want members to be able to set font type, color and italic. The field number for this are:
font type: 23
color: 24
italic : 25

I have color and italic working, but not font type.

My current code is:
PHP Code:
<!--Custom Font-->
<if 
condition="$post['field23'] OR $post['field24'] OR $post['field25']">

<
span style="font$post[field23]; color: $post[field24];font-style: $post[field25];">$post[message]</strong></span>

<else />
$post[message]

</if>
<!--/
Custom Font--> 
Please advise.

Does higher / lower case matter when defining fonts?
Reply With Quote
  #15  
Old 04-14-2008, 11:47 PM
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Location: Chicago
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by imported_mindcrime View Post
I added it into the legacy postbit as was referred to in shadow's post. The instructions with this mod state edit template but not where.

I put it in presumably where it is supposed to be, however, it is not working. Could you please be more specific for us code-tarded folks. Thanks. Also, can you clarify - the instructions say:

FIND:
<!-- message -->
<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

REPLACE WITH:
I've just downloaded the instructions and it says:

Code:
TEMPLATE EDIT:

FIND:
<!-- message -->
		<div id="post_message_$post[postid]">$post[message]</div>
<!-- / message -->

REPLACE WITH:
		<!-- message -->
		<div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX'] OR $post['fieldXX']">

<span style="font: $post[fieldXX]px $post[fieldXX]; color: $post[fieldXX]; font-weight: $post[fieldXX]; font-style: $post[fieldXX]; text-decoration: $post[field17];">$post[message]</strong></span>

<else />
$post[message]

</if>
<!--/Custom Font-->
</div>
		<!-- / message -->
Reply With Quote
  #16  
Old 04-14-2008, 11:52 PM
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Location: Chicago
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Alfa1 View Post
Yes, that would be handy!

Searching templates for the code
PHP Code:
<div id="post_message_$post[postid]">$post[message]</div
shows two templates that contain this code:
postbit and postbit_legacy

postbit works.

I only want members to be able to set font type, color and italic. The field number for this are:
font type: 23
color: 24
italic : 25

I have color and italic working, but not font type.

My current code is:
PHP Code:
<!--Custom Font-->
<if 
condition="$post['field23'] OR $post['field24'] OR $post['field25']">

<
span style="font$post[field23]; color: $post[field24];font-style: $post[field25];">$post[message]</strong></span>

<else />
$post[message]

</if>
<!--/
Custom Font--> 
Please advise.

Does higher / lower case matter when defining fonts?
Yes the code shows up in two templates because it depends on which you use Postbit or postbit legacy, this option can be toggled in vBOptions.

As for your problem, the way the code works it HAS to have the the size code in there. my suggestion to is leave the code the way it is and change the font size PX to the desired size you want like so:

Code:
<span style="font: 15px $post[fieldXX]; color: $post[fieldXX]; font-weight: $post[fieldXX]; font-style: $post[fieldXX]; text-decoration: $post[field17];">$post[message]</strong></span>
OR

You can also still make the profile field, but only make 1 option like 15 or whatever. Then set it to default first option and make it so the member can not edit. The first option might be easier.
Reply With Quote
  #17  
Old 04-14-2008, 11:57 PM
Alfa1's Avatar
Alfa1 Alfa1 is offline
 
Join Date: Dec 2005
Location: Netherlands
Posts: 3,537
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Aah. That makes sense. Thanks.
Reply With Quote
  #18  
Old 04-15-2008, 01:41 AM
CrashfAB CrashfAB is offline
 
Join Date: Mar 2006
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Exatcly what I was looking for. I did the same thing as Alph1

So what exactly is the default font px size? I am pretty sure 15 is a tad too large.
Reply With Quote
  #19  
Old 04-15-2008, 02:23 AM
CrashfAB CrashfAB is offline
 
Join Date: Mar 2006
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

One thing I have found--- when you choose a color--its lighter than the same color you choose in the editor
Reply With Quote
  #20  
Old 04-15-2008, 02:29 AM
CrashfAB CrashfAB is offline
 
Join Date: Mar 2006
Posts: 111
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Here is an example. The dull pink is using the hack and the brighter is using the editor when you make a post
Reply With Quote
  #21  
Old 04-15-2008, 07:21 AM
ChU v2 ChU v2 is offline
 
Join Date: May 2007
Location: Chicago
Posts: 396
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by CrashfAB View Post
Here is an example. The dull pink is using the hack and the brighter is using the editor when you make a post
I have no idea why that would happen...

Edit: I've tested it on my forum and it did not happen. I replied to the test thread and edited the post and it stayed the same.

Also I don't know the exact size that would work for forum, so it's best to try a few numbers before go LIVE with it.
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 12:35 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.10609 seconds
  • Memory Usage 2,333KB
  • Queries Executed 25 (?)
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_code
  • (4)bbcode_php
  • (5)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
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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