Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's
Author Message
Steptoe
Involved
Involved


Joined: Oct 09, 2004
Posts: 293

PostPosted: Wed Nov 16, 2005 5:02 pm Reply with quote

Im trying to fish a block made from concepts of several other blocksadding a swf in the lower part.
At the moment it needs clockcaander sql to call it even thu I have changed paths and stuff. I want to be able to remove the clockcalaner db and have it as a 'standalone' block.
I have edited it down to this but if I remove anything else or the db I either get a spave with no .swf showing or a black background.
Most what I have here so fat is from nuke how to... and post here.
This is the lower 1/2 of the block

Code:
} 

setTimeout('WorldClock()',1000);
}
window.onload=WorldClock
</s~cript>";   

///above is bottom part of the top 1/2 of the block

global $prefix, $db;
    $result = $db->sql_query("SELECT lang, type, color, width, height, background, dir from ".$prefix."_clockcalendar");
    list($lang, $type, $color, $width, $heigth, $background, $dir) = $db->sql_fetchrow($result);
       
        if ($background == "0" OR $background == "") {
    $background2 = "transparent";
    $background = "#$background";
    }
    else {
    $background2 = "";
    $background = "#$background";
    }

$content .= "<TABLE width='100%' height='100' border=0 cellPadding=0 cellSpacing=0>
<TBODY><TR><TD align=left><center><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='$width' HEIGHT='$heigth'ALIGN=''>
  <param name=\"movie\" value=\"/images/blocks/WorldTime.swf\">
      <param name='wmode' value='$background2'>
    </EMBED></OBJECT></center></TD></TR></TBODY></TABLE>";
$content.="</tr></table></td></tr></table>";
?>

_________________
My Spelling is NOT incorrect, it's Creative

Last edited by Steptoe on Thu Nov 17, 2005 1:32 am; edited 1 time in total 
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 17086

PostPosted: Wed Nov 16, 2005 10:21 pm Reply with quote

Remove these 2 lines
global $prefix, $db;
$result = $db->sql_query("SELECT lang, type, color, width, height, background, dir from ".$prefix."_clockcalendar");


Then convert this line
list($lang, $type, $color, $width, $heigth, $background, $dir) = $db->sql_fetchrow($result);
to
$lang = '';
$type = "";
$color = "";
$width = "";
$heigth = ""; // BTW, this is spelled HEIGHT
$background = "";
$dir = "";


Now, you will need to assign those settings values to use them.
 
View user's profile Send private message
Steptoe
PostPosted: Thu Nov 17, 2005 1:03 am Reply with quote

Sweet..had a play with a bit of stuff there to
ended up with this, seems to work well.
Stiil trying to figure out the daylight savings stuff in the top 1/2 of the block thu..(dig dig lol)
Code:
/*

global $prefix, $db;
    $result = $db->sql_query("SELECT lang, type, color, width, height, background, dir from ".$prefix."_clockcalendar");
    list($lang, $type, $color, $width, $heigth, $background, $dir) = $db->sql_fetchrow($result);
  if ($background == "0" OR $background == "") {
    $background2 = "transparent";
    $background = "#$background";
    }
    else {
    $background2 = "";
    $background = "#$background";
    }
*/
///$lang = '1';
///$type = "0";
///$color = "0";
$width = "130";
$HEIGHT = "130";
$background2 = "transparent";
$dir = "images/blocks/";
////  Now, you will need to assign those settings values to use them. (from out of the table then delete table)
///Above fixed with help from  http://ravenphpscripts.com/modules.php?name=Forums&file=viewtopic&p=52311#52311 

$content .= "<TABLE width='100%' height='100' border=0 cellPadding=0 cellSpacing=0>
<TBODY><TR><TD align=left><center><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='$width' HEIGHT='$heigth'ALIGN=''>
  <param name=\"movie\" value=\"/images/blocks/WorldTime.swf\">
      <param name='wmode' value='$background2'>
    </EMBED></OBJECT></center></TD></TR></TBODY></TABLE>";
$content.="</tr></table></td></tr></table>";
?>


Last edited by Steptoe on Thu Nov 17, 2005 2:38 am; edited 1 time in total 
VinDSL
Life Cycles Becoming CPU Cycles


Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com

PostPosted: Thu Nov 17, 2005 1:56 am Reply with quote

As an aside, for security purposes, you might want to throw this in there...

Code:
<PARAM NAME=\"AllowScriptAccess\" VALUE=\"never\">

No reason to encourage XSS on your website! Wink

_________________
.:: "The further in you go, the bigger it gets!" ::.
.:: Only registered users can see links on this board! Get registered or login! | Only registered users can see links on this board! Get registered or login! ::. 
View user's profile Send private message Visit poster's website ICQ Number
Steptoe
PostPosted: Thu Nov 17, 2005 2:15 am Reply with quote

hey cool...worship
I just have a small problem with that Blonde Moment


Where do I put it? ROTFL
 
Raven
PostPosted: Thu Nov 17, 2005 2:26 am Reply with quote

$heigth = ""; // BTW, this is spelled HEIGHT

Please, to appease a grammar and spelling fanatic, correct that spelling ROTFL
 
Steptoe
PostPosted: Thu Nov 17, 2005 2:51 am Reply with quote

pfff... lol I change $heigth to $HEIGHT and the .swf file is a minute dot??

Never mind found this also spelted wrong lol
WIDTH='$width' HEIGHT='$heigth'ALIGN=''>
Oh well there is a post either here , karakas or 'cops that has the mistake
I TOLD u my coding was copy paste cross the fingers (cpcf) coding ROTFL
I edited my files and post up top.
 
VinDSL
PostPosted: Thu Nov 17, 2005 4:56 pm Reply with quote

Steptoe wrote:
hey cool...worship
I just have a small problem with that Blonde Moment

Where do I put it? ROTFL


This isn't exactly to the point, but if you read between the lines, it will give you a general overview of the situation.
Only registered users can see links on this board! Get registered or login!

Bottom line: ALWAYS add this to your Flash scripts... Wink
 
Steptoe
PostPosted: Thu Nov 17, 2005 5:30 pm Reply with quote

Thanks m8...when I look at code, I sort of understand what it is doing...the basic principles...
So I did put it at the end in the mean time, more good guess than management lol
I can do that with music to. I know this sounds strange, but to actually right code or play music...even English, the grammar side, I'm not to bad at when writing official reports and letters...but the spelling is atrocious.

I do googles etc and play around off and on over several weeks before posting anything.
This thread the stuff u guys have added and explained is the most simple AND COMPLETE explanations of how to add a flash to a block anywhere I can find.
I dont give compelements...I just state how I see it ok.
Thu I realy apreachiate the help guys...not just here but in other posts to.
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> How To's

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 ©