[cpg1.4.x]: Link Append - Adds Anchor tag to links [cpg1.4.x]: Link Append - Adds Anchor tag to links
 

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

[cpg1.4.x]: Link Append - Adds Anchor tag to links

Started by Jeff Bailey, January 08, 2010, 03:13:49 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Jeff Bailey

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:

<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.
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Jeff Bailey

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 and Plugin Writing for Coppermine.

Quote from: Joachim Müller on January 08, 2010, 08:18:22 AM
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
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford