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: How to hard-code ecard "view more pictures" link ?  (Read 14525 times)

0 Members and 1 Guest are viewing this topic.

PakWaan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
How to hard-code ecard "view more pictures" link ?
« on: March 19, 2006, 03:08:27 am »

I am using Coopermine as a component in my Joomla site.  The ecard link for "view more pictures" goes to my Coppermine installation (www.website.com/coppermine/) but I want it to go to my home page instead. 

Since the URL specified in the configuration is used for other things besides just the eCard, I need to just hard code my web site address in the eCard instead of using the variable.

Where in the code does it insert the variable for the URL?  I assume I can just remove the variable on the email and insert the link to my home page directly so it links to www.website.com?
« Last Edit: September 19, 2006, 06:14:25 am by Sami »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How to hard-code ecard "view more pictures" link ?
« Reply #1 on: March 19, 2006, 09:21:15 am »

it's in your theme.php. If you can't find it there copy over $template_img_navbar from themes/sample/theme.php to your theme file and modify the link to your needs

PakWaan

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: How to hard-code ecard "view more pictures" link ?
« Reply #2 on: March 19, 2006, 01:32:59 pm »

Hmmm.... now I'm confused.

Last night, I was trying to find it in the code and found the 'View More Target'  in ecard.php - and changed it to a hard-coded URL - and it works great.

Was:

'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],

Replaced with:

'{VIEW_MORE_TGT}' => 'http://www.myurl.com',

Now all clicks on the link take the recipient to my home page, rather than straight to the gallery.

Wouls it have been better to edit it in themes?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How to hard-code ecard "view more pictures" link ?
« Reply #3 on: March 19, 2006, 08:15:24 pm »

I think I missunderstood you. Thought you want users to go to your home page when the click the 'send ecard' button
If you want users to get to your home page when clicking the link in the ecard email then you've chosen exactly the right place to add your URL

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #4 on: September 18, 2006, 05:22:06 pm »

Hi

Now I'm confused.  Just tried --- (& failed) with:

'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],

Replaced with:

'{VIEW_MORE_TGT}' => ['http://www.myurl.com'],

I too am trying to get "View More Pictures!" to link to my homepage.

What is my major malfunction with this?

Thank you

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How to hard-code ecard "view more pictures" link ?
« Reply #5 on: September 18, 2006, 05:33:04 pm »

why did you add the brackets?? All you need has been said above... just don't add wrong syntax

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #6 on: September 18, 2006, 06:29:19 pm »

thank you for your help

I'll remove the brackets
Logged

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #7 on: September 18, 2006, 06:47:36 pm »

removed brackets
Was:

'{VIEW_MORE_TGT}' => $CONFIG['myurl.com'],

Replaced with:

'{VIEW_MORE_TGT}' => 'http://www.myurl.com',

NOW I GET THIS :

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /home/sage/public_html/myurl/photoalbums/ecard.php on line 119

Tried going back to the original
{VIEW_MORE_TGT}' => $CONFIG['myurl.com'],

but the parse error continues.

sure would like to get it right

thanks ahead of time for your help
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: How to hard-code ecard "view more pictures" link ?
« Reply #8 on: September 18, 2006, 06:56:30 pm »

please post what you've changed including some lines before and after that code

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #9 on: September 18, 2006, 08:29:38 pm »

Thank you,

In  ecard.php

['view_ecard_plaintext'],
        '{PIC_URL}' => $n_picname,
        '{URL_PREFIX}' => $gallery_url_prefix,
        '{GREETINGS}' => $greetings,
        '{MESSAGE}' => bb_decode($msg_content),
        '{PLAINTEXT_MESSAGE}' => $message,
        '{SENDER_EMAIL}' => $sender_email,
        '{SENDER_NAME}' => $sender_name,
        '{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
        '{VIEW_MORE_LNK}' => $lang_ecard_php['view_more_pics'],
        '{PID}' => $pid,
        '{PIC_TITLE}' => $pic_title,
        '{PIC_CAPTION}' => $pic_caption,
        );

                                $message = template_eval($template_ecard, $params);
                                $plaintext_message = template_eval($template_ecard_plaintext, $params);


_______________________________________
& the other section of the same page is:
_______________________________________



        '{URL_PREFIX}' => $gallery_url_prefix,
        '{GREETINGS}' => $greetings,
        '{MESSAGE}' => bb_decode($msg_content),
        '{SENDER_EMAIL}' => $sender_email,
        '{SENDER_NAME}' => $sender_name,
        '{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
        '{VIEW_MORE_LNK}' => $lang_ecard_php['view_more_pics'],
        '{PID}' => $pid,
        '{PIC_TITLE}' => $pic_title,
        '{PIC_CAPTION}' => $pic_caption,
        );

                                starttable('100%', $lang_ecard_php['preview']);
                                echo '<tr><td>';
                                echo template_eval($template_ecard, $params);
                                echo '</td></tr>';

___________________________________________________________
I've changed it back to original and it is working that way.  But still want the link "View More Pictures" on the recipient's e-card to link to my website URL.

I had changed individually and simultaneously the lines:

FROM:
 
'{VIEW_MORE_TGT}' => $Config['ecards_more_pic_target'],

TO:

'{VIEW_MORE_TGT}' => http://www.myurl.com,

________________________________________________________
When I changed either or both of these lines I get the parse errors.  I am using the Eyeball template included with the photo gallery program.

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to hard-code ecard "view more pictures" link ?
« Reply #10 on: September 18, 2006, 09:40:16 pm »

Try to change line 194 and line 119 to this :
Code: [Select]
'{VIEW_MORE_TGT}' => 'http://www.myurl.com',
« Last Edit: September 19, 2006, 06:15:20 am by Sami »
Logged
‍I don't answer to PM with support question
Please post your issue to related board

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #11 on: September 18, 2006, 10:01:11 pm »

hi:

Just tried that (failed again) - it linked back to the goppermine photo album page again instead of my website main page.  Yes I entered my correct website url.

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to hard-code ecard "view more pictures" link ?
« Reply #12 on: September 18, 2006, 10:05:46 pm »

can you post a link to your gallery please?
Logged
‍I don't answer to PM with support question
Please post your issue to related board

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #13 on: September 18, 2006, 10:25:34 pm »


CopperMine Photo Gallery page:

http://www.boundarygop.org/photoalbums/

Website main page:
http://www.boundarygop.org/

Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to hard-code ecard "view more pictures" link ?
« Reply #14 on: September 18, 2006, 10:30:36 pm »

Search the ecard.php , you'll find two
Code: [Select]
'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
you should change them both to
Code: [Select]
'{VIEW_MORE_TGT}' => 'http://www.boundarygop.org',

And do not put / at the end of site url it will create that parse error ;)
Logged
‍I don't answer to PM with support question
Please post your issue to related board

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #15 on: September 18, 2006, 10:43:46 pm »

did as you said - - it did not change the path
still "View More Pictures"  on the recipient ecard goes back to the url/photoalbum
not to the url main page

?
Logged

Sami

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 3686
  • BMossavari
    • My Project
Re: How to hard-code ecard "view more pictures" link ?
« Reply #16 on: September 18, 2006, 10:51:37 pm »

Then you need to also edit displaycard.php and replace
Code: [Select]
'{VIEW_MORE_TGT}' => $CONFIG['ecards_more_pic_target'],
with yours
Or
You may change the URL of your coppermine gallery folder (no 'index.php' or similar at the end)
under config to http://www.boundarygop.org/ but in this way your home link under main menu also change
Logged
‍I don't answer to PM with support question
Please post your issue to related board

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #17 on: September 18, 2006, 11:10:50 pm »

changed in displayecards php  & ecards php files did not make a difference.

Sounds like changing the index is a real bear.  I don't see why the other person was able to change the link with such ease.  What is my major malfunction here?

Logged

sagebear

  • Coppermine newbie
  • Offline Offline
  • Posts: 10
Re: How to hard-code ecard "view more pictures" link ?
« Reply #18 on: September 18, 2006, 11:22:51 pm »

Me again.

Link to View More Pictures now goes to my website homepage. 
I changed the codes once in displayecard and twice in ecards phps, refreshed everything and Voila! It now works correctly.

Thank you so much for your time and expertise

Logged
Pages: [1]   Go Up
 

Page created in 0.027 seconds with 19 queries.