SitePoint Sponsor

User Tag List

Results 1 to 11 of 11
  1. #1
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Location
    California
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Adding Social Bookmarking/ Social Networking Links into Blogger Template

    I recently redesigned by Blogger Blog by using a new template. I have implemented the template, but am having two problems.

    I want to make the buttons at the top of my screen to resemble the "Share This" section of this page (near the bottom) of this page. I have coped the HTML and tried to use this, nut with no success.

    I have also followed the instructions @ http://www.exploding-boy.com/2006/01...to-blog-posts/

    Every time I would try to save my template, Blogger would say "Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The reference to entity "url" must end with the ';' delimiter."

    My blog is located at http://blog.seooptimizers.com

    I would like them to be pop-ups so visitors will not be lead away from my site. I also want the information such as page title and description to change as each page is stumbled, dugg, et.

    My other problem is that there is not a big gap in between the post title and the post. Does anyone know what part of the CSS or HTML needs to be changed to make the text a different color? I have tried changing many areas and have continuously been unsuccessful.

    All help is very much appreciated!

    THANKS!!!!
    Last edited by bosmolskate; Feb 15, 2010 at 23:47. Reason: added information

  2. #2
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    40,513
    Mentioned
    182 Post(s)
    Tagged
    6 Thread(s)
    The gap under the headings seems to be the margin bottom on the title div and some meta content you have there that is coloured white so you can't see it.

    e.g.
    Code:
    div.title{margin-bottom:0!important}
    .postmeta{color:#000!important}

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,317
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by bosmolskate View Post
    Every time I would try to save my template, Blogger would say "Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The reference to entity "url" must end with the ';' delimiter."
    To get rid of that message, change the & in each url to & . E.g.

    Code:
    <a href="http://del.icio.us/post?url=<?php the_permalink() ?>&amp;title=<?php the_title(); ?>">Del.icio.us</a>
    To have the popup used on the site you linked to, you can use services like ShareThis and just plop their code into you page (fugly though it be):

    http://sharethis.com/#STS=g5qny20g.a4e

  4. #4
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,317
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    Oops, no I'm wrong. Even though the &amp; thing is a good tip anyway, I think the error is referring to the lack of a ; as shown in red below:

    Code:
    <a href="http://del.icio.us/post?url=<?php the_permalink(); ?>&amp;title=<?php the_title(); ?>">Del.icio.us</a>

  5. #5
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Location
    California
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you for the quick response. I was able to fix the margin and coloring!

    Unfortunately, I am still getting errors with the social buttons. When I put the line of code:
    <li>
    <a class='bookmark' href='http://del.icio.us/post?url=<?php the_permalink(); ?>&amp;title=<?php the_title(); ?>' target='_blank' title='Delicious'>
    <img alt='Delicious Link' src='http://2.bp.blogspot.com/_gpF2ywAQTzU/S0lSiV0tUzI/AAAAAAAAAqo/XQHEi6tM7XM/s1600/delicious-ico.png'/>
    </a>
    </li>

    I get the error: "Your template could not be parsed as it is not well-formed. Please make sure all XML elements are closed properly. XML error message: The value of attribute "href" associated with an element type "null" must not contain the '<' character."

  6. #6
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,745
    Mentioned
    11 Post(s)
    Tagged
    0 Thread(s)
    Can you show us the generated ouput of that? PHP doesn't help us much

    It looks like that not everything in the PHP is wrapped with quotes
    Always looking for web design/development work.
    http://www.CodeFundamentals.com

  7. #7
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The code you're using for the social icon links is for Wordpress blogs. For Blogger sites, you'll want to use the code from the following page...

    http://www.exploding-boy.com/2007/01...ks-to-blogger/


  8. #8
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Location
    California
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://www.exploding-boy.com/2007/01...ks-to-blogger/ is an old post and does not work in the new version of Blogger.

    I now get the error

    XML error message: The reference to entity "url" must end with the ';' delimiter.

    What do you mean:
    "Can you show us the generated ouput of that? PHP doesn't help us much

    It looks like that not everything in the PHP is wrapped with quotes "

  9. #9
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://waronstuff.blogspot.com/2007/...-icons-to.html

    http://tips-for-new-bloggers.blogspo...n-blogger.html

    slightly newer posts with code examples for the 'new' template. I don't really use Blogger so didn't test them out, but hopefully these may work?

  10. #10
    SitePoint Enthusiast
    Join Date
    Mar 2009
    Location
    California
    Posts
    26
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks agarcia831 this site http://tips-for-new-bloggers.blogspo...n-blogger.html let me input the code and it went through without any errors.

    Unfortunately, now when i try to use the buttons it is not drawing the correct information out. It says invalid URL and post title/ description.

    For example, go to my blog and try clicking on the delicious or digg buttons (first 2 on left) these have the new code, but will not work properly. Anyone know what is causing this and how to fix this.

    Thanks

  11. #11
    SitePoint Zealot agarcia831's Avatar
    Join Date
    Nov 2009
    Location
    California
    Posts
    119
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    been trying to figure this out...and I found a blog post that explains how to convert code for the old template for use on new templates...and read this at the bottom of the page...

    But beware - remember a lot of the code relates to the post body of individual posts, so it may not work in a sidebar and you may have to change the data tag to something more appropriate for that location.

    Similarly you could put the code in the page footer section or the top of the page as well or instead of each individual post, and use variations on the code for that - but I won't deal with that here.
    I figure if those social icon buttons aren't in the post body area, that could be causing any errors and so the data tagss in the links may have to be tweaked somehow. Looked through the data tags page and came up with this...

    Code:
    <a expr:href='"http://del.icio.us/post?url=" + data:blog.url + "&amp;title=" + data:blog.pageTitle' target='_blank' class='bookmark' title='Delicious'>
    I replaced data:post.url with data:blog.url...and data:post.title with data:blog:pageTitle.
    tried the code on a test blogger account and it seems to work...or at least the blog url and title in the url are coming up instead of the code.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •