K2 article publishing date

GK User
Thu Nov 15, 2012 12:37 pm
Hi all!
I have a common problem with most of your templatesL when i hide publishing date in k2 item the date dissapears but instead the title of the article don"t align to the left. Please how can i resolve that?

J2.5.8
User avatar
Platinum Boarder

Konrad M
Thu Nov 15, 2012 2:54 pm
Hi,
please give us url to your site. It will be much easier to help you.
User avatar

GK User
Thu Nov 15, 2012 3:38 pm
User avatar
Platinum Boarder

Konrad M
Thu Nov 15, 2012 3:41 pm
Please add to override.css
Code: Select all
.itemToolbar {
margin: 0 0 25px 0 !important;
}

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

GK User
Thu Nov 15, 2012 3:52 pm
Thank you!
It works but it is important to me to have the posibility to chose when an article show/not show the date and the title alignes corectly

Check out http://profitrad.ro/index.php/despre-noi/prezentare
User avatar
Platinum Boarder

Konrad M
Thu Nov 15, 2012 4:06 pm
So in this case you have to use Java Script code. Please go to js/gk.scripts.js and find (line97):
Code: Select all
});
// function to set cookie
function setCookie(c_name, value, expire) {
   var exdate=new Date();
   exdate.setDate(exdate.getDate()+expire);
   document.cookie=c_name+ "=" +escape(value) + ((expire==null) ? "" : ";expires=" + exdate.toUTCString());
}

change it to:
Code: Select all
    if(document.getElements('.itemDateCreated')){
        var el =  document.getElements('.itemToolbar');
        for (var i=0; i < tab.length; i++) {   
            el[i].addClass('mypadding');
        }   
   }
});
// function to set cookie
function setCookie(c_name, value, expire) {
   var exdate=new Date();
   exdate.setDate(exdate.getDate()+expire);
   document.cookie=c_name+ "=" +escape(value) + ((expire==null) ? "" : ";expires=" + exdate.toUTCString());
}

and then add to override.css
Code: Select all
.mypadding {
margin-left:112px !important;
}
User avatar

GK User
Thu Nov 15, 2012 4:54 pm
Is not working
User avatar
Platinum Boarder

Konrad M
Thu Nov 15, 2012 4:56 pm
Please send me Private Message with access to your joomla backend and ftp access.
User avatar

GK User
Thu Nov 15, 2012 5:34 pm
pM sent
User avatar
Platinum Boarder

GK User
Fri Nov 16, 2012 10:09 am
Hi Konrad! Could you investigate? . I"ve send you another PM
User avatar
Platinum Boarder

GK User
Mon Nov 19, 2012 3:33 pm
There is any gavick moderators on this forum?
User avatar
Platinum Boarder

Konrad M
Mon Nov 19, 2012 5:45 pm
I checked code and I fixed it. Now should work.
User avatar

GK User
Mon Nov 19, 2012 6:35 pm
Many thanks Konrad!
Could you show us the modification, so all the users benrfit from this little necesary tweak?
User avatar
Platinum Boarder

Konrad M
Tue Nov 20, 2012 10:26 am
I removed erlier java script code and I just added to override.css
Code: Select all
.itemToolbar {
margin: 0 0 25px 0 !important;
}

.itemDateCreated {
    margin: 7px 20px 0 0 !important;
    position: relative !important;
}
User avatar


cron