View Full Version : send to messenger
kreasta
09-28-2006, 02:56 PM
i`m thinking about an p2_news modification....
how you know, if u use the code
<a href="ymsgr:im?+&msg=your message">blabla</a>
you can send an Y!im with your message(like this (ymsgr:im?+&msg=Helllo subdrimers))... but.. how about sending our article to them...
<a href="ymsgr:im?+&msg=$Article_title<br>$article_text<br>$website_url">blabla</a>
i tryd to do this and ..logicaly...fail... so.. i`m asking you now.. :d
http://img224.imageshack.us/my.php?image=1vq7.png
oh.. and an option for disabling that link
sorry 4 my bad english and for my typos :d :(
Tobias
09-28-2006, 03:49 PM
Hello,
there are multiple problems you may run into with sending the actual article text:
text too large for single message, messenger might truncate it
the html link itself will not work with "plain" html tags, these need to be converted; however, the resulting link may also be way too long
I guess the safest way is to just send the link to the article, not it's contents.
$article_link = RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $articleid);
echo '<a href="ymsgr:im?+&msg=Please read the article here: '.$article_link.'">Message Article</a>';
Haven't tried it myself, though. :)
kreasta
09-28-2006, 04:18 PM
i trust your codes condev, becoase i know your creations... but... i don`t know where exactly i have to put-it in news.php?
sorry for my stupidity
kreasta
09-28-2006, 04:42 PM
It woooorkkkksssss
when was the last time i sad "i love you condev?"
oh.. enought whit this gay shitz.. thank`you.. workning
take the code
in news.php find:
// display email article link?
if(($article['settings'] & $p2_articlebitfield['displayemailarticlelink']) && $p2_settings['Enable Email Articles'] == 1)
{
echo '<img alt="" src="' . $sdurl . 'plugins/p2_news/email.gif" /> <a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $article['articleid'] . '&p2_action=emailarticle') . '">' . $p2_language['email'] . '</a><br />';
$displaylinebreaks = true;
}
and replace-it with
// display email article link?
if(($article['settings'] & $p2_articlebitfield['displayemailarticlelink']) && $p2_settings['Enable Email Articles'] == 1)
$article_link = RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $articleid);
{
echo '<img alt="" src="' . $sdurl . 'plugins/p2_news/email.gif" /> <a href="' . RewriteLink('index.php?categoryid=' . $categoryid . '&p2_articleid=' . $article['articleid'] . '&p2_action=emailarticle') . '">' . $p2_language['email'] . '</a> <img alt="" src="' . $sdurl . 'plugins/p2_news/yahoo.gif" /><a href="ymsgr:im?+&msg=Please read the article here: '.$article_link.'"> Send in messenger</a><br />';
$displaylinebreaks = true;
}
and put this image in your plugins/p2_news directory
http://img179.imageshack.us/img179/1656/yahoolk9.gif
vBulletin® v3.8.6, Copyright ©2000-2012, Jelsoft Enterprises Ltd.