Squeezebox in Joomla 1.5

Joomla! Apprentice
Joomla! Apprentice
Posts: 38
Joined: Sun Aug 03, 2008 6:05 am

Squeezebox in Joomla 1.5

Postby jpatti » Fri Aug 15, 2008 5:24 am

I'm posting this cause I searched and didn't find it. I read the documentation on Scribd linked from the Absolute Beginner's Guide. Because there was a bit to cut-and-paste, I downloaded the text version of it to grab the bit you stick in your template:

Code: Select all

<script type="text/javascript" src="<?php echo $this->baseurl ? >/media/system/js/modal.js"> </script> <link rel="stylesheet" href="<?php echo $this->baseurl ? >/media/system/css/modal.css" type="text/css" /> <script type="text/javascript"> // <!-window.addEvent('domready', function(){ var JTooltips = new Tips($$('.hasTip'), { maxTitleChars: 50, fixed: 'false'}); }); // --> </script> <script type="text/javascript"> // <!-window.addEvent('domready', function() { SqueezeBox.initialize({}); $$('a.modal').each(function(el) { el.addEvent('click', function(e) { new Event(e).stop(); SqueezeBox.fromElement(el); }); }); }); // --> </script>

The problem is that the close php tag should be ?> not ? > - that space makes the whole thing broken, twice in this sample. If a beginner (say me!) actually cuts-and-pastes that into their template, the whole site goes fubar and you get an error. And the poor beginner freaks out completly as the whole entire site I've been building for weeks just disappears! Luckily, I just deleted that crap and it came back. Still this is very bad for something supposed to be for Absolute Beginner's, eh?

A secondary problem is that Joomla already has this built-in anyways, so you don't need all that crap in your template anyways. All you have to add after the DOCTYPE and HTML statements is:
<?php JHTML::_('behavior.modal'); %>

So the documentation is trying to go about it in an excessively complicated way (aside from being broken due to that space in the close php tag).

Posted not to complain about the documentation (I realize it's a freebie produced by a volunteer), but so the next person who Googles this problem finds this answer.

Joomla! Fledgling
Joomla! Fledgling
Posts: 3
Joined: Thu Apr 16, 2009 9:08 pm

Re: Squeezebox in Joomla 1.5

Postby kc_forrest » Thu Apr 16, 2009 9:19 pm

The Scribd info on the topic is retarded, however, you fell victim to a funky closing tag too.

%> is Ruby.

It should read:

<?php JHTML::_('behavior.modal'); ?>

Return to “Feedback and Suggestions”

Who is online

Users browsing this forum: No registered users and 2 guests