forum.coppermine-gallery.net

Support => cpg1.4 plugins => cpg1.4.x Support => Older/other versions => cpg1.4 plugin contributions => Topic started by: Jeff Bailey on January 08, 2010, 03:13:49 am

Title: [cpg1.4.x]: Link Append - Adds Anchor tag to links
Post by: Jeff Bailey on January 08, 2010, 03:13:49 am
This plugin adds an anchor tag to all the links contained in a div. It should be used in websites that have the Coppermine Gallery located in an area that you have to scroll to see it.

edit your "/your_gallery/themes/your_theme/template.html"
To use this plugin you must first "wrap" your gallery in a div, using any id you want in this format -> <div id="anyid">
example:
Code: [Select]
<div id="anyid">
  {CUSTOM_HEADER}
  <table width="100%" border="0" cellpadding="20" cellspacing="20">
    <tr>
      <td valign="top" style="border: 1px solid #666666;background-color:#FFFFFF;">
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td>
              <a href="index.php"><img src="themes/classic/images/site_logo.png" border="0" alt="" /></a><br />
            </td>
            <td width="100%" align="center">
              <h1>{GAL_NAME}</h1>
              <h3>{GAL_DESCRIPTION}</h3><br />
              {SYS_MENU} <br /> {SUB_MENU}
            </td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td align="center" valign="top">
              {LANGUAGE_SELECT_FLAGS}
            </td>
          </tr>
          <tr>
            <td align="center" valign="top">
              {THEME_SELECT_LIST}
              {LANGUAGE_SELECT_LIST}
            </td>
          </tr>
        </table>
        <img src="images/spacer.gif" width="1" height="15" alt="" />
        <br />
        <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left" valign="top">
              {ADMIN_MENU}
              {GALLERY}
            </td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  {CUSTOM_FOOTER}{VANITY}
</div>

When you Install the plugin, it will ask you for the div id.
After the install is complete all the links inside of the div tags will have the #cpg_top anchor added at the end.


v1.1 includes language file capability.
Title: Re: Loading gallery page with the gallery at the top of the page
Post by: Jeff Bailey on January 08, 2010, 06:40:11 pm
Made changes as suggested.
It seems that I can not reply to the announcement thread.

v1.2
uninstall and remove table before updating to v1.2
1. Changed storage of the div id.
2. Deleted sql folder.
3. Updated install and uninstall functions.
4. Updated english.php.
5. Made minor code changes to comply with Coding guidelines (http://documentation.coppermine-gallery.net/en/dev_coding.htm) and Plugin Writing for Coppermine (http://documentation.coppermine-gallery.net/en/dev_plugins.htm).

Do you agree to see your plugin listed in the subversion repository as well?
You may do what you want with the plugin.

v1.2 attached