Small Mod that allows you to sostrituire your standard menu with a tab menu is very simple, and above all very discreet on file icy, in fact the changes are relatively few.
* A line of code in every css file of your template (just to call the MOD)
* Inevitable change on overall_header.tpl
* If you use UPI2DB Mod on active or selected by user, you must delete the word "Messages" from on lang_main_upi2db.php for obvious reasons of space.
* Add a new folder in root/templates/icy_phoenix.
The mod is ready for the modified and included installation instructions, for the default templates, for others we will have to make a small change. :P
ScreenShot:
I am attaching a few buttons optional different templates, created with the default image.
Apple & Milky Way
Frozen Phoenix
Dark Phoenix
MG Autumn
Icy Phoenix
Morpheus
Black Pearl
Blue Pearl
Download
You can see how they work, on my site: Here
Regards. TopoMotoV3X
[MOD] Tab Menu For Icy
Subject: [MOD] Tab Menu For Icy
Last edited by TopoMotoV3X on Mon 14 Feb, 2011 23:11; edited 1 time in total
Last edited by TopoMotoV3X on Mon 14 Feb, 2011 23:11; edited 1 time in total
Subject: Re: [MOD] Tab Menu For Icy
Nice, :mryellow:
But how about trying to add some php code to the default header to make the menu "Location-Smart" so that the buttons stay changed when at a specific location like "viewtopic.php" rather than just a mouseover change - Just like in your picture, the "Forum" button would stay up while one is at that location?
Would possibly save a lot of editing for each template set? :P
But how about trying to add some php code to the default header to make the menu "Location-Smart" so that the buttons stay changed when at a specific location like "viewtopic.php" rather than just a mouseover change - Just like in your picture, the "Forum" button would stay up while one is at that location?
Would possibly save a lot of editing for each template set? :P
Subject: Re: [MOD] Tab Menu For Icy
In current development version I have added some vars which should easily allow doing that.
This is the main var used for that... which could be used to match the current page without having to insert extra PHP code.
mort wrote: [View Post]
In current development version I have added some vars which should easily allow doing that.
'SCRIPT_NAME' => str_replace('.' . PHP_EXT, '', $userdata['page']['page_name']),
This is the main var used for that... which could be used to match the current page without having to insert extra PHP code.
Subject: Re: [MOD] Tab Menu For Icy
Well... I have created that var just to avoid using PHP code in TPL (this also mean some small speed-up).
You can use like this:
Or in any other way you think is appropriate...
And so on...
You can use like this:
<!-- IF SCRIPT_NAME = "forum" -->FORUM<!-- ELSE -->ELSE<!-- ENDIF -->
Or in any other way you think is appropriate...
And so on...
Subject: Re: [MOD] Tab Menu For Icy
Menus are a cow of a thing, but try to get your mind on this as another way of simplifying it.
I'm not really sure as to how this is put together with some other software I use - But it sure is easy to add new "Locations" automatically to the menus, and I'll dig it out if you want to have a look at it - - or tell you where you can get it.
But the simplicity of it is : This: $rules parses to this: rules(.php)
:P
[b]$input?? [/b]== basename(_file_)
Translates to:
[b]$index[/b] == basename(_file_)
[b]$search[/b] == basename(_file_)
So the menu looks something like this.
<li{if $index} class="current"{/if}><a href="index.php"><b>Index</b></a></li>
<li{if $search} class="current"{/if}><a href="search.php"><b>Search</b></a></li>
So if one adds anything else (as below) to the "Menu" it will automatically parse the variable.
<li{if $chat} class="current"{/if}><a href="chat.php"><b>Chat</b></a></li>
<li{if $rules} class="current"{/if}><a href="rules.php"><b>Rules</b></a></li>
Translates to:
[b]$index[/b] == basename(_file_)
[b]$search[/b] == basename(_file_)
So the menu looks something like this.
<li{if $index} class="current"{/if}><a href="index.php"><b>Index</b></a></li>
<li{if $search} class="current"{/if}><a href="search.php"><b>Search</b></a></li>
So if one adds anything else (as below) to the "Menu" it will automatically parse the variable.
<li{if $chat} class="current"{/if}><a href="chat.php"><b>Chat</b></a></li>
<li{if $rules} class="current"{/if}><a href="rules.php"><b>Rules</b></a></li>
I'm not really sure as to how this is put together with some other software I use - But it sure is easy to add new "Locations" automatically to the menus, and I'll dig it out if you want to have a look at it - - or tell you where you can get it.
But the simplicity of it is : This: $rules parses to this: rules(.php)
:P
Subject: Re: [MOD] Tab Menu For Icy
I don't know what you wanted to achieve... anyway I have created a PHP function which you can check how it works into the latest dev version of Icy Phoenix for the CMS:
File is here:
https://github.com/MightyGorgon/icy...s_cms_admin.php
This function depend on the MODE var, but you can easily replace that with script name.
- /*
- * Generate tabs
- */
- function generate_tabs($mode)
- {
- global $db, $cache, $config, $userdata, $lang, $template;
- $tabs_array = array();
- $tabs_array[] = array('TITLE' => $lang['CMS_TITLE'], 'MODE' => false, 'LINK' => append_sid(IP_ROOT_PATH . $this->root), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_home.png', 'TIP' => $lang['CMS_TIP_TITLE'], 'AUTH' => AUTH_REG);
- $tabs_array[] = array('TITLE' => $lang['CMS_CUSTOM_PAGES'], 'MODE' => 'layouts', 'LINK' => append_sid(IP_ROOT_PATH . $this->root . '?mode=layouts'), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_custom_pages.png', 'TIP' => $lang['CMS_TIP_CUSTOM_PAGES'], 'AUTH' => AUTH_REG);
- $tabs_array[] = array('TITLE' => $lang['CMS_STANDARD_PAGES'], 'MODE' => 'layouts_special', 'LINK' => append_sid(IP_ROOT_PATH . $this->root . '?mode=layouts_special'), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_standard_pages.png', 'TIP' => $lang['CMS_TIP_STANDARD_PAGES'], 'AUTH' => AUTH_REG);
- $tabs_array[] = array('TITLE' => $lang['CMS_BLOCK_SETTINGS'], 'MODE' => 'block_settings', 'LINK' => append_sid(IP_ROOT_PATH . $this->root . '?mode=block_settings'), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_blocks.png', 'TIP' => $lang['CMS_TIP_BLOCK_SETTINGS'], 'AUTH' => AUTH_REG);
- $tabs_array[] = array('TITLE' => $lang['CMS_GLOBAL_BLOCKS'], 'MODE' => 'blocks', 'LINK' => append_sid(IP_ROOT_PATH . $this->root . '?mode=blocks&l_id=0&action=editglobal'), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_blocks_global.png', 'TIP' => $lang['CMS_TIP_GLOBAL_BLOCKS'], 'AUTH' => AUTH_REG);
- $tabs_array[] = array('TITLE' => $lang['CMS_CONFIG'], 'MODE' => 'config', 'LINK' => append_sid(IP_ROOT_PATH . $this->root . '?mode=config'), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_settings.png', 'TIP' => $lang['CMS_TIP_CONFIG'], 'AUTH' => AUTH_REG);
- $tabs_array[] = array('TITLE' => $lang['CMS_MENU_PAGE'], 'MODE' => 'menu', 'LINK' => append_sid(IP_ROOT_PATH . 'cms_menu.' . PHP_EXT), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_menu.png', 'TIP' => $lang['CMS_TIP_MENU'], 'AUTH' => AUTH_REG);
- $tabs_array[] = array('TITLE' => $lang['CMS_ADS'], 'MODE' => 'ads', 'LINK' => append_sid(IP_ROOT_PATH . 'cms_ads.' . PHP_EXT), 'ICON' => IP_ROOT_PATH . $this->menu_images_root . 'cms_ads.png', 'TIP' => $lang['CMS_TIP_ADS'], 'AUTH' => AUTH_REG);
- $tabs_counter = 0;
- $current_nav = false;
- foreach ($tabs_array as $tab_data)
- {
- $selected = false;
- if(check_auth_level($tab_data['AUTH']))
- {
- if ($mode == $tab_data['MODE'])
- {
- $selected = true;
- }
- $template->assign_block_vars('tabs', array(
- 'TAB_ID' => $tabs_counter,
- 'TAB_TITLE' => $tab_data['TITLE'],
- 'TAB_LINK' => $tab_data['LINK'],
- 'TAB_ICON' => $tab_data['ICON'],
- 'TAB_TIP' => (empty($tab_data['TIP']) ? $tab_data['TITLE'] : $tab_data['TIP']),
- 'S_SELECTED' => $selected,
- )
- );
- $tabs_counter++;
- }
- }
- $template->assign_vars(array(
- 'N_TABS' => $tabs_counter,
- )
- );
- return true;
- }
File is here:
https://github.com/MightyGorgon/icy...s_cms_admin.php
This function depend on the MODE var, but you can easily replace that with script name.
Subject: Re: [MOD] Tab Menu For Icy
looks like, we can also try to archive to get the data from dyn menu table.
working on a mod to create the top menu through dyn menu , adding a new script to take the Cat string out of the menu array.
Idea is, when you create a new Dyn_Menu in CMS,you got an selector to choose between header menu or nav menu block on the right.
i´m thinking of inserting in the overall_header an If - Else condition, so if there is a dyn header menu, the default menu would´nt been called and shown
working on a mod to create the top menu through dyn menu , adding a new script to take the Cat string out of the menu array.
Idea is, when you create a new Dyn_Menu in CMS,you got an selector to choose between header menu or nav menu block on the right.
i´m thinking of inserting in the overall_header an If - Else condition, so if there is a dyn header menu, the default menu would´nt been called and shown
Subject: Re: [MOD] Tab Menu For Icy
This menu has a problem with languages because it used "Fixed width" tabs. :(
The only real way to overcome it is to use at least three images per tab (background, left and right) so that it automatically expands to different length words.
The Tab Menu pic shows what I mean.
The Tab Menu2 pic shows one alternative that wraps the words regardless of length, but it has a drawback - Unread Posts use VARIABLES, and one cannot wrap variables because there is no place to slot the code in where it has to go.
And no, I don't want to hijack this thread by discussing Tab Menu2 or other ways to maybe do it - That's for another thread.
:mryellow:
The only real way to overcome it is to use at least three images per tab (background, left and right) so that it automatically expands to different length words.
The Tab Menu pic shows what I mean.
The Tab Menu2 pic shows one alternative that wraps the words regardless of length, but it has a drawback - Unread Posts use VARIABLES, and one cannot wrap variables because there is no place to slot the code in where it has to go.
And no, I don't want to hijack this thread by discussing Tab Menu2 or other ways to maybe do it - That's for another thread.
:mryellow:
Subject: Re: [MOD] Tab Menu For Icy
Yep, I said that badly - The background is to fill the space for the whole width of the menu, unless one uses the default .css for the menu background.
I need to to make more time available to myself. :roll:
I need to to make more time available to myself. :roll:
Subject: Re: [MOD] Tab Menu For Icy
i think, you should use the custom background of the template all time.
so the menu fit´s nicely
so the menu fit´s nicely
Subject: Re: [MOD] Tab Menu For Icy
As I said, you have to delete the entry "messages" from the language used, if you do not want to change the language file, will be sufficient eliminate {L_POSTS} to overall_header.tpl
I do not see this problem, note that, in the development version, we no longer have the word "Messages" on upi2db
I do not see this problem, note that, in the development version, we no longer have the word "Messages" on upi2db
Subject: Re: [MOD] Tab Menu For Icy
No, that wasn't the point I was making - If you look at the German word for "register" in "your" tabs in the picture, it's right to the edges of the tab. They use a lot of longer words than that (I don't think there are any short ones - Easy TheSteffen :mryellow: ), and that may create problems with the layout because the tabs are limited in width.
TopoMotoV3X wrote: [View Post]
No, that wasn't the point I was making - If you look at the German word for "register" in "your" tabs in the picture, it's right to the edges of the tab. They use a lot of longer words than that (I don't think there are any short ones - Easy TheSteffen :mryellow: ), and that may create problems with the layout because the tabs are limited in width.
Page 1 of 3
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.3408s (PHP: 8% SQL: 92%)
SQL queries: 18 - Debug Off - GZIP Enabled