Change font size of custom text above signature

Started by pepa, January 19, 2018, 09:38:46 PM

Previous topic - Next topic

Sir Osis of Liver

Grtting back to your original request, don't know why changing font-size in .custom_fields_above_signature doesn't work (for me, either), but this does -

Display.template.php



/// Any custom fields for standard placement?
if (!empty($message['member']['custom_fields']))
{
foreach ($message['member']['custom_fields'] as $custom)
if (empty($custom['placement']) || empty($custom['value']))
echo '
<li class="custom_fields">',  $custom['value'], '</li>';
}



index.css



.custom_fields
{
font-size: .65em;
}



I'm seeing three fields diplayed correctly.
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Gwenwyfar

Quote from: pepa on January 22, 2018, 06:05:44 AM
It was working perfectly but now it only displays the first two custom fields?

Just realised the above code was working perfectly in Redsy theme but now misbehaving since I changed to default theme with responsive curve.
You're right, it does that. Maybe this should be submitted as a bug report.

if ($custom['placement'] != 2 || empty($custom['value']))

Removing $custom['placement'] != 2 ||  fixes this.
"It is impossible to communicate with one that does not wish to communicate"

pepa

Quote from: Sir Osis of Liver on January 22, 2018, 12:29:55 PM
Grtting back to your original request, don't know why changing font-size in .custom_fields_above_signature doesn't work (for me, either), but this does -

Display.template.php



/// Any custom fields for standard placement?
if (!empty($message['member']['custom_fields']))
{
foreach ($message['member']['custom_fields'] as $custom)
if (empty($custom['placement']) || empty($custom['value']))
echo '
<li class="custom_fields">',  $custom['value'], '</li>';
}



index.css



.custom_fields
{
font-size: .65em;
}



I'm seeing three fields diplayed correctly.

Yes, thank you that works to change the font size.  I'm still only seeing two fields displayed i.e. two in poster block and the same two above the signature.

pepa

Quote from: Gwenwyfar on January 22, 2018, 03:26:19 PM
Quote from: pepa on January 22, 2018, 06:05:44 AM
It was working perfectly but now it only displays the first two custom fields?

Just realised the above code was working perfectly in Redsy theme but now misbehaving since I changed to default theme with responsive curve.
You're right, it does that. Maybe this should be submitted as a bug report.

if ($custom['placement'] != 2 || empty($custom['value']))

Removing $custom['placement'] != 2 ||  fixes this.

Thanks again Gwenwyfar .... unfortunately still no luck, just seeing two fields displayed after removing the code you suggested?

Gwenwyfar

I haven't checked if there is more of that code elsewhere, I removed it here for the one for above signature area and it is now displaying my 3 fields (it was only showing 2 before).

Could you attach your Display.template.php?
"It is impossible to communicate with one that does not wish to communicate"

Sir Osis of Liver

Works fine for me in either location, with Display.template.php edited as above to remove field label, and new css class to reduce font.  I cannot replicate the two field glitch.

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

pepa

Quote from: Gwenwyfar on January 22, 2018, 06:08:55 PM
I haven't checked if there is more of that code elsewhere, I removed it here for the one for above signature area and it is now displaying my 3 fields (it was only showing 2 before).

Could you attach your Display.template.php?

display.template.php attached

Sir Osis of Liver

That file displays 3 fields in either location, with or without this code -



     if ($custom['placement'] != 2 || empty($custom['value']))



Are you sure all fields are configured correctly?

Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

pepa

Quote from: Sir Osis of Liver on January 22, 2018, 09:43:43 PM
That file displays 3 fields in either location, with or without this code -



     if ($custom['placement'] != 2 || empty($custom['value']))



Are you sure all fields are configured correctly?

Yep ... amazing, that was it.  Show on topic view wasn't checked on the 3rd field.  For some reason it had become unchecked when I changed for Redsy theme.  I didn't physically do it, so I have no explanation.

Thank you both for all your help with this .... fantastic community here : )

pepa

Just one last comment on all of this ...

If I comment out the font size in .custom_fields_above_signature in index.css then the class that Sir Osis added i.e.

.custom_fields
{
font-size: .65em;
}


doesn't work or, at least, the text of custom fields displayed above the signature becomes approx twice the size, so there may be some bug operating here?  But no biggie all the problems I was encountering have been resolved thanks to the wonderful support here!

Gwenwyfar

Hmm, odd things going on in these fields. Mines are all checked to display.

Glad it's all sorted then :)

Quotedoesn't work or, at least, the text of custom fields displayed above the signature becomes approx twice the size, so there may be some bug operating here?
em is a percentage, so it should be reducing whatever font size it originally was. No idea why it would become larger though, maybe that area has a larger font size being inherited from somewhere.
"It is impossible to communicate with one that does not wish to communicate"

pepa

Quote from: Gwenwyfar on January 23, 2018, 06:19:05 AM
Hmm, odd things going on in these fields. Mines are all checked to display.

Glad it's all sorted then :)

Quotedoesn't work or, at least, the text of custom fields displayed above the signature becomes approx twice the size, so there may be some bug operating here?
em is a percentage, so it should be reducing whatever font size it originally was. No idea why it would become larger though, maybe that area has a larger font size being inherited from somewhere.

Yes, my thoughts as well ... some inheritance happening I'm not aware of.  Thank you for all your help with this (and Sir Osis).  I was getting quite lost and frustrated but the two of you pulled me through, great outcome : )

Sir Osis of Liver

Quote from: pepa on January 23, 2018, 02:02:46 AM
doesn't work or, at least, the text of custom fields displayed above the signature becomes approx twice the size

You have to change formatting for both.  Font-size for fields in poster info block are adjusted using new .custom_fields class.  That has no effect on fields displayed above signature, that's formatted  in .custom_fields_above_signature, you have to change both -



.custom_fields_above_signature
{
width: 98%;
clear: right;
padding: 1em 0 3px 0;
border-top: 1px solid #aaa;
line-height: 1.4em;
font-size: 0.65em;
}

.custom_fields
{
font-size: .65em;
}
Ashes and diamonds, foe and friend,
 we were all equal in the end.

                                     - R. Waters

Advertisement: