E Card Hyperlink Above and Banner under Image E Card Hyperlink Above and Banner under Image
 

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]

Main Menu

E Card Hyperlink Above and Banner under Image

Started by WizBiz, December 16, 2003, 04:06:22 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

WizBiz

hello
i want add "send e-card" link above full size image in displayimage page en a banner under it.

what do i do & is this possible?

Beste regard,
Claudio (Netherlands)

Joachim Müller

yes, the template file for ecards can be modified as you wish, take a look at your theme file (/themes/yourtheme/theme.php) and search for// HTML template for e-cardsand modify the stuff that comes after it as you wish, but remember: the file itself is not being sent along with the email, only the html code is - if a user has disabled html downloads in his email client or is offline while reading the emails, he will see broken images (this applies of course to the pic sent as ecard as well).

GauGau

WizBiz

That isn't the thing i want to do :-)
On the page where the image is shown, i want to place the link above and under.
I have found the right spot in theme.php but nou i must figure a way to get the hyperlink to work and pointing to the e-card system.
This link
<a href="{ECARD_TGT}" title="{ECARD_TITLE}">
isnt working becourse of the html.
Any tips  :oops:

A sample you can find http://www.0906sex.nu/gallerie/

Joachim Müller

above link leads you possibly to an adult site - I wasn't able to find out, as I disabled scripting for security reasons and was sent back.
Please do always note with a link to a pron-related site that the visitor will be confronted with nudity for legal reasons (some people might get problems with their employers if they open porn sites).

@WizBiz: I didn't fully understand your problem. Could you describe it more detailed please?

GauGau

WizBiz

Oh  :oops:  i'm really sorry.

Here's a example of the thing i want to do:
This link can contain ADULT material

When the people click on the line:
"LEUK? STUUR DAN NU ALS E-CARD NAAR EEN KENNIS, KLIK HIER!"
they can sent a E-Card with that photo.

But i can't use the hyperlink <a href="{ECARD_TGT}" title="{ECARD_TITLE}">

how can i link to the e-card with this link?

Joachim Müller

ok, I get the idea...
The stuff you wanted to add<a href="{ECARD_TGT}" title="{ECARD_TITLE}">can only be used in template.html, as everything in curly braces will be replaced by some actual content when the template file is being parsed - you can't do that when you modify a coppermine core code file.
Instead, edit displayimage.php and find        $pic_html = "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";replace with        $pic_html='<a href="ecard.php?album='.$album.'&pid='.$pid.'&pos='.$pos.'">LEUK? STUUR DAN NU ALS E-CARD NAAR EEN KENNIS, KLIK HIER!</a><br />';
        $pic_html.= "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";


I haven't tested this, but this is the way to go, maybe there's a syntax error in above code that has to be corrected, but it'll give you an idea where to look.

GauGau

WizBiz

GauGau,

That worked! but......not al the way  :(

Some pics does show the link, some don't. I cant figure out why.

This one show's the link:
This picture shows the link (Clean picture)

This one doesn't show's the link:
This picture doesn't shows the link (Clean picture)

WizBiz


Joachim Müller

Try this code$pic_html='<a href="ecard.php?pos=-'.$pid.'">LEUK? STUUR DAN NU ALS E-CARD NAAR EEN KENNIS, KLIK HIER!</a><br />';
        $pic_html.= "<a href=\"javascript:;\" onClick=\"MM_openBrWindow('displayimage.php?pid=$pid&fullsize=1','" . uniqid(rand()) . "','scrollbars=yes,toolbar=yes,status=yes,resizable=yes,width=$winsizeX,height=$winsizeY')\">";
GauGau

WizBiz

I'm really sorry, but no.

Sometime's its showing te link, sometime's he doen's.

And when i click on the link, i get the error that this album doesn't excist.

Example: Here (Clean picture)

WizBiz

a combi of those two don't worked either *cry*

WizBiz

Sorry, that i disturb you with my problems, but i really think this will generate more e-cards from my site.
So, please please help me  :(

WizBiz

Isn't is possible? Or do'n't you have time.....
In case of "no time" i wish you and everybody on the board a nice Holiday

Joachim Müller

sorry, it's more a question of me being reluctant to code a modification I only see little use in. Getting this to work would basically mean some looking into it in detail. Try looking into the code a little harder for yourself...

GauGau

WizBiz

I have finded out why the links isn't schowing sometime's.
When the pic is bigger en i can open it in a popup, the link is showing, when the pics can't get bigger and the popup isn't  possible, there is no link showing.
You you ave any suggestion where i must look now?

Best regards,
Claudio

Oasis

you also need to replace
$pic_html = "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" /><br />\n";
with
$pic_html='<a href="ecard.php?pos=-'.$pid.'">LEUK? STUUR DAN NU ALS E-CARD NAAR EEN KENNIS, KLIK HIER!</a><br />';  
$pic_html .= "<img src=\"".$picture_url."\" {$image_size['geom']} class=\"image\" border=\"0\" /><br />\n";
Pixnet Gallery: http://www.pixnet.net
iNSiGNiA Weblog: http://www.jayliu.org

WizBiz

I haved figure it out for myzelf 2 ours ago, stil working to perfect it a litle :-)
TNX, works great!