Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 06-10-2005, 09:52 AM
Kenneth K Offline
pp regular
 
Join Date: Oct 2004
Posts: 49
Send a message via MSN to Kenneth K
styling comments li ?

In my never ending urge to perfect my design I would like to style the last line in the comments. You know the name-link (got that) but also the '@ date'. I tried looking in the main php but I have no luck in spotting anything in there. So where do I look?

Kenneth :?
__________________
http://www.pinx.dk/photoblog/
Reply With Quote
  #2  
Old 06-10-2005, 08:11 PM
Connie
Guest
 
Posts: n/a
Kenneth,

as I explained very often already, it is very easy to identify the CSS-elements of a page with Firefox and the webdeveloper extension

1) open the comment-page in Firefox
2) CSS / View Style Information
3) go with the cursor to the part of the web page which you want to identify
4) in the status line you see: ..... div comments > ul >li
5) so you know that the the comment is formatted by a LI-element (listing element)

but: this shows that the last line has the same formatting as the complete comment
so you have no direct access to the last line

I do not recomment you now to go into the script which produces the comments, as any moderation there will be subject to further updates ;=)

so there is no direct way to format it via template + CSS
Reply With Quote
  #3  
Old 06-10-2005, 08:32 PM
Kenneth K Offline
pp regular
 
Join Date: Oct 2004
Posts: 49
Send a message via MSN to Kenneth K
Quote:
but: this shows that the last line has the same formatting as the complete comment
so you have no direct access to the last line
Yes exactly, that's what I want to change. I was hoping that someboby could go in and make that last line a element so it can be styled. It's a flaw IMO that you can't change it.

Kenneth
__________________
http://www.pinx.dk/photoblog/
Reply With Quote
  #4  
Old 06-10-2005, 08:48 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
i'll look into this. there's no reason why users shouldn't have the ablity to change it.
Reply With Quote
  #5  
Old 06-10-2005, 08:50 PM
Connie
Guest
 
Posts: n/a
the last line should be set into a <span...> when the last line is produced in index.php ...

there is no way to say with CSS " please format only the last line of a list-element" unfortunately
Reply With Quote
  #6  
Old 06-10-2005, 09:04 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
in includes/functions.php change

Code:
		$image_comments .= "<li>$comment_message<br />$comment_name @ $comment_datetime</li>";
to

Code:
		$image_comments .= "<li>$comment_message<br /><span id='commentinfo'>$comment_name @ $comment_datetime</span></li>";
and then in your stylesheet you can use #image info {whatever} to style that line.
Reply With Quote
  #7  
Old 06-10-2005, 09:15 PM
phunk Offline
forum loafer
 
Join Date: Jun 2005
Location: AT
Posts: 15
same wish here.
i found after long time searching the following in functions.php

line 24

$image_comments .= "<li>$comment_message<br />$comment_name @ $comment_datetime</li>";

this should get you where you want


edit: *bummer* a few mins too late!
Reply With Quote
  #8  
Old 06-10-2005, 09:31 PM
Kenneth K Offline
pp regular
 
Join Date: Oct 2004
Posts: 49
Send a message via MSN to Kenneth K
Thanks again Joe[y] I never looked in includes/functions.php

Did I mention I love this forum? :lol:

Kenneth
__________________
http://www.pinx.dk/photoblog/
Reply With Quote
  #9  
Old 06-10-2005, 09:47 PM
derevaun Offline
pp regular
 
Join Date: Mar 2005
Location: oly, wa
Posts: 47
I think I changed mine to this:

Code:
$image_comments .= "  <dt>$comment_name ($comment_datetime)</dt>\n    <dd>$comment_message</dd>";
...and used a parent selector in the dt and dd rules to format it visually. Seems more semantic this way, and you get separate (instead of nested) elements. Potaytoe potahtoe :wink:
Reply With Quote
  #10  
Old 06-10-2005, 09:49 PM
Joe[y]'s Avatar
Joe[y]+ Offline
Team Pixelpost
 
Join Date: Mar 2005
Location: UK
Posts: 3,101
Send a message via MSN to Joe[y]
Quote:
Originally Posted by derevaun
I think I changed mine to this:

Code:
$image_comments .= "  <dt>$comment_name ($comment_datetime)</dt>\n    <dd>$comment_message</dd>";
...and used a parent selector in the dt and dd rules to format it visually. Seems more semantic this way, and you get separate (instead of nested) elements. Potaytoe potahtoe :wink:
i'd agree with this too.... but most users wouldn't care about semantics.. just simplicity.
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 07:46 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs