How to hard-code ecard "view more pictures" link ? How to hard-code ecard "view more pictures" link ?
 

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

How to hard-code ecard "view more pictures" link ?

Started by PakWaan, March 19, 2006, 03:08:27 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

PakWaan

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?

Stramm

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

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?

Stramm

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

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


Stramm

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

sagebear


sagebear

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

Stramm

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

sagebear

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.


Sami

#10
Try to change line 194 and line 119 to this :

'{VIEW_MORE_TGT}' => 'http://www.myurl.com',
‍I don't answer to PM with support question
Please post your issue to related board

sagebear

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.


Sami

‍I don't answer to PM with support question
Please post your issue to related board


Sami

Search the ecard.php , you'll find two

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

you should change them both to

'{VIEW_MORE_TGT}' => 'http://www.boundarygop.org',


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

sagebear

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

?

Sami

Then you need to also edit displaycard.php and replace

'{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
‍I don't answer to PM with support question
Please post your issue to related board

sagebear

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?


sagebear

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