Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
  #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
  #2  
Old 04-18-2008, 11:58 AM
Conner85 Conner85 is offline
 
Join Date: Jan 2008
Posts: 129
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nevermind.

I figured out the problem. The </object> tag doesn't show up in IE.

So for anyone else having this problem, add </object> after $myplayercode.

So it looks like this $myplayercode</object>

The object isn't closed. Therefore, nothing written after the flash document will show up because it's covered by the flash document.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:20 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04208 seconds
  • Memory Usage 2,194KB
  • Queries Executed 14 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (2)post_thanks_box
  • (2)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (2)post_thanks_postbit_info
  • (2)postbit
  • (2)postbit_attachment
  • (2)postbit_onlinestatus
  • (2)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete