Author |
Message |
SV_JJSKID
New Member


Joined: Sep 06, 2004
Posts: 11
|
Posted:
Mon Sep 06, 2004 12:50 am |
|
Hi,
I'm new to the forum and have been able to do just about everything I wanted to do with my site thanks to this forum:) Between this site and PHPNUKE I've become interested in building websites again and have also gotten my brain racked with learning php. But alas, I have hit a bump and now I need some specific help.
Today, I spent all afternoon making a swell flash .swf for my Freelancer clan site http://fl.sv1web.com and I got it to work by editing the file: header.html simply enough and added this code on line 3. In my search I noticed others with .swf troubles so here's my simplistic solution.
_______________________________________________________________
<td align="center" <object width="100%" height="155"><param name="movie" value="hmdl.swf"> <embed width="755" height="155" src="themes/subBlack3dBlue/forums/images/hmdl.swf"></embed></object></a></embed></td>
_______________________________________________________________
All that worked great and I like the way it looks with my theme BUT.... I don't like that it's on every page of the site because it's about 72Kb and also because the sounds I put in it get old after changing pages a few times.
What I would like to do is to point the site index to a special header file maybe e.x. header2.html. Then and add a new, smaller, less noisy .swf to the original header.html for every other page generated on the site. I'm hoping that the index alone can be pointed to header2.html, and leave the rest of the site pointing to the original header.html that it would save alot of editing.
A bit long winded I know but that's my process at work Any help would be appreciated. Thank you
SV_JJSKID |
|
|
|
 |
GanjaUK
Life Cycles Becoming CPU Cycles

Joined: Feb 14, 2004
Posts: 633
Location: England
|
Posted:
Mon Sep 06, 2004 9:43 am |
|
SV_JJSKID, have you thought about maybe using a splash page with your noisy flash on? That way people will only hear it once before they enter the site. As users would be hitting the index a fair bit and it might be just as annoying.
You could still achieve what you was looking for originally by coding theme.php a little but what I suggested above might be the better solution. What do you think? |
_________________ Only registered users can see links on this board! Get registered or login! |
|
|
 |
SV_JJSKID

|
Posted:
Mon Sep 06, 2004 5:52 pm |
|
While a splash page would do the trick I've used them on other sites and users would still get them as they entered the site anyway so I personally would rather just get to the index where the links are. I'm more interested in going the themes.php route but it's really beyond my abilities with php now, I'm still learning. |
|
|
|
 |
GanjaUK

|
Posted:
Mon Sep 06, 2004 7:46 pm |
|
Open up theme.php we are working in the Function themeheader() section. Add $home to the globals.
Then add this code somewhere below:
Code:
if ($home==1) {
$header_flash = "<object width=\"100%\" height=\"155\"><param name=\"movie\" value=\"MOVIE1.swf\"> <embed width=\"755\" height=\"155\" src=\"/themes/subBlack3dBlue/forums/images/MOVIE1.swf\"></embed></object>";
} else {
$header_flash = "<object width=\"100%\" height=\"155\"><param name=\"movie\" value=\"MOVIE2.swf\"> <embed width=\"755\" height=\"155\" src=\"/themes/subBlack3dBlue/forums/images/MOVIE2.swf\"></embed></object>";
}
|
Now open header.html and replace your flash code with: $header_flash
MOVIE1 is the flash for index.php, and MOVIE2 will load up on any other page. I tested this and it works perfectly. |
|
|
|
 |
SV_JJSKID

|
Posted:
Mon Sep 06, 2004 9:09 pm |
|
I tried it and couldn't get it to fly. Here's what I did...
THEME.PHP__________________________________________________
function themeheader() {
global $admin, $home, $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $nukeurl, $anonymous;
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query("SELECT * FROM ".$prefix."_banner WHERE type='0' AND active='1'"));
/* Get a random banner if exist any. */
/* More efficient random stuff, thanks to Cristian Arroyo from http://www.planetalinux.com.ar */
if ($home==1) {
$header_flash = "<object width=\"100%\" height=\"155\"><param name=\"movie\" value=\"hmdl.swf\"> <embed width=\"755\" height=\"155\" src=\"/themes/subBlack3dBlue/forums/images/hmdl.swf\"></embed></object>";
} else {
$header_flash = "<object width=\"100%\" height=\"155\"><param name=\"movie\" value=\"hmdl2.swf\"> <embed width=\"755\" height=\"155\" src=\"/themes/subBlack3dBlue/forums/images/hmdl2.swf\"></embed></object>";
}
______________________________________________________________
HEADER.HTML_________________________________________________
Replaced
<tr>
<td align="center" <object width="100%" height="155"><param name="movie" value="hmdl.swf"> <embed width="755" height="155" src="themes/subBlack3dBlue/forums/images/hmdl.swf"></embed></object></a></embed></td>
</tr>
With
<tr>
<td align="center">$header_flash</a></td>
</tr>
_______________________________________________________ |
|
|
|
 |
GanjaUK

|
Posted:
Mon Sep 06, 2004 9:24 pm |
|
Looks like you added the flash code in theme.php inside the banners code. As I don't see any closing }
You need to add that code on it's own. For example look for:
Code:$public_msg = public_message();
|
Make a new line above that and put it there. |
|
|
|
 |
SV_JJSKID

|
Posted:
Mon Sep 06, 2004 9:34 pm |
|
Sweet it works Thanks a lot for the help
Check it out fl.sv1web.com |
|
|
|
 |
GanjaUK

|
Posted:
Mon Sep 06, 2004 9:38 pm |
|
Your welcome. And yeah looks good.  |
|
|
|
 |
|