Announcement

Collapse
No announcement yet.

How to give certain threadtitles a different layout?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to give certain threadtitles a different layout?

    Hi,

    Don't know if this is the correct forum, but:

    In Vb 3.0 I used this change in the 'threadbit'-template to give certain threadtitles a different look:

    (vB 3.0.16)
    -------------------------------------------------
    <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
    $thread[movedprefix]
    $thread[typeprefix]
    <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]"<if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930))">style="font-size: 13pt;background-color: #E1E4F2;"</if>><if condition="$show['gotonewpost']"><strong>$thread[threadtitle]</strong><else />$thread[threadtitle]</if>
    -------------------------------------------------

    I am not a programmer so since the vB 3.5 templates have changed, I don't really know how to put the above code in bold properly into the template-code below:

    (vB 3.5.7)
    -------------------------------------------------
    <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
    $thread[movedprefix]
    $thread[typeprefix]
    $thread[moderatedprefix]
    <if condition="$show['gotonewpost']">
    <strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a></strong>
    <else />
    <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
    </if>
    -------------------------------------------------

    Anyone can help me out? Thanks!
    How much do you love XenForo?

  • #2
    Use this code:

    Code:
    <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
               $thread[movedprefix]
                $thread[typeprefix]
                $thread[moderatedprefix]
                <if condition="$show['gotonewpost']">
    <strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid][B]<if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930))"> style="font-size: 13pt;background-color: #E1E4F2;"</if>[/B]">$thread[threadtitle]</a></strong>
                <else />
    <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]">$thread[threadtitle]</a>
                </if>
    Best Regards
    Colin Frei

    Please don't contact me per PM.

    Comment


    • #3
      Hi Colin,

      Thanks for your quick reaction! But it doesn't work as I wanted it to : those threads need to have this different layout always and I guess the code above only shows this different layout when those threads are new posts?

      How to accomplish it?
      How much do you love XenForo?

      Comment


      • #4
        Ah, I see.

        Try this code instead:

        Code:
        <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&t=$thread[threadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
                   $thread[movedprefix]
                    $thread[typeprefix]
                    $thread[moderatedprefix]
                    <if condition="$show['gotonewpost']">
        <strong><a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid][B]<if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930))"> style="font-size: 13pt;background-color: #E1E4F2;"</if>[/B]">$thread[threadtitle]</a></strong>
                    <else />
        <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"[B]<if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930))"> style="font-size: 13pt;background-color: #E1E4F2;"</if>[/B]>$thread[threadtitle]</a>
                    </if>
        Best Regards
        Colin Frei

        Please don't contact me per PM.

        Comment


        • #5
          Thank you very much!
          How much do you love XenForo?

          Comment


          • #6
            Does this also work in 3.6.1 ?

            Comment


            • #7
              Hello Colin,

              Can you tell us what we have to do to get it to work in vB 3.6.5?

              Schanulleke : or did you find out already how to do it in vB 3.6.1?
              How much do you love XenForo?

              Comment


              • #8
                Originally posted by Grover View Post
                Hello Colin,

                Can you tell us what we have to do to get it to work in vB 3.6.5?

                Schanulleke : or did you find out already how to do it in vB 3.6.1?
                Anyone?
                How much do you love XenForo?

                Comment


                • #9
                  The same instructions will work on 3.6.x

                  Comment


                  • #10
                    Originally posted by Kerry-Anne View Post
                    The same instructions will work on 3.6.x
                    Well, the code on 3.6 is a bit differently. I am no programmer, but after trial and error several times, I came up with this:

                    Code:
                     
                    <if condition="$show['gotonewpost']"><a href="showthread.php?$session[sessionurl]goto=newpost&amp;t=$thread[threadid]" id="thread_gotonew_$thread[realthreadid]"><img class="inlineimg" src="$stylevar[imgdir_button]/firstnew.gif" alt="$vbphrase[go_to_first_new_post]" border="0" /></a></if>
                       $thread[movedprefix]
                       $thread[typeprefix]
                       $thread[moderatedprefix]
                    <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"
                    <if condition="$show['gotonewpost']"> style="font-weight:bold;<if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930))">font-size: 13pt;background-color: #E1E4F2"</if>">$thread[threadtitle]</a>
                    <else />
                    <if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930))"> style="font-size:13pt;background-color: #E1E4F2"</if>>$thread[threadtitle]</a>
                    </if>
                    And that seems to work. Maybe somebody (a programmer) could confirm this is the correct use of code?
                    How much do you love XenForo?

                    Comment


                    • #11
                      Is this correct?

                      Like I said in the posting above, inside 'threadbit' I changed this:

                      ------------------------------
                      <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"<if condition="$show['gotonewpost']"> style="font-weight:bold"</if>>$thread[threadtitle]</a>
                      ------------------------------

                      Into this:

                      ------------------------------
                      <a href="showthread.php?$session[sessionurl]t=$thread[threadid]$thread[highlight]" id="thread_title_$thread[realthreadid]"

                      <if condition="$show['gotonewpost']"> style="font-weight:bold;<if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930,11029))">font-size: 11pt;background-color: #E1E4F2"</if>">$thread[threadtitle]</a>

                      <else />

                      <if condition="in_array($thread[threadid],array(8467,8493,8888,9329,9930,11029))"> style="font-size:11pt;background-color: #E1E4F2"</if>>$thread[threadtitle]</a>

                      </if>
                      ------------------------------

                      I am not sure about my programming skills , but can anybody confirm this is the correct use of code? It does work correctly on my forum (vBulletin 3.6.8) it seems this way.
                      Last edited by Grover; Wed 12 Sep '07, 6:00am.
                      How much do you love XenForo?

                      Comment

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