pb

Content

  1. Introduction
  2. Features
  3. Compatibility with PHP prior to v5
  4. Installation
  5. Upgrading from earlier versions
  6. The option pages
  7. Tokens
  8. Frequently Asked Questions (FAQ)
  9. History
  10. Credits
  11. Contact

1. Introduction

Pagebar adds a nice page bar to your blog posts, multipaged posts and paged comments:

2. Features

2.2 Optional automatic insertion if page on all post pages (blog, search, tags, …)

The basic pagebar for your blog posts, search results and archive pages can be added automagically to your site. You can choose to put it above your posts, below your posts or in the footer. Unfortunately there is no possibility to determine the start or end of a single post or page. Therefore the multipagebar and commentbar have to be inserted manually (see chapters 4.3 and 4.4).

2.1 Full control of pagebar by manual insertion into the templates.

Automatic insertion is meant for simple themes which have only one post loop. Most modern themes uses more than one loop and would be ruined by automatically inserting pagebar. By manually inserting pagebar into your theme you have full control where pagebar should be displayed and where it should not.

2.3 Better pagination for multipaged posts and pages

You can split pages and posts into multiple pages by using the <!--nextpage--> tag (Article by the Blog Herald).

Unfortunately the standard pagination display of WordPress looks quite boring:0204

You can easily replace this cluttered display with pagebar by changing two lines in your theme:0204

2.4 „Display all“ link for multipaged posts and paged comments.

As you can see in the image above pagebar provides a feature that is not included in WordPress by offering the possibility to add a link to pagebar to display all parts of a page/post if it has multiple parts or all comments if you have selected Enhanced Comments.

2.5 Extremely customizable.

One of the outstanding features of pagebar is it’s flexibility to fit your needs. You can define the size of all parts of pagebar (left, center, right) and define the look by editing the CSS-style of pagebar, separately for the postbar, the multipagebar and the commentbar.

2.6 Compatible with WordPress v2.7, v2.8 and WordPress nightly.

Pagebar ist compatible to the latest versions of WordPress, namely 2.7 and 2.8, and to the bleeding edge version. pagebar may be working with versions prior to 2.7 but it’s not supported and advised.

3. Compatibility with PHP prior to v5

pagebar works only with PHP 5.0 or greater installed on your system. Version 5 was released in 2004 and support for PHP4 was dropped on 8th of August 2008. PHP4 is definitely outdated and should no longer be used by any programmer.

4. Installation

4.1 Copy files

Unpack the archive and copy the files into a directory called pagebar in
your plugin directory (usually …/wp-content-plugins/). Copy the file pagebar.css
into your themes directory or copy the content to the theme’s style.css file
(see chapter XXX).

4.2 Adding postbar to your blog posts

There are two ways of inserting postbar into you blog:

  • automatic
  • manual

4.2.1 Automatic installation

If you have a simple blog (e.g. the default theme) you can easily add postbar by selecting “Automagic insertion” in the options page. Then you can select where you want the postbar to appear:

  • Front of postings
  • Behind postings
  • Footer

4.2.2 Manual installation

If the automatic insertion is not suitable for your blog because your theme has more than one posting loop you can add postbar manually to your blog by editing some of your themes files. Simply add the following code directly behind The Loop in your index.php and search.php:

        if (function_exists('postbar'))
            postbar();

Of course you may want to configure postbar to your needs using the option page and by editing the pagebar.css style file.

4.3 Adding pagebar to your multipaged posts

This pagebar can not be displayed automatically so you have to edit the file page.php. If your theme contains the standard navigation for multipaged posts you first have to delete the following code:

wp_link_pages(array('before' => '

' . __('Pages:', 'kubrick') . ' ', 'after' => '

', 'next_or_number' => 'number'));

(The code does not have to look necessarily exactly the same, this example is from the WordPress default theme.) Then you can add the multipagebar to your pages:

        if (function_exists('multipagebar'))
            multipagebar();

You can customize the display of your multipagebar by editing the settings in the Multipagebar tab on the pagebar option page.

4.4 Adding pagebar to your paged comments

This pagebar can not be added automatically (there is no action indicating the end of the comment loop) so you have to edit the file comments.php. If your theme contains the standard navigation for paged comments you first have to delete the following code:


(The code does not have to look necessarily exactly the same, this example is from the WordPress default theme.) Then you can add the commentbar to your pages:

        if (function_exists('commentbar'))
            commentbar();

5. Upgrading from earlier versions

Important: the old pagebar() function has been renamed to postbar() since this seems to describe its function better. Nevertheless the old pagebar() function is and will be an alias.

pagebar v2.5+ introduces a new database structure for its settings. Formerly there was only one entry in wp_options called pagebar. Since there are now three different pagebars (postbar, commentbar and multipagebar), the options are splitted into three entries (postbar, commentbar and multipagebar respectively).
After installation (either through WordPress update or manually per FTP) pagebar copies the settings stored in pagebar to the new postbar entry and sets commentbar and multipagebar to inherit the settings so everything should look fine without manual interference. The commentbar and multipagebar have to be installed manually though.

6. The option pages

The option page is devided into three tabs (postbar, multipagebar, commentbar) for the three different pagebar types. You need to have Javascript enabled in your browser for the option page to work!

tabs1

They all share some basic settings and got some specific settings, explained in the next chapters.

6.1 Shared basic settings

Left Number of links displayed on the left of the bar. If this number is 0 no left links are displayed at all.
Center The number of links displayed in the middle of the bar. This should be an odd number. If an even number is entered, pagebar will display one more link than entered. If this number is 0 no left links are displayed at all.
Right Number of links displayed on the right of the bar. if this number is 0 no right links are displayed at all (see figure xxx).
Leading text Text to be displayed in front of the bar. A space is automatically added after the text. You can use the tokens in this field.
Standard page Text to be displayed on all pages but the current. You can use the tokens.
Current page Text to be displayed on the current page. You can use the tokens.
First page Text to be displayed for the first page.
Last page Text to be displayed for the last page.
Connector Text to be displayed between the left/center and center/right area. If left empty, „…“ is displayed.
Previous Text to be displayed for the link to the previous page. If left empty, „<“ is displayed.
You can additionally define if the Previous link is always displayed, never displayed or if it is done automatically.
Next Text to be displayed for the link to the previous page. If left empty, „>“ is displayed.
You can additionally define if the Next link is always displayed, never displayed or if it is done automatically.
Tooltip text Text to display in tooltips. You can use the tokens.
Display Actually display tooltips?
Stylesheet You can define the necessary CSS definitions in two places:

  • in the style.css file of the current theme
  • in a seperate file in the current theme’s directory. The name of the file can be defined here.

6.2 Specific pagebar settings

Automatic insertion

If you would like to get pagebar inserted in the blog automatically you need to select this option and additionally the position where to insert pagebar (see next section).

Positioning

If you have selected automatic insertion you can select where to insert the pagebar:

Front of postings Front of first posting
Behind postings After the last posting
Footer In the footer (footer.php)

(If „Automatic insertion“ is not selected these options are disbled.)

Integration

You can remove the standard wordpress navigation manually or by setting the „remove old navigation“ checkbox.

Remove standard navigation Remove the standard navigation text of WordPress („« Previous entry“, „Next entry »“). This only works if the author of your currently used theme hasn’t changed the CSS class of the standard navigation (.navigation that is).

(If „Automatic insertion“ is not selected these options are disabled.)

6.3 Specific multipagebar settings

Inherit settings If you check this option all basic options (chapter 6.1) will be inherited from the postbar settings. Additionally all these options are removed from the multipagebar settings tab.
All pages link pagebar gives you the possibility to display all parts of a multipaged post. Checking this setting will add a link behind the pagebar allowing the user to display all parts.
All pages label Text display for the „All pages link“.

6.4 Specific commentbar options

Inherit settings If you check this option all basic options (chapter 6.1) will be inherited from the postbar settings. Additionally all these options are removed from the commentbar settings tab.
All pages link pagebar gives you the possibility to display all comments if you have paged comments. Checking this setting will add a link behind the pagebar allowing the user to display all comments.
All comments label Text display for the „All comments link“.

6  Tokens

Tokens can be used in any display area of pagebar. If it makes sense where you want to use it, you have to decide by yourself.

{page} Page number
{total} Total number of pages
{current} Current page number

7  Frequently Asked Questions (FAQ)

1. How do I center pagebar2?

8  History

9  Credits

  • Lester Chan for his initial idea for this plugin.
  • Lise of liseweb.fr for her French translation.
  • Michael Preuß for his “ rel = nofollow “ suggestion and for telling me not to include it!
  • Moniko TS for making me aware of the multiple loops problem.
  • Mike of trash-wissen .de for pointing out the feed problem.
  • Joern of diekretschmars.de for his various comments and ideas.

10  Contact

Send mail to author.
If you want to submit an error report , please mention the version ( WordPress and pagebar ) you are using . No versions , no support !