The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
I've been searching aimlessly to find a way to link the default picture on MySpace to the profile picture area in my users' profiles. Pretty much all they have to do is type in their MySpace user name and their default picture shows up. As well as auto-updating every time they change their default picture on MySpace. I finally came across PHP code, but I have NO CLUE how to turn it into a plugin. If anyone could help, it would be awesome.
Code:
<?php function grab_main_pic($url) { $ch = curl_init($url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); if (preg_match('/<a\s+id="ctl00_Main_ctl00_UserBasicInformation1_hlDefaultImage"[^>]+><img\s+src="([^"]+)"/si', curl_exec($ch), $mainpic)) { return $mainpic[1]; } return 'Failed to grab main pic.'; } echo grab_main_pic('http://www.myspace.com/$userinfo[field24]'); ?> |
#2
|
|||
|
|||
![]()
Not meaning to bump.. but.. no one at all?
|
#3
|
|||
|
|||
![]()
If you want to show the myspace profile picture on everypage for the user signed in.
Hook: global_start PHP Code:
Also single and double quotes mean different things. PHP Code:
|
#4
|
|||
|
|||
![]()
That seems to atleast get the plugin to respond. The way I was setting the plugin up was causing a bunch of errors. But now all it says is Failed to grab main pic. Is there anything I'm doing wrong?
By the way, thank you very much. |
#5
|
||||
|
||||
![]()
make sure curl is intalled and compiled on your server
|
#6
|
|||
|
|||
![]()
It's installed. Is there anything else it could be?
|
#7
|
|||
|
|||
![]()
Hmmmm.. Still saying Failed to grab main pic. Maybe the link needs to be changed into something like images.myspace.com? I've been trying to play around with it all I can. But as always, failed attempts.
|
![]() |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|