Problem adding button Problem adding button
 

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

Problem adding button

Started by fareforce, June 20, 2005, 12:49:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fareforce

I am using the theme rainy_day, with a shop hack to mal's. I am having a problem adding a button in the main_menu1 (next to where it either says login or logout).

This is the code I tried:

In the file theme.php I added
Quote<!-- BEGIN view_cart -->
                                        <td><img name="spacer" src="images/spacer.gif" width="5" height="25" border="0" id="spacer" alt="" /></td>
                                        <td><img name="button1_r1_c1" src="themes/rainy_day/images/button1_r1_c1.gif" width="5" height="25" border="0" id="button1_r1_c1" alt="" /></td>
                                        <td background="themes/rainy_day/images/button1_r1_c2.gif">
                                                <a href="http://{$CONFIG['shop_server']}/cf/review.cfm?userid={$CONFIG['shop_userid']}">View Basket</A>
                                        </td>
                                        <td><img name="button1_r1_c3" src="themes/rainy_day/images/button1_r1_c3.gif" width="5" height="25" border="0" id="button1_r1_c3" alt="" /></td>
<!-- END view_cart -->
right before:
Quote<!-- BEGIN login -->

I also changed:
Quoteif (USER_ID) {
        template_extract_block($template_main_menu, 'login');
    } else {
      template_extract_block($template_main_menu, 'logout');
        template_extract_block($template_main_menu, 'my_profile');
    }
to this:
Quoteif (USER_ID) {
       template_extract_block($template_main_menu, 'view_cart');
        template_extract_block($template_main_menu, 'login');
    } else {
        template_extract_block($template_main_menu, 'view_cart');
      template_extract_block($template_main_menu, 'logout');
        template_extract_block($template_main_menu, 'my_profile');
    }

I thought that would work, but it doesn't show the button. I don't get any error either.  Can anyone help me with this?
To see the site in action visit below and click on Photos


~fareforce
http://www.alaskastudio.com
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Nibbler

template_extract_block removes the block from the template. (eg it removes the login link if you are logged in already) .You have it set to always remove the block therfore it never shows up. If you always want it to appear then you don't need to use the function or add your own comments around the code atall.

fareforce

doh!  it's been a long day..   thanks for the help though!

~fareforce
http://www.alaskastudio.com
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com