TinyPortal

Development => Support => Topic started by: sgilleland on February 04, 2009, 08:49:51 PM

Title: Overlay FLV on home page
Post by: sgilleland on February 04, 2009, 08:49:51 PM
I have a transparent flash of an virtual actor that I want to put on my page.....the problem is I have to put the this code after the body tag.  I am not sure which file to modify, would it be in the index.template.php in the theme I am using?  When I do that, I get a result that doesn't show it in the bottom left, it is up a couple of inches.  Also, it says I need to get the latest version of Flash, which I have........it works on my other sites.  Thanks in advance for your help!

Here is a copy of my index.template.php attached.


<!-- Please place just after the <body> tag -->
<script language="JavaScript" src="popin_adplib.js"></script>
<script language="JavaScript" src="popin.js"></script>
Title: Re: Overlay FLV on home page
Post by: IchBin on February 04, 2009, 08:51:35 PM
Yes that is the file you would use. If its not putting your script at the exact bottom, try putting that code before the closing </body> tag instead.
Title: Re: Overlay FLV on home page
Post by: sgilleland on February 05, 2009, 12:41:24 AM
Ok, it is in the right place, but when I open the page, it says that I have the wrong version of Flash and it doesn't play the video.  I put in another page...index.php and used the same code as I used in the index.template.php and it works great.  It appears that there is something to do with the index.template.php file.

Anyone have any ideas?  here is the site www.dreamconnectionz.com you will see that the lower left has the message about not having the current flash and has the Flash gif below it.
Title: Re: Overlay FLV on home page
Post by: IchBin on February 05, 2009, 04:21:10 PM
It is most likely because the path to your file is wrong or something. I also don't see any embed tags in your code.
Title: Re: Overlay FLV on home page
Post by: sgilleland on February 05, 2009, 04:42:46 PM
I would agree, however, I took another index.php and put it in the themes/amber11final folder and copied the code that I am trying to use.. out of the index.template.php and pasted it to the index.php file and it works.  This tells me the paths are correct, but something in the index.template.php is messing it up.

Do I need to do something different because I am placing it within php after the <body> tag?  This is what I am pasting in

<!-- Advanced DHTML Popup Linking section start -->
<!-- Please place just after the <body> tag -->
<script language="JavaScript" src="941_adplib.js"></script>
<script language="JavaScript" src="941.js"></script>
<!-- Advanced DHTML Popup Linking Section End -->
Title: Re: Overlay FLV on home page
Post by: IchBin on February 05, 2009, 04:53:21 PM
Actually, what you're thinking may be a little backwards. The way the SMF templating system works is by including files into one another. Since the index.php file is loaded as the controller, all other files are loaded through this file via includes etc. If putting your code in the index.php is working, and the index.template.php file is not, that would indicate that the path is not right. You can test this, by putting a FULL path to the files instead of just a relative path.

Instead of just calling the js file, call it by full path. Use a URL src="http://yoursite.com/path/to/file" or a full path src="/path/to/file/"