vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   MySpace Player Plugin for IE (https://vborg.vbsupport.ru/showthread.php?t=176518)

Conner85 04-18-2008 10:18 AM

MySpace Player Plugin for IE
 
1 Attachment(s)
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.

Conner85 04-18-2008 11:58 AM

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.


All times are GMT. The time now is 09:17 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.00987 seconds
  • Memory Usage 1,721KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_code_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (2)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete