Problem with button Problem with button
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Problem with button

Started by Fréderic, December 12, 2004, 11:28:12 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Fréderic

I'm using the style Project VII, but I want to edit it... So, I've made
$template_main_menu2 = <<<EOT
                        <table border="0" cellpadding="0" cellspacing="0">
                                <tr>
                                        <td class="top_menu_left_bttn">
                                                <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                        </td>
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="javascript:;" onMouseOver="MM_showHideLayers('Menu1','','show')">@</a>
                                        </td>
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTUP_TGT}">{LASTUP_LNK}</a>
                                        </td>
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{LASTCOM_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{LASTCOM_LNK}</a>
                                        </td>
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{TOPN_LNK}</a>
                                        </td>

into
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPN_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{TOPN_LNK}</a>
                                        </td>
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{TOPRATED_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{TOPRATED_LNK}</a>
                                        </td>
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{UPL_PIC_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{UPL_PIC_LNK}</a>
                                        </td>
                                        <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                        <td class="top_menu_bttn">
                                                <a href="{FAV_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{FAV_LNK}</a>
But when I upload it, the text I get is: UPL_PIC_LNK, in stead of Upload pictures... So, the UPL_PIC_LNK code isn't being replaced by the right text... Does anyone get my problem?

mid0ri

Find on theme.php function theme_main_menu2()
and add

'{UPL_PIC_TGT}' => "upload.php",
        '{UPL_PIC_TITLE}' => $lang_main_menu['upload_pic_title'],
        '{UPL_PIC_LNK}' => $lang_main_menu['upload_pic_lnk'],

after
the following code:
'{SEARCH_LNK}' => $lang_main_menu['search_lnk'],

Good luck!

Fréderic

#2
@Mods: I don't know if I may post another question here (it's about the same buttons)
But, let's give it a go :-)
Everytime I visit the gallery now, I've got an error, in this block:
<table border="0" cellpadding="0" cellspacing="0">
                               <tr>
                                       <td class="top_menu_left_bttn">
                                               <a href="index.php?cat=0" title="Ga naar de album lijst">Album lijst</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="javascript:;" onMouseOver="MM_showHideLayers('Menu1','','show')">@</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="thumbnails.php?album=lastup&cat=0">Laatste upload</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="thumbnails.php?album=lastcom&cat=0" onMouseOver="MM_showHideLayers('Menu1','','hide')">Laatste commentaar</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="thumbnails.php?album=topn&cat=0" onMouseOver="MM_showHideLayers('Menu1','','hide')">Meest bekeken</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="thumbnails.php?album=toprated&cat=0" onMouseOver="MM_showHideLayers('Menu1','','hide')">Best beoordeeld</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                       <a href="upload.php" title="Upload een bestand in een album">Upload bestand</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_right_bttn">
                                               <a href="search.php" onMouseOver="MM_showHideLayers('Menu1','','hide')">Zoek</a>
                                       </td>
                               </tr>
                       </table>

The original PHP code is:
$template_main_menu1 = <<<EOT
                                               |
<!-- BEGIN my_gallery -->
                                               <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a> |
<!-- END my_gallery -->
<!-- BEGIN favorite -->
                                               <a href="{FAV_TGT}">{FAV_LNK}</a> |
<!-- END favorite -->
<!-- BEGIN allow_memberlist -->
                                               <a href="{MEMBERLIST_TGT}" title="{MEMBERLIST_TITLE}">{MEMBERLIST_LNK}</a> |
<!-- END allow_memberlist -->
<!-- BEGIN my_profile -->
                                               <a href="{MY_PROF_TGT}">{MY_PROF_LNK}</a> |
<!-- END my_profile -->
<!-- BEGIN faq -->
                       <a href="{FAQ_TGT}" title="{FAQ_TITLE}">{FAQ_LNK}</a> |
<!-- END faq -->
<!-- BEGIN enter_admin_mode -->
                                               <a href="{ADM_MODE_TGT}" title="{ADM_MODE_TITLE}">{ADM_MODE_LNK}</a> |
<!-- END enter_admin_mode -->
<!-- BEGIN leave_admin_mode -->
                                               <a href="{USR_MODE_TGT}" title="{USR_MODE_TITLE}">{USR_MODE_LNK}</a> |
<!-- END leave_admin_mode -->
<!-- BEGIN register -->
                                               <a href="{REGISTER_TGT}" title="{REGISTER_TITLE}">{REGISTER_LNK}</a> |
<!-- END register -->
<!-- BEGIN login -->
                                               <a href="{LOGIN_TGT}">{LOGIN_LNK}</a> |
<!-- END login -->
<!-- BEGIN logout -->
                                               <a href="{LOGOUT_TGT}">{LOGOUT_LNK}</a> |
<!-- END logout -->
EOT;

$template_main_menu2 = <<<EOT
                       <table border="0" cellpadding="0" cellspacing="0">
                               <tr>
                                       <td class="top_menu_left_bttn">
                                               <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}">{ALB_LIST_LNK}</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="javascript:;" onMouseOver="MM_showHideLayers('Menu1','','show')">@</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="{LASTUP_TGT}">{LASTUP_LNK}</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="{LASTCOM_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{LASTCOM_LNK}</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="{TOPN_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{TOPN_LNK}</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                                               <a href="{TOPRATED_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{TOPRATED_LNK}</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_bttn">
                       <a href="{UPL_PIC_TGT}" title="{UPL_PIC_TITLE}">{UPL_PIC_LNK}</a>
                                       </td>
                                       <td><img name="menu_spacer" src="themes/project_vii/images/menu_spacer.gif" width="2" height="35" border="0" id="menu_spcer" alt="" /><br /></td>
                                       <td class="top_menu_right_bttn">
                                               <a href="{SEARCH_TGT}" onMouseOver="MM_showHideLayers('Menu1','','hide')">{SEARCH_LNK}</a>
                                       </td>
                               </tr>
                       </table>

I've editted also this piece of code (added text for favorites):
   $param = array('{MY_GAL_TGT}' => "index.php?cat=$my_gallery_id",
       '{MY_GAL_TITLE}' => $lang_main_menu['my_gal_title'],
       '{MY_GAL_LNK}' => $lang_main_menu['my_gal_lnk'],
'{FAV_TGT}' => "thumbnails.php?album=favpics",
       '{FAV_LNK}' => $lang_main_menu['fav_lnk'],
       '{MEMBERLIST_TGT}' => "usermgr.php",
       '{MEMBERLIST_TITLE}' => $lang_main_menu['memberlist_title'],
       '{MEMBERLIST_LNK}' => $lang_main_menu['memberlist_lnk'],
       '{MY_PROF_TGT}' => "profile.php?op=edit_profile",


But it seems something's wrong, but I can't find what...
//EDIT: forgot to say: the style is Project VII and the dropdown JS with the @ sign doesn't work anymore...

mid0ri

If see that you're trying to add the "Upload file" button. Please check your
$template_main_menu2 block and make sure you you didn't left out EOT;  after </table>

Quote
dropdown JS with the @ sign doesn't work anymore...
It may work but you just can't see it, did you change the CSS? Menu beneath @sign ( My gallery |  My Favorites |  etc.) may be hidden underneath something and check the text color.

Joachim Müller

you mustn't remove the lines like<!-- BEGIN my_gallery -->- they are mandatory.

Joachim