Announcement

Collapse
No announcement yet.

Adding a custom field to channel manager when adding\editing a forum?

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

  • Shon
    replied
    Originally posted by shka View Post

    You should better use $page['channelid'].

    $page['nodeid'] means the id of the current node. In forum view (list of threads) it is the id of the forum node and equal to $page['channelid'], but when viewing a thread it is the id of the thread node and not equal to the also published node of the parent channel node.
    Thank you shka! That is exactly what I was looking for!

    Leave a comment:


  • shka
    replied
    Originally posted by Shon View Post
    Code:
    <vb:if condition="$page['nodeid'] == X">You're Viewing X Forum</vb:if>
    But that variable doesn't seem to work when viewing a thread.
    You should better use $page['channelid'].

    $page['nodeid'] means the id of the current node. In forum view (list of threads) it is the id of the forum node and equal to $page['channelid'], but when viewing a thread it is the id of the thread node and not equal to the also published node of the parent channel node.

    Leave a comment:


  • Shon
    replied
    Originally posted by Wayne Luke View Post
    You can already add a Meta Description tag for every channel by visiting the channel and editing the page. By default, it will use the description entered in the AdminCP if you create the forums there. Topics created with vBulletin 5 will use a snippet of the Topic Starter post as its description automatically.

    You can edit templates and add <if> statements for additional data based on the URL of the page. However, this will be unwieldy and will affect the performance of your page as you're processing hundreds or thousands of <if> statements. It doesn't really seem like a viable solution.

    You cannot have a "Long" and "Short" description.
    Sorry... I don't technically mean a "description" in that sense. I'm only wanting to show different text in the header template when a user is viewing a forum or thread page depending on which forum a user is viewing. In vB4.x I was able to do this with conditional statements per forumid (if forumid==1 then show "ForumID is 1" if forumid==2 then show "ForumID is 2" etc.). I don't want to change the meta descriptions or the actual description of the forum itself, only display a specific text if a user is inside of a certain forum.

    Another example using this specific thread again... I would want to add a conditional statement for if forum="Support Issues & Questions" then show "ABC" in the header template.

    I don't necessarily need to pull the URL of the page, I mainly only need to display different text depending on a forumid, pageid, nodeid, or whatever it's called now... I'm just unsure of what variable to use to get the forum title a thread is posted to when a user is viewing a thread.

    I was able to get this to work in the header template when viewing the actual forum page by using:

    Code:
    <vb:if condition="$page['nodeid'] == X">You're Viewing X Forum</vb:if>
    But that variable doesn't seem to work when viewing a thread.

    I hope this makes better sense. :\

    Thank you for your help!

    Leave a comment:


  • Wayne Luke
    replied
    You can already add a Meta Description tag for every channel by visiting the channel and editing the page. By default, it will use the description entered in the AdminCP if you create the forums there. Topics created with vBulletin 5 will use a snippet of the Topic Starter post as its description automatically.

    You can edit templates and add <if> statements for additional data based on the URL of the page. However, this will be unwieldy and will affect the performance of your page as you're processing hundreds or thousands of <if> statements. It doesn't really seem like a viable solution.

    You cannot have a "Long" and "Short" description.

    Leave a comment:


  • Shon
    replied
    Originally posted by Wayne Luke View Post
    This would only be possible with custom coding at this time. I don't have an actual code example available.
    Thanks Wayne... Would it be possible to do this via template edits instead using if conditions?

    I am basically trying to recreate something I did with vB4.x... I'm wanting to modify the header template to include the forum title and an additional\secondary description of a forum when a person is viewing a specific forum or a thread... using this thread for example, I'm wanting to add "Support Issues & Questions" (forum title this thread is in) and a custom\different description for the "Support Issues & Questions" forum inside of the header template when viewing this thread (or the "Support Issues & Questions" forum itself.)

    I thought it would be easy to add something to the admincp, but that's not completely necessary.

    Thank you for your help!

    Leave a comment:


  • Wayne Luke
    replied
    This would only be possible with custom coding at this time. I don't have an actual code example available.

    Leave a comment:


  • Adding a custom field to channel manager when adding\editing a forum?

    I hope this is possible with vB5...

    I'm wanting to add an additional text input field when editing a forum within the AdminCP (for example, a secondary description field for both short and long descriptions of a forum).

    Is this possible with or without hardcoding\modifying the forum.php file?

    vB5 is still brand new to me lol

    Any help with being able to go about doing this is very much appreciated!

Related Topics

Collapse

Working...
X