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-05-2008 10:00 PM

Control User Post Font via Profile Options
 
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!

iogames 04-06-2008 06:58 AM

Wow! can I talk to u in private? ;)

Jasem 04-06-2008 10:34 AM

Wow!, Thank you very much :)

Flamerokz 04-06-2008 10:57 AM

Thanks! One of my members needed this

BigDog56 04-06-2008 12:48 PM

Can't get the color or size to work

ChU v2 04-06-2008 03:42 PM

Quote:

Originally Posted by BigDog56 (Post 1484331)
Can't get the color or size to work


Make sure that you've edited the fieldXX with the correct field numbers.

obmob 04-09-2008 04:52 PM

WOW, and this would set a default font, size, color in user posts?

This is a must! :D
Will test... thanks!

M0Dy 04-10-2008 12:50 AM

Thank you

ChU v2 04-12-2008 01:35 PM

Your welcome

imported_mindcrime 04-12-2008 06:43 PM

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.

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.

Alfa1 04-15-2008 11:43 AM

Quote:

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

I added 8 - 15. 15 is somewhat large for most fonts, but for some fonts it is good.

BTW: the list of fonts is not complete. Here is the complete list:
arial
arial black
arial narrow
Book antiqua
century gothis
comic sans ms
courier new
fixedsys
franklin gothic medium
garamond
georgia
impact
helvetica
impact
lucida console
lucida sans unicode
microsoft sans serif
palatino linotype
system
tahoma
times new roman
trebuchet ms
verdana

CrashfAB 04-15-2008 07:48 PM

Also--when a user has there font customly set--and somebody repliess to it--in the quote it reverts back to the standard font

ChU v2 04-16-2008 06:35 PM

Quote:

Originally Posted by CrashfAB (Post 1491518)
Also--when a user has there font customly set--and somebody repliess to it--in the quote it reverts back to the standard font

Within the quote box? I could look into that. It shouldn't be too hard, maybe just another template edit.

Alfa1 04-17-2008 07:53 PM

All my posts have turned into the font and colours that I have set in my profile. Should this be?

CrashfAB 04-17-2008 08:02 PM

Quote:

Originally Posted by Alfa1 (Post 1493242)
All my posts have turned into the font and colours that I have set in my profile. Should this be?


yup--its a global setting so to speak..

za3bour 04-20-2008 11:41 AM

this is driving me crazy , all went fine (font,color,bold,italic,..etc) except font size it is not changing can you tell me what's wrong ?

here is teh code

<if condition="$post['field9'] OR $post['field11'] OR $post['field10'] OR $post['field12'] OR $post['field13'] OR $post['field14']">

<span style="font face: $post[field9]; size: $post[field11]; color: $post[field10]; font-weight: $post[field12]; font-style: $post[field13]; text-decoration: $post[field14];">$post[message]</strong></span></font>

za3bour 04-20-2008 11:53 AM

I did change px to size because this didn't work either :S

ChU v2 04-20-2008 08:37 PM

Quote:

Originally Posted by za3bour (Post 1495112)
I did change px to size because this didn't work either :S

It looks like you've edited my original code and made something of your own. Try mine. The first field IS the font px size.

za3bour 04-21-2008 05:34 AM

This is the original I did try this one , every thing worked except the Font Size, So what is wrong here ? my field for font size is 11

Quote:

<!-- 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[fieldXX];">$post[message]</strong></span>

<else />
$post[message]

</if>
<!--/Custom Font-->
</div>
<!-- / message -->

za3bour 04-21-2008 05:46 AM

it did work :D man i thought the first field was for font type and the second is for size

now it works just perfect . what a great hack :cool: if you could please change it in Quote as well that would be great.

Thanks again

ChU v2 04-21-2008 06:01 PM

Quote:

Originally Posted by za3bour (Post 1495582)
it did work :D man i thought the first field was for font type and the second is for size

now it works just perfect . what a great hack :cool: if you could please change it in Quote as well that would be great.

Thanks again


Glad you got it, I planning on working on that when I get the time! Thanks for your feedback.

FLMom 05-04-2008 12:32 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 just added deeppink to my group and it works fine :D

FLMom 05-04-2008 12:33 AM

I am having an issue with size.
Here is my code:

Code:

<!-- message -->
  <div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['field17'] OR $post['field18'] OR $post['field19'] OR $post['field20'] OR $post['field21'] OR $post['field22']">
<span style="font: $post[field17]px $post[field19]; color: $post[field18]; font-weight: $post[field20]; font-style: $post[field21]; text-decoration: $post[field22];">$post[message]</strong></span>
<else />
$post[message]
</if>
<!--/Custom Font-->

Can you please tell me what I have done wrong and why it won't work? I am on 3.7.0

Thanks!

FLMom 05-04-2008 02:37 AM

Also, some of my members can't see the colored fonts. I thought maybe it was because they were on Firefox, but I use that a lot and could still see it. Any ideas?

Thanks!

ChU v2 05-04-2008 03:49 PM

Quote:

Originally Posted by FLMom (Post 1507523)
I am having an issue with size.
Here is my code:

Code:

<!-- message -->
  <div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['field17'] OR $post['field18'] OR $post['field19'] OR $post['field20'] OR $post['field21'] OR $post['field22']">
<span style="font: $post[field17]px $post[field19]; color: $post[field18]; font-weight: $post[field20]; font-style: $post[field21]; text-decoration: $post[field22];">$post[message]</strong></span>
<else />
$post[message]
</if>
<!--/Custom Font-->

Can you please tell me what I have done wrong and why it won't work? I am on 3.7.0

Thanks!

What issue are you having? Is the size just not working at all? Is it when you leave it default or select a font?

Quote:

Originally Posted by FLMom (Post 1507606)
Also, some of my members can't see the colored fonts. I thought maybe it was because they were on Firefox, but I use that a lot and could still see it. Any ideas?

As far as I've tested it works in both IE and Firefox.
Thanks!


FLMom 05-04-2008 04:11 PM

The size doesn't work at all. It's the same size no matter what the user chooses in edit options.

For the second part, I have tested in both Firefox and IE, it works for me, just not them. I don't even know what to tell them. Could it be a cookie issue? Should they try to clear their cookies?

Thanks for any help you can offer!

Cori

LoF 05-05-2008 11:38 AM

Very nice! Thanks!

I have a question: Can I translate it to Hebrew and post it in an Israeli vBulletin support forum? (vbheb.com)
With a credit to you and link to your profile - of course.

FLMom 05-06-2008 06:16 PM

Never mind....I figured it out on my own. Maybe you can elaborate more in the directions, looks like I wasn't the only one having trouble with size.

Either way, great hack! My members love it :D

ChU v2 05-07-2008 08:44 PM

Quote:

Originally Posted by LoF (Post 1509168)
Very nice! Thanks!

I have a question: Can I translate it to Hebrew and post it in an Israeli vBulletin support forum? (vbheb.com)
With a credit to you and link to your profile - of course.

Yes

Quote:

Originally Posted by FLMom (Post 1510778)
Never mind....I figured it out on my own. Maybe you can elaborate more in the directions, looks like I wasn't the only one having trouble with size.

Either way, great hack! My members love it :D

How so? What could you have used that would have made it an easier install?

DeLi_EsMeR 05-15-2008 12:56 AM

Thank you ;)


All times are GMT. The time now is 01:43 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.02766 seconds
  • Memory Usage 1,853KB
  • 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
  • (4)bbcode_code_printable
  • (4)bbcode_php_printable
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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