Quantcast

Creativebits.org

an All Creative World site
Abdul's picture
576 pencils

Need a little help with this code, please!

Hi everyone!

I've just given my blog a makeover and almost everything is sorted. A few things which I still don't know how to do, are getting to me. If someone could help with this HTML, that'd be great!

1. On my new template, for some reason it doesn't say "Posted by" at the end of each post with my name. How do I add that in the HTML?

2. Another problem I'm finding is with the comments. If you look, when you click on the comments link, it takes you to the post and shows the post and the comments after it. It shows the time each comment was made, but not the author of the comment. How do I add that in the HTML? I've found the code for it, I think, but when I add it after the date bit in the HTML, it still doesn't work. This is the code right?

<$BlogCommentAuthor$> said&hellip;</p>

Where do I put it? When you click on "Post a comment", it loads up Blogger comment bit and shows the author there though.

3. One other little bit I'd like to change is the header. Is it possible to put "(Now Freelancing.)" on another line?

I know I'm asking for quite a lot, but I'd really appreicate it if someone could help me out here.

Critique my blog also, anything else need tweaking?

Thanks!

Commenting on this Forum topic is closed.

Joshua's picture
222 pencils

A link to your blog would be very helpful in this instance.

Joshua's picture
222 pencils

As for your blog author question, the bit of code you want is "Posted by < $BlogItemAuthorNickname$ >", without spaces in the brackets, of course.

Abdul's picture
576 pencils

Oh yeah, I forgot! :oops:

Here it is: http://www.bitsofabdul.blogspot.com/

Where would I put that code for the author bit? In which bit of the HTML?

Thanks.

Abdul's picture
576 pencils

I've fixed the "Posted By" bit, I think it's ok as it is now. How would I get the email icon in the middle of "Posted By" and the "Comments", and not on the left?

I still need help with the comments thing. Problem number 2 in the first post and also there's problem 3 (in the first post) about the text in the header needing a little formatting.

Thanks a lot guys! I really do appreciate it!

By the way, Ivan is it? (Who owns this blog?) Get some InDesign stuff up, please! I've just started in InDesign and Illustrator and it'll be great if you can post some tips and tricks about those two packages. Thanks.

Ivan's picture

I'll look into your unanswered questions in the afternoon.

as for InDesign Jim, my partner is the ace for InDesign. ask him to post more! ;)

Abdul's picture
576 pencils

Thanks. I just realised your from Bahrain, not someplace like the States lolz. Nice place is Bahrain. Wish to go someday, been to Jordan before.

How do I umm get in touch with Jim?

And thanks, I really want to just get these last bits sorted.

Ivan's picture

Comments Tags

There are two sections of comment tags in a template. One section simply creates the links that readers see next to your posts and click on to leave you a comment. The other section displays the comments themselves. We'll look at these two parts separately.

These examples show only a minimal amount of code to make the comments work. You are, of course, welcome to add any formatting that you like to it, so that it matches the rest of your blog.

Links:

The following piece of code will print a link reading "X comments" where "X" is the number of comments that have been left on that post so far. It should be placed between the <Blogger> and </Blogger> tags that display your posts, and it usually goes in the byline, where the author's name is listed.

</p>
<p><BlogItemCommentsEnabled></p>
<p>   <a href="<$BlogItemCommentCreate$>" </p>
<p>   <$BlogItemCommentFormOnClick$>></p>
<p>   <$BlogItemCommentCount$> comments</a></p>
<p></BlogItemCommentsEnabled></p>
<p>

First, notice the <BlogItemCommentsEnabled> tags that surround the others. This is so the rest of the code will only be displayed on posts for which comments are enabled. The link to <$BlogItemCommentCreate$> will point to the page where you can both read existing comments and create a new one. <$BlogItemCommentFormOnClick$> includes the code that opens the link in a popup window, if you have that option selected. Note that it goes inside the opening <a> tag. Finally, <$BlogItemCommentCount$> simply prints out the number of comments for that post. You can put whatever text you like in place of "comments."

Comments:

This part of the code will also go between the <Blogger> and </Blogger> tags, but you will probably also want to enclose them in <ItemPage> and </ItemPage> tags as well, so the comments only appear on your post pages, and don't clutter up the main page of your blog.

</p>
<p><BlogItemCommentsEnabled></p>
<p>   <a name="comments"></a></p>
<p>   <h4><$BlogItemCommentCount$> Comments:</h4></p>
<p>   <BlogItemComments></p>
<p>      <a name="<$BlogCommentNumber$>"></a></p>
<p>      <p class="comment-body"></p>
<p>         <$BlogCommentBody$></p>
<p>      </p></p>
<p>      <p class="comment-data"></p>
<p>         By <$BlogCommentAuthor$>, at</p>
<p>         <a href="#<$BlogCommentNumber$>"></p>
<p>         <$BlogCommentDateTime$></a></p>
<p>         <$BlogCommentDeleteIcon$></p>
<p>      </p></p>
<p>   </BlogItemComments></p>
<p>   <p><a href="<$BlogItemCommentCreate$>" </p>
<p>   <$BlogItemCommentFormOnClick$>></p>
<p>   Post a Comment</a></p></p>
<p></BlogItemCommentsEnabled></p>
<p>

Here we see a few tags that tie in to the previous bit of code. Once again, we've enclosed everything in <BlogItemCommentsEnabled> so posts that don't allow comments won't print anything. We also have <$BlogItemCommentCount$> as before, to display the number of comments.

The <BlogItemComments> tags mark the section of code that cycles through each comment to print it out. The <$BlogCommentBody$>, <$BlogCommentAuthor$> and <$BlogCommentDateTime$> tags all print out the information you would expect them to, with the added benefit that the author tag includes a link to the author's profile or webpage, if they have one. The <$BlogCommentNumber$> gives the ID number of each comment, for creating permalinks, just like the ID numbers of regular posts.

Finally, there are a couple little tags to round out the functionality. <$BlogCommentDeleteIcon$> inserts a delete button for each comment, but only if the person viewing it is the comment author or an administrator of the blog. No one else is allowed to delete comments. <$BlogItemCreate$> adds the link that lets people leave new comments.

Ivan's picture

on your 3rd question, i would suggest you design a custom header and incorporate that into your site rather.

also, i would get rid of the border around your kubrick layout. find this code in your template and delete the whole line that starts with border:...

</p>
<p>#page {</p>
<p>	background-color: white;</p>
<p>	margin: 20px auto 0;</p>
<p>	padding: 0;</p>
<p>	width: 760px;</p>
<p>	border: 1px solid #959596;</p>
<p>	}</p>
<p>

Abdul's picture
576 pencils

Ivan, thanks for that.

I've actually changed the header. Oh, and I've also got it saved somewhere which I can easily edit. So that's no problem. 8)

The comments thing, I've tried many combinations with that code, still it doesn't show the authors name. I don't get it!

Oh, and you forgot about the last bit. About the email icon needing to be in the centre of each post, in between the the two lines.

Thanks anyway!

Ivan's picture

why not post your template? maybe i can spot the problem.

Abdul's picture
576 pencils

Done it! :D

Check it out @ http://bitsofabdul.blogspot.com/. I've got the email icon centred, the comment author bit sorted out too and the header doesn't matter much, I know how to customise it and what-not.

Anyway, thanks for your time though, and keep this place rocking!

Abdul.

P.S. Any chance of a link to my blog? :wink:

Creativebits is a blog about creativity, design and Macs. We also have a critique section where you can post your work to get opinions and a forum to discuss any design related topics.

Recommend us on Google

Latest critique

  • Critique for my logo
  • Lava mole

Marketplace