Javascript in entries

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
holysjit
Regular
Posts: 131
Joined: Sun Apr 08, 2007 9:47 am

Javascript in entries

Post by holysjit »

Is it possible to use javascript in my entries?
I want to put this code in entries:

Code: Select all

<script type="text/javascript">
var so1 = new SWFObject("http://yourwebsite.com/flvplayer.swf", "flvplayer", "638", "458", "7", null, true);
so1.addParam("allowFullScreen", "true");
so1.addParam("allowSciptAccess", "always");
so1.addVariable("autoplay", "true");
so1.addVariable("flv", "clip.flv"); // Here, you have to paste the full video path
so1.write("flashcontent2");
</script>
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Javascript in entries

Post by garvinhicking »

Hi!

Yes, you can put flash into your entries. You might need to disable the WYSIWYG editor (temporarily) for this to be accessful, though.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
holysjit
Regular
Posts: 131
Joined: Sun Apr 08, 2007 9:47 am

Post by holysjit »

you might need to disable the WYSIWYG editor
How?

I found two codes. Which one is the best to use?

Code: Select all

<object width="252" height="192" data="http://stemp.agriya.in/famous-locations/skins/videos/flvplayer/flvplayer.swf" type="application/x-shockwave-flash"><param value="http://stemp.agriya.in/famous-locations/skins/videos/flvplayer/flvplayer.swf" name="movie"/><param value="sameDomain" name="allowScriptAccess"/><param name="allowFullScreen"value="true" /><param value="high" name="quality"/><param value="config=http://stemp.agriya.in/famous-locations/skins/videos/flvplayer.php?url=http://www.youtube.com/get_video?video_id=M0ODskdEPnQ&t=OEgsToPDskLCJzaqk PG4xbT45funpRZY&val=4" name="FlashVars"/></object>

Code: Select all

embed src="flvplayer.swf" flashvars="flv=yourvideofilepath" quality="high" bgcolor="#000000" width="638" height="435" name="flvplayer" align="middle" allowScriptAccess="sameDomain" allowfullscreen="true" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
They both don't work, but mybey you know which one is the best...



[
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!
holysjit wrote:
you might need to disable the WYSIWYG editor
How?
In your personal preferences, set "Use WYSIWYG editor" to: "no".
I found two codes. Which one is the best to use?
Sorry, I don'T use flash so I can't tell. You might need to look up flash-videoplayer specific sites or forums, if no one else here can help.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
holysjit
Regular
Posts: 131
Joined: Sun Apr 08, 2007 9:47 am

Post by holysjit »

Ok, I knew that I don't have to ask you questions about Flash on SERENDIPITY forums.....

Ok, I went to 'Personal Settings', but it was already 'No'.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Post by garvinhicking »

Hi!

It might be something else, markup plugins like nl2br might make your javascript unusable, so you'd need to disable those markup plugins for postings that contain javascript. you can do that if you install the "extended properties for entries" plugin, and then for each entry with javascript you can disable plugins in the 'Extended options' section of the entry editor.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
Post Reply