Send link to all the Yahoo contacts Send link to all the Yahoo contacts
 

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

Send link to all the Yahoo contacts

Started by blackmamba, June 30, 2006, 12:48:02 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

blackmamba

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:
// 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:
//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.

Paver

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:
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.

augustin

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