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: Make album names clickable links?  (Read 8436 times)

0 Members and 1 Guest are viewing this topic.

olegario

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 32
Make album names clickable links?
« on: November 14, 2003, 04:15:45 pm »

In the album list screen, would it be possible to make the album names clickable links so they can take you into the albums?  Right now, only clicking on the small thumbnails can take you into the albums.
Logged

majestyk

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
Make album names clickable links?
« Reply #1 on: November 17, 2003, 01:53:58 pm »

Hey,
that's a feature I wanted from the begining - each time I tried to click on the album name (in vain) :-)

I patched the theme hardwired (great theme, by the way) to achieve that:
Code: [Select]


--- style.css.backup    Mon Nov 17 13:49:27 2003
+++ style.css   Mon Nov 17 13:49:08 2003
@@ -127,6 +127,16 @@
         text-decoration: underline;^M
 }^M
 ^M
+.alblist {^M
+        color : #C7C7C7;^M
+        text-decoration: none;^M
+}^M
+^M
+.alblist:hover {^M
+        color : #C7C7C7;^M
+        text-decoration: underline;^M
+}^M
+^M
 bblink a {^M
         color: #8090A3;^M
         text-decoration: none;^M
--- theme.php.backup    Mon Nov 17 13:25:49 2003
+++ theme.php   Mon Nov 17 13:47:29 2003
@@ -239,7 +239,7 @@
         <table width="100%" height="100%" cellspacing="0" cellpadding="0">^M
         <tr>^M  
                 <td colspan="3" height="1" valign="top" class="tableh2">^M
-                        <b>{ALBUM_TITLE}</b>^M
+                        <a href="{ALB_LINK_TGT}" class="alblist"><b>{ALBUM_TITLE}</b></a>^M
                 </td>^M
         </tr>^M
         <tr>^M


I think  the changes in the theme.php should merge in most themes, but the changes in the stylesheet must be made according to your color wishes.

Hope that helps,
majestyk

PS: don't forget to remove the ^M's!
Logged

jeffreyt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Make album names clickable links?
« Reply #2 on: January 11, 2004, 10:00:43 am »

Hi Great modd,

But better do it this way... (rainy-day theme)

Code: [Select]
<!-- BEGIN album_cell -->
        <td width="{COL_WIDTH}%" height="100%" valign="top">
        <table width="100%" height="100%" cellspacing="0" cellpadding="0">
        <tr>
                <td colspan="3" height="1" valign="top" class="tableh2">
                       
<a href="{ALB_LINK_TGT}" class="alblist"><b>{ALBUM_TITLE}</b></a>
                </td>
        </tr>
        <tr>


Otherwise u will have double album-names, with only the last one clickable.

Jef
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Make album names clickable links?
« Reply #3 on: January 11, 2004, 12:51:33 pm »

Great mod.   :D

All you need to do, regardless of the theme, is in themes/yourtheme/theme.php, find the first 2 instances of '{ALBUM_TITLE}', and change it to '<a href="{ALB_LINK_TGT}" class="alblist"><b>{ALBUM_TITLE}</b></a>'.

This will give link colours the same as the menu.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

jeffreyt

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Make album names clickable links?
« Reply #4 on: January 11, 2004, 01:44:53 pm »

Hi casper,

I did so, but the album color links are still (not sided) blue.

Not black as they suppose to be.... But i can life with that. It's more high-lighted this way.

Thanks for your input in this.

Jef
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Make album names clickable links?
« Reply #5 on: January 11, 2004, 04:46:20 pm »

Hi Jeffrey,

Yes, thats what I meant, the same colour as the clickable links in the menu at the top of the page, which in default theme is blue.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

bethyesque

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Make album names clickable links?
« Reply #6 on: January 19, 2004, 02:26:57 am »

Casper's fix is correct. However you also have to edit your theme's style sheet appropriately, as majestyk mentioned.

If you are using the default style sheet as a basis, then you'll have to add the 'alblist' class, because it is not there. The reason you're seeing a blue link is because the code is calling for a class that isn't defined in the style sheet, therefore, it is simply defaulting to the blue.

So, if you want the 'alblist' links to match the black menu links in the default style, then add the following to your theme's style sheet (just as majestyk posted):



Code: [Select]

.alblist {
        color : #000000;
        text-decoration: none;
}

.alblist:hover {
       color : #000000;
       text-decoration: underline;
}




Works like charm. I just did this to my own gallery.
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Make album names clickable links?
« Reply #7 on: February 21, 2004, 10:15:14 am »

added this code to the devel branch of the cvs (in other words: will be in the next version) for all themes, although I used the css class alblink (already exists).

Thanks for your contributions.

GauGau
Logged

bethyesque

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Make album names clickable links?
« Reply #8 on: February 22, 2004, 05:48:17 am »

hehe...yeah alblink does make more sense now doesn't it.  :D
Logged

romans815

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Make album names clickable links?
« Reply #9 on: February 19, 2005, 02:22:45 pm »

How about the ability for the "Album Link" at the top of the page to be able to link back to the home page. It will only go to the current album you are in if you are in one. I have searched in the forum, but have not found this particular topic.

Thanks
Logged

Casper

  • VIP
  • Coppermine addict
  • ***
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 5231
Re: Make album names clickable links?
« Reply #10 on: February 19, 2005, 09:17:16 pm »

If you mean the 'Album list', it does what it says on the tin, it takes you to the list of albums of the category you are currently in.

This has been many times discussed, as well as ways of changing it, or adding a 'Gallery home' button.

Besides, many installations are just part of larger websites, and their webmasters do not consider the coppermine index.php as their 'Home' page, and will be asking us to change any button called that to something else.

As Donnoman has answered on another thread, this has been added in the next version.
Logged
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 19 queries.