PDA

View Full Version : adding javascript to directory


sitbyme
09-04-2006, 05:01 PM
Hi

I wish I had known I'd have to learn a new set of skills to mod esyndicat before I bought it. I like the script don't get me wrong I just didn't know it was based on a template system like Smarty, I thought it would be just PHP. next time I'm new to sonething I'll ask.

After trying for hours I am unable to add includes that work to the pages and so I decided to just do a popup for a media player and I'm having no luck with that either.


I want to add javascript to the top of the left column so that when the button is clicked on the media player pops up.

Here is the code I want to add If anyone can help me that would be great

<script language="JavaScript" type="text/JavaScript">
<!--
function wimpyPopPlayer(theFile,id,stuff) {
window.open(theFile,id,stuff);
}
//-->
</script>
<a href="javascript:;" onClick="wimpyPopPlayer('http://www.####.com/myWimpy.html','wimpyMP3player','width=485,height=1 40')"><img src="http://www.####.com/light3s/pop_up_pill.jpg" border="0" align="top"></a></div>

In case anyone is looking to put a media player on their directory I'm using one called wimpy and for the backend database manager I'm using loudblog. That way I can have hundreds of mp3s in distinct categories so users can find what interests them.

Thanks very much

Sit

redeye
09-04-2006, 05:03 PM
Have you tried putting

{literal}
script language="JavaScript" type="text/JavaScript">
<!--
function wimpyPopPlayer(theFile,id,stuff) {
window.open(theFile,id,stuff);
}
//-->
</script>{/literal}

tags around the code?

sitbyme
09-04-2006, 05:29 PM
redeye

Thanks a million... does this {literal} tag also mean I can do PHP includes in the templates as well?

I knew it was simple but I seem to like to smash my head at a problem for a few hours before I see any light.

thanks again

Sit

redeye
09-04-2006, 05:31 PM
I tried a few things with php includes and haven't been successful. There is a thread somewhere recently about this that I'm going to have a look at.