Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Problem adding button  (Read 2938 times)

0 Members and 1 Guest are viewing this topic.

fareforce

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 66
  • Who are you calling a weasel?
    • Alaska Studio
Problem adding button
« on: June 20, 2005, 12:49:32 am »

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:
Quote
      if (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:
Quote
      if (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
« Last Edit: June 20, 2005, 01:19:49 am by Nibbler »
Logged
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com

Nibbler

  • Guest
Re: Problem adding button
« Reply #1 on: June 20, 2005, 12:56:58 am »

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.
Logged

fareforce

  • Coppermine regular visitor
  • **
  • Offline Offline
  • Gender: Male
  • Posts: 66
  • Who are you calling a weasel?
    • Alaska Studio
Re: Problem adding button
« Reply #2 on: June 20, 2005, 01:13:37 am »

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

~fareforce
http://www.alaskastudio.com
Logged
~fareforce
Anchorage, AK
Home of the frozen weasel
http://www.alaskastudio.com
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 20 queries.