forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: olegario on November 14, 2003, 04:15:45 pm

Title: Make album names clickable links?
Post by: olegario 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.
Title: Make album names clickable links?
Post by: majestyk 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!
Title: Make album names clickable links?
Post by: jeffreyt 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
Title: Make album names clickable links?
Post by: Casper 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.
Title: Make album names clickable links?
Post by: jeffreyt 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
Title: Make album names clickable links?
Post by: Casper 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.
Title: Make album names clickable links?
Post by: bethyesque 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.
Title: Make album names clickable links?
Post by: Joachim Müller 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
Title: Make album names clickable links?
Post by: bethyesque on February 22, 2004, 05:48:17 am
hehe...yeah alblink does make more sense now doesn't it.  :D
Title: Re: Make album names clickable links?
Post by: romans815 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
Title: Re: Make album names clickable links?
Post by: Casper 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.