Add tab in ucp

Discussion forum for MOD Writers regarding MOD Development.
Locked
User avatar
FladeX
Registered User
Posts: 244
Joined: Tue Jul 08, 2008 10:38 am
Location: Russia, Saransk
Name: Max Istlyaev
Contact:

Add tab in ucp

Post by FladeX » Thu Aug 27, 2009 1:14 pm

How to add new tab in ucp?
I want to ways:
1. In "overview" tabs, under "manage drafts", "manage attachments".
2. In top tab's panel, after "Usergroups", "Friends&Foe".

I marked this on screen (red text). Please help.

Image
and sorry for my bad english [ phpBB Adept ]
My mods: Sitemap FX, Referrals FX, Topiclist FX, Alphabet FX, Polls Results FX.

User avatar
FladeX
Registered User
Posts: 244
Joined: Tue Jul 08, 2008 10:38 am
Location: Russia, Saransk
Name: Max Istlyaev
Contact:

Re: Add tab in ucp

Post by FladeX » Thu Aug 27, 2009 7:35 pm

Open includes/ucp/info/ucp_main.php
Find

Code: Select all

				'drafts'		=> array('title' => 'UCP_MAIN_DRAFTS', 'auth' => '', 'cat' => array('UCP_MAIN')),
After, add

Code: Select all

				'new_tab'	=> array('title' => 'UCP_MAIN_NEW_TAB', 'auth' => '', 'cat' => array('UCP_MAIN')),
Open includes/ucp/ucp_main.php
Find

Code: Select all

					$template->assign_var('S_DRAFT_ROWS', $row_count);
					}
					
			break;
After, add

Code: Select all

			case 'new_tab':

			$user->add_lang('mods/new_tab');
			break;
But nothing to happend - new tab in "Main" tab doesn't appear. Why?
and sorry for my bad english [ phpBB Adept ]
My mods: Sitemap FX, Referrals FX, Topiclist FX, Alphabet FX, Polls Results FX.

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Add tab in ucp

Post by A_Jelly_Doughnut » Thu Aug 27, 2009 7:50 pm

You have to install the tab in the Admin Panel. Go to the "system" tab, then "Administration Control Panel". There is a dropdown box at the bottom right which should list your new module.
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
FladeX
Registered User
Posts: 244
Joined: Tue Jul 08, 2008 10:38 am
Location: Russia, Saransk
Name: Max Istlyaev
Contact:

Re: Add tab in ucp

Post by FladeX » Thu Aug 27, 2009 7:55 pm

Thanks, it works! :)

And how I can automatic add this tab, only by editing files and don't use ACP -> System?
and sorry for my bad english [ phpBB Adept ]
My mods: Sitemap FX, Referrals FX, Topiclist FX, Alphabet FX, Polls Results FX.

User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34457
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Re: Add tab in ucp

Post by A_Jelly_Doughnut » Thu Aug 27, 2009 9:42 pm

The easiest way would be to use UMIL (assuming you're interested in writing a MOD)
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish

User avatar
FladeX
Registered User
Posts: 244
Joined: Tue Jul 08, 2008 10:38 am
Location: Russia, Saransk
Name: Max Istlyaev
Contact:

Re: Add tab in ucp

Post by FladeX » Fri Aug 28, 2009 6:40 am

Ok, thanks for your answers!
and sorry for my bad english [ phpBB Adept ]
My mods: Sitemap FX, Referrals FX, Topiclist FX, Alphabet FX, Polls Results FX.

Locked

Return to “[3.0.x] MOD Writers Discussion”