Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 3
Goto page 1, 2, 3  Next
 
Reply with quote Download Post 
Post [MOD] Tab Menu For Icy 
 
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.  

ScreenShot:
tab_menu


I am attaching a few buttons optional different templates, created with the default image.

apple_tab_style Apple & Milky Way

 cyan_tab_style Frozen Phoenix

 dark_tab_style Dark Phoenix

 gray_tab_style MG Autumn

 ice_tab_style Icy Phoenix

 morpheus_tab_style Morpheus

 p_black_tab_style Black Pearl

 p_blue_tab_style Blue Pearl




Download


You can see how they work, on my site: Here

Regards. TopoMotoV3X
 




____________
IP Version: 1.3.0.53b
Server: Linux
 
Last edited by TopoMotoV3X on Mon 14 Feb, 2011 23:11; edited 1 time in total 
TopoMotoV3XSend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: [MOD] Tab Menu For Icy 
 
Nice,

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?  
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Tab Menu For Icy 
 
Great work TopoMotoV3X,

Thanks for sharing it.
 




____________
TheSteffen
Often SEARCH is the quickest way to get support.
IcyPhoenix German Support
 
TheSteffenSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Tab Menu For Icy 
 
mort wrote: [View Post]
Nice,

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?  

In current development version I have added some vars which should easily allow doing that.

Code: [Download] [Hide] [Select]
    '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.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Tab Menu For Icy 
 
 
Off Topic
:
Not sure of how that would be applied to menus, but I meant something simple like this:

Create the css class .selected and let the css do the work.

TopoMotoV3X has no doubt spent some time with this, so maybe he would like to take it a bit further?  

Code: [Download] [Hide] [Select]
<?php if (basename($_SERVER['SCRIPT_NAME']) == 'index.php') { ?> <span class="selected"> <?php } else { ?> <span> <?php } ?>
<a href="{FULL_SITE_PATH}{U_PORTAL}">{L_HOME}</a></span>  <img src="{FULL_SITE_PATH}{IMG_MENU_SEP}" alt="" /> 


 
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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:
Code: [Download] [Hide] [Select]
<!-- IF SCRIPT_NAME = "forum" -->FORUM<!-- ELSE -->ELSE<!-- ENDIF -->


Or in any other way you think is appropriate...
Code: [Download] [Hide] [Select]
<div class="tab-{SCRIPT_NAME}">


And so on...
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.

Code: [Download] [Hide] [Select]
[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>


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)


 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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:

Code: [Download] [Hide]
  1.      /*  
  2.      * Generate tabs  
  3.      */  
  4.      function generate_tabs($mode)  
  5.      {  
  6.          global $db, $cache, $config, $userdata, $lang, $template;  
  7.  
  8.          $tabs_array = array();  
  9.  
  10.          $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);  
  11.          $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);  
  12.          $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);  
  13.          $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);  
  14.          $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);  
  15.          $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);  
  16.          $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);  
  17.          $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);  
  18.  
  19.          $tabs_counter = 0;  
  20.          $current_nav = false;  
  21.          foreach ($tabs_array as $tab_data)  
  22.          {  
  23.              $selected = false;  
  24.              if(check_auth_level($tab_data['AUTH']))  
  25.              {  
  26.                  if ($mode == $tab_data['MODE'])  
  27.                  {  
  28.                      $selected = true;  
  29.                  }  
  30.  
  31.                  $template->assign_block_vars('tabs', array(  
  32.                      'TAB_ID' => $tabs_counter,  
  33.                      'TAB_TITLE' => $tab_data['TITLE'],  
  34.                      'TAB_LINK' => $tab_data['LINK'],  
  35.                      'TAB_ICON' => $tab_data['ICON'],  
  36.                      'TAB_TIP' => (empty($tab_data['TIP']) ? $tab_data['TITLE'] : $tab_data['TIP']),  
  37.                      'S_SELECTED' => $selected,  
  38.                      )  
  39.                  );  
  40.                  $tabs_counter++;  
  41.              }  
  42.          }  
  43.  
  44.          $template->assign_vars(array(  
  45.              'N_TABS' => $tabs_counter,  
  46.              )  
  47.          );  
  48.  
  49.          return true;  
  50.      }  
  51.  


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.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.

 

tabmenu2.png
Description: Tab Menu2 
Filesize: 3.62 KB
Viewed: 221 Time(s)

tabmenu2.png

tabmenu1.png
Description: Tab Menu 
Filesize: 2.03 KB
Viewed: 201 Time(s)

tabmenu1.png


 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Tab Menu For Icy 
 
mort wrote: [View Post]
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.


 


You can do this with 2 images. no need to use 3
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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.
 



 
mortSend private message  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 




____________
Out of Order
 
spydieSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post 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
 




____________
IP Version: 1.3.0.53b
Server: Linux
 
TopoMotoV3XSend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: [MOD] Tab Menu For Icy 
 
TopoMotoV3X wrote: [View Post]
I do not see this problem, note that, in the development version, we no longer have the word "Messages" on upi2db


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   ), and that may create problems with the layout because the tabs are limited in width.
 



 
mortSend private message  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 3
Goto page 1, 2, 3  Next


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You 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


  

 

  cron