Invision Byte: Add board Guidelines as a tabbed link - IP.Board 3.x - Tutorials - Invision Byte

Jump to content


Welcome to Invision Byte

Welcome to Invision Byte, like most online communities you must register to view or post in our community, but don't worry this is a simple free process that requires minimal information. Take advantage of it immediately, Register Now or Sign In.

  • Start new topics and reply to others
  • Subscribe to topics and forums to get automatic updates
  • Purchase one of the products available and quickly receive support for it!
  • View and use the shoutbox to communicate
  • Get your own profile and make new friends
  • Customize your experience here
Guest Message by DevFuse

User is offline Author

Find Posts Tutorial info

  • Added on: May 23 2009 10:02 AM
  • Date Updated: Sep 19 2009 10:35 AM
  • Views: 2473

Collaboration


kooh likes this Like

Add board Guidelines as a tabbed link

This tutorial adds the board guidelines link in the main navigation with Discussion, Members, etc as a tabbed like like the others


In ACP -> Look & Feel -> [select a skin] -> Edit Skin Templates -> Global Templates -> globalTemplate find:
{parse variable="forumActive" default="" oncondition="IPS_APP_COMPONENT == 'forums'" value="active"}

Replace with:
{parse variable="forumActive" default="" oncondition="IPS_APP_COMPONENT == 'forums' AND ($this->request['module'] != 'extras' AND $this->request['section'] != 'boardrules')" value="active"}
						{parse variable="guidelinesActive" default="" oncondition="IPS_APP_COMPONENT == 'forums' AND $this->request['module'] == 'extras' AND $this->request['section'] == 'boardrules'" value="active"}

Find:
<if test="applicationsloop:|:is_array($header_items['applications']) AND count($header_items['applications'])">

Add Above:
						<if test="siteruleslink:|:$this->settings['gl_show'] and $this->settings['gl_title']">
						<li id='nav_discussion' class='left {parse variable="guidelinesActive"}'><a href='<if test="ruleslink:|:$this->settings['gl_link']">{$this->settings['gl_link']}<else />{parse url="app=forums&amp;module=extras&amp;section=boardrules" base="public"}</if>'><if test="siterulestitle:|:$this->settings['gl_title']">{$this->settings['gl_title']}<else />{$this->lang->words['board_rules']}</if></a></li>
						</if>

Finally find and remove the other board guidelines link:
						<if test="siteruleslink:|:$this->settings['gl_show'] and $this->settings['gl_title']">
						<li><a href='<if test="ruleslink:|:$this->settings['gl_link']">{$this->settings['gl_link']}<else />{parse url="app=forums&amp;module=extras&amp;section=boardrules" base="public"}</if>'><if test="siterulestitle:|:$this->settings['gl_title']">{$this->settings['gl_title']}<else />{$this->lang->words['board_rules']}</if></a></li>
						</if>

Save the template, you're done :)


Here an image posted by someone on IPS Forum after following my tutorial:
Posted Image
NOTE: The images in those links are not added by this tutorial!
0
Powered by Tutorials 1.2.2 © 2021, by Michael McCune