How to make new modules positions?

Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Sat Dec 29, 2012 12:22 pm
Reply with quote
Report this post
Hi,
1.
http://demo.gavick.com/joomla25/gamenew ... Itemid=107
I want add left sidebar for menus.


2.
http://demo.gavick.com/joomla25/gamenew ... Itemid=419
I wand that left and right sidebars still visible in Single article view.

Ho i can do this?

Thanks.
User avatar
Junior Boarder

Konrad M
Sat Dec 29, 2012 10:17 pm
Reply with quote
Report this post
User avatar

GK User
Sat Dec 29, 2012 11:32 pm
Reply with quote
Report this post
Thx.
User avatar
Junior Boarder

GK User
Thu Jan 24, 2013 2:09 am
Reply with quote
Report this post
I dont know what im doing wrong... I have made 2 new positions, but i cant see em on my site...Are you sure the guide is up to date?
User avatar
Fresh Boarder

Konrad M
Thu Jan 24, 2013 10:46 am
Reply with quote
Report this post
@malaelan I guess you copied code from article. So please change ' and this " becasue they change and it doesn't work. How it look when you paste it:
Code: Select all
<?php if($this->modules(‘myposition’)) : ?>
<div>
<jdoc:include type=”modules” name=”myposition” style=”<?php echo $this->module_styles['myposition']; ?>” />
</div>
<?php endif; ?>

and how it should:
Code: Select all
<?php if($this->modules('myposition')) : ?>
<div>
<jdoc:include type="modules" name="myposition" style="<?php echo $this->module_styles['myposition']; ?>" />
</div>
<?php endif; ?>
User avatar

GK User
Thu Jan 24, 2013 12:26 pm
Reply with quote
Report this post
Hey again.

Yes i copied they code from the guide, the same as you used, but i get an error on the default.php file.

The i tryed this code

<?php if($this->modules(‘myposition’)) : ?>
<div>
<jdoc:include type=”modules” name=”myposition” style=”<?php echo $this->module_styles['myposition']; ?>” />
</div>
<?php endif; ?>

This time no error but i still cant see the position on the front site.

Im kind of a rookie in php, but i belive i did it the right way...
User avatar
Fresh Boarder

GK User
Thu Jan 24, 2013 12:48 pm
Reply with quote
Report this post
Konrad M wrote:@malaelan I guess you copied code from article. So please change ' and this " becasue they change and it doesn't work. How it look when you paste it:
Code: Select all
<?php if($this->modules(‘myposition’)) : ?>
<div>
<jdoc:include type=”modules” name=”myposition” style=”<?php echo $this->module_styles['myposition']; ?>” />
</div>
<?php endif; ?>

and how it should:
Code: Select all
<?php if($this->modules('myposition')) : ?>
<div>
<jdoc:include type="modules" name="myposition" style="<?php echo $this->module_styles['myposition']; ?>" />
</div>
<?php endif; ?>


Its the same code, or im i missing something?
User avatar
Fresh Boarder

Konrad M
Thu Jan 24, 2013 12:53 pm
Reply with quote
Report this post
Look at quotation marks in
Code: Select all
$this->modules(‘myposition’)

and:
Code: Select all
type=”modules” name=”myposition” style=”<?php echo $this->module_styles['myposition']; ?>”

are diffrent and usually make issues.
User avatar

GK User
Thu Jan 24, 2013 1:27 pm
Reply with quote
Report this post
Im lost lol.

Fatal error: Call to undefined method GKTemplate::modules() in /home/www/mydomain.com/templates/gk_gamenews/layouts/default.php on line 210
User avatar
Fresh Boarder

Konrad M
Thu Jan 24, 2013 1:32 pm
Reply with quote
Report this post
Ok. My mistake I forgot that Game News is using Gavern 3.0. Please change code to this one:
Code: Select all
<?php if($this->API->modules('myposition')) : ?>
<div>
<jdoc:include type="modules" name="myposition" style="<?php echo $this->module_styles['myposition']; ?>" />
</div>
<?php endif; ?>
User avatar

GK User
Thu Jan 24, 2013 1:41 pm
Reply with quote
Report this post
Okay tyvm, the code is working, but i have one more question. I would like my 2 new banner pos. to show in left and right of the top of the site, just like on this http://www.tipsbladet.dk
Where do i put the code?
User avatar
Fresh Boarder

Konrad M
Thu Jan 24, 2013 2:28 pm
Reply with quote
Report this post
I think you have to put them at the bottom befor </body> tag and you will have to add them in css
Code: Select all
{
position:absolute;
top:0;
}

and for left banner you have to set left:0 and for right set right:0;
User avatar

GK User
Thu Jan 24, 2013 4:44 pm
Reply with quote
Report this post
Oh my god :-)

No matter what i do, i cant get the banner to move...Im not sure what code to use ;-(

i got it the right top of the site, but i need it to move closer to the design.
User avatar
Fresh Boarder

Konrad M
Fri Jan 25, 2013 11:19 am
Reply with quote
Report this post
Can you give me url to your site ?
User avatar

GK User
Fri Jan 25, 2013 12:06 pm
Reply with quote
Report this post
i have sendt you an PM
User avatar
Fresh Boarder

Konrad M
Fri Jan 25, 2013 12:27 pm
Reply with quote
Report this post
Unfortunetly access to page isn't working.
User avatar

GK User
Fri Jan 25, 2013 12:36 pm
Reply with quote
Report this post
Konrad M wrote:Unfortunetly access to page isn't working.


new pm
User avatar
Fresh Boarder

Konrad M
Fri Jan 25, 2013 1:25 pm
Reply with quote
Report this post
Please add class 'left' to the left div and 'right' to the right one.
Then please add to override.css
Code: Select all
.left,.right {
position:absolute;
z-index:1;
top:0;
}
.left {
left:0;
}
.right {
right:0;
}
#gkPage {
z-index: 3;
position: relative;
}

and remember to enable override.css option in template settings.
User avatar

GK User
Fri Jan 25, 2013 1:41 pm
Reply with quote
Report this post
I want to make sure i undertand this .

Please add class 'left' to the left div and 'right' to the right one.

= add "left" in the leftbanner Module Class Suffix ?

If yes, i have done it all, but banners are stil stuck in the same spot, and yes i have copied to css. override and

enable override.css option in template settings.
User avatar
Fresh Boarder

Konrad M
Fri Jan 25, 2013 1:45 pm
Reply with quote
Report this post
no I mean add class directly in source code. When you are adding new module position. Becasue if you add it using suffix you will add class to the inner div.
User avatar

GK User
Fri Jan 25, 2013 1:52 pm
Reply with quote
Report this post
Oh well, ty so much for taking your time, but i guess im just to stupid to make it work
User avatar
Fresh Boarder

Konrad M
Fri Jan 25, 2013 2:07 pm
Reply with quote
Report this post
When you are adding this code add class to div like here:
Code: Select all
<?php if($this->API->modules('myposition')) : ?>
<div class="left">
<jdoc:include type="modules" name="myposition" style="<?php echo $this->module_styles['myposition']; ?>" />
</div>
<?php endif; ?>

and that 's all.
User avatar

GK User
Fri Jan 25, 2013 3:06 pm
Reply with quote
Report this post
We are getting close now :-)

Now the banners are in both sides of the top....but not close to the template

how do i do that ?
User avatar
Fresh Boarder

Konrad M
Sat Jan 26, 2013 7:13 pm
Reply with quote
Report this post
For left module increase 'left' value and for right one increase 'right' one.
User avatar


cron