vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Requests/Questions (Unpaid) (https://vborg.vbsupport.ru/forumdisplay.php?f=112)
-   -   Custom Postbit Font settings? (https://vborg.vbsupport.ru/showthread.php?t=47792)

Sweet Cheeks 01-17-2003 04:30 AM

Custom Postbit Font settings?
 
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:

PHP Code:

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


All times are GMT. The time now is 06:02 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.02401 seconds
  • Memory Usage 1,718KB
  • 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
  • (1)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (5)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete