Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic [2.3] AutoTabs 4 YaBB 2.3 - beta 0.2 (Read 1961 times)
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
[2.3] AutoTabs 4 YaBB 2.3 - beta 0.2
Jan 3rd, 2009 at 9:16am
Print Post  
This is actually a modwriter tool to "bundle" wtih mods that adds tabs to the main tab menu. (Or even better - implemented in a future version of YaBB 2.x)  Wink

AutoTabs 4 YaBB 2.3

0.2 beta

This mod create tabs for the main tab menu based on a small text file uploaded to the /Variables folder.
Very handy for modwriters (and admins) that wants to add one or more tabs without having to download or delete the taborder.txt file.

Apply this mod.

Upload (in ASCII mode):
cgi-bin/yabb2/Admin/ModList.pl
cgi-bin/yabb2/Sources/AdvancedTabs.pl


Create a text file (or one for each tab you want to add) and save it with a meaningfull name and the extention .tab - like: google.tab and upload it to the /Variables folder in ASCII mode.

Format of a text file to create a complete custom tab
pointing to a external page:
-----------------------------------------------------

%newtab=(
'tabtext' => 'Google',
'taburl' => 'http://www.google.com',
'tabwin' => '1',
'showto' => '0',
'addafter' => 'search',
);

1;

-----------------------------------------------------


Format of a text file to create a complete custom tab
pointing to a internal page:
-----------------------------------------------------

%newtab=(
'tabtext' => 'My Profile',
'taburl' => '$scripturl?action=viewprofile;username=xxx',
'tabwin' => '0',
'showto' => '1',
'addafter' => 'admin',
);

1;

-----------------------------------------------------


If you for some reason have hardcoded the tab in your mod and only want to add it to the taborder.txt file this is the format (IMPORTANT that you only add these two elements to the text file):
-----------------------------------------------------

%newtab=(
'tabtext' => 'Google',
'addafter' => 'search',
);

1;

-----------------------------------------------------

The elements of the hash are:

'tabtext'      The text displayed on the tab.

'taburl'      The url to the page the tab should link to.

'tabwin'      Open in same or new window.
           '0' = open in same window.
           '1' = open in new window.

'showto'      Visitors that are allowed to see the tab.
           '0' = all
           '1' = members, gmods and admin
           '2' = gmods and admin
           '3' = admin only

'addafter'      Hash key name of the tab you want the new tab located next to.
           Key name for the standard tabs in YaBB are:
           'home' = Home
           'help' = Help
           'search' = Search
           'ml' = Members
           'admin' = Admin
           'revalidatesession' = Update Session
           'login' = Login
           'register' = Register
           'guestpm' = PM to admin
           'mycenter' = User CP
           'logout' = Logout
« Last Edit: Jan 5th, 2009 at 12:46am by Carsten »  

autotabs_4_yabb23_02.zip ( 2 KB | Downloads )

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
Jeff
God Member
*****
Offline


There are no bugs there
are only features

Posts: 2552
Joined: Jan 14th, 2005
Gender: Male
Re: AutoTabs 4 YaBB 2.3 - beta 0.1
Reply #1 - Jan 3rd, 2009 at 10:51am
Print Post  
Nice.  Wink
  

greetings
Jeff
Back to top
WWW  
IP Logged
 
Carsten
God Member
*****
Offline


...to much YaMS

Posts: 3281
Location: Langå
Joined: Aug 2nd, 2002
Gender: Male
Re: AutoTabs 4 YaBB 2.3 - beta 0.2
Reply #2 - Jan 3rd, 2009 at 2:23pm
Print Post  
Small fix for easier creation of internal linking tabs. New beta 0.2 zip in first post.
  

If you knock your head against a brick wall and hear a hollow sound, it's not necessarily coming from the wall.
Back to top
 
IP Logged
 
batchman
Global Moderator
*****
Offline


What's up?!

Posts: 1280
Location: Orlando
Joined: Apr 28th, 2002
Gender: Male
Re: AutoTabs 4 YaBB 2.3 - beta 0.2
Reply #3 - Jan 4th, 2009 at 10:12pm
Print Post  
Sorry to ask, but using this mod, which steps are no longer needed to create within one's mod, itself.

Obviously, I am not going to need a mod step to change taborder.txt. I think I am not going to need the step which adds the quiz mod to TabMenu.pl.

But do I need any of the steps which add to AdvancedTabs.pl?

Edited:
After poking around Carsten's mod for a bit, I have come to the conclusion that I still need all the steps previously in my mod ... though one has been changed to avoid making other mods have a more difficult time installing.
  

Improving my forum, one mod at a time!


Now up and running again, with an accurate link.


Back to top
WWW  
IP Logged
 
Derek Bullock
Full Member
***
Offline


I love Camp Oven Cooking

Posts: 184
Location: Brisbane
Joined: Nov 9th, 2007
Gender: Male
Re: [2.3] AutoTabs 4 YaBB 2.3 - beta 0.2
Reply #4 - Feb 21st, 2009 at 5:09am
Print Post  
Very good  Smiley
  

Back to top
WWW  
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint