News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Custom Tab

Started by Deprecated, September 17, 2008, 12:43:00 AM

Previous topic - Next topic

gemigene

I inserted target="_blank" in the following line and it works, does this look right to you?

<a href="', !empty($modSettings['custom_tab_execute_url']) ? $modSettings['custom_tab_execute_url'] : $scripturl, '" target="_blank">',
               !empty($modSettings['custom_tab_label']) ? $modSettings['custom_tab_label'] : $txt['custom_tab_label_default'],'</a>

Thanks,
Gene
"Religion is metaphysical statism. I will be ruled by no man on earth, nor by any god in heaven"

Deprecated


gemigene

Quote from: Deprecated on November 07, 2008, 02:54:42 PM
Close enough...

Thanks deprecated, it works but if you have a better suggestion, shoot...

Thanks,
Gene
"Religion is metaphysical statism. I will be ruled by no man on earth, nor by any god in heaven"

Mr_Lon

I'm using SMF 2.0 Beta 4 and also use the Babylon Theme.
I need to know the name of the new button link that I made. On my Babylon screen I get an empty image sign and I did make a button but I need a name to make it work?

Other wise it works Great. Thanks

Lon

Deprecated

Hey Lon! It looks like you're going to be my first theme problem solved! :D

You need this image: Themes/babylon/images/english/custom.gif

Unfortunately you will have to make your own. However, I have a site that will blow your mind: http://www.marcovanveelen.nl/buttongenerator/

I haven't used Marco's button generator yet but it looks like it would do the job, and maybe take only a couple minutes to do it. :D

Let me know how it works out. :) In fact, please attach your button to your reply post. If it matches Babylon I may add it to this modification's page.

Mr_Lon

Thanks That is what I need!
AND That is one cool site I'll use it for sure.

Lon

Deprecated

Post your button when you have made it. :)

The Saviour

Deprecated...

Is there a way to use this mod (or a reasonable facsimile, thereof) in order to create a PHP block for SimplePortal?

I've tried posting my question almost everywhere, but I keep coming back to this mod...hoping it will provide some sort of an answer.

As it stands...your mod creates one (and only one) custom tab...am I correct?

If not, then I stand corrected.  However, is there a way to use this mod to create a block in Simple Portal with text only links to areas that already have links in the navigation menu?

Any help on this will certainly be appreciated...

TeaTephi

#68
Powered by SMF 1.1.7 |
TinyPortal v0.9.8 © Bloc
Manuscript design

Tried to manually install this mod first, but after editing the files it didn't add my tabs (chat and bookmarks) I checked allow members to see the tab, then I realized I uploaded index.template.php to the default instead of the correct theme folder.

When I uploaded this file to the theme folder , none of the forum posts were there and there was a new menu at the top of the screen, still missing my tabs.

The smaller file is working, but no tabs.

Using Flashchat and bookmark mods
Help!?

Mod Name   Version   
1.   XarSmilies-1   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
2.   TinyPortal   0.983     [ Uninstall ] [ List Files ] [ Delete ]
3.   FontandSizeDropdown_1.2   1.3     [ Uninstall ] [ List Files ] [ Delete ]
4.   Simple Award System   2.0.0.4b    [ List Files ] [ Delete ]
5.   Bookmarks   1.1    [ List Files ] [ Delete ]
6.   Custom BBCode   2.00     [ Uninstall ] [ List Files ] [ Delete ]
7.   Link Thumbnail   1.0     [ Uninstall ] [ List Files ] [ Delete ]
8.   Simple Award System   1.3.0    [ List Files ] [ Delete ]
9.   Bible - Books of Law   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
10.   Bible - Books of History   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
11.   Bible - Books of Poetry   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
12.   Bible - Books of Prophets   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
13.   Bible - New Testament   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
14.   Bible Tag   1.1     [ Uninstall ] [ List Files ] [ Delete ]
15.   ShowTopics   1.1     [ Uninstall ] [ List Files ] [ Delete ]
16.   Signature Dropdown Choices   1.0     [ Uninstall ] [ List Files ] [ Delete ]
17.   Googlebot & Spiders Mod   2.0.3    [ Apply Mod ] [ List Files ] [ Delete ]
18.   FlashChat Integration   1.0     [ Uninstall ] [ List Files ] [ Delete ]
19.   SMF 1.0.13 / 1.1.5 / 2.0 b3.1 Update   1.0    [ List Files ] [ Delete ]
20.   Member Notepad   1.0    [ Apply Mod ] [ List Files ] [ Delete ]
21.   Enhanced Profile   1.1.5     [ Uninstall ] [ List Files ] [ Delete ]
22.   Profile Comments   1.4     [ Uninstall ] [ List Files ] [ Delete ]
23.   Profile User Action   1.1     [ Uninstall ] [ List Files ] [ Delete ]
24.   Googlebot & Spiders Mod   2.0.4    [ Apply Mod ] [ List Files ] [ Delete ]
25.   Auto Embed Video/Audio Clips   4.0.2     [ Uninstall ] [ List Files ] [ Delete ]
26.   Profile_Visitors   4.0     [ Uninstall ] [ List Files ] [ Delete ]
27.   Custom Profile Field Mod   3.19     [ Uninstall ] [ List Files ] [ Delete ]
28.   Bookmarks   2.2.1     [ Uninstall ] [ List Files ] [ Delete ]
29.   mp3 Flash Player BBC Tag (XHTML Compliant)   1.0     [ Uninstall ] [ List Files ] [ Delete ]
30.   Anti-Bot Registration Puzzles   1.2     [ Uninstall ] [ List Files ] [ Delete ]
31.   Are You Human? Anti-Bot Registration Check   1.3     [ Uninstall ] [ List Files ] [ Delete ]
32.   reCAPTCHA for SMF   0.9.5.3
SMF 2.0.2 | TinyPortal 1.107 Veterans day theme Opera 11.50
Mods:Profile Comments.....AEVA Media 2.10.....Activity in profile.....join-reason....Bookmarks 2.3.....SA Chat    Beta 4-1 Rev43....Tapatalk SMF 2.0 RC4/RC5/Final Plugin    3.0.1.....SMFPacks Likes Lite Mod

Thank you guys for all your support and development that you do.  I love my forum, and am so thankful to have a place to ask my questions.  I do love SMF 2.0 it's smoother and all my members love it!

Deprecated

Please be advised that I have upgraded and improved this modification:

Version 1.2 (Nov. 24, 2008) Improved 1.x installation script to avoid interference from other mods. Added British and British UTF-8 language strings.

Link to Mod

Anybody who is having any problems installing on SMF 1.1.7 should try the new version of this modification and see if the problems have been fixed.

Mark S

Code
add_default_settings.php
This file should be able to execute standalone.

Where does this file go?

Deprecated

It just enables the guest and member viewing, during installation. You can do that manually. I added the settings program to default enable it so that people wouldn't post in the support topic, "Why don't I see any tab?" :)

Some people were forgetting to turn on at least one enable. No enable = no tab. :)

Mark S

#72
1)  The custom button generator site does make the babylon theme buttons.  But the icons are soley posting, posting admin and messaging related - no navbar icons (HOME, CHAT, etc.). 

Try it depreciated, it take less than a minute, it's that easy to use.

2)  I installed the custom button generator today.  Worked like a charm.  Couldn't be easier to use for us complete newbies!

However, I don't know if this is how you designed the mod but, I created a button and it worked, placing the button next to the to the right of the default locations of the home and help buttons.  This was for my chat room.

I created another button for my GALLERY  At this point, you already know what happened;  It replaced the CHAT button.

First, I want these custom buttons to the left of the logout button.  I'm sure I can do a search and find out how to move the one that was created.  Then, ? I should be able to create a new custom button and it will appear to the right of the HELP button?  and I can move that too?

Which naturallly ends in a request....

Creating multiple tab buttons with the ability to pre-select the location on the nav bar.  I'm guessing this would creat a lot of additional coding for you, so I understand if it's something your getting tired of playing with and want to move on to bigger and better things.  It would be very, very handy though.




Later that afternoon: 

I went back to the file and looked at the code to move.  No, it won't happen the way I expected since the reference is to a "custom" tab, rather than one of the pre-defined, default tabs (HOME, HELP, etc.) 

So, I can create one custom button, and I can move it.  But, I can't use the same program to make another one in another place or even make another one and move it to another place.  That is, if what I have said is correct.




Later that evening...

I scanned every message that had any word even remotely involved and I did find the info to create tabs.  They were a bit dissimilar so, it took a while to figure out which was best for me. 

I moved the all the code for the [custom] button to where I wanted it to appear and hard coded the other one, adding the target_blank" so my gallery would open in a separate window.

Issue not solved, but I needed a work around quickly since I have 700 members waiting patiently for me to get my newbie head out of my arse and give them a new website!

Happy Thanksgiving to you, Depreciated, and all you other gurus and the brain weary seekers!

- Mark

- Mark

gamerxgirl

Is it possible to edit this mod so that it will update other themes that are installed? I have a few themes installed and I'd love for them to be updated with new tabs. I don't care so much for the default theme.

Great mod though nevertheless!
Xenaverse.net Xena: Warrior Princess Forums | Gallery | Reviews | Fan Fiction

pooya

Cant i make more then just 1 tab?

Mr.IT

I want to use Custom Tab in custom theme (Dilber Multicolor) . I have already install but don't show on menu bar . how to do it

Yop

#76
Neat mod and all (although it would've been a LOT easier if whoever designed the current menu decided on making the menu actually simple, instead of forcing people to use code to add menu items), but I have two concerns for this mod:

1. How do you set the order in which the buttons appear (if at all possible, if not, feature request'd)?
2. How do you remove buttons once you've added them? The mod doesn't seem to offer any functionality for that, and I haven't found it (yet?) by browsing through the mod's files and / or the database.

Hrm, it seems that this mod is very limited, I've tried to add a new custom button, but instead of adding, the existing one is missing :/. I think I'll just manually replace the entire menu structure in the template instead of bothering with this.

Edit: Done (partially), I've added two buttons to my menu bar using array_splice and whatnot, code below. Just one question though, does anyone know where the current page is located? i.e. how to determine when to set a menu button as 'active'?


// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

// set text of 'home' to 'forum home'
   $context['menu_buttons']['home']['title'] = "Forum Home";
   
   // custom menu items
   
   // Site home, first in yon list.
   $butt = array('active_button' => false, 'href' => 'http://someurl.com', 'title' => 'Home');
   
   // The second argument (the first '0') is the position of the menu item - first one is 0.
   array_splice(&$context['menu_buttons'], 0, 0, array($butt));
   
   // Unread posts
   $butt = array('active_button' => false, 'href' => 'http://forums.someurl.com/unread/', 'title' => 'View Unread');
   array_splice(&$context['menu_buttons'], 2, 0, array($butt));
   

   echo '
   <div id="main_menu">
      <ul class="clearfix">';

   foreach ($context['menu_buttons'] as $act => $button)
   {
// custom buttons will have $act = 0 and whatnot instead of a proper title, set their $act manually here
if ($act === 0) $act = 'Home';
if ($act === 1) $act = 'View Unread';
   
      echo '
         <li id="button_', $act, '">
            <a', $button['active_button'] ? ' class="active"' : '', ' title="', $act , '" href="', $button['href'], '">
               <span', isset($button['is_last']) ? ' class="last"' : '', '>', ($button['active_button'] ? '<em>' : ''), $button['title'], ($button['active_button'] ? '</em>' : ''), '</span>
            </a>
         </li>';
   }
   echo '
      </ul>
   </div>';
}

McQueen79

#77
Hello:)

I really enjoy the forum, I have just installed it, a couple of days ago.
I will be really gratefull if you guys help me. :)

The forum is a part of a web site. I want to put a link to the web site from the forum tab.
I am using the Fade2White theme. I have no problems with the custom tab under the default theme, but I stand on the f2w theme, cause it fits to my web site. So, the link appears under the default theme, but it goes away under the f2w theme.  I also tried to install the custom tab by hand, following the instructions for 1.1.7 here, but something like this happened:
hxxp:www.picvalley.net/u/1258/948485227.BMP [nonactive]

My index.template.php beginning on line 345 look s like this:
// Show the menu up top. Something like [home] [help] [profile] [logout]...
function template_menu()
{
   global $context, $settings, $options, $scripturl, $txt;

   // Work out where we currently are.
   $current_action = 'home';
   if (in_array($context['current_action'], array('admin', 'ban', 'boardrecount', 'cleanperms', 'detailedversion', 'dumpdb', 'featuresettings', 'featuresettings2', 'findmember', 'maintain', 'manageattachments', 'manageboards', 'managecalendar', 'managesearch', 'membergroups', 'modlog', 'news', 'optimizetables', 'packageget', 'packages', 'permissions', 'pgdownload', 'postsettings', 'regcenter', 'repairboards', 'reports', 'serversettings', 'serversettings2', 'smileys', 'viewErrorLog', 'viewmembers')))
      $current_action = 'admin';
   if (in_array($context['current_action'], array('search', 'admin', 'calendar', 'profile', 'mlist', 'register', 'login', 'help', 'pm')))
      $current_action = $context['current_action'];
   if ($context['current_action'] == 'search2')
      $current_action = 'search';
   if ($context['current_action'] == 'theme')
      $current_action = isset($_REQUEST['sa']) && $_REQUEST['sa'] == 'pick' ? 'profile' : 'admin';

   // Are we using right-to-left orientation?
   if ($context['right_to_left'])
   {
      $first = 'last';
      $last = 'first';
   }
   else
   {
      $first = 'first';
      $last = 'last';
   }

   // Show the start of the tab section.
  echo '
        <div id="stylefour">
           <ul>';

          // Show the [home] button.
               echo '<li><a' , $current_action=='home' ? ' class="chosen"' : '' , ' href="', $scripturl, '"><b>' , $txt[103] , '</b></a></li>';

          // Show the [help] button.
                              echo '<li><a' , $current_action=='help' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=help"><b>' , $txt[119] , '</b></a></li>';

         // How about the [search] button?
               if ($context['allow_search'])
                  echo '<li><a' , $current_action=='search' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=search"><b>Търсене</b></a></li>';

       // Is the user allowed to administrate at all? ([admin])
               if ($context['allow_admin'])
                  echo '<li><a' , $current_action=='admin' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=admin"><b>' , $txt[2] , '</b></a></li>';
       // Edit Profile... [profile]
               if ($context['allow_edit_profile'])
                  echo '<li><a' , $current_action=='profile' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=profile"><b>' , $txt[79] , '</b></a></li>';

       // Go to PM center... [pm]
               if ($context['user']['is_logged'] && $context['allow_pm'])
                  echo '<li><a' , $current_action=='pm' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=pm"><b>' , $txt['pm_short'] , ' ', $context['user']['unread_messages'] > 0 ? '[<strong><blink>'. $context['user']['unread_messages'] . '</blink></strong>]' : '' , '</b></a></li>';

       // The [calendar]!
               if ($context['allow_calendar'])
                  echo '<li><a' , $current_action=='calendar' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=calendar"><b>' , $txt['calendar24'] , '</b></a></li>';

      // the [member] list button
          if ($context['allow_memberlist'])
                echo '<li><a ' , $current_action=='mlist' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=mlist"><b>' , $txt[331] , '</b></a></li>';

       // If the user is a guest, show [login] button.
            if ($context['user']['is_guest'])
             echo '<li><a ' , $current_action=='login' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=login"><b>' , $txt[34] , '</b></a></li>';

    // If the user is a guest, also show [register] button.
           if ($context['user']['is_guest'])
            echo '<li><a ' , $current_action=='register' ? ' class="chosen"' : '' , ' href="', $scripturl, '?action=register"><b>' , $txt[97] , '</b></a></li>';

   // Otherwise, they might want to [logout]...
      if ($context['user']['is_logged'])
      echo '<li><a ' , $current_action=='logout' ? ' class="chosen"' : '' , 'href="', $scripturl, '?action=logout;sesc=', $context['session_id'], '"><b>' , $txt[108] , '</b></a></li>';
   echo '
      </ul>
   </div>';
}

CongaMonkey

Cloak URL?

Have it and love it. on 1.1.7  Simple yet functional. Thanks.

Any way to cloak the URL on mouseover?
Tried the regular way with html and can't get it to cloak.
Any idea if this can be done on this mod via the URL label? Code?

Thanks.

Rodas

Portuguese translation for the MOD Custom Tab:

Tradução para Portugues do MOD Custom Tab:

Modifications.portuguese_pt-utf8.php

$txt['custom_tab_enable_guest_access'] = 'Permitir acesso a convidados:';
$txt['custom_tab_enable_member_access'] = 'Permitir acesso a membros:';
$txt['custom_tab_execute_url'] = 'Link URL:';
$txt['custom_tab_label'] = 'Nome do menu:';
$txt['custom_tab_label_default'] = 'CUSTOM';
$txt['custom_tab_mods_cat'] = 'Configura&ccedil;&atilde;o do menu';
$txt['custom_tab_title']='Configura&ccedil;&atilde;o do menu';


Do not donate but translate: D

Hugs  ;D ;D ;D

Não doar mas traduzi :D

Abraços   ;D ;D

Advertisement: