Newthread.gif

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • scorpio24
    Senior Member
    • Nov 2006
    • 679

    Newthread.gif

    FORUMDISPLAY

    I have been trying to omit the newthread.gif button in forum ID:17 with no success.


    <td class="smallfont"><if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>



    This conditional places a text link above the newthread.gif in forum ID:17

    <if condition="$forumid == 17">
    <a href="http://www.website.ca/forum/misc.php?do=form&fid=3"><font size=3><b>Post an Ad</font></a> </if>


    Any suggestions much appreciated.
  • Jake Bunce
    Senior Member
    • Dec 2000
    • 46598
    • 3.6.x

    #2
    Normally you would just make the forum into a category by disabling this:

    Admin CP -> Forums & Moderators -> Forum Manager -> Edit Forum -> Act as Forum

    Categories have no thread listing or new thread button.

    Comment

    • scorpio24
      Senior Member
      • Nov 2006
      • 679

      #3
      Thx Jake, but I would still like members to be able to post new threads...but only through the Easy forms template. The Post an AD link in the screenshot goes to the easy form which then posts as a new thread when submitted.

      I am trying to figure out how to omit the Newthread.gif in forum ID:17 with a conditional. I understand it would be considered editing code and beyond support but was hoping some saavy vb coders might have a suggestion.

      Attached Files
      Last edited by scorpio24; Fri 9 Oct '09, 6:41pm.

      Comment

      • kennethj
        Senior Member
        • Apr 2001
        • 116
        • 3.6.x

        #4
        should work.. .
        Code:
        <td class="smallfont">
            <if condition="$forumid == 17">
        <a href="http://www.website.ca/forum/misc.php?do=form&fid=3"><font size=3><b>Post an Ad</font></a>
            <else />
        <if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
            </if>
        </td>
        if condition is : <if condition="$forumid == 17"
        if condition is not : <if condition="!$forumid == 17
        .. . / GFXstyles certain amount of common sense is necessary to survive in this world !
        insanity leaves you no restrictions

        Comment

        • Shadab
          Senior Member
          • Nov 2007
          • 143
          • 3.8.x

          #5
          Try and see if it works:

          HTML Code:
          <td class="smallfont">
              <if condition="$foruminfo['forumid'] == 17">
                  <a href="http://www.website.ca/forum/misc.php?do=form&amp;fid=3" style="font-size:14px">
                      <b>Post an Ad</b>
                  </a>
              <else />
                  <if condition="$show['newthreadlink']">
                      <a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow">
                          <img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" />
                      </a>
                  <else />
                      &nbsp;
                  </if>
              </if>
          </td>
          EDIT: Kennethj beat me to it. :|
          The joy of an early release lasts but a short time. The bitterness of an unusable system lasts for years.
          GeekPoint Forum | Articles & Reference

          Comment

          • scorpio24
            Senior Member
            • Nov 2006
            • 679

            #6
            Thanks guys

            I managed to add multiple forums...had some trouble until I realized that the (6) </if> belong at the end and not after each <else />

            <td class="smallfont">
            <if condition="$forumid == 37">
            <a href="http://www.website.ca/forum/misc.php?do=form&fid=1"><font size=3><b>Post an AD</font></a>
            <else />
            <td class="smallfont">
            <if condition="$forumid == 50">
            <a href="http://www.website.ca/forum/misc.php?do=form&fid=2"><font size=3><b>Post an AD</font></a>
            <else />
            <if condition="$forumid == 17">
            <a href="http://www.website.ca/forum/misc.php?do=form&fid=3"><font size=3><b>Post an AD</font></a>
            <else />
            <td class="smallfont">
            <if condition="$forumid == 41">
            <a href="http://www.website.ca/forum/misc.php?do=form&fid=6"><font size=3><b>Post an AD</font></a>
            <else />
            <if condition="$forumid == 94">
            <a href="http://www.website.ca/forum/misc.php?do=form&fid=4"><font size=3><b>Post an AD</font></a>
            <else />
            <td class="smallfont">
            <if condition="$forumid == 122">
            <a href="http://www.website.ca/forum/misc.php?do=form&fid=7"><font size=3><b>Post an AD</font></a>
            <else />
            <if condition="$show['newthreadlink']"><a href="newthread.php?$session[sessionurl]do=newthread&amp;f=$foruminfo[forumid]" rel="nofollow"><img src="$stylevar[imgdir_button]/newthread.gif" alt="$vbphrase[post_new_thread]" border="0" /></a><else />&nbsp;</if></td>
            </if></if> </if></if> </if></if>
            </td>
            Last edited by scorpio24; Mon 12 Oct '09, 7:52am.

            Comment

            • Shadab
              Senior Member
              • Nov 2007
              • 143
              • 3.8.x

              #7
              I managed to add multiple forums...had some trouble until I realized that the (6) </if> belong at the end and not after each <else />
              Yeah. It can get real messy with those nested <if>'s
              when a single <elseif> would've kept the nesting level down and made the code easier to read.

              ElseIf will be there in vB4. For good.
              The joy of an early release lasts but a short time. The bitterness of an unusable system lasts for years.
              GeekPoint Forum | Articles & Reference

              Comment

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