Announcement

Collapse
No announcement yet.

Display Forum Description on Forum Channel page using an Ad Module

Collapse
X
Collapse
First Prev Next Last
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Free Mod Display Forum Description on Forum Channel page using an Ad Module

    It's a default feature in vB4 to have the forum description displayed below the forum name in the forum display page. Unfortunately, this is not the case for vB5. But don't worry, adding it is fairly easy thing to do and the actual code for it is so simple! You may wonder why on earth vBulletin has not implemented it yet? Don't ask me, I don't know why.

    You can do this by editing a template but I don't recommend it for maintenance reasons as you may get template merge conflicts during an upgrade and you would have to resolve the conflicts every time. I prefer this approach better using an Ad module as this will not get affected by future upgrades.

    Below are the steps:
    1. Go to a Forum Channel Page.
    2. Enable Sitebuilder (Edit Site ON)
    3. Click Edit Page.
    4. Drag and drop an Ad Module onto the page below the Page Title Module.
    5. Edit the Ad Module by clicking on the Pencil icon.
    6. Fill out the config form
      Title: Forum Description (or anything, it doesn't matter as this will not be displayed)
      Keep default values in other fields.
    7. Click Edit button in the Config Ad option.
    8. Click Add New Ad button.
    9. Enter Ad title (e.g. Forum Description)
    10. Enter the following HTML code and template variable. NOTE: The code in red is required as a workaround for vB 5.2.4 and above until this JIRA bug report is fixed. For vB 5.2.3 and below, do not add them.
      Code:
      	[COLOR=#FF0000]</vb:literal>[/COLOR]
      	<div class="custom-forum-channel-desc h-align-left">
      	{vb:raw page.nodedescription}
      	</div>
      	[COLOR=#FF0000]<vb:literal>[/COLOR]
    11. Save the form.
    12. Save the page.
    13. Overwrite the template. This makes the changes to the template available to all the Forum channel pages.
    14. (Optional) If you want to style the forum description, you can add custom CSS in css_additional (or via Sitebuilder > Style > CSS Editor) with this CSS rule:
      Code:
      	.custom-forum-channel-desc {
      	/* custom style here */
      	}
      You could also add the custom CSS directly in the Ad module itself by adding this at the very top of the code.

      Code:
      	<style>
      	.custom-forum-channel-desc {
      	/* custom style here */
      	}
      	</style>
    If you added HTML tags in the forum description when you set it in AdminCP Channel Manager, these will be preserved and carried over to the Ad module when the forum description is displayed. So if you have a banner ad in the description, this will also be displayed on the Forum channel page.

    Screenshot:
    Click image for larger version

Name:	forum-desc-min.png
Views:	1539
Size:	25.2 KB
ID:	1612
    Demo:
    See any forum channel page on this site.
    Last edited by glennrocksvb; 11-22-2016, 03:23 PM. Reason: Added workaround fix in Step 10 for vB 5.2.4 and above
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    #2
    I had someone complained in vb.org that this mod is not working for them and it just displays the raw code on the page and not parsed and evaluated.
    Code:
    {vb:raw page.nodedescription}
    To fix this issue:

    1. Determine the ad id generated by the Ad module you added. Right click on the module and inspect the HTML element and find ad_XXX_inner or axd_XXX CSS classes in the module. The XXX is the ad id.

    2. Find the ad template in AdminCP using the ad id you got in step 1. The template name has a format of ad_XXX where XXX is the ad id.

    3. Edit the template and make sure the "Text Only" checkbox is unchecked. If it is checked, it causes vB template code syntax to not be parsed and evaluated. So it has to be unchecked. This is what it says in AdminCP below the "Text Only" label:
    If checked, template will be passed exactly as entered here- no rendering will be performed.
    4. Save.
    Helpful? Donate. Thanks!
    Buy me a coffeePayPal QR Code
    Fast VPS Host for vBulletin:
    A2 Hosting & IONOS

    Comment


      #3
      Originally posted by glennrocksvb View Post
      I had someone complained in vb.org that this mod is not working for them and it just displays the raw code on the page and not parsed and evaluated.
      Code:
      {vb:raw page.nodedescription}
      To fix this issue:

      1. Determine the ad id generated by the Ad module you added. Right click on the module and inspect the HTML element and find ad_XXX_inner or axd_XXX CSS classes in the module. The XXX is the ad id.

      2. Find the ad template in AdminCP using the ad id you got in step 1. The template name has a format of ad_XXX where XXX is the ad id.

      3. Edit the template and make sure the "Text Only" checkbox is unchecked. If it is checked, it causes vB template code syntax to not be parsed and evaluated. So it has to be unchecked. This is what it says in AdminCP below the "Text Only" label:


      4. Save.
      I think that is not the issue. The issue seems to be stemming from the system wrapping the ad code in between <vb:literal></vb:literal> tags which cause the vb template code syntax in ad modules to not work and be treated as literal string and not variables. This started in vB 5.2.4 and seems to be intended for vBCloud only and not in self-hosted version. I opened a JIRA bug report for this and updated the first post to add a workaround fix until that bug is resolved.
      Helpful? Donate. Thanks!
      Buy me a coffeePayPal QR Code
      Fast VPS Host for vBulletin:
      A2 Hosting & IONOS

      Comment


        #4
        Click image for larger version

Name:	No Permission Error.PNG
Views:	169
Size:	12.1 KB
ID:	2288

        I get this message when trying to install this code in the ad module.

        Comment


        • glennrocksvb
          glennrocksvb commented
          Editing a comment
          Are you on vBCloud?

        #5
        Yes, I'm on cloud, so this doesn't work for cloud forums?

        Comment


          #6
          It should work. Can you try reloading the page and try again?
          Helpful? Donate. Thanks!
          Buy me a coffeePayPal QR Code
          Fast VPS Host for vBulletin:
          A2 Hosting & IONOS

          Comment


            #7
            I get the same message when refreshing the page. I don't understandstand what i did wrong.

            Comment


            • Nintenex
              Nintenex commented
              Editing a comment
              It allows me to save it without the <vb:literal> codes though it doesnt work correctly.

            • glennrocksvb
              glennrocksvb commented
              Editing a comment
              It looks like the workaround to add <vb:literal> tags doesn't work in vBCloud and only works in self-hosted version. You're out of luck then. But I heard forum description will be implemented by vB soon. So I guess you just have to wait.

            • Nintenex
              Nintenex commented
              Editing a comment
              Thats okay glen, it wasnt a big deal i can wait for it.

            #8
            I think default vB now has this ?

            Comment

            Users Viewing This Page

            Collapse

            There is 1 user viewing this forum topic.

            • Guest Guest

            Latest Posts

            Collapse

            Working...
            X
            Searching...Please wait.
            An unexpected error was returned: 'Your submission could not be processed because you have logged in since the previous page was loaded.

            Please push the back button and reload the previous window.'
            An unexpected error was returned: 'Your submission could not be processed because the token has expired.

            Please push the back button and reload the previous window.'
            An internal error has occurred and the module cannot be displayed.
            There are no results that meet this criteria.
            Search Result for "|||"