forum.coppermine-gallery.net

Support => cpg1.3.x Support => Older/other versions => cpg1.3 Themes/Skins/Templates => Topic started by: Traxman on April 30, 2005, 10:01:55 am

Title: New link
Post by: Traxman on April 30, 2005, 10:01:55 am
Ok I have searched this board up and down. Read the faq and docs over and over.

My question refers to adding links into coppermines gallery navbar.

My gallery is located at:
http://www.gamingdynasty.com/PhotoAlbum/index.php

I have skinned the BlackWidow theme to match my site so I know fairly well the style.css and theme files. I have also added links from my main page and my forum to the gallery and everything is integrated.

Being that I changed the template.html file here it is:

Code: [Select]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html dir="{LANG_DIR}">
<head>
<title>{TITLE}</title>
<meta http-equiv="Content-Type" content="text/html; charset={CHARSET}" />
<meta http-equiv="Pragma" content="no-cache" />
{META}
<link rel="stylesheet" href="themes/black_widdow/style.css" />
<script type="text/javascript" src="scripts.js"></script></head>
<body bgcolor="#000000" text="#FFFFFF">

<table width="90%" cellspacing="0" cellpadding="0" border="0" align="center">
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" class="topbkg">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="left" width="100%">&nbsp;
<!-- remove this as you do'nt like text titles -->
<!--Removed gallery title and description for personal header--!>
<!--<div align="center" class="headtitle">{GAL_NAME} :: {GAL_DESCRIPTION}</div>--!>
<!-- remove this as you do'nt like text titles -->
</td>

</tr>
</table></td>
</table>
 
  <!-- middle section header -->
  <tr>
    <td> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
       
        <tr>
          <td rowspan="2"><img src="themes/black_widdow/images/button_1.gif" width="15" height="25" alt="" /></td>
          <td background="themes/black_widdow/images/announce_1.gif" width="100%" class="topnav" align="center">{MAIN_MENU}</td>
          <td rowspan="2"> <img src="themes/black_widdow/images/button_4.gif" width="15" height="25" alt="" /></td>
        </tr>
        <tr>
          <td> </td>
        </tr>
      </table></td>
  </tr>
  <!-- middle section header -->
 
  <tr>
    <td height="100%"> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">

        <tr>
          <td background="themes/black_widdow/images/spacer.gif" width="15">&nbsp;</td>
          <td bgcolor="#000000">
            <table width="870" border="0" align="center" cellpadding="0" cellspacing="4" class="bodyline">
              <tr>
                <td ><table width="100%" border="0" align="center">
                    <tr>
                      <td>{ADMIN_MENU}</td>
                    </tr>
                    <tr>
                      <td align="center">{GALLERY}<br /></td>
                    </tr>
                    <tr>
                      <td align="center">{LANGUAGE_SELECT_FLAGS}<br />{LANGUAGE_SELECT_LIST}&nbsp;{THEME_SELECT_LIST}</td>
                    </tr>
                  </table>
 </td>
              </tr>
            </table></td>
          <td background="themes/black_widdow/images/spacer.gif" width="14">&nbsp; </td>
        </tr>
        <tr>
          <td colspan="3"><img src="themes/black_widdow/images/spacer.gif" width="100%" height="17" alt="" /></td>
        </tr>
      </table></td>
  </tr>
</table>
</body>
</html>

I need a link just like the "My Gallery" Link in the navbar.

A test account is provided.

user: test1
pass: test1

If any other info is needed please let me know. I am somewhat experience in coding so I can handle most of the terminolgy.
Title: Re: New link
Post by: donnoman on April 30, 2005, 05:42:28 pm
You need to edit your theme.php

this is from classic

theme.php; $template_main_menu
Code: [Select]
// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
<!-- BEGIN album_list -->
                        <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}"><strong>{ALB_LIST_LNK}</strong></a>
<!-- END album_list -->
<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a> |
<!-- END my_gallery -->


the "<!-- BEGIN custom_name -->" starts the button (the name has significance to coppermine, so don't duplicate or remove names that already exist.

put whatever you want the contents to be, I would copy the contents of my_gallery, then modify to suit.

the "<!-- END custom_name -->" ends that button.

In most themes all buttons are the same so it doesn't matter what button you copy. Though by the looks of it, your first and last button may be different, take note of those differences if you copy those.

so if I were going to make a "forum" button I might do:

Code: [Select]
// HTML template for main menu
$template_main_menu = <<<EOT
                <span class="topmenu">
<!-- BEGIN album_list -->
                        <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}"><strong>{ALB_LIST_LNK}</strong></a>
<!-- END album_list -->
<!-- BEGIN forum -->
                        <a href="http://www.gamingdynasty.com/forum2/" title="Forum">Forum</a> |
<!-- END forum -->
<!-- BEGIN my_gallery -->
                        <a href="{MY_GAL_TGT}" title="{MY_GAL_TITLE}">{MY_GAL_LNK}</a> |
<!-- END my_gallery -->





Title: Re: New link
Post by: Traxman on April 30, 2005, 06:15:09 pm
Thank you so much. It was a simple edit. Works perfect.
Title: Re: New link
Post by: Jangla on October 27, 2005, 08:31:08 pm
Does it have to be simple text links in a <span>?  I'd like to have a table in there so I can use icons for each link.  I'm playing around with what I think should go in there but not having much luck so far.

Edit - sorted it now.  :-[
Title: Re: New link
Post by: kegobeer on October 27, 2005, 09:27:18 pm
It doesn't have to be in a span.  You can wrap everything inside a table - just make sure you open and close tags inside the <!-- BEGIN --> and <!-- END --> tags.  You don't need to use a table if you want to have icons though.

Code: [Select]
$template_main_menu = <<<EOT
<!--BEGIN album_list -->
  <a href="{ALB_LIST_TGT}" title="{ALB_LIST_TITLE}"><img src="whatever.jpg">&nbsp;{ALB_LIST_LNK}</a>
<!--END album_list -->
Title: Re: New link
Post by: Joachim Müller on October 27, 2005, 09:30:30 pm
take a look at the theme hardwired or rainy_day that come with coppermine - they have table navigation.