Thread Title Fonts

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • JonUrban
    Senior Member
    • Jul 2003
    • 222
    • 4.0.0

    Thread Title Fonts

    Is it possible to make the font size larger in a specific thread?

    We have a sticky thread with section rules, and would like it to stick out from the rest.

    THANKS

    :-jon
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Admin CP -> Styles & Templates -> Style Manager -> « » -> Threadbit Templates -> threadbit

    Add the red code:

    Code:
    			$thread[movedprefix]
    			$thread[typeprefix]
    			<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" [color=red]<if condition="$thread[threadid] == X">style="font-size: 12pt;"</if>[/color]><if condition="$show['gotonewpost']"><strong>$thread[threadtitle]</strong><else />$thread[threadtitle]</if></a>
    Where X is the threadid of the thread. Change the font-size attribute to whatever you want.

    That should work.

    Comment

    • JonUrban
      Senior Member
      • Jul 2003
      • 222
      • 4.0.0

      #3
      Thanks Jake - It works like a CHARM!!!

      Comment

      • JonUrban
        Senior Member
        • Jul 2003
        • 222
        • 4.0.0

        #4
        Jake,

        One other thing, what about if I want to make the thread title font a different color, say red, just for that thread ID?

        :-jon

        Comment

        • Jake Bunce
          Senior Member
          • Dec 2000
          • 46598
          • 3.6.x

          #5
          Add the blue code to the previous code:

          Code:
          			$thread[movedprefix]
          			$thread[typeprefix]
          			<a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" [color=red]<if condition="$thread[threadid] == X">style="font-size: 12pt; [color=blue]color: red;[/color]"</if>[/color]><if condition="$show['gotonewpost']"><strong>$thread[threadtitle]</strong><else />$thread[threadtitle]</if></a>

          Comment

          • JonUrban
            Senior Member
            • Jul 2003
            • 222
            • 4.0.0

            #6
            Thanks again, Jake! AWESOME SUPPORT!!!!

            Comment

            • Dennis Olson
              Senior Member
              • Oct 2002
              • 2789

              #7
              Okay, how about if you wanted the font change to affect ALL sticky-threads. JUST sticky threads. But automatically (not using threadID, but the sticky-bit).

              Comment

              • Jake Bunce
                Senior Member
                • Dec 2000
                • 46598
                • 3.6.x

                #8
                For the if condition, use this:

                Code:
                [color=red]<if condition="$show['sticky']">[/color]

                Comment

                • Grover
                  Senior Member
                  • May 2001
                  • 4005
                  • 3.8.x

                  #9
                  Is it possible to check for a specific text in a threadtitle?

                  I asked the same question as the TS did overhere : How to change the colour of a specific sticked thread?
                  But I will be using this thread to continue my questions.

                  In the link above I wrote:

                  Originally posted by Grover
                  Hi,

                  I am running into the following situation at the moment:

                  I have a forum with some sticky threads in it. Recently I posted an advert in that forum. This ad is also a sticky posting:

                  ---------------------------------------------------------------
                  Forum A

                  Sticky: [Advert] Buy your Marsupilami here.
                  Sticky: Fawlty Towers is the best comedy series ever made.
                  Sticky: Series 1 was a little better then Series 2
                  Sticky: What are you on about? I love 'Full House'!
                  ---------------------------------------------------------------

                  The problem now is that it seems that not much visitors and members read this add, as I can see by looking at the 'view' column.

                  Is it possible to change the title-colour of just this particular sticked [Advert] -thread, instead of all the above sticked threads? I need the advert to stand out from the rest of the sticked threads.

                  Help is appreciated,
                  I am going to try the tip of Jake:

                  Jake is using the threadID: <if condition="$thread[threadid] == X">

                  I am not a programmer ... but I would like to know if it is somehow possible to -instead of using the threadID- check if the threadtitle contains the text '[Advert]' and change the style based on that?

                  That way all threads with the text '[Advert]' will have this style automatically, cause I don't have to bother with the threadID's etc.
                  How much do you love XenForo?

                  Comment

                  • Jake Bunce
                    Senior Member
                    • Dec 2000
                    • 46598
                    • 3.6.x

                    #10
                    Originally posted by Grover
                    I am not a programmer ... but I would like to know if it is somehow possible to -instead of using the threadID- check if the threadtitle contains the text '[Advert]' and change the style based on that?

                    That way all threads with the text '[Advert]' will have this style automatically, cause I don't have to bother with the threadID's etc.
                    String functions are not available to template conditionals, so there is no way to check partial strings. You would need to modify the files to get that to work.

                    Comment

                    • Grover
                      Senior Member
                      • May 2001
                      • 4005
                      • 3.8.x

                      #11
                      Originally posted by Jake Bunce
                      String functions are not available to template conditionals, so there is no way to check partial strings. You would need to modify the files to get that to work.
                      Thanks for explaining, Jake.
                      How much do you love XenForo?

                      Comment

                      • JonUrban
                        Senior Member
                        • Jul 2003
                        • 222
                        • 4.0.0

                        #12
                        UPDATE:

                        I was going to do this after the 3.5.3 upgrade, because I had to revert the template. However, I noticed that the code had changed a bit, so the above solution does not fit the new template.

                        Can Jake or someone else show where to put the added code in the new template?

                        THANKS

                        Comment

                        widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                        Working...