PDA

View Full Version : Profile Enhancements - Flickr Integration


amykhar
24 Jun 2006, 01:13
This little mod will show your member's 5 most recent additions to Flickr on their profile pages. It is not a difficult install, but you do need to follow directions carefully.

This is built using phpFlickr, which you must download from:

http://www.phpflickr.com/

To install this mod, you should know how to:
1. Create a user profile field.
2. Install a product.
3. Download files and upload them to your server
4. Rename a directory on your server.
5. Edit a template
6. Edit a plugin.

whitetigergrowl
24 Jun 2006, 02:46
as much as I'd love to create an account to view the live demo....ummm no I'll pass.

Looks good from the pic though.

Benj
24 Jun 2006, 10:33
nice addon i might use it :D

Snake
24 Jun 2006, 14:29
Nice one! I'll install this in a minute! ;)

amykhar
24 Jun 2006, 23:38
I'm sorry. I forgot the member pages require login :blush: I'll zap that link.

Amy

Spleasure
25 Jun 2006, 21:19
Couldn't this be done with the much simpler javascript API so you don't need phpFlickr?

Amaranth
25 Jun 2006, 21:35
What would be great for the user is simply to insert an RSS link to his Flickr library, and the X latest pictures from this would be shown on his profile.

amykhar
26 Jun 2006, 02:39
Couldn't this be done with the much simpler javascript API so you don't need phpFlickr?
I avoid javascript whenever possible. It's satan's language ;)

amykhar
29 Jun 2006, 20:44
What would be great for the user is simply to insert an RSS link to his Flickr library, and the X latest pictures from this would be shown on his profile.
Why would this be better than simply putting in their username? I would think it would be easier for people to enter their username than an RSS link, and it has the same result in that it fetches the most recent pictures.

Mythotical
06 Jul 2006, 04:58
If anyone asks, this works perfect on 3.5.4, here is the edited xml file that will work with 3.5.4

Amy, hope you don't mind I edited the xml to work with 3.5.4

Cheers
Steve

amykhar
06 Jul 2006, 12:07
I don't mind a bit. :)

ashley53680
14 Jul 2006, 04:39
Wonderful!! (3.5.4)

Subfusion
10 Aug 2006, 22:58
I'm using this plugin with the Gold Release of version 3.6.0 and I get the following error:

The Flickr API returned error code #1: User not found

Any way I can fix this?

R1D1
22 Sep 2006, 08:41
Thanx thanx thanx! :) Cool.

R1D1
22 Sep 2006, 08:42
I'm using this plugin with the Gold Release of version 3.6.0 and I get the following error:

The Flickr API returned error code #1: User not found

Any way I can fix this?

Did you create the field an changed "field34" to your fieldnumber?

Subfusion
24 Sep 2006, 19:10
Did you create the field an changed "field34" to your fieldnumber?
Yes I did.

3dsoft
29 Sep 2006, 12:15
It would be nice if there would be an option of displaying tag based random pics from flickr (not user based).

amykhar
29 Sep 2006, 13:09
Let me see what I can do. Not promising anything though.

amykhar
29 Sep 2006, 13:16
Upon brief inspection, the flickr api doesn't do that - at least not that I see. BUT, you can use an RSS feed to do it:

http://www.flickr.com/services/feeds/docs/photos_public/

This allows you to return public pictures and filter by tags.

SpadMan
02 Oct 2006, 20:15
Does anyone have this working with phpFlickr Version 2.0.0 released 29 September 2006?

I'm getting the following:
Warning: Invalid argument supplied for foreach() in /member.php(832) : eval()'d code on line 15

SpadMan
03 Oct 2006, 16:32
I had to revert back to phpFlickr 1.6 to get this mod to work. I did notice that you get the same error I posted above if the flickr user has no public images.

SpadMan
05 Oct 2006, 14:43
I modified Amy's .xml file a wee bit to avoid the "Warning: Invalid argument supplied for foreach() in /member.php..." for flickr users with no public images. Now I'm a happy camper. Thanks for the mod Amy. :D

ABeautifulBrown
08 Oct 2006, 23:54
how'd you fix it, spad?

SpadMan
10 Oct 2006, 00:54
how'd you fix it, spad?

In product-amykhar_flickru.xml search for // Loop through the photos and output the html
and add this line above it if ($photos['photo']) {

Now find }]]></phpcode>
and replace it with }}]]></phpcode>

OpticalSerenity
06 Nov 2006, 17:13
Is there a way I can simply get a little Flickr icon by all the instant messaging icons in a postbit for people who choose to say they have a flickr account? Basically just clicking it and it takes you to their Flickr page...

edenx
07 Nov 2006, 02:25
Cool mod!
Any chance to make a Fotolog.com integration, just like this one?

Thanks!!

Ashiro
05 Jan 2007, 00:48
Thanksfor a great plugin. However, when I have installed it and followed all the procedures when I come to view a profile with the correct user profile field set, etc I get a completely blank screen. No output at all.

You can see an example here (not that it shows much): http://www.degenerates.co.uk/board2/member.php?u=1

Have you any idea what could be causing this? I'd be very grateful for your help.

corsacrazy
22 Jan 2007, 11:22
are there to be any additions and updates amy?

Ghosty
22 Jan 2007, 13:05
Ok, now that I've fixed the Member.php problem, I think I may have another issue.

I cant seem to display any info. I have entered in my username, but when I go to the profile page, it doesn't show anything...

Any ideas?

VBB 3.6.4

karabalsagun
30 Jan 2007, 14:46
I have the same problem..

karabalsagun
02 Feb 2007, 19:21
OK, found the problem... it doesn't work with phpFlickr-2 you must use 1.6 :)

Benj
31 Mar 2007, 12:35
ye run it with version with 1.6 and it works :D


Cheers

Tralala
31 Mar 2007, 15:51
Here's the fix (thanks hambil!) to get it to work with phpFlickr 2:

After some investigation it appears the flickr api has changed so that people_findByUsername now returns an array instead of the userid. The userid can than be retrieved via 'id' in the array.

Amy's code:

// Find the NSID of the username inputted via the form
$nsid = $f->people_findByUsername($userinfo['field5']);

// Get the friendly URL of the user's photos
$photos_url = $f->urls_getUserPhotos($nsid);

// Get the user's first 5 public photos
$photos = $f->people_getPublicPhotos($nsid, NULL, 5);


Updated code:

// Find the NSID of the username inputted via the form
$nsid = $f->people_findByUsername($userinfo['field5']);

// Get the friendly URL of the user's photos
$photos_url = $f->urls_getUserPhotos($nsid['id']);

// Get the user's first 5 public photos
$photos = $f->people_getPublicPhotos($nsid['id'], NULL, 5);


The code in question is in amy's "Get Flickr Pictures" plugin.

Worked for me, and now I have both this one as well as hambil's flickr BBcode working... with phpFlickr 2 installed.

Benj
01 Apr 2007, 19:59
whats the benifits of using version 2 for our purposes? am i right in thinking nothing?

Tralala
01 Apr 2007, 20:30
Well, for one thing, it's the common ground that allowed me to use both this mod, as well as the BBflickr code that hambil has shared:

http://www.vbulletin.org/forum/showthread.php?t=143578

(without the new code, and the edit I quoted above, amy's hack broke.)

As far as new features, with amy's Flickr-vb member profile integration, nothing going there. But it's nice to have the latest code, I suppose, in case future flickr-vb integration mods come out...

Benj
01 Apr 2007, 21:30
cheers for that

redseal
19 Sep 2007, 16:10
Is this working on 3.6.8?

Taragon
03 Mar 2008, 22:57
I have to admit I don't know anything about making add-ons (yet), but I believe this should make it pass w3 XHTML 1.0 Transitional validation.

----------------------------
flickr_user_bit

FIND:
----------------------------

<td class="alt1"><a href=$photos_url$photo[id]><img border='0' alt='$photo[title]' src="$photo_src"></a></td>

----------------------------
REPLACE with:
----------------------------

<td class="alt1"><a href="$photos_url$photo[id]"><img border="0" alt="$photo[title]" src="$photo_src" /></a></td>

----------------------------
Done!


I'm not really sure if it matters, but I am using Tralala/hambil's code http://www.vbulletin.org/forum/showpost.php?p=1216877&postcount=33

Still using it on my vb 3.7.0 Beta 5 board! Thanks amykhar!

Taragon
16 Jun 2008, 11:28
I sometimes recieve this error on my user profile page.
Does someone have any idea what might cause this? (running php5)

Warning: phpFlickr::require_once(HTTP/Request.php): failed to open stream: No such file or directory in [path]/phpFlickr/phpFlickr.php on line 90
Fatal error: phpFlickr::require_once(): Failed opening required 'HTTP/Request.php' (include_path='.:.:.:/usr/share/php5:/usr/share/php5/PEAR') in /srv/www/vhosts/die16-clan.com/httpdocs/forum/phpFlickr/phpFlickr.php on line 90

BeerLuver
24 Jun 2008, 22:45
Has anyone gotten this to work with 3.7.1? I tried installing it but was unable to get it working; produced some errors.

Hope someone can revamp this mod for latest versions of vbulletin ;)

HabboForum
21 Jan 2009, 19:34
I need something like this for 3.8. Shame this wasn't updated. :(

ywwz
27 Jul 2009, 13:31
I need something like this for 3.8. Shame this wasn't updated. :(

agreed.

Taragon
27 Jul 2009, 14:12
I'd take a look at www.vbulletin-germany.org, as I believe ragtek made something similar http://www.vbulletin-germany.org/showthread.php?t=5421

This product still works btw., just not under php5

Easific
02 Jan 2010, 17:03
I know this will sound really vague, but what all do I need to read and understand for making this product work under vb4.0

Since the mod itself is 3.5 years old, a lot must have changed. I really need something like this.