Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2009-10-28 20:11:13

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: an7_flickr

Hi John,

I’ve got this working – I’ve stopped hak_tinymce working on the article body.

I’ve also made a few changes.
I wanted to embed medium images and lightbox large images.

I’ve done what Niconemo mentioned splitting the $thumb I chose to name it $thumb_admin.

So in the plugin code.

$thumb_admin = "square_url"; $thumb = "med_url"; $full = "large_url";

also further down the plugin code.

change $thumb to $thumb_admin as below

$flickrset = <<<EOF <script type="text/javascript" src="$path?user=$user&page=$page&per_page=$per_page"></script> <script type="text/javascript"> for (key in js_flickr['$user']) { document.write("<a href=\"#body\" ><img src=\""+ js_flickr['$user'][key]['$thumb_admin'] +"\" onClick=\"append('"+ js_flickr['$user'][key]['$thumb'] +"', '"+ js_flickr['$user'][key]['$full'] +"', '"+ escape(js_flickr['$user'][key]['title']) +"', '"+ js_flickr['$user'][key]['page_url'] +"');return false;\" style=\"margin: 5px 5px 0 0;\" \/></a>"); } </script> EOF;

In js_flickr.php you need to add this line to the array around line 112.

$array_text = $array_text . buildJSFlickrArrayEntry(getFlickrImageURL($obj,'b'),$key,$photo['id'],'large_url');

Thanks for this. It is going to make me photoblog again!


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#14 2009-10-29 01:47:26

iaian7
Plugin Author
From: US
Registered: 2006-12-05
Posts: 57
Website

Re: an7_flickr

@geoff777 – Glad you got it working! I wish there was a way to work with TinyMCE, but I can’t get anything, even regular TXP tags, to stay around. Everytime I save an article with TinyMCE enabled, everything but the plain text is unceremoniously stripped out. :(

@Daragh – I’ve used a relative path like this – “/js/js_flickr.php”, though an absolute path should work as well (“http://www.domain.com/js/js_flickr.php”).


VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios

Offline

#15 2009-10-30 17:35:14

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: an7_flickr

Hi, the most recent thumbs from the photostream are appearing but not in the true order of the photostream. More noticable if you increase the number.

Is this fixable or just the way this works?

Thanks Geoff


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#16 2009-10-31 04:49:03

iaian7
Plugin Author
From: US
Registered: 2006-12-05
Posts: 57
Website

Re: an7_flickr

Unfortunately, that’s the way it works; the images are returned by Flickr without any ordering at all.

Do you know if the image ID is sequential or not? It might be possible to add sorting if they are… hmm.


VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios

Offline

#17 2009-10-31 20:13:49

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: an7_flickr

I don’t sorry.

The plugin will save me time but would be better if the photos were in photostream order for a more natural blogging interaction.
If thats down to Yahoo/Flickr – not a lot we can do?

Last edited by geoff777 (2009-10-31 20:16:40)


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#18 2009-11-07 16:56:19

iaian7
Plugin Author
From: US
Registered: 2006-12-05
Posts: 57
Website

Re: an7_flickr

geoff777 wrote:

The plugin will save me time but would be better if the photos were in photostream order for a more natural blogging interaction.
If thats down to Yahoo/Flickr – not a lot we can do?

It doesn’t appear that Flickr IDs are at all related to order – upload order, perhaps, but not actual photostream order (which makes sense, the ID has to be unique and constant, while the photostream can be reordered at will). Unless Flickr adds a sortable identifier to each photo, I don’t think there’s anything else that can be done. I’ll check with the guy that designed the Flickr integration just to be sure.


VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios

Offline

#19 2009-11-17 10:13:41

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: an7_flickr

Hi

I’m getting dome character code in the Title …. %20 instead of a space any cure for this?


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#20 2009-11-18 05:00:21

iaian7
Plugin Author
From: US
Registered: 2006-12-05
Posts: 57
Website

Re: an7_flickr

geoff777 wrote:

Hi I’m getting dome character code in the Title …. %20 instead of a space any cure for this?

Are you seeing this in the actual page itself, or just in the editing window? There were some issues with special characters in Flickr names, so the entities are often encoded to prevent issues with the javascript. They shouldn’t be showing up when the page is displayed on your site.

Iaian7 / John Einselen


VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios

Offline

#21 2009-11-20 14:52:50

geoff777
Plugin Author
From: Benarrabá Andalucía Spain
Registered: 2008-02-19
Posts: 282
Website

Re: an7_flickr

Hi John

Yes it is appearing in the title of the slimbox.

Try this page from the site I’m using it on.

Andalucia Blog

5th photo down – the tree & sky.

Should read “Madroño Strawberry Tree”

The ñ and spaces are not correctly displayed.

Thanks Geoff

Last edited by geoff777 (2009-11-20 14:53:08)


There are 10 types of people in the world: those who understand binary, and those who don’t.

Offline

#22 2009-11-23 07:37:26

iaian7
Plugin Author
From: US
Registered: 2006-12-05
Posts: 57
Website

Re: an7_flickr

Ah! I think I may know what’s going on here… the javascript that inserts the code has major issues with special characters, and requires careful encoding to prevent failure to run. I’ll need to fix it so titles are un-encoded when printed to the text area. I can’t make the modifications and tests necessary at the moment (it may be a couple week before I have time), but till an “official” update is released, this is what needs to happen:

• Modify the plugin javascript to un-encode characters while printing to the text area.

or

• Modify Slimbox’s title display to output the correct un-encoded text.

Sorry I can’t help more immediately,
Iaian7 / John Einselen


VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios

Offline

#23 2010-01-22 16:14:13

decoderltd
Member
From: London
Registered: 2006-06-20
Posts: 248
Website

Re: an7_flickr

Hi,

Great plug-in John, I’ve been looking for something like this to display Flickr streams.

I’ve no real experience with Javascript and run into a couple of very basic problems. I’m a little confused as to exactly where I need to add the script path in js_flickr.php, I can’t see a line that would do that. And finally, Would I be right in thinking that everywhere 'username' appears I should insert my own username?

Thanks for any help.

Offline

#24 2010-01-22 16:42:21

iaian7
Plugin Author
From: US
Registered: 2006-12-05
Posts: 57
Website

Re: an7_flickr

Once you’ve entered your Flickr API in one of the first lines, you shouldn’t need to make any more changes to the .php file at all. All other settings are in the TXP plugin (such as the location of the .php file on your server, so TXP can find it).

Hope that helps,

Iaian7 / John Einselen


VFX artist, photographer, designer, CG generalist, and hobbyist web developer
My TXP sites: blog | reels | portfolios

Offline

Board footer

Powered by FluxBB