Simple, but not working
First unread post • 12 posts
• Page 1 of 1
Simple, but not working
Hi,
I am using a template form Gavick. It has a style switcher in the footer. I would like to move this to be a bit f a feature in the left hand column.
I tried to move just the HTML, and the switcher does work but does not save the changed style as a cookie unless the footer style switcher is enabled. That would be OK except that uses IDs not classes and make the page fail validation.
So I decided to try and add it with the PHP script. Unfortunately Joomla takes that out. So now I found Jumi! I create a custom module, add the code, but then I just get an error message.
Please help me. I have very little understanding of PHP. I feel that this is a simple request but I am just stupid and don't know any other way.
My development website:
http://www.emw8.com/
All the code in the footer. Theme/layouts/blocks/footer.php
All I would like to do is get the right code I need, place it in a simple Jumi module, and it to work!
here is the code that I tried to place i the Jumi 'code written' field:
Thanks, CB
I am using a template form Gavick. It has a style switcher in the footer. I would like to move this to be a bit f a feature in the left hand column.
I tried to move just the HTML, and the switcher does work but does not save the changed style as a cookie unless the footer style switcher is enabled. That would be OK except that uses IDs not classes and make the page fail validation.
So I decided to try and add it with the PHP script. Unfortunately Joomla takes that out. So now I found Jumi! I create a custom module, add the code, but then I just get an error message.
Please help me. I have very little understanding of PHP. I feel that this is a simple request but I am just stupid and don't know any other way.
My development website:
http://www.emw8.com/
All the code in the footer. Theme/layouts/blocks/footer.php
- Code: Select all
<div id="gk-footer" class="clearfix main">
<?php if($this->countModules('footer_nav')) : ?>
<div id="gk-footer-nav">
<jdoc:include type="modules" name="footer_nav" style="none" />
</div>
<?php endif; ?>
<?php if($this->getParam('stylearea', 1)) : ?>
<div id="stylearea">
<a href="#" class="style_switcher" id="style_switcher1">Green</a>
<a href="#" class="style_switcher" id="style_switcher2">Red</a>
<a href="#" class="style_switcher" id="style_switcher3">Blue</a>
</div>
<?php endif; ?>
<div id="gk-copyright">
<?php
if (($mobile = $this->mobile_device_detect())) :
$handheld_view = $this->getParam('ui');
$switch_to = $handheld_view=='desktop'?'default':'desktop';
$text = $handheld_view=='desktop'?'Mobile Version':'Desktop Version';
?>
<a class="gk-tool-switchlayout" href="<?php echo JURI::base()?>?ui=<?php echo $switch_to?>" title="<?php echo JText::_($text)?>"><span><?php echo JText::_($text)?></span></a>
<?php endif ; ?>
<?php echo $this->_tpl->params->get("footer_content"); ?>
</div>
</div>
All I would like to do is get the right code I need, place it in a simple Jumi module, and it to work!
here is the code that I tried to place i the Jumi 'code written' field:
- Code: Select all
<?php if($this->getParam('stylearea', 1)) : ?>
<div id="stylearea">
<a href="#" class="style_switcher" id="style_switcher1">Green</a>
<a href="#" class="style_switcher" id="style_switcher2">Red</a>
<a href="#" class="style_switcher" id="style_switcher3">Blue</a>
</div>
<?php endif; ?>
Thanks, CB
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
Re: Simple, but not working
I'm not sure, but probably you need to use this code instead
- Code: Select all
<?php
$template =& JFactory::getTemplate();
if($template->getParam('stylearea', 1)) :
?>
<div id="stylearea">
<a href="#" class="style_switcher" id="style_switcher1">Green</a>
<a href="#" class="style_switcher" id="style_switcher2">Red</a>
<a href="#" class="style_switcher" id="style_switcher3">Blue</a>
</div>
<?php endif; ?>
Regards,
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
- Edvard
- Site Admin
- Posts: 1836
- Joined: Mon Jun 28, 2010 1:54 pm
- Location: Yerevan, Armenia
Re: Simple, but not working
That doesn't work either. I get this:
Fatal error: Call to undefined method JTemplate::getParam() in /var/www/vhosts/emw8.com/httpdocs/modules/mod_jumi/tmpl/default.php(12) : eval()'d code on line 3
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
Re: Simple, but not working
PLEASE HELP!
Thanks, CB
Thanks, CB
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
Re: Simple, but not working
Try this:
- Code: Select all
<?php
$document =& JFactory::getDocument();
if($document->params->getParam('stylearea', 1)) :
?>
<div id="stylearea">
<a href="#" class="style_switcher" id="style_switcher1">Green</a>
<a href="#" class="style_switcher" id="style_switcher2">Red</a>
<a href="#" class="style_switcher" id="style_switcher3">Blue</a>
</div>
<?php endif; ?>
Regards,
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
- Edvard
- Site Admin
- Posts: 1836
- Joined: Mon Jun 28, 2010 1:54 pm
- Location: Yerevan, Armenia
Re: Simple, but not working
Now I get this error:
- Code: Select all
Fatal error: Cannot pass parameter 1 by reference in /var/www/vhosts/emw8.com/httpdocs/modules/mod_jumi/tmpl/default.php(12) : eval()'d code on line 3
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
Re: Simple, but not working
What do you get using this code:
- Code: Select all
<?php
$document =& JFactory::getDocument();
echo '<pre>', print_r($document, true), '</pre>';
Regards,
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
- Edvard
- Site Admin
- Posts: 1836
- Joined: Mon Jun 28, 2010 1:54 pm
- Location: Yerevan, Armenia
Re: Simple, but not working
- Code: Select all
Warning: imagejpeg() [function.imagejpeg]: Unable to open '/var/www/vhosts/emw8.com/httpdocs/cache/mod_novasfh/tmp/thb_lappys2.jpg' for writing in /var/www/vhosts/emw8.com/httpdocs/modules/mod_novasfh/helper.php on line 639
That and a whole lot of code that's in the module. http://www.emw8.com/
I really appreciate the help. TY, CB
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
Re: Simple, but not working
That is completely another error. You shouldn't see errors, you will see the document object dump.
Regards,
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
Edvard Ananyan - 2GLux Team
Please post a review at the Joomla Extensions Directory. It is very important for us!
- Edvard
- Site Admin
- Posts: 1836
- Joined: Mon Jun 28, 2010 1:54 pm
- Location: Yerevan, Armenia
Re: Simple, but not working
Well that error is something to do with the flash gallery on the homepage - permissions problem that i've just fixed. The style switcher is still not showing as intended.
What should I do?
What should I do?
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
Re: Simple, but not working
Hi,
I managed to find a fix, that I thin is OK. It didn't evolve Jumi. I tried this module for something else and I couldn't get it to work. Maybe my understaning of PHP us too little, but I just don't understand it.
Thanks anyway.
I managed to find a fix, that I thin is OK. It didn't evolve Jumi. I tried this module for something else and I couldn't get it to work. Maybe my understaning of PHP us too little, but I just don't understand it.
Thanks anyway.
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
Re: Simple, but not working
IMO - ur module doesnt work!
- blakeys
- Posts: 8
- Joined: Wed Dec 15, 2010 10:19 pm
12 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 6 guests