Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Info line styling  (Read 4482 times)

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
Info line styling
« on: October 15, 2006, 07:38:57 PM »

I've been trying to change the style of the info line under each post, but can't get it to work.

Quote
// INFO LINE TAGS (readmore, comments, date)
function tags($tag) {
   $tags = array(); $tags['infoline'] = '

,readmore,comments,date,edit,

';
   $tags['comments'] = '
,

,name, on ,date,edit,

,

,comment,

,
';
   return $tags[$tag];
}
Do I need to add anything in there? I've tried:
readmore, ·, comments, · etc etc

but then when there's no Read More link, it shows two middots next to eachother..

Help please :$
Logged

Jochum Meester

  • Sr. Member
  • ****
  • Karma: 1
  • Posts: 309
    • JochumMeester.com
Info line styling
« Reply #1 on: October 15, 2006, 07:46:41 PM »

Another question which is related: where is the function to change timezones? :)
Logged

celebro

  • Guest
Info line styling
« Reply #2 on: October 15, 2006, 07:48:29 PM »

try styling them like so in your css file.

Code: [Select]
.comment .date a {
    your styles: here;
}
Those info lines are actually links besides the date which is plain text. and can be styled with .date { }

BTW THIS IS MY 100 POST WEE!!!
Logged

Dom

  • Full Member
  • ***
  • Karma: 5
  • Posts: 163
    • domdelimar.com
Info line styling
« Reply #3 on: April 05, 2007, 07:40:39 PM »

Quote from: JM
I've tried:
readmore, , comments, etc etc

but then when there's no Read More link, it shows two middots next to eachother..

Help please :$
That's exactly what's been troubling me today. And the only way I could fix it, since I couldn't find a solution through CSS is to muck with the center function...

So, go and locate the function center() in your snews.php file,
and then search for this chunk of code inside this function:
Quote
if ($infoline == true) {
                  foreach ($tag as $tag) {
                     switch (true) {
                        case ($tag == 'date'): echo $a_date_format; break;
                        case ($tag == 'readmore' && strlen($r['text']) > $shorten):
                           echo $link.$category.'/'.$r['seftitle'].'/" title="'.l('read_more').'">'.l('read_more').'</a> '; break;
and change it into this (hint: blue is the only thing I added)
Quote
if ($infoline == true) {
                  foreach ($tag as $tag) {
                     switch (true) {
                        case ($tag == 'date'): echo $a_date_format; break;
                        case ($tag == 'readmore' && strlen($r['text']) > $shorten):
                           echo $link.$category.'/'.$r['seftitle'].'/" title="'.l('read_more').'">'.l('read_more').'</a> '; break;
Similarly, you could make this even like this:
Quote
echo ' '.$link.$category.'/'.$r['seftitle'].'/" title="'.l('read_more').'">'.l('read_more').'</a> '; break;
depending how you sorted your infoline (for example, mine goes like this: "Posted on date ~ readmore ~ comments(n)" and I chose to add "~" in front of readmore and comments(n) and that's it.)

The same needs to be applied few rows below, on comment part:
Quote
echo $link.$category.'/'.$r['seftitle'].'/#'.l('comment').'1" title="'.l('comments').'">'.l('comments').' ('.$comments_num.')</a> '; break;
and wherever else you need it (date, edit parts?)... you get the point...
« Last Edit: August 29, 2007, 03:45:18 PM by Dom »
Logged

Zucye

  • Sr. Member
  • ****
  • Karma: 5
  • Posts: 347
    • Simplemente una Mujer
Info line styling
« Reply #4 on: April 06, 2007, 05:25:32 PM »

Quote from: JM
Another question which is related: where is the function to change timezones? :)
Add the following to your .htaccess file, accoding to your time zone:
Code: [Select]
SetEnv TZ "US/Eastern"(US/Eastern = is my time zone)
It only applies to new posts; previous posts will retain the old time format.
Logged
We can always learn from our failures, not so much from obvious success - C. Robinson (W. Disney). :)