Game magazine + Bike Store Virtuemart
- GK User
- Sun Aug 11, 2013 11:16 am
Hi I followed this steps: http://www.gavick.com/forums/startup-joomla25/startup-virtuemart-20537.html
to have bike store css added to my website of gk game magazine but on step 4 when I copy and replace the code it doesn't want to load the site.
Please advise if there is more steps or other steps with this template.
I have attached the head.php file
to have bike store css added to my website of gk game magazine but on step 4 when I copy and replace the code it doesn't want to load the site.
Please advise if there is more steps or other steps with this template.
I have attached the head.php file
-

- Expert Boarder
- GK User
- Mon Aug 12, 2013 7:52 pm
Your head.php didn't attached.
Could You post it again, or post code before change and after change?
Do You get any errors? Could You post them?
Could You post it again, or post code before change and after change?
Do You get any errors? Could You post them?
-

- Moderator
- GK User
- Mon Aug 12, 2013 8:45 pm
Here is the code:
AND HERE IS THE CODE AFTER:
I couldn't find any errors
- Code: Select all
$this->addCSS($this->URLtemplate() . '/css/gk.stuff.css');
AND HERE IS THE CODE AFTER:
- Code: Select all
$this->addCSS($this->URLtemplate() . '/css/gk.stuff.css');
$this->API->addCSS($this->API->URLtemplate() . '/css/vm.css');
I couldn't find any errors
-

- Expert Boarder
- GK User
- Mon Aug 12, 2013 8:53 pm
Could You please post an url to your site?
-

- Moderator
- GK User
- Mon Aug 12, 2013 8:56 pm
www.pcsafrica.net
You will see thath the site doesn't load but will load with default head.php
-

- Expert Boarder
- GK User
- Tue Aug 13, 2013 3:48 pm
Here is my head.php, and it loads vm.css fine:
Perhaps problem lies somewhere else (does vm.css exist? is patch correct?)
- Code: Select all
<?php
// This is the code which will be placed in the head section
// No direct access.
defined('_JEXEC') or die;
$favicon_image = $this->getParam('favicon_image', '');
if($favicon_image == '') {
$favicon_image = $this->URLtemplate() . '/images/favicon.ico';
} else {
$favicon_image = $this->URLbase() . $favicon_image;
}
$this->API->addFavicon($favicon_image);
?>
<?php
// check the color version
$template_style = '';
$template_pattern = '';
if($this->getParam("stylearea", 1)) {
$template_style = (isset($_COOKIE['gk_game_magazine_j30_style']) ? $_COOKIE['gk_game_magazine_j30_style'] : $this->getParam("template_color", 1));
} else {
$template_style = $this->getParam("template_color", 1);
}
// load the CSS files
if($this->getParam('reset_css', '') != '') {
$this->addCSS($this->URLtemplate() . '/css/reset/'.$this->getParam('reset_css', '').'.css');
}
if($this->getParam("css_prefixer", '0')) {
$this->addJS($this->URLtemplate() . '/js/prefixfree.js');
}
$this->addCSS($this->URLtemplate() . '/css/layout.css');
$this->addCSS($this->URLtemplate() . '/css/joomla.css');
$this->addCSS($this->URLtemplate() . '/css/template.css');
$this->addCSS($this->URLtemplate() . '/css/menu.css');
$this->addCSS($this->URLtemplate() . '/css/gk.stuff.css');
$this->addCSS($this->URLtemplate() . '/css/vm.css');
if($this->getParam('typography', '1') == '1') {
$this->addCSS($this->URLtemplate() . '/css/typography.style'.$template_style.'.css');
if($this->getParam('typo_iconset1', '1') == '1') $this->addCSS($this->URLtemplate() . '/css/typography.iconset.1.css');
}
$this->addCSS($this->URLtemplate() . '/css/style'.$template_style.'.css');
if($this->getParam("css_override", '0')) {
$this->addCSS($this->URLtemplate() . '/css/override.css');
}
if($this->getParam("css_custom", '') != '') {
$this->addCSSRule($this->getParam('css_custom', ''));
}
if($this->getParam('css_compression', '0') == 1 || $this->getParam('css_cache', '0') == 1) {
$this->registerCache();
}
if($this->getParam('js_compression', '0') == 1 ) {
$this->registerJSCompression();
}
// include fonts
$font_iter = 1;
while($this->getParam('font_name_group'.$font_iter, 'gkFontNull') !== 'gkFontNull') {
$font_data = explode(';', $this->getParam('font_name_group'.$font_iter, ''));
if(isset($font_data) && count($font_data) >= 2) {
$font_type = $font_data[0];
$font_name = $font_data[1];
if($this->getParam('font_rules_group'.$font_iter, '') != ''){
if($font_type == 'standard') {
$this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . '; }'."\n");
} elseif($font_type == 'google') {
$font_link = preg_replace('/https?:/m', '', $font_data[2]);
$font_family = $font_data[3];
$this->addCSS($font_link);
$this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: \''.$font_family.'\', Arial, sans-serif; }'."\n");
} elseif($font_type == 'squirrel') {
$this->addCSS($this->URLtemplate() . '/fonts/' . $font_name . '/stylesheet.css');
$this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . ', Arial, sans-serif; }'."\n");
} elseif($font_type == 'adobe') {
$this->API->addJS('//use.edgefonts.net/'.$font_name.'.js');
$font_name = explode(":", $font_name);
$font_name = $font_name[0];
$this->API->addCSSRule($this->API->get('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . ', Arial, sans-serif; }'."\n");
}
}
}
$font_iter++;
}
// include JavaScript
$this->addJS($this->URLtemplate() . '/js/gk.scripts.js');
if($this->getParam('use_lazyload', '1') == 1) {
echo '<script type=\'text/javascript\' data-excluded=\''.str_replace("=Disabled\r\n", ",",$this->getParam('lazyload_for_pages', 'null')).'\' id=\'gkLazyLoad\' src=\''.$this->URLtemplate().'/js/lazyload.js\' ></script>';
}
if($this->browser->get('browser') == 'ie7') {
$this->addJS($this->URLtemplate() . '/js/ie7.equal.columns.js');
}
if($this->getParam('selectivizr', '0') == 1 && ($this->browser->get('browser') == 'ie7' || $this->browser->get('browser') == 'ie8')) {
$this->addJS($this->URLtemplate() . '/js/selectivizr.js');
}
$this->addJSFragment(' $GKMenu = { height:'.($this->getParam('menu_height','0') == 1 ? 'true' : 'false') .', width:'.($this->getParam('menu_width','0') == 1 ? 'true' : 'false') .', duration: '.($this->getParam('menu_duration', '500')).' };');
$this->addJSFragment( '$GK_TMPL_URL = "' . $this->URLtemplate() . '";' );
$this->addJSFragment( '$GK_LANG_LANUCH_PROJECT = "' . JText::_('TPL_GK_LANG_LAUNCH_PROJECT') . '";' );
?>
<!--[if IE 9.0]><link rel="stylesheet" href="<?php echo $this->URLtemplate(); ?>/css/ie9.css" type="text/css" /><![endif]-->
<!--[if IE 8.0]><link rel="stylesheet" href="<?php echo $this->URLtemplate(); ?>/css/ie8.css" type="text/css" /><![endif]-->
<!--[if IE 7.0]><link rel="stylesheet" href="<?php echo $this->URLtemplate(); ?>/css/ie7.css" type="text/css" /><![endif]-->
Perhaps problem lies somewhere else (does vm.css exist? is patch correct?)
-

- Moderator
- GK User
- Tue Aug 13, 2013 6:54 pm
Strange, now that I have copied your code it works perfectly,
Thank you very much
Thank you very much
-

- Expert Boarder
- GK User
- Wed Aug 14, 2013 4:59 pm
Ok, great I could help 
-

- Moderator
- GK User
- Mon Aug 19, 2013 8:42 am
It seems to work fine now, the only problem is when you click on any of the links on the frontpage slider it takes you to the K2 page but doubles the writing http://www.pcsafrica.net/ : example: http://www.pcsafrica.net/index.php/turn-key-solutions.
*The slider at the bottom must be there
Why is it doing that? Is it because of the code I added?
Please advise,
Thank you
*The slider at the bottom must be there
Why is it doing that? Is it because of the code I added?
Please advise,
Thank you
-

- Expert Boarder
- GK User
- Mon Aug 19, 2013 7:19 pm
It seems like You are missing some of the code, or You have added code that acts strangely:
This looks like our conditionals that are used to select which version (mobile or desktop) should be rendered. And because most new browsers renders whatever they come to in the code, it looks like doubled entry.
Checkout modified code for that conditionals.
- Code: Select all
<gavern:desktop>...</gavern:desktop>
<gavern:mobile>...</gavern:mobile>
This looks like our conditionals that are used to select which version (mobile or desktop) should be rendered. And because most new browsers renders whatever they come to in the code, it looks like doubled entry.
Checkout modified code for that conditionals.
-

- Moderator
- GK User
- Tue Aug 20, 2013 9:29 am
Its strange because I haven't added or changed any other code except for the code in the head.php that you have provided me:
- Code: Select all
<?php
// This is the code which will be placed in the head section
// No direct access.
defined('_JEXEC') or die;
$favicon_image = $this->getParam('favicon_image', '');
if($favicon_image == '') {
$favicon_image = $this->URLtemplate() . '/images/favicon.ico';
} else {
$favicon_image = $this->URLbase() . $favicon_image;
}
$this->API->addFavicon($favicon_image);
?>
<?php
// check the color version
$template_style = '';
$template_pattern = '';
if($this->getParam("stylearea", 1)) {
$template_style = (isset($_COOKIE['gk_game_magazine_j30_style']) ? $_COOKIE['gk_game_magazine_j30_style'] : $this->getParam("template_color", 1));
} else {
$template_style = $this->getParam("template_color", 1);
}
// load the CSS files
if($this->getParam('reset_css', '') != '') {
$this->addCSS($this->URLtemplate() . '/css/reset/'.$this->getParam('reset_css', '').'.css');
}
if($this->getParam("css_prefixer", '0')) {
$this->addJS($this->URLtemplate() . '/js/prefixfree.js');
}
$this->addCSS($this->URLtemplate() . '/css/layout.css');
$this->addCSS($this->URLtemplate() . '/css/joomla.css');
$this->addCSS($this->URLtemplate() . '/css/template.css');
$this->addCSS($this->URLtemplate() . '/css/menu.css');
$this->addCSS($this->URLtemplate() . '/css/gk.stuff.css');
$this->addCSS($this->URLtemplate() . '/css/vm.css');
if($this->getParam('typography', '1') == '1') {
$this->addCSS($this->URLtemplate() . '/css/typography.style'.$template_style.'.css');
if($this->getParam('typo_iconset1', '1') == '1') $this->addCSS($this->URLtemplate() . '/css/typography.iconset.1.css');
}
$this->addCSS($this->URLtemplate() . '/css/style'.$template_style.'.css');
if($this->getParam("css_override", '0')) {
$this->addCSS($this->URLtemplate() . '/css/override.css');
}
if($this->getParam("css_custom", '') != '') {
$this->addCSSRule($this->getParam('css_custom', ''));
}
if($this->getParam('css_compression', '0') == 1 || $this->getParam('css_cache', '0') == 1) {
$this->registerCache();
}
if($this->getParam('js_compression', '0') == 1 ) {
$this->registerJSCompression();
}
// include fonts
$font_iter = 1;
while($this->getParam('font_name_group'.$font_iter, 'gkFontNull') !== 'gkFontNull') {
$font_data = explode(';', $this->getParam('font_name_group'.$font_iter, ''));
if(isset($font_data) && count($font_data) >= 2) {
$font_type = $font_data[0];
$font_name = $font_data[1];
if($this->getParam('font_rules_group'.$font_iter, '') != ''){
if($font_type == 'standard') {
$this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . '; }'."\n");
} elseif($font_type == 'google') {
$font_link = preg_replace('/https?:/m', '', $font_data[2]);
$font_family = $font_data[3];
$this->addCSS($font_link);
$this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: \''.$font_family.'\', Arial, sans-serif; }'."\n");
} elseif($font_type == 'squirrel') {
$this->addCSS($this->URLtemplate() . '/fonts/' . $font_name . '/stylesheet.css');
$this->addCSSRule($this->getParam('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . ', Arial, sans-serif; }'."\n");
} elseif($font_type == 'adobe') {
$this->API->addJS('//use.edgefonts.net/'.$font_name.'.js');
$font_name = explode(":", $font_name);
$font_name = $font_name[0];
$this->API->addCSSRule($this->API->get('font_rules_group'.$font_iter, '') . ' { font-family: ' . $font_name . ', Arial, sans-serif; }'."\n");
}
}
}
$font_iter++;
}
// include JavaScript
$this->addJS($this->URLtemplate() . '/js/gk.scripts.js');
if($this->getParam('use_lazyload', '1') == 1) {
echo '<script type=\'text/javascript\' data-excluded=\''.str_replace("=Disabled\r\n", ",",$this->getParam('lazyload_for_pages', 'null')).'\' id=\'gkLazyLoad\' src=\''.$this->URLtemplate().'/js/lazyload.js\' ></script>';
}
if($this->browser->get('browser') == 'ie7') {
$this->addJS($this->URLtemplate() . '/js/ie7.equal.columns.js');
}
if($this->getParam('selectivizr', '0') == 1 && ($this->browser->get('browser') == 'ie7' || $this->browser->get('browser') == 'ie8')) {
$this->addJS($this->URLtemplate() . '/js/selectivizr.js');
}
$this->addJSFragment(' $GKMenu = { height:'.($this->getParam('menu_height','0') == 1 ? 'true' : 'false') .', width:'.($this->getParam('menu_width','0') == 1 ? 'true' : 'false') .', duration: '.($this->getParam('menu_duration', '500')).' };');
$this->addJSFragment( '$GK_TMPL_URL = "' . $this->URLtemplate() . '";' );
$this->addJSFragment( '$GK_LANG_LANUCH_PROJECT = "' . JText::_('TPL_GK_LANG_LAUNCH_PROJECT') . '";' );
?>
<!--[if IE 9.0]><link rel="stylesheet" href="<?php echo $this->URLtemplate(); ?>/css/ie9.css" type="text/css" /><![endif]-->
<!--[if IE 8.0]><link rel="stylesheet" href="<?php echo $this->URLtemplate(); ?>/css/ie8.css" type="text/css" /><![endif]-->
<!--[if IE 7.0]><link rel="stylesheet" href="<?php echo $this->URLtemplate(); ?>/css/ie7.css" type="text/css" /><![endif]-->
-

- Expert Boarder
- GK User
- Thu Aug 22, 2013 4:25 pm
It seems to be working fine now.
-

- Moderator
- GK User
- Fri Aug 23, 2013 8:51 am
Yes thanks,
A developer fixed it for me
A developer fixed it for me
-

- Expert Boarder
13 posts
• Page 1 of 1
