Display Date

GK User
Wed Aug 24, 2011 11:41 am
Hi
How could I show date in this template?

Thank you?
User avatar
Expert Boarder

GK User
Tue Sep 27, 2011 11:27 am
hi,

I also want to show date how to do that?
User avatar
Fresh Boarder

GK User
Tue Sep 27, 2011 6:53 pm
See attached image if its what you want and i ll post the solution.
User avatar
Platinum Boarder

GK User
Tue Sep 27, 2011 7:17 pm
yes, I want same like that!:)
User avatar
Fresh Boarder

GK User
Tue Sep 27, 2011 8:22 pm
Firstly backup your website and database.
See attached image on how this looks.

What below does is
1. Creates new template module position called "topdate"
2. Adds template position "topdate" to show in template. If module is disabled it will not appear
3. Adds CSS for Date module
4. Downloading and installating date module for variety of usage rather then using simple phpdate function.
5. Necessary settings to show as in attached image.

Edit templatesgk_twn2templateDetails.xml
After Line 79 add "<position>topdate</position>" so it looks like below
Code: Select all
      <position>middlemenu</position>
      <position>highlighter</position>
      <position>middlenav1</position>
      <position>middlenav2</position>      
      <position>topdate</position>      
      <!-- STANDARD Module Positions -->

open "templatesgk_twn2layoutsblockstop.php"
Find line 54 to 58 which is :
Code: Select all
   <?php if($this->modules('highlighter')) : ?>
   <div id="gkHighlighter">
      <jdoc:include type="modules" name="highlighter" style="<?php echo $this->module_styles['highlighter']; ?>" />
   </div>
   <?php endif; ?>

Change it to like this:
Code: Select all
   <?php if($this->modules('highlighter')) : ?>
   <div id="gkHighlighter">
      <jdoc:include type="modules" name="highlighter" style="<?php echo $this->module_styles['highlighter']; ?>" />
   </div>
   <?php if($this->modules('topdate')) : ?>
   <div>
      <jdoc:include type="modules" name="topdate" />
   </div>
   <?php endif; ?>   
   <?php endif; ?>


Enable CSS override feature and add below into override.css
Code: Select all
/* Topdate Date Module */
#ty2udate195 { float: right; margin-top: 49px; padding-right: 5px; font-family: BebasNeue,Arial,sans-serif;}
/* top highlighter */
#gkHighlighter { position: absolute; left: 0; bottom: 8px; width: 70%;  }

Download and install Date Module from below link - Module is free and just change amount to 0 and click get it:
Code: Select all
http://ty2u.com/downloads/joomla/modules/date-and-time.html

Goto Joomla Admin > Extensions > Module Manager > Look for "Date2" module
Click on to edit features As follows:
Show title : Hide
Status : Published
Position: topdate
Module Assignment: On All Pages

Then on the right:
Display Options > Show on separate lines or on the same line? : Same Line
Time Options > Time prefix : " - " so its space - space or you can write Time: so date and time doesnt stick together.
Time Options > Use 24 hour time? : Yes
There are lots of other options which you can configure there but above will show as the image i attached.

Good Luck....
User avatar
Platinum Boarder

GK User
Wed Sep 28, 2011 2:45 am
Hi NormanUK

I Tried your solution, but didn't work for me.

These are my problems:

1. I Found this code on templatesgk_twn2layoutsblockslogo.php:

"Open "templatesgk_twn2layoutsblockstop.php"
Find line 54 to 58 which is :....



2. The date module is in the left and without BebasNeue font.

3. This module is not compatible with image Show GK4 (break and stop the slideshow)

I'll try with other date module.

Thank you very much.
User avatar
Expert Boarder

GK User
Wed Sep 28, 2011 3:07 am
Did you enable CSS override feature?
Do you have a link to your website ?
User avatar
Platinum Boarder

GK User
Wed Sep 28, 2011 7:58 am
User avatar
Expert Boarder

GK User
Wed Sep 28, 2011 11:34 am
In Override.css delete below line
Code: Select all
/* Topdate Date Module */
#ty2udate195 { float: right; margin-top: 49px; padding-right: 5px; font-family: BebasNeue,Arial,sans-serif;}


Goto Date2 Module settings and on the right Display Options CSS Styles in the box enter below and save and re-enable date module so we can make sure date module gets its styling.
Code: Select all
float: right; margin-top: 49px; padding-right: 5px; font-family: BebasNeue,Arial,sans-serif;


On my 2 local installation class name is "ty2udate195" as you have disabled the module already i cannot see which class name module uses in your installation. So by doing above we can see if it does get the class css applied. So we can look further for correction when using image show...
User avatar
Platinum Boarder

GK User
Wed Sep 28, 2011 6:59 pm
normanUK wrote:In Override.css delete below line
Code: Select all
/* Topdate Date Module */
#ty2udate195 { float: right; margin-top: 49px; padding-right: 5px; font-family: BebasNeue,Arial,sans-serif;}


Goto Date2 Module settings and on the right Display Options CSS Styles in the box enter below and save and re-enable date module so we can make sure date module gets its styling.
Code: Select all
float: right; margin-top: 49px; padding-right: 5px; font-family: BebasNeue,Arial,sans-serif;


On my 2 local installation class name is "ty2udate195" as you have disabled the module already i cannot see which class name module uses in your installation. So by doing above we can see if it does get the class css applied. So we can look further for correction when using image show...


The date it shows with Bebasneue font at right corner, but image show stills broken with both enabled.
Is the last thing until publish my site.


Can you help me to solve the problem with the compatibility between the two modules of the date and the images?
I'll give you administrator access. Give me your email, please
Thank you.
User avatar
Expert Boarder

GK User
Wed Sep 28, 2011 8:23 pm
I am sorry but because of past experiences i dont take admin account from fellow users ;)

Can you please enable both modules so we can see the error perhaps we can fix it that way.
User avatar
Platinum Boarder

GK User
Wed Sep 28, 2011 9:29 pm
Ok. It's enabled now.
The module GK_Tabs GK4 is incompatible too, when date it is enabled.

http://www.bimbachedigital.es/2012/

Thank you very much
User avatar
Expert Boarder

GK User
Wed Sep 28, 2011 10:45 pm
its not a css problem , you can disable the date module , i ll install imageshow in my local installation and see if i can find the problem.
User avatar
Platinum Boarder

GK User
Thu Sep 29, 2011 10:30 am
Change from
Code: Select all
   <?php if($this->modules('highlighter')) : ?>
   <div id="gkHighlighter">
      <jdoc:include type="modules" name="highlighter" style="<?php echo $this->module_styles['highlighter']; ?>" />
   </div>
   <?php if($this->modules('topdate')) : ?>
   <div>
      <jdoc:include type="modules" name="topdate" />
   </div>
   <?php endif; ?>   
   <?php endif; ?>

To below , this is simple php to show date instead of the module as i couldnt recreate the problem you have. Leave the date2 module on as it looks to have any modules there then displays php date.
Code: Select all
   <?php if($this->modules('highlighter')) : ?>
   <div id="gkHighlighter">
      <jdoc:include type="modules" name="highlighter" style="<?php echo $this->module_styles['highlighter']; ?>" />
   </div>
   <?php endif; ?>
   <?php if($this->modules('topdate')) : ?>   
   <div id="ty2udate195">
      <?php echo JHTML::_('date', 'now'); ?>
   </div>
   <?php endif; ?>
User avatar
Platinum Boarder

GK User
Thu Sep 29, 2011 11:00 am
Now works fine. I put this code in override.css:

Code: Select all
/* Topdate Date Module */
#ty2udate195 { float: right; margin-top: 10px; padding-right: 5px; font-family: BebasNeue,Arial,sans-serif;}


http://bimbachedigital.es/2012/


Thank you very much ;)
User avatar
Expert Boarder

GK User
Thu Sep 29, 2011 5:46 pm
No problem at all...
User avatar
Platinum Boarder


cron