View Single Post
  #1  
Old 04-18-2008, 10:18 AM
Conner85 Conner85 is offline
 
Join Date: Jan 2008
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default MySpace Player Plugin for IE

I've been using a plugin for musicians to be able to type their MySpace Friend ID into a profile field and have their MySpace player show up in their profile. The plugin uses CURL. But for some reason, it looks PERFECT in FireFox. While in IE7, anything below the MySpace player doesn't show up. It even takes my footer out.

Here is the code from the plugin hooking member_customfields...

Code:
require_once(DIR . '/includes/class_bbcode.php');
			$bbcode_parser =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
			$url = "http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=".$bbcode_parser->parse($userinfo["field71"],0, true);
			$user_agent = "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)";
			
			$ch = curl_init();    // initialize curl handle
			curl_setopt($ch, CURLOPT_URL, $url); // set url to post to
			curl_setopt($ch, CURLOPT_FAILONERROR, 1);              // Fail on errors
			curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);    // allow redirects
			curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); // return into a variable
			curl_setopt($ch, CURLOPT_PORT, 80);            //Set the port number
			curl_setopt($ch, CURLOPT_TIMEOUT, 15); // times out after 15s
			
			curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
			
			$document = curl_exec($ch);
			
			$myplayercode = "";
			if (stripos(html_entity_decode($document),"<object id=\"mp3player\""))
			{
				$start=stripos(html_entity_decode($document),"<object id=\"mp3player\"");	
				$end=stripos(html_entity_decode($document),"</object>");	
				$myplayercode = substr(html_entity_decode($document),$start,$end-$start);
			}
Now, I know it says compatible; MSIE 5.01; Windows NT 5.0, but is there any way at all to "make" it compatible for the later versions of IE?

Here's some of the code in my MEMBERINFO template to be sure it isn't an error on my part, or maybe a style issue. Couldn't paste it all due to the character limit.

Code:
<if condition="$userinfo[field71]">
     <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr class="alt2"> 
         <td class="alt2" align="left" valign="top">
               <center>$myplayercode</center>
         </td>
</tr>
</table>
<br />
</if>
<if condition="$template_hook[memberinfo_foruminfo]">
     <table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<tr class="tcat">
<td><strong><if condition="$userinfo[field53] OR $userinfo[field54]"><if condition="$userinfo[field53]">$userinfo[field53]'s</if><if condition="$userinfo[field54]">$userinfo[field54]'s</if><else />$userinfo[username]'s</if> Blogs</strong></td>
</tr>
<tr class="alt2">
<td class="alt2" valign="top">
$template_hook[memberinfo_foruminfo]
</td>
</tr>
</table><br /></if>
And below are two screen shots of what it looks like in both versions. Any help would be GREATLY appreciated.
Attached Images
File Type: jpg MSFF.jpg (65.9 KB, 0 views)
File Type: jpg MSIE.jpg (47.9 KB, 0 views)
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01226 seconds
  • Memory Usage 1,803KB
  • Queries Executed 12 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (2)postbit_attachment
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete