Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
gator
Hangin' Around


Joined: Jul 24, 2003
Posts: 36
Location: Canada

PostPosted: Sat Aug 14, 2004 11:29 am Reply with quote

Basically I am trying to grab a flash file from another website and incorporate it into a block. The flashfile contains the total olympic medal count by country.

Here is the medal count source page I want to include in my block.

Only registered users can see links on this board! Get registered or login!

The flash file called:

Only registered users can see links on this board! Get registered or login!


Here is the code I have so far:

Code:
<?php 


if (!eregi("modules.php", $PHP_SELF)) {
die ("You can't access this file directly...");
}
$index = 0; // 0 : do not show right blocks - 1:show right blocks
require_once("mainfile.php");
$module_name = basename(dirname(__FILE__));
include("header.php");
OpenTable();

echo "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"600\" height=\"450\"> "
."<param name=\"movie\" value=\"http://www.tsn.ca/flash/olympics/medals/on_flash_med_table.swf\">"
."<param name=quality value=high> "
."<embed src=\"http://www.tsn.ca/flash/olympics/medals/on_flash_med_table.swf\"  quality=high pluginspage=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" type=\"application/x-shockwave-flash\" width=\"600\" height=\"450\"></embed>"
."</object>";

CloseTable();
include("footer.php");
?>


The error message I am recieving is:
Quote:
You can't access this file directly...


Thanks...incidently I also posted this at NC...don't ask me why Rolling Eyes
 
View user's profile Send private message Visit poster's website
GanjaUK
Life Cycles Becoming CPU Cycles


Joined: Feb 14, 2004
Posts: 633
Location: England

PostPosted: Sat Aug 14, 2004 12:27 pm Reply with quote

You said you was trying to create a block? The above looks more like a module to me Laughing You should open up one of the blocks already in nuke and take a look how they work, see if you have some more luck.


EDIT:

I had a look at this one, it loads up a preloader then fades to white. I believe the movie is looking for a 2nd movie to play, or the xml with the medal data. In either case its looking for these files on your own server and of course the data is not on your server, so I don't think you will be able to get this flash to work on your site period.

For reference purposes here is the block I knocked up quickly.

Code:


<?php

if (eregi("block-Medals.php", $_SERVER['SCRIPT_NAME'])) {
    Header("Location: index.php");
    die();
}

$content = "<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0\" width=\"160\" height=\"240\" id=\"on_flash_med_table\">
<param name=\"movie\" value=\"http://www.tsn.ca/flash/olympics/medals/on_flash_med_table.swf\">
<param name=\"quality\" value=\"high\">
<param name=\"bgcolor\" value=\"#ffffff\">
</object>";

?>

_________________
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
gator
PostPosted: Sat Aug 14, 2004 4:08 pm Reply with quote

This code seems to do it. Thanks for the help Smile RavensScripts

Code:
<?php 


if (eregi("block-Search.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$content  .= "<iframe src=\"http://www.tsn.ca/flash/olympics/medals/on_flash_med_table.swf\" name=\"Medals\" scrolling=\"no\" frameborder=\"no\" align=\"center\" height = \"275px\" width = \"155px\">";
$content  .= " . \</iframe>";
?>


Last edited by gator on Sun Aug 15, 2004 12:28 pm; edited 3 times in total 
GanjaUK
PostPosted: Sat Aug 14, 2004 4:42 pm Reply with quote

It's dirty but at least it works. Wink
 
oprime2001
Worker
Worker


Joined: Jun 04, 2004
Posts: 119
Location: Chicago IL USA

PostPosted: Sat Aug 14, 2004 8:05 pm Reply with quote

Here's another one -- using Only registered users can see links on this board! Get registered or login!
Code:
<?php


if (eregi("block-Search.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

$content  .= "<iframe src=\"http://cbs.sportsline.com/olympics/box-scoreboards?qs_single=1\" name=\"Medals\" scrolling=\"no\" frameborder=\"no\" align=\"top\" width=\"143\" height=\"275\">";
$content  .= " . \</iframe>";
$content  .= "<center><a href=\"http://cbs.sportsline.com/olympics/summer/medaltracker\" target=_blank>All medals</a></center>";
?>

I'm not sure what that if-clause at the top does, but I just left it. Is the if-clause necessary?
 
View user's profile Send private message
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©