Your username
Have an account?
Forgot your password?
  • Log in or Sign up

    Results 1 to 5 of 5
    1. #1
      Junior Member frybread's Avatar
      Join Date
      Jan 2009
      Posts
      6
      Provided Answers: 1

      Default Answered: Threadfields - add a conditional for one of the field ids?

      Hey, I love the site and extra threadfields.

      I'm trying to add a condition to make one of my field titles red. How would I add an IF statement to do that? Would I use fieldid, or title?

      I've tried,
      Code:
      <![CDATA[if ($threadfield['fieldid'] == '2'){[<divstyle="color:red"><b>$threadfield[title]:</b> $thread[fieldvalue]</div>]]]>}
      without much luck!

      Thanks for any help

    2. "Make sure you change both instances of the number 3 and change the following in the provb_index template to reflect the same number:

      HTML Code:
      <td class="tcat" colspan="3">$vbphrase[provb_index_newattachments]</td>
      "


    3. #2
      Junior Member frybread's Avatar
      Join Date
      Jan 2009
      Posts
      6
      Provided Answers: 1

      Default Re: Threadfields - add a conditional for one of the field ids?

      ok I figured it out
      I was mixing PHP with Vbulletin's template conditionals.
      http://www.vbulletin.com/docs/html/t...e_conditionals

      A correct if statement looks like this,

      Code:
      <if condition="$fieldid == 2">hello</if>
      This is from editing the template section in the xml file, by the way.
      Last edited by frybread; 01-30-2009 at 12:37 PM.

    4. #3
      ModernvB.com Owner Gio~Logist's Avatar
      Join Date
      Oct 2008
      Posts
      1,208
      Provided Answers: 30

      Default Re: Threadfields - add a conditional for one of the field ids?

      Bingo, that would do the trick. And you edited newthread_extra_fields, correct?

    5. #4
      Junior Member frybread's Avatar
      Join Date
      Jan 2009
      Posts
      6
      Provided Answers: 1

      Default Re: Threadfields - add a conditional for one of the field ids?

      Yeah, sure did. It's working great. I was even able to add a field with a URL. This Q&A mod is looking great too.

      Thanks!

    6. #5
      ModernvB.com Owner Gio~Logist's Avatar
      Join Date
      Oct 2008
      Posts
      1,208
      Provided Answers: 30

      Default Re: Threadfields - add a conditional for one of the field ids?

      Yea, that's what we do over in our paid skins section.

      People don't realize it's as simple as setting the field to display #0 (so that it doesn't automatically show in listings) and then utilizing $thread[fieldx] as best possible - to get those really customized listings going for yourself

      Glad to see you making the best of the mod. Good luck!

    Similar Threads

    1. Additional field for posters to read only
      By connectr in forum Premium Product Support
      Replies: 3
      Last Post: 01-09-2009, 10:12 PM

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •