Coders Refuge Forums: Making the Topic tab active by default on the Watched Items hook

Jump to content

Making the Topic tab active by default on the Watched Items hook Bookmark

User is offline Michael 

  • Administrator
  • View blog
  • View gallery
  • Group: Owner
  • Posts: 1,934
  • Joined: 30-April 09
  • Location:Columbus, OH
  • IPB Version:3.1

Find Posts Tutorial info

  • Added on: 03 March 2010 - 09:07 AM
  • Views: 343
Description: This tutorial explains how to change the Watched Items hook on the Board Index so that the Topics tab is active by default.

To make the Topics tab active by default, edit the Board Index -> hookWatchedItems skin template, find this code:

			<ol class='tab_bar no_title mini'>
				<li id='tab_link_forums' class='tab_toggle active clickable'>{$this->lang->words['watched_forums']}</li>
				<li id='tab_link_topics' class='tab_toggle clickable'>{$this->lang->words['watched_topics']}</li>
			</ol>
			<div id='tab_content_forums' class='tab_toggle_content'>

Change it to:

			<ol class='tab_bar no_title mini'>
				<li id='tab_link_forums' class='tab_toggle clickable'>{$this->lang->words['watched_forums']}</li>
				<li id='tab_link_topics' class='tab_toggle active clickable'>{$this->lang->words['watched_topics']}</li>
			</ol>
			<div id='tab_content_forums' class='tab_toggle_content' style='display:none;'>

Find:

			<div id='tab_content_topics' class='tab_toggle_content' style='display:none;'>

Change it to:

			<div id='tab_content_topics' class='tab_toggle_content'>

Save the template, repeat for each skin.

Edit the /public/js/ips.hooks.js file, and change this code:

	activeTab: 'forums',

To this:

	activeTab: 'topics',

Save and upload.
1

Share:

Powered by (IM) Tutorials 1.1.0 © 2010, by Michael McCune