Advanced search  

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]

Pages: [1]   Go Down

Author Topic: Send link to all the Yahoo contacts  (Read 13123 times)

0 Members and 1 Guest are viewing this topic.

blackmamba

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 22
Send link to all the Yahoo contacts
« on: June 30, 2006, 12:48:02 am »

Send link to all the Yahoo contacts
This mod will create a link inside the displayimage.php's INFO field specially crafted to pop-up "Send an instant message" window in Yahoo Messenger(windows).
You need this mod as a source of free & effective advertising for your gallery.

files to edit: 1 (displayimage.php)
time needed: ~30 sec
results: priceless advertising



Quote
open:
displayimage.php

find:
Code: [Select]
// with subdomains the variable is $_SERVER["SERVER_NAME"] does not return the right value instead of using a new config variable I reused $CONFIG["ecards_more_pic_target"] no trailing slash in the configure
after add:
Code: [Select]
//send link to all yahoo contacts
$info['Yahoo'] = '<a href="'. "ymsgr:im?+&msg=". $CURRENT_PIC_DATA[title] ."+http://www.yourdomain.com/displayimage.php?pos=-" . $CURRENT_PIC_DATA[pid] . '">' . "<b>send this pic to Yahoo Messenger contacts!</b>" . '</a>';

Important notice:
do remember to replace www.yourdomain.com from the obove line with the propper URL

That's it!

sample of this mod:
http://www.pozehaioase.ro/displayimage.php?pos=-2665

edit (by Paver): This mod works in both 1.3.x and 1.4.x so I removed the 1.4.x tag in the subject.
« Last Edit: June 30, 2006, 04:44:23 am by Paver »
Logged

Paver

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1609
  • Paul V.
Re: Send link to all the Yahoo contacts - cpg1.4.x
« Reply #1 on: June 30, 2006, 04:35:18 am »

You can also avoid modifying a core script by customizing a theme function.

In themes/yourtheme/theme.php, modify the function theme_html_picinfo as shown:
Code: [Select]
function theme_html_picinfo(&$info)
{
    global $lang_picinfo, $CURRENT_PIC_DATA;

    $info['Yahoo'] = '<a href="'. "ymsgr:im?+&msg=". $CURRENT_PIC_DATA[title] ."+http://www.yourdomain.com/displayimage.php?pos=-" . $CURRENT_PIC_DATA[pid] . '">' . "<b>send this pic to Yahoo Messenger contacts!</b>" . '</a>';
    $html = '';

    $html .= "        <tr><td colspan=\"2\" class=\"tableh2_compact\"><b>{$lang_picinfo['title']}</b></td></tr>\n";
    $template = "        <tr><td class=\"tableb_compact\" valign=\"top\" >%s:</td><td class=\"tableb_compact\">%s</td></tr>\n";
    foreach ($info as $key => $value) $html .= sprintf($template, $key, $value);

    return $html;
}
The 2 modifications to the default function are adding the global variable $CURRENT_PIC_DATA and adding the $info line after it.

If your theme.php doesn't have this function already, copy it from themes/sample/theme.php.  The easiest way to make sure you copy it properly is to copy it to a line above the last line ?> in your theme.php.
Logged

augustin

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 26
Re: Send link to all the Yahoo contacts
« Reply #2 on: November 05, 2008, 09:12:05 am »

I have tried this mod and it seems to not work.

Take a look

http://www.eyescoops.com/displayimage.php?album=lastup&cat=0&pos=1

Any help would be appriciated

Thanks
Logged
Pages: [1]   Go Up
 

Page created in 0.025 seconds with 20 queries.