Link Bar
Version: 0.5
Author: Nick Ramsay (based on work by shibuya246)
Created on: 2010/03/23
Last Updated: 2010/06/03
Tested on: 1.3.0
Plugins Required: None
Plug & Play: Yes
Supported: No
Description
A bare bones, external link bar shown at the top of each post visited from your site.
"Link Bar" is very basic, but very extensible. By default, it shows your site name, link to the post on your site, and a link to close the bar. The CSS is separate from the usual merged archive file that hotaru uses because most of that is unnecessary for a simple bar, but I've included a way to override the default link_bar.css file if you copy it to your own theme folder and edit it there. The link_bar_top.php template can also be customized in the usual way, by copying it to your theme.
Developing for Link Bar
Plugin developers can easily extend Link Bar with these hooks:
Hooks 5-8 return $result. If $result is empty, the default section will show (i.e. whole bar, logo, post, or more). If a positive value is returned to those hooks, then the defaults will not be shown, i.e plugins will override the defaults.PHP Code:1. $h->pluginHook('link_bar_pre_template'); // in the code, immediately before showing the template file
2. $h->pluginHook('link_bar_top'); // at the very top of the template, before anything is output to the screen
3. $h->pluginHook('header_meta'); // the same hook that other plugins use to change meta descriptions and keywords
4. $h->pluginHook('link_bar_css_js'); // include your own css or javascript files
5. $h->pluginHook('link_bar'); // after the opening BODY tag
6. $h->pluginHook('link_bar_logo'); // within the logo section
7. $h->pluginHook('link_bar_post'); // within the post section
8. $h->pluginHook('link_bar_more'); // within the more section
9. $h->pluginHook('link_bar_end'); // before the closing BODY tag
Add settings to the Link Bar Settings page
Since it would be overkill to have settings pages for each plugin that hooks into Link Bar, I've made an example to show how you can add settings to the Link Bar settings page instead of needing your own. Download the attached Link Bar Example plugin for a demonstration.
-----------------------------------------------
Link Bar
Instructions
1. Upload the "link_bar" folder to your plugins folder.
2. Install it from Plugin Management in Admin.
3. Enable/Disable the bar for logged in or logged out users in Admin -> Plugin Settings -> Link Bar
4. If you want RSS links to use the link bar, you need to enable RSS forwarding in Admin -> Plugin Settings -> SB Base
Changelog
v.0.5 2010/05/27 - Nick - Updated for compatibility with the Bookmarking plugin
v.0.4 2010/04/09 - Nick - Added global option to disable the Link Bar for logged in or logged out users
v.0.3 2010/03/26 - Nick - Added option in user settings to disable the Link Bar (but it's on by default)
v.0.2 2010/03/25 - Nick - Fix to revert $h->post->origUrl so that Video Inc, etc. can use it.
v.0.1 2010/03/23 - Nick - Released first version (based on "SocialBar" by shibuya246)
-----------------------------------------------
Link Bar Example (for developers)
Instructions
1. Upload the "link_bar_example" folder to your plugins folder.
2. Install it from Plugin Management in Admin.
3. Edit the example text in Admin -> Plugin Settings -> Link Bar
Changelog for Link Bar Example
v.0.2 2010/4/09 - Nick - Fix for example text not updating
v.0.1 2010/3/23 - Nick - Released first version
-----------------------------------------------
Link Bar Vote
This plugin adds a working vote button to the bar. The button itself is unstyled so you'll have to do that yourself. I recommend you copy the CSS from within the lb_vote_button template into your link_bar.css file.
Instructions for
1. Upload the "link_bar_vote" folder to your plugins folder.
2. Install it from Plugin Management in Admin.
Changelog for Link Bar Vote
v.0.1 2010/3/25 - Nick - Released first version
-----------------------------------------------
Please click "Rate Thread" and give this plugin a rating. Thank you.


Reply With Quote


Bookmarks