Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
urlencode output of <txp:title />?
Hi there,
I’m trying to create a del.icio.us bookmark link for individual articles, like this:
<code>
post to <a href=“http://del.icio.us/post?url=<txp:permlink />&title=<txp:title />”>del.icio.us</a>
</code>
Problem is, the title won’t get encoded properly for this to work.
Is there a way to urlencode the output of <txp:title />, or perhaps a better way to do this?
Last edited by Christopher (2006-08-31 16:00:21)
Offline
Re: urlencode output of <txp:title />?
Ar har!
I figured it out:
<code>
post to <a href=“http://del.icio.us/post?url=<txp:permlink />&title=<txp:php>$a = title (array ());echo urlencode($a);</txp:php>”>del.icio.us</a>
</code>
Last edited by Christopher (2006-09-20 13:29:32)
Offline
Re: urlencode output of <txp:title />?
awesome awesome awesome. A similar thing works for Digg ::
post to <a href="http://del.icio.us/post?url=<txp:permlink />&title=<txp:php>$a = title (array ());echo urlencode($a);</txp:php>">del.icio.us</a>
· <a href="http://digg.com/submit?phase=2&url=<txp:permlink />&title=<txp:php>$a = title (array ());echo urlencode($a);</txp:php>&bodytext=<txp:excerpt />&topic=<txp:category1 link=/"n/" />">
digg</a>
Yes, I have tried turning it off and on.
Offline
Re: urlencode output of <txp:title />?
For those linking to lots of bookmarking services, <a href=“http://www.ako-k.com/archive/150”>the ako_social plugin</a> might be of interest.
Offline
Re: urlencode output of <txp:title />?
Looks like the digg code only works if you have articles without excerpts – at least on my site.
Offline
Re: urlencode output of <txp:title />?
I modified the del.icio.us code for hugg.com and it seems to work:
<a href="http://www.hugg.com/submit?url=<txp:permlink />&title=<txp:php>$a = title (array ());echo urlencode($a);</txp:php>">hugg this</a>
Offline
#7 2006-09-24 20:25:09
- marc
- New Member
- Registered: 2006-09-24
- Posts: 2
Re: urlencode output of <txp:title />?
Elenita wrote:
For those linking to lots of bookmarking services, <a href=“http://www.ako-k.com/archive/150”>the ako_social plugin</a> might be of interest.
The text file for that seems to be broken and the site has not been updated since June. Might anyone else have it?
Offline
Re: urlencode output of <txp:title />?
No, the text file isn’t broken – that’s how plugins look (base64 encoding).
Offline
#9 2006-09-24 23:00:19
- marc
- New Member
- Registered: 2006-09-24
- Posts: 2
Re: urlencode output of <txp:title />?
Thank you! I should have looked closer.
Offline
Pages: 1