Author |
Message |
Steptoe
Involved
![Involved Involved](modules/Forums/images/ranks/4stars.gif)
![](modules/Forums/images/avatars/db59d0e0432a3ca97d73f.gif)
Joined: Oct 09, 2004
Posts: 293
|
Posted:
Wed Nov 16, 2005 5:02 pm |
|
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 |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
Site Admin/Owner
![](modules/Forums/images/avatars/45030c033f18773153cd2.gif)
Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Wed Nov 16, 2005 10:21 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Steptoe
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Nov 17, 2005 1:03 am |
|
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 |
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
VinDSL
Life Cycles Becoming CPU Cycles
![](modules/Forums/images/avatars/a22ae3b240f0eae302721.jpg)
Joined: Jul 11, 2004
Posts: 614
Location: Arizona (USA) Admin: NukeCops.com Admin: Disipal Designs Admin: Lenon.com
|
Posted:
Thu Nov 17, 2005 1:56 am |
|
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](modules/Forums/images/smiles/icon_wink.gif) |
_________________ .:: "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! ::. |
|
![ICQ Number ICQ Number](themes/RavenIce/forums/images/lang_english/icon_icq_add.gif) |
![](themes/RavenIce/forums/images/spacer.gif) |
Steptoe
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Nov 17, 2005 2:15 am |
|
hey cool...
I just have a small problem with that
Where do I put it? ![ROTFL](modules/Forums/images/smiles/rotfl.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Raven
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Nov 17, 2005 2:26 am |
|
$heigth = ""; // BTW, this is spelled HEIGHT
Please, to appease a grammar and spelling fanatic, correct that spelling ![ROTFL](modules/Forums/images/smiles/rotfl.gif) |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Steptoe
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Nov 17, 2005 2:51 am |
|
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
I edited my files and post up top. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
VinDSL
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Nov 17, 2005 4:56 pm |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
Steptoe
![](modules/Forums/images/avatars/gallery/blank.gif)
|
Posted:
Thu Nov 17, 2005 5:30 pm |
|
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. |
|
|
|
![](themes/RavenIce/forums/images/spacer.gif) |
|