vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Template Modifications (https://vborg.vbsupport.ru/forumdisplay.php?f=192)
-   -   New Posting Features - Control User Post Font via Profile Options (https://vborg.vbsupport.ru/showthread.php?t=175282)

ChU v2 04-14-2008 12:06 AM

Quote:

Originally Posted by imported_mindcrime (Post 1489240)
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.

imported_mindcrime 04-14-2008 12:28 AM

Quote:

Originally Posted by ChU v2 (Post 1490049)
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.:D Also, can you clarify - the instructions say:

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

REPLACE WITH:

Alfa1 04-14-2008 08:38 AM

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?

ChU v2 04-14-2008 11:47 PM

Quote:

Originally Posted by imported_mindcrime (Post 1490068)
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.:D 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 -->


ChU v2 04-14-2008 11:52 PM

Quote:

Originally Posted by Alfa1 (Post 1490270)
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.

Alfa1 04-14-2008 11:57 PM

Aah. That makes sense. Thanks.

CrashfAB 04-15-2008 01:41 AM

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.

CrashfAB 04-15-2008 02:23 AM

One thing I have found--- when you choose a color--its lighter than the same color you choose in the editor

CrashfAB 04-15-2008 02:29 AM

Here is an example. The dull pink is using the hack and the brighter is using the editor when you make a post

ChU v2 04-15-2008 07:21 AM

Quote:

Originally Posted by CrashfAB (Post 1490895)
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.


All times are GMT. The time now is 09:52 PM.

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.02761 seconds
  • Memory Usage 1,763KB
  • 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
  • (2)bbcode_code_printable
  • (4)bbcode_php_printable
  • (5)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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