Page 1 of 1

Trying to make strikethrough but need help

Posted: Fri May 28, 2010 4:37 am
by pororo
I'm trying to make my topic titles have strikethroughs if the topic is 'Locked'.

I'm using ProSilver and changed the code in the viewforum_body.html to below.

Code: Select all

<a <!-- IF topicrow.S_TOPIC_LOCKED and not (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL or topicrow.S_POST_STICKY) -->style="text-decoration: line-through;"<!-- ENDIF --> href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
But it's not working. Any ideas?

Re: Trying to make strikethrough but need help

Posted: Fri May 28, 2010 4:43 am
by Mick
Have a look at this.

Re: Trying to make strikethrough but need help

Posted: Fri May 28, 2010 5:11 am
by pororo
I'm not sure what I did wrong. Do I need to put { } between the lines?

Would you be kind enough to alter my initial posted code so it gets corrected? I could learn from that.

Re: Trying to make strikethrough but need help

Posted: Fri May 28, 2010 5:26 am
by Mick
I can't edit your post, sorry.

I'm only guessing but try surrounding the style section with <> like:

Code: Select all

<style="text-decoration: line-through;">
This is a standard method for doing it:

Code: Select all

<p style="text-decoration:line-through;">This text has line through</p>
Note: I edited my previous post as it was unnecessary.

Re: Trying to make strikethrough but need help

Posted: Fri May 28, 2010 5:34 am
by pororo
Tried it like this

Code: Select all

<a <!-- IF topicrow.S_TOPIC_LOCKED and not (topicrow.S_POST_ANNOUNCE or topicrow.S_POST_GLOBAL or topicrow.S_POST_STICKY) --><style="text-decoration:line-through;"><!-- ENDIF --> href="{topicrow.U_VIEW_TOPIC}" class="topictitle">{topicrow.TOPIC_TITLE}</a>
But still, no strikethrough. Since the text-decoration thingy is alread wrapped by <a , I don't think I need to add the < > for the style attibute.

Hmm... :roll:

Re: Trying to make strikethrough but need help

Posted: Fri May 28, 2010 4:18 pm
by Christian 2.0
Try this:

Code: Select all

<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_TOPIC_LOCKED --><span style="text-decoration: line-through;">{topicrow.TOPIC_TITLE}</span><!-- ELSE -->{topicrow.TOPIC_TITLE}<!-- ENDIF --></a>

Re: Trying to make strikethrough but need help

Posted: Fri May 28, 2010 11:39 pm
by Mick
Nice one Chris! ;)

Re: Trying to make strikethrough but need help

Posted: Sat May 29, 2010 12:43 am
by pororo
Christian 2.0 wrote:Try this:

Code: Select all

<a href="{topicrow.U_VIEW_TOPIC}" class="topictitle"><!-- IF topicrow.S_TOPIC_LOCKED --><span style="text-decoration: line-through;">{topicrow.TOPIC_TITLE}</span><!-- ELSE -->{topicrow.TOPIC_TITLE}<!-- ENDIF --></a>
Thx a million. Works perfectly! :)
Mixstar wrote:Nice one Chris! ;)
Mixstar, thx to u 2 for helping out. Cheers! ;)