Menu Theme help. how to restyle a 1.3 theme to 1.4 Menu Theme help. how to restyle a 1.3 theme to 1.4
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Menu Theme help. how to restyle a 1.3 theme to 1.4

Started by gateway, January 27, 2006, 11:30:48 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

gateway

We just upgraded our sites with from the 1.3 and we had some custome themse we designed, I got everything over as far as I know in the new
format and all is working execpet for what replaced {MENU}.

I changed the template to reflect SYS_MENU and SUB_MENU but my styles that i created for {MENU} I have no idea how to get workign in the code since its compltely differnt and their isnt any html code like the old MENU was.

old code example:

// HTML template for main menu
$template_main_menu1 = <<<EOT
                <span class="topmenu1">
                        <table border="0" cellpadding="0" cellspacing="1">
                                <tr>
                                        <td><a href="http://www.mysite.com/members/" title="Home">Home</a>
                                        </td>
<!-- BEGIN my_gallery -->
                                        <td><a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a>
                                        </td>
<!-- END my_gallery -->
<!-- BEGIN allow_memberlist -->
                                        <td><a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a>
                                        </td>
<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->
                                        <td><a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a>
                                        </td>
<!-- END my_profile -->
<!-- BEGIN faq -->
                                        <td><a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a>
                                        </td>
<!-- END faq -->
<!-- BEGIN enter_admin_mode -->
                                        <td><a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a>
                                        </td>
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                                        <td><a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a>
                                        </td>
<!-- END leave_admin_mode -->
<!-- BEGIN upload_pic -->
                                        <td><a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a>
                                        </td>
<!-- END upload_pic -->
<!-- BEGIN register -->
                                        <td><a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a>
                                        </td>
<!-- END register -->
<!-- BEGIN login -->
                                        <td><a href="{LOGIN_TGT}">{LOGIN_LNK}</a>
                                        </td>
<!-- END login -->
<!-- BEGIN logout -->
                                        <td><a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a>
                                        </td>
<!-- END logout -->
                                </tr>
                        </table>
                </span>




new theme code .. ie untouched

  // HTML template for template sys_menu buttons
    // {HREF_LNK}{HREF_TITLE}{HREF_TGT}{BLOCK_ID}{SPACER}
    addbutton($sys_menu_buttons,'{HOME_LNK}','{HOME_TITLE}','{HOME_TGT}','home',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{MY_GAL_LNK}','{MY_GAL_TITLE}','{MY_GAL_TGT}','my_gallery',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{MEMBERLIST_LNK}','{MEMBERLIST_TITLE}','{MEMBERLIST_TGT}','allow_memberlist',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{MY_PROF_LNK}','{MY_PROF_TITLE}','{MY_PROF_TGT}','my_profile',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{ADM_MODE_LNK}','{ADM_MODE_TITLE}','{ADM_MODE_TGT}','enter_admin_mode',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{USR_MODE_LNK}','{USR_MODE_TITLE}','{USR_MODE_TGT}','leave_admin_mode',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{UPL_PIC_LNK}','{UPL_PIC_TITLE}','{UPL_PIC_TGT}','upload_pic',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{REGISTER_LNK}','{REGISTER_TITLE}','{REGISTER_TGT}','register',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{FAQ_LNK}','{FAQ_TITLE}','{FAQ_TGT}','faq',$template_sys_menu_spacer);
    addbutton($sys_menu_buttons,'{LOGIN_LNK}','{LOGIN_TITLE}','{LOGIN_TGT}','login','');
    addbutton($sys_menu_buttons,'{LOGOUT_LNK}','{LOGOUT_TITLE}','{LOGOUT_TGT}','logout','');
    // Login and Logout don't have a spacer as only one is shown, and either would be the last option.



now I have no idea how to get my css class topmenu1 into the new design theme, ??

thoughts?

Paver

There's a sticky in this board regarding "How to modify SYS_MENU & SUB_MENU".  Please read that to understand the new menu functions.  Basically, you should be able to use your HTML for the old menu in $template_sys_menu and $template_sub_menu.  Break up your old menu HTML into the two menus, using the sample theme as a guide to which button goes where.  You don't have to use the new addbutton() functions; you can use straight HTML by defining those 2 variables just like you did for your old menu.  Look at the hardwired theme for an example of a 1.4 theme that uses straight HTML for the SYS_MENU & SUB_MENU.