PDA

View Full Version : New Posting Features - Control User Post Font via Profile Options


ChU v2
04-05-2008, 10:00 PM
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 (https://vborg.vbsupport.ru/showthread.php?t=167487)

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
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
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
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
<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:
<!--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
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:


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
Yes, that would be handy!

Searching templates for the 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:
<!--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:


<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
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
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
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
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
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


<!-- 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
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
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:

<!-- 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
I am having an issue with size.
Here is my 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?

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
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

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 ;)

TimberFloorAu
05-24-2008, 08:05 PM
It would be beneficial, when ppl say "never mind i fixed it"

To quote exactly what they did.

Ozzy

If this mod is applicable to 3.7 gold, can you please indicate. Looks like a great code.

Also, is there a mod, to just colorize members usernames in the forum home, online list?

Ozzy

stumparoooo
05-28-2008, 01:51 AM
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 did you fix the size issue?

I cannot get it to work either. :(

iou1
06-18-2008, 11:00 PM
This is what I currently have:

<!-- message -->
<div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['field10'] OR $post['field11'] OR $post['field12'] OR $post['field13'] OR $post['field14'] OR $post['field15']">

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

<else />
$post[message]

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


Everything seems fine until I post and then nothing happens. Oh and I'm a total n00b, just a warning. ;)

Arrogant-One
07-08-2008, 12:27 AM
<font face="Georgia">This sounds like a great little mod, but I am concerned about the extensive template changes.</font>

blind-eddie
07-10-2008, 06:00 PM
Yes, this would be a very nice addon, but, with the changes going global, and changing all your old post to what you set in your usercp is not a good Idea at all. Thank you for sharing, but I have to click uninstall.

jjbushell
07-14-2008, 12:40 AM
Hey, nice mod but I am having a problem.

I have all the options enabled in UCP but only 1 will actually show for some reason, here is the code I have

<!-- message -->
<div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['field6'] OR $post['field7'] OR $post['field8'] OR $post['field9'] OR $post['field10'] OR $post['field11']">

<span style="font: $post[field6]px $post[field8]; color: $post[field7]; font-weight: $post[field9]; font-style: $post[field10]; text-decoration: $post[field17];">$post[message]</strong></span>

<else />
$post[message]

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

Thats the code for both postbit and postbit_legacy.

Thanks for any help mate.

littlegun
07-25-2008, 07:30 PM
Hi, Thump up . This should be builtin in the Vb itself.

I pasted the code in the postbit as below, but still nothing changed when i change my font from the CP.
what you think might be the problem?

Thanks
<!-- message -->
<div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['field556'] OR $post['field557'] OR $post['field558'] OR $post['field559'] OR $post['field560'] OR $post['field561']">

<span style="font: $post[field556]px $post[field557]; color: $post[field558]; font-weight: $post[field559]; font-style: $post[field560]; text-decoration: $post[field561];">$post[message]</strong></span>

<else />
$post[message]

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

littlegun
07-25-2008, 08:52 PM
Yes, this would be a very nice addon, but, with the changes going global, and changing all your old post to what you set in your usercp is not a good Idea at all. Thank you for sharing, but I have to click uninstall.

me too...
sorry

SnapOff Racing
10-03-2008, 03:50 PM
I've spent hours trying to get this to work. I got everything working except the font type. It just won't work for me and chooses the default font. What could be wrong?

Here's my code.

<!-- message -->
<div id="post_message_$post[postid]">
<!--Custom Font-->
<if condition="$post['field6'] OR $post['field7'] OR $post['field8'] OR $post['field9']">

<span style="font: 15px font: $post[field6]; color: $post[field7]; font-weight: $post[field8]; font-style: $post[field9]; text-decoration: $post[field8];">$post[message]</strong></span>

<else />
$post[message]

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

ShawneyJ
10-13-2008, 02:49 AM
I've just downloaded the instructions and it says:


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 -->


the instructions kinda suck no offense

thincom2000
11-07-2013, 03:16 PM
It's too bad this wasn't a product. Could have been used without any template edits, simply by adding these options as CSS to the $headinclude template with a plugin.