Please login or register.

Login with username, password and session length
Advanced search  

News:

Latest sNews - sNews 1.7 - with its own forums - for discussion and user mods.

Author Topic: Padding on content. moving date  (Read 6520 times)

netfuel

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Padding on content. moving date
« on: December 21, 2007, 05:01:44 PM »

Hey guys, I am wanting to break out the title, body, and post data into three seperate divs. EX:

Code: [Select]
<div id="title">Title of article</div>
<div id="body_art">Body of an article</div>
<div id="post data">date time comments</div>

I have been successful up to this point? Any help would be awesome. (I have been digging around for a day or so now. haha.)

oh and I know very little about php.

example of the page I am working on here: http://www.mattladner.com/
Logged

stjepan

  • Full Member
  • ***
  • Karma: 3
  • Posts: 135
Re: Padding on content. moving date
« Reply #1 on: December 26, 2007, 10:58:46 AM »

Why should you do that?

centered

  • Guest
Re: Padding on content. moving date
« Reply #2 on: December 26, 2007, 12:58:12 PM »

Hey guys, I am wanting to break out the title, body, and post data into three seperate divs. EX:

Code: [Select]
<div id="title">Title of article</div>
<div id="body_art">Body of an article</div>
<div id="post data">date time comments</div>

I have been successful up to this point? Any help would be awesome. (I have been digging around for a day or so now. haha.)

oh and I know very little about php.

example of the page I am working on here: http://www.mattladner.com/

In 1.6

Article title:
Find this line:
Code: [Select]
if ($r['displaytitle'] == 'YES') {echo '<h2>'.(strlen($text) > $shorten ? $link.$category.'/'.$r['seftitle'].'/" title="'.$title.'">'.$title.'</a>' : $title).'</h2>';}
Article Body:
Find this line (next line lol):
Code: [Select]
file_include(str_replace('[break]', '', $text), $shorten);
Post data, already has tags:
Find:
Code: [Select]
function tags($tag) {
$tags = array(); $tags['infoline'] = '<p class="date">,readmore,comments,date,edit,</p>';
$tags['comments'] = '<div class="comment">,<p class="date">,name, '.l('on').' ,date,edit,</p>,<p>,comment,</p>,</div>';
return $tags[$tag];
}
Logged

centered

  • Guest
Re: Padding on content. moving date
« Reply #3 on: December 26, 2007, 01:07:28 PM »

Logged

stjepan

  • Full Member
  • ***
  • Karma: 3
  • Posts: 135
Re: Padding on content. moving date
« Reply #4 on: December 26, 2007, 02:41:29 PM »

What's the point of every element in its own div?  Styling?  Design?

centered

  • Guest
Re: Padding on content. moving date
« Reply #5 on: December 26, 2007, 02:59:01 PM »

Yes, to some.
Logged

stjepan

  • Full Member
  • ***
  • Karma: 3
  • Posts: 135
Re: Padding on content. moving date
« Reply #6 on: December 27, 2007, 01:59:20 PM »

I was curious...

netfuel

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Padding on content. moving date
« Reply #7 on: December 27, 2007, 11:00:45 PM »

Article Body:
Find this line (next line lol):
Code: [Select]
file_include(str_replace('[break]', '', $text), $shorten);


Thanks for the help! I think I have most of what I am looking for working. The only thing left is I need 20px of padding on the post body. And Since I don't really know PHP I keep messing it up. can I do something like this?

Code: [Select]
'<div id="body_art">'
file_include(str_replace('[break]', '', $text), $shorten);
'</div>'
Logged

centered

  • Guest
Re: Padding on content. moving date
« Reply #8 on: December 27, 2007, 11:32:24 PM »

Code: [Select]
echo '<div id="body_art">';
file_include(str_replace('[break]', '', $text), $shorten);
echo '</div>';


I like how your page is coming

« Last Edit: December 27, 2007, 11:35:07 PM by equilni »
Logged

netfuel

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Padding on content. moving date
« Reply #9 on: December 27, 2007, 11:45:22 PM »

Thanks!

If I can ever get it styled correctly it should turn out like this:
http://www.mattladner.com/matt.jpg

I am also planning on making the background image random on every page so the organic lines are a bit different every time.
Logged

netfuel

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Padding on content. moving date
« Reply #10 on: December 28, 2007, 12:35:05 AM »

Replacing

Code: [Select]
file_include(str_replace('[break]', '', $text), $shorten);

with
Code: [Select]
file_include(str_replace('[break]', '', '<div id="art">'.$text.'</div>'), $shorten);

seemed to work really well, I think Ill do something similar for the comments and forms.
Logged

centered

  • Guest
Re: Padding on content. moving date
« Reply #11 on: December 31, 2007, 05:45:25 PM »

I would double check something...
http://www.mattladner.com/print/aiga-poster/#Comment1

i shouldn't be able to see an edit after the comment...
Logged

netfuel

  • Newbie
  • *
  • Karma: 0
  • Posts: 5
Re: Padding on content. moving date
« Reply #12 on: December 31, 2007, 05:52:03 PM »

I would double check something...
http://www.mattladner.com/print/aiga-poster/#Comment1

i shouldn't be able to see an edit after the comment...

yeah not really sure why that is printing but Ill look into it. I am also having some issues with the background image getting covered by something. But other than that I think all that is left is a little javascript to preload the big images and a crap load of image production work.
Logged