- Oct 9, 2002
- 28,298
- 1,235
- 136
I'm not trained as a web developer, but I'm often asked to make changes to the company web site. Over the years, I've picked up tiny bits of HTML knowledge and I probably don't do everything "the right way."
Since I've been the one to make minor changes to the company site for a few years now, I've figured out the basics of how PHP works and made significant changes to the code when necessary (thank you, Google!). I'm still clueless when it comes to SQL.
Now, my employer wants to redesign the site without paying to have a whole new site with new content built from scratch. It would use the existing CMS (which always feels deficient and I often have to edit HTML/PHP files manually). The CMS is the only way I know of to get certain content stored in the SQL database.
Basically, I think I'm going to re-write some PHP files to produce a different layout with the same content. I think I can do that. Almost none of the code is indented or readable without modification. It's going to take a lot of effort to make it readable, but I think I can do it.
The first order of business is the Flash banner on the main page. The CMS lets me upload pictures and the banner rotates through them by changing every 10 seconds or so. We want to replace it with something that's just HTML + JavaScript so it's more universally-compatible.
Can someone tell me how a Flash object like this gets the parameters that tell it which images to use?
This code seems to generate the <embed> object:
...there's currently no alternate content for users without Flash.
I've checked out the referenced functions in AC_RunActiveContent.js and can't find anything to hint where the Flash object gets the arguments to tell it which images to use.
The JavaScript version should use the same resource images that are managed from the CMS. Does that mean I would have to de-compile the SWF file somehow to see how it locates the images? Do SWF files have the ability to access an SQL database?
Thanks for any help / insight you can offer.
Maybe I'll view / edit the source code for the CMS page to see what it does with the images I upload.
Since I've been the one to make minor changes to the company site for a few years now, I've figured out the basics of how PHP works and made significant changes to the code when necessary (thank you, Google!). I'm still clueless when it comes to SQL.
Now, my employer wants to redesign the site without paying to have a whole new site with new content built from scratch. It would use the existing CMS (which always feels deficient and I often have to edit HTML/PHP files manually). The CMS is the only way I know of to get certain content stored in the SQL database.
Basically, I think I'm going to re-write some PHP files to produce a different layout with the same content. I think I can do that. Almost none of the code is indented or readable without modification. It's going to take a lot of effort to make it readable, but I think I can do it.
The first order of business is the Flash banner on the main page. The CMS lets me upload pictures and the banner rotates through them by changing every 10 seconds or so. We want to replace it with something that's just HTML + JavaScript so it's more universally-compatible.
Can someone tell me how a Flash object like this gets the parameters that tell it which images to use?
This code seems to generate the <embed> object:
Code:
<script language="JavaScript" type="text/javascript">
<!--
if (AC_FL_RunContent == 0 || DetectFlashVer == 0){
alert("This page requires AC_RunActiveContent.js.");
}else{
var hasRightVersion = DetectFlashVer(requiredMajorVersion, requiredMinorVersion, requiredRevision);
if(hasRightVersion){
// if we've detected an acceptable version
// embed the flash movie
AC_FL_RunContent(
'codebase', 'http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,24,0',
'width', '735',
'height', '261',
'src', 'homebanner',
'quality', 'high',
'pluginspage', 'http://www.macromedia.com/go/getflashplayer',
'align', 'middle',
'play', 'true',
'loop', 'true',
'scale', 'showall',
'wmode', 'transparent',
'devicefont', 'false',
'id', 'homebanner',
'bgcolor', '#ffffff',
'name', 'homebanner',
'menu', 'true',
'allowScriptAccess','sameDomain',
'allowFullScreen','false',
'movie', 'homebanner',
'salign', ''
); //end AC code
}else{
// flash is too old or we can't detect the plugin
var alternateContent = 'Alternate HTML content should be placed here.'
+ 'This content requires the Adobe Flash Player.'
+ '<a href=http://www.macromedia.com/go/getflash/>Get Flash</a>';
document.write(alternateContent); // insert non-flash content
}
}
// -->
</script>
I've checked out the referenced functions in AC_RunActiveContent.js and can't find anything to hint where the Flash object gets the arguments to tell it which images to use.
The JavaScript version should use the same resource images that are managed from the CMS. Does that mean I would have to de-compile the SWF file somehow to see how it locates the images? Do SWF files have the ability to access an SQL database?
Thanks for any help / insight you can offer.
Maybe I'll view / edit the source code for the CMS page to see what it does with the images I upload.
Last edited:
