The Joomla! Forum ™

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 Post subject: Squeezebox in Joomla 1.5
PostPosted: Fri Aug 15, 2008 5:24 am 
Joomla! Apprentice
Joomla! Apprentice

Joined: Sun Aug 03, 2008 6:05 am
Posts: 38
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:

<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.

Reply with quote  
PostPosted: Thu Apr 16, 2009 9:19 pm 
Joomla! Fledgling
Joomla! Fledgling

Joined: Thu Apr 16, 2009 9:08 pm
Posts: 3
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'); ?>

Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
Powered by phpBB® Forum Software © phpBB Group