[CUSTOM] Adding top extra banner modules

GK User
Sat Dec 04, 2010 8:27 pm
Hello there,

I would like to add the banner module into the top portion of the website, where you have search and login functions (there will go away).

Anyway, can you tell me how to register the module there so it will work with Joomla's banner's system?

Thank you,
Tom
User avatar
Fresh Boarder

GK User
Sun Dec 12, 2010 10:23 pm
Hi there,

I have the same idea, but in the top of the page. We want 2 different module positions.

It will look something like this:
modpos.jpg
User avatar
Expert Boarder

GK User
Sun Dec 12, 2010 11:58 pm
Hi

This is considerate customisation and i shouldn't do this :whistle: ... but here's a good start.

Step 1:
Open templateDetails.xml file on sporter directory and add this 2 modules positions, like this:

Code: Select all
<!-- extra banner positions -->
<position>banner-topo1</position>
<position>banner-topo2</position>


Step 2:
Open ../gk_sporter/layouts/blocks/top.php and before this line:

Code: Select all
<div id="gk-top" class="main">


add this fragment:

Code: Select all
<?php
$topowidth = 'null';
if($this->countModules('banner-topo1 and banner-topo2'))
{
      $topowidth = '50%';      
   }
   else
   {
      $topowidth = '100%';   
   }
?>

<div id="banner-topo" class="main">
   <?php if( $this->countModules('banner-topo1') ): ?>
      <div class="topo1" style="width: <?php echo $topowidth; ?>;">
         <jdoc:include type="modules" name="banner-topo1" style="gavickpro" />
      </div>
   <?php endif; ?>
   <?php if( $this->countModules('banner-topo2') ): ?>
      <div class="topo2" style="width: <?php echo $topowidth; ?>;">
         <jdoc:include type="modules" name="banner-topo2" style="gavickpro" />
      </div>
   <?php endif; ?>
</div>


Step 3:
Open gk_stuff.css file on css directory and add this fragment at the end:

Code: Select all
#banner-topo .moduletable_content {background:transparent;border:none}
#banner-topo .mod_banners h3, #banner-topo .mod_banners .item {border: none}
#banner-topo {max-height: 70px;display:inline-block;}
#banner-topo .topo1 {float:left;margin: 0 auto;}
#banner-topo .topo2 {float:right;}
#banner-topo .moduletable_content img {margin: 0 auto;display:block}


Step 4:
Populate respetive banner-topo1 and banner-topo2 module positions.

As example, this should be the result on frontend:

screen_2010-12-13.png


Enjoy ;)


EDIT:
Tip tag: ADD_POSITION
User avatar
Platinum Boarder

teitbite
Mon Dec 13, 2010 2:22 am
Hi

Good one Saichinha. I'll use it if anyone else ask for adding a position :) and You know the best that this would be the most popular post ever :D
User avatar
Moderator

GK User
Tue Dec 14, 2010 11:40 am
seichinha, can't we get this in the knowledgebase???
User avatar
Platinum Boarder

GK User
Wed Dec 15, 2010 2:06 am
can't agree more teitbite
User avatar
Expert Boarder

GK User
Sat Dec 18, 2010 3:10 pm
This is great guys!

Thanks!
User avatar
Junior Boarder

GK User
Sat Jan 01, 2011 3:22 pm
Great. Much appreciated.
User avatar
Fresh Boarder

GK User
Mon Jan 03, 2011 8:43 pm
How to reduce the space between the banner and the logo?
User avatar
Expert Boarder

teitbite
Tue Jan 04, 2011 6:33 pm
Hi

In template.css file play with value of this class:

Code: Select all
#gk-top {
    min-height: 140px;
}
User avatar
Moderator

GK User
Tue Jan 04, 2011 7:20 pm
I tried this, followed directions, and it did not work...

Chris Powers
User avatar
Fresh Boarder

GK User
Wed Jan 05, 2011 2:23 am
cgmpowers wrote:I tried this, followed directions, and it did not work...

Chris Powers


Please show us your website.
User avatar
Platinum Boarder

GK User
Wed Jan 05, 2011 3:39 pm
Pls can u pls help me the Login button on The world News only work well on localhost but on the web server it doest nor work while the register button bring the window to register but the login does not bring out window to enter username/password pls can u pls help for god sake
User avatar
Fresh Boarder

GK User
Thu Jan 06, 2011 10:08 pm
Thanks, here's the website...

http://www.pbdclients.com/~aostl/



Seichinha wrote:
cgmpowers wrote:I tried this, followed directions, and it did not work...

Chris Powers


Please show us your website.
User avatar
Fresh Boarder

GK User
Mon Jan 17, 2011 9:49 am
Hi,

I try to do this modification but it dosn't work...i clear the cache, i refresh but nothing.
I don't see the new module in the back end page in the list of values...

Thanks a lot for your job, very nice.
Fred.
User avatar
Junior Boarder

GK User
Mon Jan 17, 2011 9:58 am
Hi again,

Very goog job, it work merveillously !
Thanks so much.

Soryy for the last message.
Fred.
User avatar
Junior Boarder

GK User
Mon Jan 17, 2011 10:26 am
cgmpowers wrote:Thanks, here's the website...

http://www.pbdclients.com/~aostl/


You are using Corporate 2 template and not Sporter.
User avatar
Platinum Boarder

GK User
Mon Jan 17, 2011 11:51 am
Sorry but i have a pb with the placement of my banner.

The code in the gk_stuff is :
Code: Select all
#partenaire .moduletable_content {no-repeat 0 0; float:right; height:86px; margin:54px 0 0 0; padding:0; width:543px;background:red;border:none}
#partenaire .mod_banners, #partenaire .mod_banners .item {border:none}
#partenaire .partenaire { float:right;margin: 0 auto;}
#partenaire .moduletable_content img {margin: 0 auto;display:block}


the résult is this :

banner.JPG


My banner is truncated.
I really don't know what to do. Can you help me ?
Thanks.
Fred.
User avatar
Junior Boarder

GK User
Tue Jan 18, 2011 9:39 am
no body can help me ? :sick:
User avatar
Junior Boarder

GK User
Wed Jan 19, 2011 6:40 pm
Fdnet wrote:no body can help me ? :sick:


Please show me your website or email me data.

paulo[at]gavick[dot]com

Make reference to this threat on your email.
User avatar
Platinum Boarder

GK User
Wed Jan 19, 2011 8:07 pm
Hi,

Thanks for your help.
In fact, the pb is resolved but the banner isn't placed correctly with IE7 (IE8, Firefox is OK).
The banner is placed in the top of the page...hummm i can't find solution without modified the présentation in IE8 and Firefox.
When itok in IE8 and Firefox is not ok with IE7 and when i try to change it's not ok with IE8 and Firefox...very srong.

here its the code :
Code: Select all
<?php
$topowidth = 'null';
if($this->countModules('partenaire'))
{
      $topowidth = '50%';      
   }
   else
   {
      $topowidth = '100%';   
   }
?>
<div id="partenaire" class="main">
   <?php if( $this->countModules('partenaire') ): ?>
      <div class="partenaire" style="width: <?php echo $topowidth; ?>;">
         <jdoc:include type="modules" name="partenaire" style="gavickpro" />
      </div>
   <?php endif; ?>
</div>


The gk_stuff CSS :
Code: Select all
 * Module  Partenaire transparent
 */
#partenaire .moduletable_content {no-repeat 0 0; float:right; height:86px; margin:54px 0 0 0; padding:0; width:543px;background:transparent;border:none}
#partenaire .mod_banners, #partenaire .mod_banners .item {height:86px; width:543px;border:none}
/*#partenaire {max-height: 70px;display:inline-block;}*/
#partenaire .partenaire { float:right;margin: 0 auto;}
#partenaire .moduletable_content img {margin: 0 auto;display:block}


And the copy of th screen :
IE7 :
IE7.JPG

IE8 :
IE8.JPG



Thanks for your help !
Fred
User avatar
Junior Boarder

GK User
Wed Jan 19, 2011 8:33 pm
Hi again

You just need add this line on override.css file:

Code: Select all
#partenaire {position: absolute;margin-top: -10px}


Don't forget to clear cache

Cheers ;)
User avatar
Platinum Boarder

GK User
Wed Jan 19, 2011 8:40 pm
Wonderfull !. very very very thanks to you.
I don't know how i can thanks you.
Very great.

Fred.
User avatar
Junior Boarder

GK User
Mon Feb 21, 2011 7:24 am
hi thanks for sharing this,

I only want 1 top right banner, instead of the 2 as described, so do i remove the code in bold?

<?php
$topowidth = 'null';
if($this->countModules('partenaire'))
{
$topowidth = '50%';
}
else
{
$topowidth = '100%';
}
?>

<div id="partenaire" class="main">
<?php if( $this->countModules('partenaire') ): ?>
<div class="partenaire" style="width: <?php echo $topowidth; ?>;">
<jdoc:include type="modules" name="partenaire" style="gavickpro" />
</div>
<?php endif; ?>
</div>



Updated,

I created a blank module in topo1 which then pushed the banner to the right in topo2, not int eh correct place, so still need to make it better positioned, .moduletable_content is giving it an 18 px padding

Paul
User avatar
Junior Boarder

GK User
Sat Apr 30, 2011 9:17 am
Hi, is it possible for any of the experts here to publish a guide related to this issue applicable to corporate2 template?
User avatar
Fresh Boarder

GK User
Thu Jun 23, 2011 1:52 pm
im trying it too.... on yourshop template , but its not working...... want to replace art module with other module
User avatar
Senior Boarder

GK User
Fri Jul 22, 2011 4:20 am
im also having the same problems, i just want to replace my virtuemart cart position with empty module that i want to put facebook like button. i'm currently using yourshop template.

the code above adding banner on top of it, but not replacing the existing position
User avatar
Senior Boarder

GK User
Thu Aug 18, 2011 6:01 pm
Hi I am not using the same template but I have gotten everything completed except, I cannot move my banner down and I am not sure how to fix it. Please help.
bannerissue.png
User avatar
Fresh Boarder

GK User
Fri Jan 06, 2012 12:05 am
Seichinha wrote:Hi again

You just need add this line on override.css file:

Code: Select all
#partenaire {position: absolute;margin-top: -10px}


Don't forget to clear cache

Cheers ;)


Hi,

Don't work in my site " http://www.craff.org/portal/index.php "

Seichinha, you can see this?

thanks

Perpetuo
User avatar
Junior Boarder

GK User
Fri Jan 13, 2012 10:03 am
Someone can help me?

Thank you.
User avatar
Junior Boarder

Konrad M
Fri Jan 13, 2012 10:26 am
Hi
I don't see any baner at the top of site you gave us.
User avatar

GK User
Fri Jan 13, 2012 8:10 pm
Konrad M wrote:Hi
I don't see any baner at the top of site you gave us.


I do not know which files I must edit this to put a banner on top.

You can help me?

Thanks
User avatar
Junior Boarder

Konrad M
Sun Jan 15, 2012 5:03 pm
Which template do you use. Becasue screen is from musicity and topic is about sporter.
User avatar

GK User
Mon Jan 16, 2012 9:56 am
Konrad M wrote:Which template do you use. Becasue screen is from musicity and topic is about sporter.



Hi,

My template is sporter ( www.craff.org/portal/index.php ).

Thanks
User avatar
Junior Boarder

Konrad M
Mon Jan 16, 2012 12:27 pm
You want to put it bettwen logo and search or above them ?
User avatar

GK User
Mon Jan 16, 2012 12:35 pm
Konrad M wrote:You want to put it bettwen logo and search or above them ?



I want to put between the logo and serch.

Thanks
User avatar
Junior Boarder

Konrad M
Mon Jan 16, 2012 12:42 pm
Try edit \templates\gk_sporter\layouts\default.php and find it
Code: Select all
   <div id="gkTopWrapper" class="gkWrap">
      <?php $this->messages('message-position-1'); ?>
              
      <div id="gkLogoWrapper">   
          <?php $this->loadBlock('logo'); ?>
      </div>

       /* TRY PASTE IT HERE  */
       
        <?php if( $this->modules('search') ): ?>
            <div id="gkSearch">
              <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
          </div>
        <?php endif; ?>
User avatar

GK User
Mon Jan 16, 2012 12:53 pm
Konrad M wrote:Try edit \templates\gk_sporter\layouts\default.php and find it
Code: Select all
   <div id="gkTopWrapper" class="gkWrap">
      <?php $this->messages('message-position-1'); ?>
              
      <div id="gkLogoWrapper">   
          <?php $this->loadBlock('logo'); ?>
      </div>

       /* TRY PASTE IT HERE  */
       
        <?php if( $this->modules('search') ): ?>
            <div id="gkSearch">
              <jdoc:include type="modules" name="search" style="<?php echo $this->module_styles['search']; ?>" />
          </div>
        <?php endif; ?>



It is this code that should I insert?
User avatar
Junior Boarder

Konrad M
Mon Jan 16, 2012 12:58 pm
No it is place where you should paste your code with new module postion. I added comment where you should paste it.
User avatar

GK User
Mon Jan 16, 2012 1:02 pm
Konrad M wrote:No it is place where you should paste your code with new module postion. I added comment where you should paste it.


Thanks,

But, what code should I put?

Thanks.
User avatar
Junior Boarder


cron
Remember me
Register New Account
If you are old Gavick user, click HERE for steps to retrieve your account.