Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-01-10 01:56:00
- Paxton84
- New Member
- Registered: 2008-01-07
- Posts: 6
Problem with loading/using Mediabox on my site.....
I am currently using slimbox on my portfolio pages(s) to provide a visual touch to my artwork. I decided that want to try out Mediabox on my blog page in order to play video based clips or links to new movie trailers…..
I’m am using a misc form to bring in the meta data/css/scripts on all of my pages….the portfolio form works fine to implement slimbox…however, the blog form (below) does not work using similar <txp> tags to call forth the 3 javascripts and 1 css file to make the video appear (clicking on the video link takes you directly to an Apple trailer page instead of popping in the on site viewer.)
BLOG FORM
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<txp:mediabox scripts=”/js/mootools_111.js”,
/js/mediabox.js /css/mediabox.css” />
<txp:swfobject scripts=”/js/swfobject.js” />
</head>
however…………
When I include the links as regular xhtml links to call forth the javascripts and css the video opens fine:
<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
<html xmlns=“http://www.w3.org/1999/xhtml” xml:lang=“en” lang=“en”>
<head>
<meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
<link rel=“stylesheet” href=”/css/mediabox.css” type=“text/css” media=“screen” />
<script src=”/js/mootools_111.js” type=“text/javascript”></script>
<script src=”/js/swfobject.js” type=“text/javascript”></script>
<script src=”/js/mediabox.js” type=“text/javascript”></script>
</head>
Anyone have any ideas why this is so?
Offline
Re: Problem with loading/using Mediabox on my site.....
unless you’re using some plugin that uses those txp:mediabox and txp:swfobject tags, they do not exist. you can’t just arbitrarily make up tags seeing as all tags are attached to a function. regular xhtml links are what you want to use.
Last edited by iblastoff (2008-01-10 02:06:42)
Offline
#3 2008-01-10 02:10:26
- Paxton84
- New Member
- Registered: 2008-01-07
- Posts: 6
Re: Problem with loading/using Mediabox on my site.....
Thanks iblastoff….
Now that I see your response, I did install the slimbox plugin through admin and therefore that is why it is working on my portfolio page….(feel dumb for just putting in those <txp:whatever tags now)…..not sure what I was thinking…is there not a way to reference javascript and css besides regularly xhtml links?
Thanks again.
Offline
Re: Problem with loading/using Mediabox on my site.....
Paxton84 wrote:
Thanks iblastoff….
Now that I see your response, I did install the slimbox plugin through admin and therefore that is why it is working on my portfolio page….(feel dumb for just putting in those <txp:whatever tags now)…..not sure what I was thinking…is there not a way to reference javascript and css besides regularly xhtml links?
Thanks again.
sure can. for css, you can go to your presentation -> style tab. create a new style, give it a name and paste in your stylesheet. create as many as you need/want. then you can call them like so: <txp:css n="style_name" />
here is the relevant textbook entry concerning <txp:css />
basically what you’re doing is storing your stylesheets directly into your database. depending on the quality of your webhost and your traffic, generally grabbing things like that from the database is relatively slow compared to just a file. you can use the plugin rvm_css which will automatically create a static css file for you when you create one in the style tab. (then you’d have to use the plugins tag i believe its something like <txp:rvm_css n="style_name" />
)
for javascript, you can install stm_javascript which gives you a javascript tab that behaves pretty much exactly like the css/styles tab. you would then call those with its own tag <txp:js n="javascript_name" />
Last edited by iblastoff (2008-01-10 02:21:13)
Offline