PDA

View Full Version : Add "tweeter export news link via api" to article list


Q_Line
08-20-2009, 08:59 AM
How to add for example "tweeter export news link via api" to Article list inside administration. Now we have something like this:

ARTICLE TITLE
Admin on 20 August 2009 in News with 3 comments and 5 tags

Is it possible this:

ARTICLE TITLE
Admin on 20 August 2009 in News with 3 comments and 5 tags export news to twetter

This is possible I think, but my only problem now is to add text and url like this inside vte code:

echo '<a href="http://tweeter.com/api?key=xxxxx&what=public&text=', urlencode($article.get_title), urlencode($article.get_absolute_href), '" target="_blank">';

Output tweet code:

News title - News url address

Any help!
p.s. Tweeter is here only for example, I will use another popular local service in my country

krcko
08-20-2009, 09:58 AM
try editing admin/templates/articles/list.xml template, around line 229 there should be this:

<vte:value select="{LNG_ADMIN_TAGS|strtolower}" />

below that line insert following:

<a href="http://tweeter.com/api?key=xxxxx&what=public&text={article.get_title|urlencode}-{article.get_absolute_href|urlencode}" target="_blank">export news to twitter</a>

Q_Line
08-20-2009, 10:19 AM
try editing admin/templates/articles/list.xml template, around line 229 there should be this:

<vte:value select="{LNG_ADMIN_TAGS|strtolower}" />

below that line insert following:

<a href="http://tweeter.com/api?key=xxxxx&what=public&text={article.get_title|urlencode}-{article.get_absolute_href|urlencode}" target="_blank">export news to twitter</a>


It works!

Only problem is with " sign inside article title. The result is as andquot; text!?