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: How to change nickname link color in comments?  (Read 2827 times)

0 Members and 1 Guest are viewing this topic.

kpgmza

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
How to change nickname link color in comments?
« 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.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: How to change nickname link color in comments?
« Reply #1 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:
Code: [Select]
define('THEME_WANTS_BODY_CLASS', 1);And in the template.html file in your theme, change the <body> tag to:
Code: [Select]
<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}
Logged

kpgmza

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: How to change nickname link color in comments?
« Reply #2 on: August 18, 2023, 01:54:37 am »

Hi ron4mac:

Thank you, but not working for me.

My files were like this:

theme.php
Code: [Select]
<?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
Code: [Select]
</script>

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

style.css
Code: [Select]
.BC-index .thumb_title_owner {color: red}

The change of the color of the name of the users under the thumbnails was not made  :(
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: How to change nickname link color in comments?
« Reply #3 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?
Logged

kpgmza

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: How to change nickname link color in comments?
« Reply #4 on: August 18, 2023, 03:54:17 am »

Yes... I use 1.6.25 version.  ???
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: How to change nickname link color in comments?
« Reply #5 on: August 18, 2023, 01:09:33 pm »

Please provide a link to your site. You can PM me with it, if you prefer.
Logged

ron4mac

  • Administrator
  • Coppermine addict
  • *****
  • Country: us
  • Offline Offline
  • Posts: 2026
Re: How to change nickname link color in comments?
« Reply #6 on: August 18, 2023, 04:06:38 pm »

For what you are trying to do, use this CSS:
Code: [Select]
.BC-displayimage #comments a { color: #f9e0b2; }
Logged

kpgmza

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: How to change nickname link color in comments?
« Reply #7 on: August 19, 2023, 04:58:08 am »

Thank you very much!!! :) :) :).... That's work for me!!! . You are a genius! :)
Logged
Pages: [1]   Go Up
 

Page created in 0.015 seconds with 19 queries.