vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Products & Extensions (https://vborg.vbsupport.ru/forumdisplay.php?f=258)
-   -   Forum Display Enhancements - [vBMods.rocks] Display Forum Description on Forum Channel page using an Ad Module (https://vborg.vbsupport.ru/showthread.php?t=323618)

noypiscripter 10-12-2016 09:00 PM

[vBMods.rocks] Display Forum Description on Forum Channel page using an Ad Module
 
1 Attachment(s)
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. :confused:

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:

    </vb:literal>
    <div class="custom-forum-channel-desc h-align-left">
            {vb:raw page.nodedescription}
    </div>
    <vb:literal>

  11. Check "Active" checkbox.
  12. Save the form.
  13. Save the page.
  14. Overwrite the template. This makes the changes to the template available to all the Forum channel pages.
  15. (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>


Live Demo:
http://vbmods.rocks/forum/vbulletin-...-modifications

This mod is also posted in http://vbmods.rocks/forum/vbulletin-...g-an-ad-module

Screenshot:
See attached image below.

Papa Bear 10-14-2016 07:54 PM

Ok followed the steps and instead it only shows this.

Code:

{vb:raw page.nodedescription}

noypiscripter 10-14-2016 10:31 PM

Are you on vBCloud?

Papa Bear 10-14-2016 10:50 PM

Quote:

Originally Posted by noypiscripter (Post 2576952)
Are you on vBCloud?

No..running version 5.2.4

noypiscripter 10-14-2016 11:08 PM

Are you sure you are using an Ad Module and not an HTML module?

noypiscripter 10-14-2016 11:10 PM

Could you post or PM me the link to your site?

noypiscripter 11-18-2016 03:14 PM

@Papa Bear, I have an idea what's happening to your site not parsing vB template code syntax in Ad modules.

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. I found it for your site which is 158.

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. So in your case, the template name is ad_158.

3. Edit the template and make sure the "Text Only" checkbox is unchecked. I'm pretty sure it is checked for you which causes vB template code syntax to not be parsed and evaluated.

4. Save.

Please let me know if that fixes the issue for you.

Mark.B 11-18-2016 10:12 PM

Glenn, I ran into this on a client site and it's because the template has <vb:literal> tags in it. If you remove those it works.

Guess the ad modules must insert those by default, I'm not sure. The text only box was already unticked.

noypiscripter 11-19-2016 06:53 AM

I don't see vb literal tags in Ad module templates. Or is that done only in vBCloud? I know the Text Only flag is forcely set in css_additional template when adding custom css via Sitebuilder CSS Editor. I created a related JIRA on that recently.

http://tracker.vbulletin.com/browse/VBV-16683

Mark.B 11-19-2016 09:25 AM

Quote:

Originally Posted by noypiscripter (Post 2578403)
I don't see vb literal tags in Ad module templates. Or is that done only in vBCloud? I know the Text Only flag is forcely set in css_additional template when adding custom css via Sitebuilder CSS Editor. I created a related JIRA on that recently.

http://tracker.vbulletin.com/browse/VBV-16683

This was on a self hosted site, not cloud. It just put the tags in itself and that generated the same symptoms as the user above. I removed them and it worked. So that might be this user's issue.

It's worth noting that adding the forum description is due to go into 5.2.6:
http://tracker.vbulletin.com/browse/VBV-12209

The css_additional flag being set is, I'm fairly sure, because of Cloud customers, as they have access to that and it needs to be text only. So to implement that Jira they'd need some way of distinguishing between the two and setting it appropriately. Otherwise Cloud customers would have to be restricted from adding custom css.


All times are GMT. The time now is 12:55 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01146 seconds
  • Memory Usage 1,742KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (4)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete