Page 2 of 3
Posted: Thu Sep 11, 2008 1:33 am
by AFC_North
Hmm. That doesn't seem to be working-- it makes the page vanish, and makes the "Manage Styles" page blank.
Any ideas? (I'm afraid I only understood your instructions enough to follow them; I don't know enough to play around with them yet.)
EDIT: The problem seems to be in the config.inc.php file, as deleting it restores the page (and adding the ?> at the end didn't fix it either).
EDIT 2: Aha! I found the problem! a missing semicolon in line 13. The blog and "Manage Styles" page are back! Now let's see how it works...
Posted: Thu Sep 11, 2008 3:55 pm
by Don Chambers
Sorry about that - in my haste, I forgot the semicolon. I edited my original post to correct it just in case anyone else trips across this message in the future.
So, is it working for you? I thought this method might be good because you can control the exact placement of your ticker code without having to conform to any particular plugin.
Posted: Fri Nov 21, 2008 4:59 am
by AFC_North
Hi; I'm back again!
Thank you for the code suggestion, Don. It works just right; it looks identical to the original version, but now I can change the ticker content by entering it directly into a field on the "Manage Styles" page.
http://www.afc-north.com/serendipity/
The organization of my page is really shaping up; I have been able to play around with styles so that plug-ins on the left fit with the black background and plug-ins on the right fit with the light blue background.
The main thing that remains to work on now is the blog itself, in the center. I don't really like those little blue boxes at the top right of each post, since most of the information there is redundant. I'd prefer a more simple format with a link to the comments (showing the total number) at the end of the post. (I actually don't know what trackbacks are, but spambots have been giving me a few every week, so maybe it will be best to disable them.)
How should I go about changing the format of a post? Is this dictated by the "entries.tpl" file? I've taken a look at it, but so far I can't find the part that relates to the little boxes. Would it be better to start from a different style template? (I think I modified this one from "Serendipity v3.0" by Carl Galloway.)
Thanks for your help!
Posted: Fri Nov 21, 2008 2:22 pm
by judebert
It's looking pretty sharp!
Yes, you can change it without much problem, and you're on the right track: since it's part of the entry, it's in the entries.tpl. It's actually pretty easy to find... with the right tools. Here's what I did:
I started up Firefox with the Firebug extension. I loaded up your page, then opened the Firebug window. I clicked the HTML tab, then the "Inspect" button. I hovered over your box and clicked on it.
In the HTML tab, the <div> for the box was highlighted: <div class="serendipity_entryFooter">. I opened the entries.tpl and search for serendipity_entryFooter.
You'll find it on line 15 of the original template. There's a lot of stuff in it; you don't find the </div> until line 60.
You can remove any of that stuff you like. {* Smarty comments *} may come in handy while you experiment. And of course, you've got all the style IDs and classes sitting right there for further experimentation; you can even change them live in Firebug until you get what you want, then save them in the style.css!
Hope this helps!
Posted: Fri Nov 21, 2008 2:39 pm
by sonichouse
Your sites looks really cool.
Might I be so bold as to suggest that you loose the "entry title" and "posted by" in the entry footer and then change the css e.g.
Code: Select all
div.serendipity_entryFooter {
color:#000000;
float:right;
font-size:0.9em;
margin:0;
width:100px;
}
This would leave you with just the comments and trackback counts floating on the right of entry title.
Of course feel free to do as you please
/Steve.
Posted: Tue Nov 25, 2008 5:20 am
by AFC_North
Thanks for your help! I've incorporated both of your suggestions; now the comment count is the only thing displayed at the top of each blog post. I have also continued working on the styles-- now I like how the comments themselves look.
A few more questions:
-- How can I make the comments display in linear format by default instead of threaded? I thought I saw this option somewhere, but I can't find it now.
-- Serendipity is making me approve every comment before it will display (my brother made a few random comments to test it out). I can't figure out why it's still doing this, since the settings on Spam Protector seem to indicate that it should only ask for approval if the comment is caught by the spam filter.
-- I still don't know why there is a thin light blue border around the left sidebar, but I can live with it. : )
-- Edit: Thought of another one. Can I make it so that it will mark comments made by me somehow so it won't be possible for someone to post as "AFC_North" and pretend to be me (without my password)?
Thanks!
Posted: Tue Nov 25, 2008 3:33 pm
by Don Chambers
AFC_North wrote:-- How can I make the comments display in linear format by default instead of threaded? I thought I saw this option somewhere, but I can't find it now.
I know how to FORCE it, but I'm not sure how to change the default - maybe Garvin can answer that.... maybe even create a option for the default comment view.
AFC_North wrote:-- Serendipity is making me approve every comment before it will display (my brother made a few random comments to test it out). I can't figure out why it's still doing this, since the settings on Spam Protector seem to indicate that it should only ask for approval if the comment is caught by the spam filter.
How about the entry itself? Is the checkbox marked "Comments & trackbacks to this entry requires moderation"? You can set this default by user, or individually for each entry.
AFC_North wrote:-- I still don't know why there is a thin light blue border around the left sidebar, but I can live with it. : )
I see a border applied inline on your leftsidebar <td>. Is that what you are talking about?
AFC_North wrote:-- Edit: Thought of another one. Can I make it so that it will mark comments made by me somehow so it won't be possible for someone to post as "AFC_North" and pretend to be me (without my password)?
The current default comments.tpl includes this for determining if the comment is made by the entry author:
Code: Select all
{if $entry.author == $comment.author}serendipity_comment_author_self{/if}
So, if the comment author name and the entry author name are the same, it applies an additional class of .serendipity_comment_author_self to the comment. You could tighten that a bit by also requiring the author email to match as well:
Code: Select all
{if ($entry.author == $comment.author) and ($entry.email == $comment.clear_email)}
Posted: Wed Nov 26, 2008 1:56 am
by AFC_North
Don Chambers wrote:How about the entry itself? Is the checkbox marked "Comments & trackbacks to this entry requires moderation"? You can set this default by user, or individually for each entry.
I checked both the entry itself and my personal settings, and for both, "Comments & trackbacks to this entry requires moderation" is set to "No" or unchecked, while "Allow comments to this entry" is set to "Yes" or checked.
I'm getting notification e-mails about each comment or trackback the blog receives.
Don Chambers wrote:I see a border applied inline on your leftsidebar <td>. Is that what you are talking about?
The only place I see a border applied for the whole section is a "border=0." I actually think it's more likely to be a problem with padding or margin somewhere, given that it's the background color showing through. I'm sure part of the problem is that my coding is a little Frankenstein-esque.
Don Chambers wrote:The current default comments.tpl includes this for determining if the comment is made by the entry author:
Code: Select all
{if $entry.author == $comment.author}serendipity_comment_author_self{/if}
So, if the comment author name and the entry author name are the same, it applies an additional class of .serendipity_comment_author_self to the comment. You could tighten that a bit by also requiring the author email to match as well:
Code: Select all
{if ($entry.author == $comment.author) and ($entry.email == $comment.clear_email)}
I saw that style in the style.css file, but I didn't notice it doing anything. The comment for that section says "style for comment author if logged in"; wouldn't that mean that those comments would only appear different to me if I'm logged in? I would imagine that most if not all comment posters on my site would have no reason to log in, so the difference wouldn't show up for them anyway, would it?
Thanks! This site is awesome. I can't get over the fact that I can come back after months of being busy, and I usually get a helpful answer within a couple days here!
Posted: Wed Nov 26, 2008 3:18 am
by Don Chambers
I cannot really diagnose the moderation issue further without taking a peek "under the hood". If you want me to do that, contact me via PM with admin access info.
Regarding the border, if it is what I think you are talking about, I see this in the emitted code:
Code: Select all
<td width="15" bgcolor="#000000" style="border-left: 1px solid rgb(170, 170, 170);"/>
(the border color may be defined in hex, and not rgb - the rgb value might be firebug interpreting the hex value - I did not look at the actual stylesheet). I do not know for sure if this is your concern or not.
The serendipity_comment_author_self class is not checking a logged in status - it should apply for all visitors, not just those who are logged in. The {if} condition needs to be met for that class to be applied.
Posted: Thu Nov 27, 2008 2:12 am
by AFC_North
I think I figured out the moderation problem! The example entries I had up on that page were months old, so it was past the 30-day limit for un-moderated comments. I made a new entry, and comment posting seems to work fine for that one. Duh!
Edited to add: No, that light gray border isn't what I was talking about. The code you posted creates the vertical line defining the right edge of the "INTRO," "HISTORY," etc. buttons in the sidebar. I'm talking about the light blue space at the extreme left of the page and just under the gray horizontal bar with the ticker. The left sidebar is supposed to be flush with that corner, like it is at the old website at
http://www.afc-north.com/ but it's not.
Please don't give yourself a headache over it; it's possibly not even a s9y issue.
As for .serendipity_comment_author_self, I've set that style to give comments a different background color, but it doesn't seem to affect any of the comments up there. It ought to work for any comments I made while logged in, shouldn't it?
Posted: Thu Nov 27, 2008 10:45 am
by sonichouse
AFC_North wrote:The left sidebar is supposed to be flush with that corner, like it is at the old website at
http://www.afc-north.com/ but it's not.
This is because you have a margin of "0 auto" for your mainpane. Try
Code: Select all
#mainpane {
background-color:#CACAFF;
border-top:0 none;
margin:0;
width:100%;
}
/Steve
Posted: Thu Nov 27, 2008 3:06 pm
by Don Chambers
AFC_North wrote:As for .serendipity_comment_author_self, I've set that style to give comments a different background color, but it doesn't seem to affect any of the comments up there. It ought to work for any comments I made while logged in, shouldn't it?
Yes, it should - provided there is an exact match between the entry author name and comment author name (and email if you added that code).
Try Steve's suggestion on the border issue and let us know if that resolves that issue.
Posted: Thu Nov 27, 2008 5:18 pm
by AFC_North
Thanks, Steve. Your suggestion solved part of the problem, but there is still a bit of space there.
Posted: Thu Nov 27, 2008 6:44 pm
by sonichouse
AFC_North wrote:Thanks, Steve. Your suggestion solved part of the problem, but there is still a bit of space there.
Hi, I had a long look at it in firebug, and it looks like the TBODY has an offset of 2 pixels, not sure where that comes from though.
I'lll leave that to the experts

they may have some more ideas.
Posted: Thu Nov 27, 2008 8:42 pm
by Don Chambers
In your index.tpl file, for the <table id="mainpane">, try this instead:
Code: Select all
<table id="mainpane" border="0" cellpadding="0" cellspacing="0>
That should be all you need I think - you could add this to the #mainpane rules in your stylesheet: