Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#157 2005-10-14 16:43:32

blumie607
Member
Registered: 2004-03-08
Posts: 175
Website

Re: [plugin] [ORPHAN] vdh_flickr

<blockquote>
> larf wrote:

> EDIT: I just released 0.8.2.

Your problem most probably occurs because of php4 not being able to get the flickr xml file. In 0.8.1 I implemented only one method of getting the xml file (domxml_open_file) which does not seem to work on every host.
In 0.8.2 I’ve implemented three methods of receiving the xml file (curl, file_get_contents and domxml_open_file), and vdh_flickr automagically checks which one is available.

php5 still only uses simplexml_load_file. Anyone having problems with vdh_flickr and php?

So please try the new version and report back if it works for you. It could help me improve the plugin.

Greetings
Ralph
</blockquote>

Thanks. It works great.


bludrop studios .::. Creative Expression

Offline

#158 2005-10-14 17:08:57

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] vdh_flickr

Larf, is it possible to have a 0.7 version again before you can fix the issue ? Thank you by advance ;)


Nico

Offline

#159 2005-10-14 20:31:26

larf
Archived Plugin Author
Registered: 2005-01-31
Posts: 159
Website

Re: [plugin] [ORPHAN] vdh_flickr

OK, the old versions are online now.

But I’d like to get your issue resolved in the current version, so I will contact you soon, if you don’t mind.

Offline

#160 2005-10-15 07:26:14

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] vdh_flickr

No problem : I’ll try in a test install of TXP ;-) Thank you

Edit. A little more information, if it can help :

  • 0.8.1 : same problem
  • 0.8 is OK

Thank you again…

Last edited by Niconemo (2005-10-15 07:39:26)


Nico

Offline

#161 2005-10-15 08:32:09

larf
Archived Plugin Author
Registered: 2005-01-31
Posts: 159
Website

Re: [plugin] [ORPHAN] vdh_flickr

@ Niconemo:

I’ve just put 0.8.3 online, which adresses your problem. I hope this one will last longer.

Anyway, the next days are the last chance to utter feature requests. Soon university will take the most of the time of my daily work. Version 0.9 will most probably have pagination for set preview, because of the growing number of sets I have. Anything else that’s cool?

Offline

#162 2005-10-15 11:10:43

Niconemo
Member
From: Rhône-Alpes, France
Registered: 2005-04-18
Posts: 557

Re: [plugin] [ORPHAN] vdh_flickr

Everything’s fine with 0.8.3 :)

Once the documentation read from top to bottom… no more particular request for the moment. ;)


Nico

Offline

#163 2005-10-15 17:35:08

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Re: [plugin] [ORPHAN] vdh_flickr

First off, this is a great plugin and I have got it set up and working. Really sorry if this is easy but I just can’t seem to get my head around it.

Can somebody tell me if it’s possible to have the preview page output in the following way…

PREVIEW PAGE:

<code><dl>
<dt>Image and Title</dt>
<dd>Description</dd>
<dl></code>

TXP Possibly something like this…

PAGE =
<code><txp:vdh_flickr_set form=“flickr_preview wraptag=“dl” /></code>

FORM =
<code><dt><txp:vdh_flickr_set_link><txp:vdh_flickr_set_title /></txp:vdh_flickr_set_link></dt>
<dd><txp:vdh_flickr_set_description /></dd></code>

Cheers

Offline

#164 2005-10-15 17:49:13

larf
Archived Plugin Author
Registered: 2005-01-31
Posts: 159
Website

Re: [plugin] [ORPHAN] vdh_flickr

If I got your right, try this:

In the article or page template:
<txp:vdh_flickr nsid="123456N00” set_form=“flickr_preview” />@

And then create the form “flickr_preview” exactly as you described above.

Offline

#165 2005-10-15 20:22:56

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Re: [plugin] [ORPHAN] vdh_flickr

Thanks for your time Larf.
I used the tag as you suggested and added wraptag=“dl” but the dl didn’t show up in the code suggesting that wraptag doesn’t work here. I put a dl tag into the page (around the txp:vdh_flickr tag) but that just made it show up on the thumbnails and image pages too. Of course if I put the dl into the form it will just become part of the loop. I just need to get the wraptag to work without effecting the subsequent pages.

Earlier on I tried the vdh_flickr_if_preview tag but this produced no results (or maybe I used it wrongly), but could this be an option?

Again… thanks for you help!

Offline

#166 2005-10-15 20:43:39

larf
Archived Plugin Author
Registered: 2005-01-31
Posts: 159
Website

Re: [plugin] [ORPHAN] vdh_flickr

OK, first I must make clear what you mean.

Do you want this result (res1):
<code>
<dl>
<dt>Image and Title</dt>
<dd>Description</dd>
</dl>

<dl>
<dt>Image and Title2</dt>
<dd>Description2</dd>
</dl>
</code>

or this result (res2):
<code>
<dl>
<dt>Image and Title</dt>
<dd>Description</dd>
<dt>Image and Title2</dt>
<dd>Description2</dd>
<dl>
</code>

In order to achieve res1, use this form:
<code>
<dl>
<dt><txp:vdh_flickr_set_link><txp:vdh_flickr_set_title /></txp:vdh_flickr_set_link></dt>
<dd><txp:vdh_flickr_set_description /></dd>
</dl>
</code>

In order to achieve res2 (which I suppose you want), use this in a page template or in an article with textile turned off:
<code>
<txp:vdh_flickr_env nsid=“12345678@N00” set_form=“flickr_preview” />

<txp:vdh_flickr_if_preview><dl></txp:vdh_flickr_if_preview>
<txp:vdh_flickr />
<txp:vdh_flickr_if_preview></dl></txp:vdh_flickr_if_preview>
</code>

The form would be the same as the one you already use, but to avoid mistakes:
<code>
<dt><txp:vdh_flickr_set_link><txp:vdh_flickr_set_title /></txp:vdh_flickr_set_link></dt>
<dd><txp:vdh_flickr_set_description /></dd>
</code>

The if-tags are not documented any more, because they don’t work very reliable. I will have to sort this out some time. But in the case documented above, the are working just fine, I’ve tested it.

So I suppose you just try it out and report back.

Offline

#167 2005-10-15 21:05:26

Martagnan
Member
From: Humberside - uk
Registered: 2004-06-21
Posts: 90
Website

Re: [plugin] [ORPHAN] vdh_flickr

Thats got it!!! Thanks for that Larf! When and IF you get a chance (and just so I understand) will you explain whats going on there?

I have a request too… but that can wait for another day. ;-)

Very grateful for your time – thanks!

Offline

#168 2005-10-15 21:21:48

larf
Archived Plugin Author
Registered: 2005-01-31
Posts: 159
Website

Re: [plugin] [ORPHAN] vdh_flickr

OK, this is what’s going on:

vdh_flickr_env initializes the plugin, but does not output anything. That is why this tag and not vdh_flickr needs all the attributes. AFTER vdh_flickr_env you can use conditionals like vdh_flickr_if_preview. And vdh_flickr is used to generate the output.

The problem of the conditionals is, that until now, they are unreliable. If vdh_flickr_env receives an image id (…/gallery/?set=123456&img=1234567 in the url), vdh_flickr_if_img is true, if there is a set, but no img in the url (e.g. …gallery/?set=123456) vdh_flickr_if_thumbnails and vdh_flickr_if_set is true, and when there’s no img, set or tags in the url, vdh_flickr_if_preview is true, like in your case.

But there are cases when this will not work, like when you use s.th. like <txp:vdh_flickr_thumbnails nsid="43973976N00” latest=“80” random=“12” />@. This will show thumbnails, but vdh_flickr_if_thumbnails will not return true. I will have to work this part of the code over to be more reliable, then it becomes documented again.

Offline

Board footer

Powered by FluxBB