vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=155)
-   -   Personal Font/Color in Posts (https://vborg.vbsupport.ru/showthread.php?t=93127)

Tulsa 10-17-2006 04:09 AM

To use this hack for 3.6.2

Look for this in your postbit or legacy...

Code:

<div id="post_message_$post[postid]">$post[message]</div>
</if>



Replace with this...

Code:

<if condition="$post['fieldx'] != '' OR $post['fieldx'] != ''">

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

    <else />
        <div id="post_message_$post[postid]">$post[message]</div>
</if>


Don't forget to change the X's to whatever fields you specified originally.

Mysticales 10-17-2006 08:22 AM

I had to alter my code again.. something had messed things up... but not sure how many people use my version of the code here?

Mysticales 10-17-2006 10:31 AM

Updated my post! ^^
https://vborg.vbsupport.ru/showpost....1&postcount=76

Fixed the glitches, made it work right, now only selected usergroups can use the function, but everyone will be allowed to still see what they used. Just their own posts wont be changed unless they too are in that usergroup.

ShadowOne 10-20-2006 01:52 PM

Quote:

Originally Posted by Mysticales
Updated my post! ^^
https://vborg.vbsupport.ru/showpost....1&postcount=76

Fixed the glitches, made it work right, now only selected usergroups can use the function, but everyone will be allowed to still see what they used. Just their own posts wont be changed unless they too are in that usergroup.



When I Used Your Code... I Got An Illegal String In The Template... Oh Well... I Finally Fixed The Color And Font... Thanks Gio

Diva 10-20-2006 10:48 PM

Quote:

Originally Posted by Tulsa
To use this hack for 3.6.2

Look for this in your postbit or legacy...

Code:

<div id="post_message_$post[postid]">$post[message]</div>
</if>



Replace with this...

Code:

<if condition="$post['fieldx'] != '' OR $post['fieldx'] != ''">

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

    <else />
        <div id="post_message_$post[postid]">$post[message]</div>
</if>


Don't forget to change the X's to whatever fields you specified originally.

Hi. I am trying to get this to work for VB3.6.2 and can't seem to figure out what I did wrong. I copied the codes, changed the fields and the font is the only thing that works. Unfortunately I want this for the color. Here is what I am using:

Code:

<!-- message -->
<if condition="$post['field8'] != '' OR $post['field8'] != ''">

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

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

Any help would be very appreciated!

Tulsa 10-21-2006 08:07 PM

Quote:

Originally Posted by Diva
Hi. I am trying to get this to work for VB3.6.2 and can't seem to figure out what I did wrong. I copied the codes, changed the fields and the font is the only thing that works. Unfortunately I want this for the color. Here is what I am using:

Code:

<!-- message -->
<if condition="$post['field8'] != '' OR $post['field8'] != ''">

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

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

Any help would be very appreciated!


You have your field#'s wrong. Try this...

Code:

<!-- message -->
<if condition="$post['field9'] != '' OR $post['field8'] != ''">

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

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


Diva 10-21-2006 10:38 PM

Quote:

Originally Posted by Tulsa
You have your field#'s wrong. Try this...

Oops! I can't believe I did that. Thank you so much Tulsa! :D

Caddyman 02-15-2007 04:10 PM

works in 3.6, thanks installed!

Mysticales 02-17-2007 11:28 PM

Quote:

Originally Posted by ShadowOne (Post 1100816)
When I Used Your Code... I Got An Illegal String In The Template... Oh Well... I Finally Fixed The Color And Font... Thanks Gio

Oh? What version? My code is for 3.5.x I mean you can see a working version on http://forums.qj.net which I have it all set. =D Added a nice feature to premium users.

TheMayhem 03-18-2007 04:18 PM

uhh, whenever I try to install this hack, it always disables Quick Edit, which sucks. Is there any way around it?

cajunboy2208 04-27-2007 02:52 AM

Someone want to help to get this in 3.6?
I am stuck at
Display Size: 11

There is no display size in 3.6

deezelpope 04-28-2007 03:08 PM

Installed and looking great on 3.6.4! Had to edit post bit and legacy both.

cajunboy2208 04-30-2007 01:57 AM

Quote:

Originally Posted by cajunboy2208 (Post 1236229)
Someone want to help to get this in 3.6?
I am stuck at
Display Size: 11

There is no display size in 3.6

Anyone?

deezelpope 04-30-2007 08:48 AM

Don't worry about that...just pretend it isn't even there.:)

cajunboy2208 04-30-2007 12:24 PM

Thank you deezel

deezelpope 04-30-2007 09:08 PM

You're welcome, Cajunboy! Got it working?

cajunboy2208 05-03-2007 09:57 PM

Got it installed finally. Works like a charm. Thanks much!

deezelpope 05-03-2007 10:02 PM

Excellent! Happy to hear it!! :)

grc 07-30-2007 02:02 AM

I've spent some time today getting this mod to work on 3.6.8 -- including the addition of font size too.

First, add a Personal Font Size field to the User Profile Fields. Make the options
Use Forum Default
medium
large


Or you can size by points
9pt
10pt
11pt
12pt




Then, in the postbit template the replacement for:
Quote:

<div id="post_message_$post[postid]">$post[message]</div>
Is

Quote:

<if condition="$post['fieldx'] != '' OR $post['fieldx] != '' OR $post['fieldx'] != ''">

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

<else />
<div id="post_message_$post[postid]">$post[message]</div>
</if>
Again, the "fieldx" instances need to be replaced with the three field numbers from the User Profile Field Manager. The first three can be in any order. The second three need to match the proper field numbers for font, color, and size.

Hope this helps someone.

Chachacha 08-03-2007 07:47 PM

Now when someone quotes your post, the color doesn't show up, anyone know how to make it work in quotes as well?

Chachacha 08-04-2007 09:11 PM

Apparently theres no way to make it work in quotes. *UNINSTALLED*

SliceofLife 09-02-2007 10:11 AM

Worked. Thank you! My members will love this :D

Suiko Jin 09-19-2007 11:11 PM

Works great! Converted fine.

FENIX 11-28-2007 10:35 AM

Quote:

Originally Posted by grc (Post 1305002)
I've spent some time today getting this mod to work on 3.6.8 -- including the addition of font size too.

First, add a Personal Font Size field to the User Profile Fields. Make the options
Use Forum Default
medium
large


Or you can size by points
9pt
10pt
11pt
12pt


Hi there,

I get this message when I try to install your code..

Code:

The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ']' in /home/sites/3-cubed.net/public_html/forum/includes/adminfunctions_template.php(3587) : eval()'d code on line 128


TheJordan 12-13-2007 12:04 PM

First, the error FENIX is getting is a syntax error... check to make sure you're opening and closing all of your quotes.

I haven't had a chance to play around with making this work in quotes, but here's what I got set up on 3.6.8 that seems to be working very well...

First, create 3 new fields via User Profile Fields -> Add New Profile Field

Field 1:
---------
Type: Single-Line Text Box

Title: Default Post Color

Description: Set the default color for your posts in hexadecimal format (e.g. #FF0000 = red). Hexadecimal color codes work like this: #[red][green][blue], with FF being the highest and 00 being the lowest. Look up hexadecimal in Wikipedia if you'd like a more in depth explanation.

Max Length: 9
Field Length: 15
Required: No
Editable: Yes
Searchable: No
Member List: No

----------
Field 2
----------

Type: Single-Selection Menu

Title: Default Post Font

Description: Set the default font for your posts.

Options:Arial
Book Antiqua
Century Gothic
Comic Sans
Courier
Courier New
Garamond
Georgia
Tahoma
Times New Roman
Verdana
[whatever else you want to add/remove, etc.]

Set Default: Yes, Including first blank...

Required: No
Editable: Yes
Searchable: No
Member List: No

----------
Field 3
----------

Type: Single-Selection Menu

Title: Default Post Font Size

Description: Select the default size of the text in your posts.

Options:9pt
10pt
12pt
13pt
[whatever else you want to add/remove, etc.]

Set Default: Yes, Including first blank...

Required: No
Editable: Yes
Searchable: No
Member List: No
-------------------------------

Take a look at User Profile Field Manager and record the field names (e.g., field5, field6, etc.) for the fields you just created.

Now replace COLOR, SIZE, and FONT in the below code with your field names.

it's bold, because it's important

-------------------------------
Find and replace in Postbit Templates -> postbit:
Code:

<div id="post_message_$post[postid]">$post[message]</div>
with
Code:

<div id="post_message_$post[postid]">
<if condition="$post['COLOR'] != ''">
  <span style="color: $post[COLOR];">
</if>
<if condition="$post['FONT'] != ''">
  <span style="font-family: '$post[FONT]';">
</if>
<if condition="$post['SIZE'] != ''">
  <span style="font-size: $post[SIZE];">
</if>
    $post[message]
<if condition="$post['SIZE'] != ''">
  </span>
</if>
<if condition="$post['FONT'] != ''">
  </span>
</if>
<if condition="$post['COLOR'] != ''">
  </span>
</if>
</div>

-----------------------------
Find and replace in Postbit Templates -> postbit_legacy:
Code:

<div id="post_message_$post[postid]">$post[message]</div>
Code:

<div id="post_message_$post[postid]">
<if condition="$post['COLOR'] != ''">
  <span style="color: $post[COLOR];">
</if>
<if condition="$post['FONT'] != ''">
  <span style="font-family: '$post[FONT]';">
</if>
<if condition="$post['SIZE'] != ''">
  <span style="font-size: $post[SIZE];">
</if>
    $post[message]
<if condition="$post['SIZE'] != ''">
  </span>
</if>
<if condition="$post['FONT'] != ''">
  </span>
</if>
<if condition="$post['COLOR'] != ''">
  </span>
</if>
</div>

I hope this helps... if I have time, I'll look into dropping in a color chooser and making it work in quotes.

ahesard 04-07-2008 07:30 PM

do not show in opera

skariko 12-28-2009 01:24 PM

Any idea to port this on VB4? :)


All times are GMT. The time now is 04:19 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01354 seconds
  • Memory Usage 1,817KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (12)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (27)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete