Page 1 of 1

Dynamic Static Pages

Posted: Wed Oct 12, 2005 11:23 am
by MySchizoBuddy
No thats not an oxymoron :)

What i want is to embed different movies (wmv, mov, swf etc) with different codecs in just one static page. Instead of creating 4-5 pages each one specific to the video player plugin. I want to creat just one page that dynamically picks one part of the code. Let me explain

static page media.php

<if url = media.php?wmv>
....... code for WMV player........
</if>
<if url = media.php?mov>
....... code for Quicktime player........
</if>

All this will have to be done with php, and I just pass a variable to it which will select which player to embed in it.
makes sense

Re: Dynamic Static Pages

Posted: Wed Oct 12, 2005 11:58 am
by garvinhicking
You can use the Smarty Markup plugin, which will then also be available within static pages. With that you can embed IF-checks and stuff.

Embedding PHP in posts would work similary, but because of the enormous security implications of this I don't really want to give instructions how to achieve this.

Best regards,
Garvin

Posted: Wed Oct 12, 2005 12:01 pm
by MySchizoBuddy
one more thing the static page takes the template of the blog. is there a way that it has nothing but the video code. and it should open up in a popup browser window

SO i use smarty code

{if $player == "wmv"}
insert wmv player code
{/if}

and how do i pass the $player from a link.

Code: Select all

a href="{$serendipityBaseURL}media.php?$player="wmv"

Posted: Wed Oct 12, 2005 12:20 pm
by garvinhicking
There is no easy way to only show the content without any layout. That is the reason for static pages after all, to show all that content.

It seems as if you should write a simple PHP file on your own, completely apart frmo Serendipity. Then you can control the layout pretty easy. With s9y you would have much trouble to add many checks to index.tpl:

Code: Select all

{if $staticpage_title != "mymoviepage"}
  <html...>
{/if}
And then you would need to assign a stripped static page template to that static page which also shows nothing else.

Your question about the IF-statement shows once more that you should be creating your own PHP file instead, or create your own plugin. Actually your whoile content has nothing to do with a static page, but is much more a plugin completely on its own.

Best regards,
Garvin

Posted: Fri Oct 14, 2005 3:41 pm
by MySchizoBuddy
ok lets take this one step at a time
First lets create a plugin to embed media inside blogs.

Basically select the type of media player, file url, Rez, autostart, loop etc. and It will spit out a object and embed codes to make it work.

garvin can u point me to a similar plugin so i can take a look at it. basically a way to output code in the entry. I can only think of karma that puts stuff in the entry page. is there any other plugins that does that. Oh wait. HTML nugget plugin.

yes yes html nugget can be used. let me look into it and modify it so it enters the code automatically.
:)

i answered my own quesion :P

Posted: Fri Oct 14, 2005 3:47 pm
by garvinhicking
Hi!

You might want to take a look at the imageselectorplus plugin, which has a "quickblog" tool that injects some HTML code.

Another plugin that inserts and transforms custom code is the podcasting plugin, babelfish. Maybe the galleryimage plugin is closest to your needs so you can create your own tag system like to transform code like this:

Code: Select all

[playobject file="/bla/bla/bla.mp3" authorstart="true"]
Or something like that. Even though I might still not understand the wohle thing :-D

Best regards,
Garvin