PDA

View Full Version : Custom Postbit Font settings?


Sweet Cheeks
01-17-2003, 04:30 AM
I created 3 custom options that each user can set, they are font face, font color and font size. I added the variables to my postbit template

<p><normalfont><FONT COLOR="$post[field16]" FACE="$post[field17] SIZE="$[field18]">$post[message] </normalfont></font></font></font></p>


The problem I am having is that if someone doesnt select a custom size then it is defaulting to a larger font size and overriding my <normalfont> tag :surprised: How can I set a default for these fields to use if the user doesnt set their own, so that I can control the size myself if they dont have their own size set?

Thanks in advance for your help :rambo:

Sweet Cheeks
01-17-2003, 04:58 AM
Oops ignore this 2nd reply :lick:

WetWired
01-17-2003, 01:31 PM
I'd say you need a small code hack to fix this.
In getpostbit in admin/functions.php, add lines like this:

if(trim($post[field16])!=""){
$post[field16]='color="'.$post[field16].'"';
}//endif(trim($post[field16])!="")
if(trim($post[field17])!=""){
$post[field17]='face="'.$post[field17].'"';
}//endif(trim($post[field17])!="")
if(trim($post[field18])!=""){
$post[field18]='size="'.$post[field18].'"';
}//endif(trim($post[field18])!="")
Add this under the 'global' statements. Then, change the postbit template so the tag is <font $post[field16] $post[field17] $post[field18]>
This is untested, but should work.

Sweet Cheeks
01-17-2003, 09:32 PM
:cool: Very cool thanks for your help. I will let you know :D

Sweet Cheeks
01-21-2003, 04:24 PM
Just to let you know, I added the code, tweaked the code in the postbit a tiny bit and its working wonderfully :banana: Thank you again