edit footer edit footer
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

edit footer

Started by brynn, December 07, 2013, 04:51:53 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

brynn

Hi Friends,
I want to add something to the footer in my CPG bridged with SMF/Tiny Portal.  Based on what I've read in the manual (http://documentation.coppermine-gallery.net/en/theme_copyright.htm) it sounds like what I need to do, is edit the function theme_credits in themes/yourtheme/theme.php.

The first problem is that I can't find anything in themes/yourtheme/theme.php called "theme_credits".  The manual says that if it doesn't exist in my custom theme, then I can copy it from the sample theme and paste into my custom theme.  I've found the sample theme, and I've found the function theme_credits.

Here's the part of the sample theme that appears to contain the function theme_credits:

******************************************************************************/
function theme_credits() {
    $return = <<< EOT

<div class="footer" align="center" style="padding:10px;display:block;visibility:visible; font-family: Verdana,Arial,sans-serif;">Powered by <a href="http://coppermine-gallery.net/" title="Coppermine Photo Gallery" rel="external">Coppermine Photo Gallery</a></div>
EOT;
    return $return;
}
/******************************************************************************



Unfortunately, I don't understand much about php (or whatever code it is).  Could someone tell me exactly where to start copying and stop?  Is it everything between the rows of asterisks?

And then next, the manual doesn't seem to say where to put the function theme_credits, in themes/yourtheme/theme.php.  (Or maybe it says, but I misunderstood it?)  Could someone please tell me where to paste it in?

And finally, I'll need to do this for all the themes I've installed, correct?

Thanks for your help  :)

Niecher

Hello Brynn,

You can paste it at the end of the file above the
Quote?>
and yes, you need to do in all themes.

Regards.

brynn

Thank you Niecher!

So far, so good -- I've got 2 theme.php files edited and working.  But now I open theme.php for Color Style theme, and it says:

"//                                                             //
// Do not edit this file.                                      //
// If you need to customize your theme,                        //
// edit themes/yourtheme/theme.php instead !!!                 //
// Take a look at the sample theme (themes/sample/theme.php)   //
// to get an idea what to copy into your custom theme.         //
// Really, don't edit this file! We mean it!                   //
// "

Does that mean that having already edited my default theme, the new footer will automatically work in this theme as well?  Or does it mean that the author of this theme doesn't want anyone to make a new theme based upon Color Style theme.  If I'm not trying to make a new theme based on this Color Style theme, will it be ok to add/edit the footer?

Niecher

In this theme you can use the section Function for the credits-section to add something to Footer.
You'll find this section near the end of file theme.php.

For expample:
Quote<span class="footer">Theme <b>Colour Style</b> for Coppermine Gallery 1.5.x by <a href="http://www.portalxl.nl/forum/">PortalXL Group</a>&nbsp;&copy; 2010</span>
<span class="footer">YOUR CUSTOM TEXT</span>

Regards.

brynn

So I don't need to use the code from the sample theme?  Only the new content?

brynn

 >:(  frustrating not to be able to edit!

I found the Function for the credits-section.  But there also is a "Function for writing a pagefooter" section, a little way below that.  Since I want to add to the footer, I just want to make sure credits-section is the correct place.  You can see how I might be confused?

Oh ok, I see now.  I changed to Color Style theme, and I see it has both credits and footer!

So my question about using the sample theme code -- I guess the answer is no.

Thank you very much   :)

PS -- Ah-ha!  I did not post until I finish the work, in case I need to ask another question!  lol

I want to look at the page source for that theme, to make sure the edit worked properly.  But I have NO context or right-click menu in that theme, on any page.  Is that how it's supposed to be?  Or is there a problem somewhere?  (The new part I added will not be visible.  It is a script for something else.  That's why I need to look at the source code, to make sure it's correct.)  I've never seen a webpage without context menu!

Thanks again  :)

Also something else.  When I change themes, I notice the CPG favicon, instead of my site's favicon.  Which file needs to be edited to set the favicon?  Sorry, I know that's a different topic.  But just need a quick answer   :)  Or maybe no file needs edit, but upload favicon to theme?  TA

Niecher

.- Replaces the default favicon.ico file (in your root folder on the server) for your custom favicon.ico file.

.- That theme does not allow context menu, this is not an error is as it should be.

.- The above example, more detailed:
Quote
******************************************************************************/
// Function for the credits-section
function theme_style_credits()
{
    $return = <<< EOT
<span class="footer">Theme <b>Colour Style</b> for Coppermine Gallery 1.5.x by <a href="http://www.portalxl.nl/forum/">PortalXL Group</a>&nbsp;&copy; 2010</span>
<span class="footer">YOUR CUSTOM TEXT</span>
EOT;
    return $return;
}
/******************************************************************************

Regards.

brynn

Oohhh, no context menu supposed to be there.  :( That means I will not be able to use that theme.  People need to be able to retrieve the images' URLs, and that can't be done without the context menu.  Maybe that's why the theme was made that way?  Oh well, I will either choose another theme to take it's place.  Or just drop it, since I already have 5 or 6 more themes.  So it doesn't matter whether my footer edit works or not, since I simply can't use a theme without a context menu.

Thank you very much Niecher!  You have come to my aid once again   :)

All best.