Last step to add a new module

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
Wed Nov 27, 2013 10:22 am
Reply with quote
Report this post
Hi, I'm trying to add a new module position at the top of the news template to place my logo. I follow the documentation information, and I think I modified the templateDetails.xml file and the gk.const.php correctly. But when editing the default.php file, I did something wrong because I have a fatal error (Call to undefined method GKTemplate::modules()). I named the new module as 'newlogo". Can someone tell me the code I have to write and the line where I have to place it.

Thanks
User avatar
Senior Boarder

GK User
Wed Nov 27, 2013 7:09 pm
Reply with quote
Report this post
Hi.
probably you made something wrong.

1) Replace "gk.const.php" file from original package. In most cases you don't have to do this step.
2) Could you send add here zipped xml and changed "Default.php" - I will check
User avatar
Platinum Boarder

GK User
Wed Nov 27, 2013 7:20 pm
Reply with quote
Report this post
Ok.
I have made for you ready files. They should work without errors.
newlogo--module.zip


But remember to fix gk.const.php.
I didn't know where you wanted to insert a newlogo module so I insert near default.

Now your turn to play with CSS for this module.

Code: Select all
.newlogostyle  {      }
User avatar
Platinum Boarder

GK User
Wed Nov 27, 2013 7:37 pm
Reply with quote
Report this post
Thanks for your reply. The files you attach me did not work. Here you have the two files that I had modified. I didn't attach the default.php files because I'm sure that I did changes wrong.
I want to place logo at the top of the page, in the center. Like we have it in our actual site http://www.paternaaldia.com
User avatar
Senior Boarder

GK User
Wed Nov 27, 2013 7:41 pm
Reply with quote
Report this post
but what about your default.php ??
this is the most important file.
User avatar
Platinum Boarder

GK User
Wed Nov 27, 2013 7:45 pm
Reply with quote
Report this post
p.s.
On old page you have template called "Twn2" and on News are diffrent layout -- so you need newlogo above or under top menu ?
User avatar
Platinum Boarder

GK User
Wed Nov 27, 2013 7:50 pm
Reply with quote
Report this post
I know that they are different templates. I only want to show you where i want to place the logo. We want to place logo above the menu.
If you want I can try to modified the default.php file again to show you what I did
User avatar
Senior Boarder

GK User
Wed Nov 27, 2013 10:05 pm
Reply with quote
Report this post
I done it.
Sure there was problem with php code. so please use just this in default.php

Code: Select all
 <div class="newlogostyle">
<jdoc:include type="modules" name="newlogo" style="<?php echo $this->module_styles['newlogo']; ?>" />
</div>


I added it after line ~~67 with php message block.

Of course add new module "Custom HTML code" with logo inside & text-align:center in newlogo position, and you will see:
User avatar
Platinum Boarder


cron