Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

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

greenrift
Archived 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
Archived 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
Registered: 2004-02-23
Posts: 730

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
Archived 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

#11 2004-12-01 15:26:11

jonhicks
Member
From: Oxfordshire UK
Registered: 2004-03-22
Posts: 256
Website

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

Make sure you get the cache working properly. I never managed to set it up properly and got banned!


Cheers,
Jon VC#9

Offline

#12 2004-12-01 16:29:19

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

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

Umm, I don’t quite know what to say Jennifer. Remvoe all the options except for “username” and double check that. Also update to the newest version.

Notice: Update to the newest version. Then make sure that there are jibberish named files being placed into your images directory (the one where the images and stuff you upload goes to). This means that the MagpieRSS cache is working properly.

You will notice that adding new links isn’t instanteous, thats because the cache will update every hour. This can be changed if you really want it to, but I would let it drop down to more than an update every 5 minutes (in order to change it, you have to change the “MAGPIE_CACHE_AGE” constant to 60*[however many minutes you want its life to be]). This is done by opening up the plugin, changing the value after MAGPIE_CACHE_AGE and then saving the plugin.

Last edited by greenrift (2004-12-01 20:03:07)

Offline

Board footer

Powered by FluxBB