Textpattern Forum

You are not logged in. Register | Login | Help

#1 2004-11-30 03:03:58

greenrift
Plugin Author
Registered: 2004-03-08
Posts: 186
Website

[plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

Inspired by Jon Hick’s Sidebar Links with Del.icio.us and wanting something that was easy to use, I wrote up txp.icio.us really quickly.

All it requires is the plugin itself, and some files from MagpieRSS.

TXP.icio.us

Last edited by greenrift (2006-11-07 05:23:16)

Offline

#2 2004-11-30 03:58:56

Trip
New Member
Registered: 2004-08-14
Posts: 8
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

Sorry, which version DOES it work for? I currently have RC1 and would be keen to see it working on that version….

Last edited by Trip (2004-11-30 04:02:56)

Offline

#3 2004-11-30 04:15:23

greenrift
Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

RC1 users:

Install the plugin and everything as it says, then click on on the TXP.icio.us link in your plugins tab (where you would go to see the documentation and the code of the plugin).

In the part where it says:

extract(lAtts(array( ... ));

replace with:

extract($atts);
$form = isset($form) ? $form : 'plainlinks';
$username = isset($username) ? $username : '';
$maxitems = isset($maxitems) ? $maxitems : 10;
$exclude = isset($exclude) ? $exclude : '';
$wrap = isset($wrap) ? $wrap : '';
$break = isset($break) ? $break : '';

Then save the plugin and it should work (it definitely will if don’t use the wrap or break options).

Last edited by greenrift (2004-11-30 04:17:19)

Offline

#4 2004-11-30 04:23:50

Trip
New Member
Registered: 2004-08-14
Posts: 8
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

Magic. Thanks very much!

Also, for me at least, I would find it easier to include a tag rather than exclude many tags. For example, if I wanted items to appear on my sidebar I would include a sidebar tag when posting to del.icio.us.

How hard would it be to adapt the plugin to do this?

Offline

#5 2004-11-30 04:44:58

Andrew
Plugin Author
From: California
Registered: 2004-02-23
Posts: 730
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

haha — I knew this one was coming sooner or later. I’ve still got on my notepad a note to look into making something like that. thanks for saving me the time!

Offline

#6 2004-11-30 05:41:21

greenrift
Plugin Author
Registered: 2004-03-08
Posts: 186
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

<blockquote>
> Trip wrote:

> Magic. Thanks very much!

> Also, for me at least, I would find it easier to include a tag rather
> than exclude many tags. For example, if I wanted items to appear on
> my sidebar I would include a sidebar tag when posting to del.icio.us.

> How hard would it be to adapt the plugin to do this?
</blockquote>

On the line where it says if( arrayvals_in_array($exclude ... put an exclamation point (!) in front of the arrayvals_in_array and it will make the exclude attribute behave like an “only include if”. This isn’t a perfect solution (the perfect being have del.icio.us only return the links with tags we want), but it will work for the time being.

There are a few little things I’m going to add later, but right now I really want to finish testing my new version of albumpattern, oh and studying for the five finals that I’m going to fail.

edit: Anyone else hate how this forum does quotes? It makes quoting stuff more confusing than it should be. Can’t it just automatically wrap everything in a blockquote tag?

Last edited by greenrift (2004-11-30 06:01:23)

Offline

#7 2004-11-30 06:22:13

Trip
New Member
Registered: 2004-08-14
Posts: 8
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

I have adapted the plugin to include one tag only from the feed itself.

I simply added this line below the identical $exclude line:
$include = isset($include) ? $include : '';

and then added include to the rss feed URL line:
$yummy = fetch_rss("http://del.icio.us/rss/".$username."/".$include);

Obviously it needs to be adapted further to have multiple includes using the del.icio.us format http://del.icio.us/rss/username/tag1+tag2+tag3

Last edited by Trip (2004-11-30 06:26:16)

Offline

#8 2004-11-30 06:32:13

Trip
New Member
Registered: 2004-08-14
Posts: 8
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

I am not thinking today! You can do what I am asking just by using the username field as thus:

<txp:txp_icio_us username="your_delicious_username/tag1+tag2+tag3" />

This obviously involves no editing of the plugin at all! Much simpler…

Offline

#9 2004-12-01 05:58:13

Trip
New Member
Registered: 2004-08-14
Posts: 8
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

Gotta question greenrift,

This plugin doesn’t appear to cache the results? If del.icio.us is down then I get error messages above my header.

Is there something else I am meant to be doing to cache the results so it only grabs them when they are updated (and also that it will display cached results if del.icio.us is down)?

Offline

#10 2004-12-01 12:57:22

Jennifer
Member
From: Michigan
Registered: 2004-02-25
Posts: 74
Website

Re: [plugin] [ORPHAN] txp.icio.us - Del.icio.us bookmarks made easy

I get no output from the tag – only a few blank lines.

I have the latest build of Textpattern. Magpie files are in my texpattern directory. The plugin is installed and active. My username is correct, and is included in the tag.

What can I do?

Offline

Board footer

Powered by FluxBB