Advanced search  

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

Pages: [1]   Go Down

Author Topic: Modify Buttons / Links - top of Page - part 3  (Read 10310 times)

0 Members and 1 Guest are viewing this topic.

CrestoneCreations

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Modify Buttons / Links - top of Page - part 3
« on: July 28, 2010, 02:52:08 am »

Gallery:
http://seawolfadventures.net/photoscpg/index.php

As following from
http://forum.coppermine-gallery.net/index.php/topic,66279.0.html

Wondering how to change the URL of "Contact" to point to http://seawolfadventures.net/contact/index.html
instead of towards   contact.php
I have found the line of code   
       
Code:
Code: [Select]
'{CONTACT_TGT}' => "contact.php?referer=$REFERER",in themes/sample/themes.php
and I suppose I need to change that to
       
Code:
Code: [Select]
'{CONTACT_TGT}' => "http://seawolfadventures.net/contact/index.html?referer=$REFERER",somehow putting that into my themes/rainy_day/themes.php

but my attempts have rendered my board inoperative ... backup file inserted back and all is fine again ...

Thanks again.  Much appreciated
Logged

Joe Carver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1545
  • aka 'i-imagine'
    • Home Page
Re: Modify Buttons / Links - top of Page - part 3
« Reply #1 on: July 28, 2010, 01:18:36 pm »

To change a function/action/output from your theme you would be well advised to start reading your document package.

If there is one line that you want to add/change then you need to copy the complete function or template.

For example:
** Section <<<theme_main_menu>>> - START
has menu button designations.
Copy the complete function into your custom theme's theme.php. Then make your change.

CrestoneCreations

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Modify Buttons / Links - top of Page - part 3
« Reply #2 on: July 28, 2010, 08:15:09 pm »

Thank you Joe.  Yes, if you read the threads I reference you may be able to tell that I have indeed spent several days reading documentation and only AFTER reading that documentation and trying and failing did I seek help here on the forum.  As I mention in the referenced threads, the backend is not my strength, but I am happy to learn, and so I thank you for your help and appreciate the suggestions for those of us less code savvy who are interested in using Coppermine and making it work for us  :)

Thank you for pointing me in the right direction.  I have tried it and it worked.
There were many sections that all look the same to me, but now with your support I have had success.
Have a nice day.

Logged

CrestoneCreations

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Modify Buttons / Links - top of Page - part 3
« Reply #3 on: July 28, 2010, 09:17:44 pm »

For the benefit of those like myself who need it spelled out in basic terms ...
 - what is being referenced above is copy of a bit of code from
yourgallery/themes/sample/theme.php
to your custom theme.

So, further spelled out, the steps I have taken for success are as follows:

1. Custom Theme ==> create one by duplicating the theme files (for me that is the rainy_day theme which I copied with the name rainy_day_01)

2. Get Code ==> from yourgallery/themes/sample/theme.php 
copy the bit of code that begins with


Code: [Select]
/******************************************************************************
** Section <<<theme_main_menu>>> - START
******************************************************************************/

and ends with

Code: [Select]
/******************************************************************************
** Section <<<theme_main_menu>>> - END
******************************************************************************/

and paste that into your custom theme.
for me that is:

yourgallery/themes/rainy_day_01/theme.php

I pasted just before the

Code: [Select]
?>
at the end of the file.


3. for my case, to modify the target URL of the "Contact" button:

in yourgallery/themes/rainy_day_01/theme.php I modified the line

Code: [Select]
        '{CONTACT_TGT}' => "contact.php",
with the target URL I needed
http://seawolfadventures.net/contact/index.html
instead of "contact.php"

Code: [Select]
        '{CONTACT_TGT}' => "http://seawolfadventures.net/contact/index.html",


4. Activate the theme ==> Logged in as admin I selected the rainy_day_01 theme.

Done.

If things go wrong then of course you can replace the clean copy of
rainy_day/theme.php
with
rainy_day_01/theme.php

Hope this helps and hopefully I have represented all my steps correctly.  I'm happy to clarify for others if asked.
Now that I see this example it makes sense in the documentation, so please don't take this as a criticism of the documentation but rather just an example implementation of it.

I thank all on the forum who helped me learn this.



Logged

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: Modify Buttons / Links - top of Page - part 3
« Reply #4 on: July 28, 2010, 10:08:52 pm »

Thanks for your input. I am sure many will find this usefull.
Logged
It is a mistake to think you can solve any major problems just with potatoes.

CrestoneCreations

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: Modify Buttons / Links - top of Page - part 3
« Reply #5 on: July 28, 2010, 10:17:17 pm »

My pleasure.  Maybe as I learn more I will have a future on the team providing "support for beginners"   ;D
Logged
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.