XF 1.x Widgets in Categories

Commodore

Registered
I'm trying to set up widgets in category view, but only have been successful setting them up in forum view.

Category/Subforum view: (I call this Chapter View. We have four of them representing the four games we are in. Dungeons & Dragons Online, Neverwinter, Guild Wars 2 and Elder Scrolls Online).

I would like to show all DDO related widgets here. Id REALLY love to show New Posts widget to show only DDO and global forums posts. The same goes for all four Chapters. Each game gets their own widgets.

I'd also like to set up a raw HTML widget unique to each chapter, so I can show a twitter list pertaining to each game. I have the code for the twitter lists, so I just need to know how to set up a unique raw html widget in each Chapter.

Lastly, I'd like to show a banner atop each Chapter view, representing each game we are in.



Forum View:

I have found out how to put widgets here, which is ok. Not sure I want widgets here, if I do... Id like to have a few global widgets here which pertain to the user or all the Tyrs Chapters.

 

Russ

Pixel Exit Staff
Few ways to approach it I suppose.

The site you linked is using our little welcome banner:

https://pixelexit.com/resources/welcome-notice-general-banner.18/

You could place that code inside: ad_forum_view_above_thread_list which would show above the thread list. Or: ad_forum_view_above_node_list which would show above any sub-forums inside that forum_view template.

You could wrap a conditional around it to only show on specific nodes:

https://xenforo.com/community/resources/conditional-statements.1604/

Point 29 on there may help.
 

Russ

Pixel Exit Staff
Try using ad_forum_view_above_thread_list

This html:

Code:
<xen:if is="{$forum.node_id} == 4">
<img src="@imagePath/xenforo/sources/banner4.png" />
<xen:elseif is="{$forum.node_id} == 5" />
<img src="@imagePath/xenforo/sources/banner5.png" />
<xen:elseif is="{$forum.node_id} == 12" />
<img src="@imagePath/xenforo/sources/banner12.png" />
<xen:else />
</xen:if>

4/5/12 would be the node id's you'd need to replace with your current node ID's you want to display a banner in.

Does that help?
 

Commodore

Registered
Doesnt work.

Im sure Im not doing something right.

<xen:if is="{$forum.node_id} == 3">
<img src="@imagePath/xenforo/sources/XenForo.png" />

For the 1st 2 lines would this be correct?
 

Russ

Pixel Exit Staff
What's all of your code?

Which node should it be showing in, can you link it?
 

Commodore

Registered
Ok Im back. I need to figure this out. Guildies are complaining the site is too complex, so we must simplify. Guildies in ONE GAME dont always want to see the info from the other games. Some are in multiple games that we are in.

Id LOVE for them to only see the game they are in and even better to toggle which sections they can see. Thats big time to code Id suppose and might not be in the best interest of the guild.

SO.. the closest I can get is... widgets specific to each game. That would work for us. The coding is just over my head how to make this work. (
BD Widget Framework)
 

Commodore

Registered
I want DDO Widgets to go here:

http://tyrspaladium.com/index.php?categories/dungeons-dragons-online.3/

Neverwinter:

http://tyrspaladium.com/index.php?categories/neverwinter.5/

Elder Scrolls Online

http://tyrspaladium.com/index.php?categories/elder-scrolls-online.7/

Guild Wars 2

http://tyrspaladium.com/index.php?categories/guild-wars-2.6/

The NEW POSTS widget I only want it showing JUST THAT GAME SECTION plus the three global sections: Tyrs News, Tyrs Tavern, and
Site News, Bugs & Suggestions
 

Commodore

Registered
The code above just places a banner up top those sections right? How do I get the widgets set up for each guild section? Cant figure how to point BD Widget Framework there
 

Commodore

Registered
Also this line:

"@imagePath/xenforo/sources/banner4.png"

Where should those banner pictures be located? Is that the "/public_html/tyrspaladium/styles/fragzone/xenforo" folder??
 

Pre-Sale Questions

If you have any questions or concerns you want to ask before you make a purchase don't hesitate to use one of our multiple support channels for your convenience.