1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  1. Nick

    Nick Well-Known Member

    Nick submitted a new resource:

    Link Bar - Link Bar

    Read more about this resource...
    Last edited by a moderator: Oct 18, 2014
  2. mabujo

    mabujo Designer

    Great plugin, well played!
    This is a great way to keep the user at your site.
  3. Nick

    Nick Well-Known Member

    I've added a Link Bar Vote plugin to the attachments section in the first post. It looks very plain, adding simply "3Vote" or "4Un-vote" before the link to the Hotaru post, but it's a working vote button. Since Link Bar doesn't use CSS/JS merging, I put the CSS directly into the template, but I recommend you copy it into link_bar.css in the main plugin. Then you can style it however you like.
  4. Nick

    Nick Well-Known Member

    Updated Link Bar: v.0.2 2010/3/25 - Nick - Fix to revert $h->post->origUrl so that Video Inc, etc. can use it.

    I'm now using this on my own site:


    The comments link was done like this:

    Just after the "link_bar_top" hook at the top of the link_bar_top.php template, put this:

    <?php $h->includeLanguage('comments'); ?>
    That will get you the language file from the Comments plugin.

    I've then modified the "link_bar_post" DIV to look like this:

                <div class="link_bar_post">
                    <?php // plugin hook
    $result $h->pluginHook('link_bar_post');
                        if (!
    $result) { ?>
                            <a id="link_bar_hotaru_post" href="<?php echo $h->url(array('page'=>$h->post->id)); ?>">View this article on <?php echo SITE_NAME?></a>
                            <a id="link_bar_comments" href="<?php echo $h->url(array('page'=>$h->post->id)); ?>"><?php echo $h->countComments(false); ?></a>
                    <?php ?>
    You can see the $h->countComments function call which fetches the comment count. The false will return (by default) "Leave a comment". If you set it to true, it will say "No comments". Otherwise, it will show the number of comments.

    Edit: Also included a fix in 0.2 for the Link Bar not working with RSS forwarding enabled.

    Edit: From Hotaru 1.1.4, the countComments function call should be this:

    Or if you only want the count, with no text, just use:
  5. Nick

    Nick Well-Known Member

    Show source url on hover

    With Link Bar enabled, you'll notice that you can't see the original source url in the status bar anymore so you don't know where the post has come from until you click the link. Here's a small template hack to show the original post URL when you hover over the title link:

    In both sb_list.php and sb_post.php, find

    and on the next line, add:

    $source $h->post->origUrl;
    Further down, in the show_post_title DIV, add $source as a title. i.e:

    In sb_list.php
    <a href='<?php echo $h->post->origUrl?>' title='<?php echo $source?><?php echo $h->vars['target']; ?> class="click_to_source"><?php echo $h->post->title?></a>
    In sb_post.php
    <a href='<?php echo $h->post->origUrl?>' title='<?php echo $source?><?php echo $h->vars['target']; ?>><?php echo $h->post->title?></a>
  6. Nick

    Nick Well-Known Member

    Updated Link Bar: v.0.3 2010/3/26 - Nick - Added option in user settings to disable the Link Bar (but it's on by default)

    After putting the Link Bar on my site, the reaction by my visitors was surprisingly negative. So, version 0.3 includes an option to disable the bar from the individual user's settings page (no template or css changes necessary).
  7. landshark

    landshark New Member

    Nick, another great one.

    A couple probing questions. :)

    1. Do you plan to add support for up/down voting?
    2. Any chance of a tutorial on how to add the Tweet this and other viral promotion options like you are using at Japansoc?
  8. Nick

    Nick Well-Known Member

    Not really. I just wanted to get some basics out for people to use as a base and modify to their liking.

    Not really, but here's a hint: Copy the sb_base_post_extra_fields hook into your link_bar_top template. Exclude plugins with the last array, e.g:

    <?php $h->pluginHook('sb_base_show_post_extra_fields''', array(), array('tags''vote')); ?>
    Then you'd need to play with the CSS.
  9. Nick

    Nick Well-Known Member

    I've noticed a huge drop in the number of posts I have indexed in Google. I don't know if it's because of this plugin, but it's prompted me to make this update just in case:

    Updated: Link Bar - v.0.4 2010/4/09 - Nick - Added global option to disable the Link Bar for logged in or logged out users

    I've disabled the bar for logged out users so it doesn't confuse the Googlebot.

    Also fixed a bug in Link Bar Example:

    Updated: Link Bar Example - v.0.2 2010/4/09 - Nick - Fix for example text not updating
  10. trsaso

    trsaso New Member

    where to find : sb_list.php and sb_post.php ?
  11. mabujo

    mabujo Designer

    In your theme folder, but they are deprecated as of Hotaru 1.3 so you should look for bookmarking_list.php and bookmarking_post.php instead.

    If these files are not in your theme folder you can copy them from /content/plugins/bookmarking/templates/ to your theme folder and then make your modificattions.
    Nick likes this.
  12. trsaso

    trsaso New Member

    Coding is new for me. I looking step by step how to add advertisement code on Link bar plugin.
    Thanks , and also wery good script you have, big posibility.

  13. shibuya246

    shibuya246 Hotaru Developer Staff Member Admin

    If you are using Hotaru v 1.3 you will find these files renamed in the bookmarking plugin in the folder /content/plugins/bookmarking/templates

    They are now called bookmarking_list.php and bookmarking_post.php

    Copy these files to your themes folder and you can customize any way you want. :)
  14. angolanmade

    angolanmade Well-Known Member

    Does this allow for anonymous voting on the actually link bar?
  15. Nick

    Nick Well-Known Member

    Nope, but you could implement it if you wanted to.
  16. nikar

    nikar New Member

    Why not show the page title?
  17. Nick

    Nick Well-Known Member

    It shows the page title if you use friendly urls.
  18. wolfdogg

    wolfdogg New Member

    Still Working?

    Does this plugin still work for others? I've just switched to 3 different themes, using 2 different browsers, and can't get it to show.
  19. frytec

    frytec Member

    go to user settings and check if LinkBar is enabled
  20. wolfdogg

    wolfdogg New Member

    You're referring to the 'Plugin Settings' -> 'Link Bar Settings' ?

    Both of the following are checked:
    Show to logged out users
    Show to logged in users

Share This Page