coppermine-gallery.com/forum

Support => cpg1.6.x Support => cpg1.6 themes (visuals) => Topic started by: kpgmza on August 11, 2023, 01:07:57 PM

Title: How to change nickname link color in comments?
Post by: kpgmza on August 11, 2023, 01:07:57 PM
Hi... I hope you can help me with this modification.

I try to change the color of the user's nickname link that appears in the comments, but I see that it also affects the color of the link that appears on the homepage.
The problem is that the homepage has a light background and the comment title bar has a dark background, that is, there is no link color that goes well with both!

I modify the color of the links (active, visited, etc) from the CSS file.

Is there any way to make the user's nickname link behave differently on the homepage and on the comments page so I can assign it different colors without one affecting the other?

I hope I was clear in my question and that you can help me. thank you so much.
Title: Re: How to change nickname link color in comments?
Post by: ron4mac on August 17, 2023, 02:24:59 PM
At the top of the theme.php file in your theme, add this define with other defines that may be there:
define('THEME_WANTS_BODY_CLASS', 1);
And in the template.html file in your theme, change the <body> tag to:
<body class="{BODY_CLASS}">

Then in your css, you can use the class name of the page being displayed. Class names are in the form: BC-<page>
Example:
.BC-index .thumb_title_owner {color: red}
Title: Re: How to change nickname link color in comments?
Post by: kpgmza on August 18, 2023, 01:54:37 AM
Hi ron4mac:

Thank you, but not working for me.

My files were like this:

theme.php
<?php
/*************************
  Coppermine Photo Gallery
  ************************
  Copyright (c) 2003-2009 Coppermine Dev Team
  v1.1 originally written by Gregory DEMAR

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License version 3
  as published by the Free Software Foundation.

  ********************************************
  Coppermine version: 1.4.25
  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.4.x/themes/water_drop/theme.php $
  $Revision: 5997 $
  $Author: gaugau $
  $Date: 2009-05-26 08:43:24 +0200 (Di, 26 Mai 2009) $
**********************************************/

define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until // you have validated it. See docs/theme.htm.
define('THEME_WANTS_BODY_CLASS'1);                                          

// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='&#38;#8226';

?>




template.html
</script>

</head>
<body class="{BODY_CLASS}">
<div id="rap">
<div id="container">
<div class="content">


style.css

.BC-index .thumb_title_owner {color: red}


The change of the color of the name of the users under the thumbnails was not made  :(
Title: Re: How to change nickname link color in comments?
Post by: ron4mac on August 18, 2023, 03:50:10 AM
Oh ... sorry, I was assuming that you are using a recent version of CPG (1.6.10 or newer). Are you?
Title: Re: How to change nickname link color in comments?
Post by: kpgmza on August 18, 2023, 03:54:17 AM
Yes... I use 1.6.25 version.  ???
Title: Re: How to change nickname link color in comments?
Post by: ron4mac on August 18, 2023, 01:09:33 PM
Please provide a link to your site. You can PM me with it, if you prefer.
Title: Re: How to change nickname link color in comments?
Post by: ron4mac on August 18, 2023, 04:06:38 PM
For what you are trying to do, use this CSS:
.BC-displayimage #comments a { color: #f9e0b2; }
Title: Re: How to change nickname link color in comments?
Post by: kpgmza on August 19, 2023, 04:58:08 AM
Thank you very much!!! :) :) :).... That's work for me!!! . You are a genius! :)