Oracle of ONE1

Obscure words of unity

ggis-InlinePost

ggis-InlinePost gives authors an easy way to insert a post within a page or another post. Simply add [ggisinlinepost id=”%id”] to your post. There are a few attributes to control the display of the inlined post’s title, content, metadata, and separators.

Installation

  1. Download the latest version of the plugin.
  2. Unzip the plugin.
  3. Upload the file ggis-inlinepost.php to the ‘/wp-content/plugins/’ directory.
  4. Activate the plugin through the ‘Plugins’ menu in WordPress.
  5. Edit the ggis InlinePost optional parameters from the Settings menu.
  6. Place [ggisinlinepost id=”%id”] in your posts.

Frequently Asked Questions

Can I put more than 1 inline post on a page?

Yes.

Does this act recursively by including posts within posts within posts?

Yes, but not when using the deprecated code convention.

Why does a post not seem to show even when the plugin is working?
Do I need to worry about causing a recursive infinite loop?

In order to prevent the recursive features of this plugin from causing an infinite loop, an inlined post limit has been set. If a post has already been inlined using the plugin, it will not be inlined again; instead an HTML comment will be inserted. If you think this might be happening, use your browser to view the page source. The comment, <!– ggis-InlinePost already included postID =??. Inifinite inlined loop avoided. –>, is inserted whenever ggis-InlinePost purposely does not inline a post.

What usage do you recommend as best practice for this plugin?

Because of the recursion issue, I only inline post onto pages. Wordpress does not strongly differentiate between posts and pages other than by a post_type flag. This means you could inline a page into a page. Best practice is to only inline posts into pages.

How can I adjust the inline post’s appearance?

You should be able to fully control your form’s appearance using CSS. The HTML output is fully embedded with CSS tags to make personalization easy. The DIV tag is of the form:

<div class="ggis-inlinepost" id="ggis-inlinepost-f56-p69">

The class applies to all inline posts but the id specifically identiefies the post inlined (f) with the page it is inlined onto (p).

Usage

A post may be inlined onto a post or page, by including the following code, enclosed by [  ], in your text.

[ggisinlinepost id="%id" attribute1="%attr1" attribute2="%attr2"]

Here is an explanation of the all fields:

  • [ is the opening tag
  • ] is the closing tag
  • ggisinlinepost – identifies the shortcode (required)
  • id – id of post to include (required)
  • titletag – the tag in which to enclose the title (limited to simple tags such as h2, h5, p, b, etc.)
  • topseparator – put a horizontal rule before the post (0/1, default = 0)
  • botseparator – put a horizontal rule after the post (0/1, default = 0)
  • showtitle – show title of the post (0/1, default = 1)
  • showmeta – show metadata of the post, includes modified date and comments (0/1, default = 1)
  • showcontent – show the main content of the post (0/1, default = 1)

Many of the above optional fields may be set via the wordpress dashboard settings. Below is a sample using all possible attributes and their default values:

[ggisinlinepost id="4" titletag="h3" topseparator="0" botseparator="0" showtitle="1" showmeta="1" showcontent="1"]

Deprecated

The following code convention will still be properly parsed by this plugin though it usage has been superceded by the shortcode convention. Deprecated usage will not necessarily take advantage of newer features and options.
[-ggis-inlinepost id="%id" titletag="%tag"-]

Announcements

Release of ggis-InlinePost v1.1

The version 1.1 of ggis-InlinePost is released into the wild on June 26, 2010. It is available for download from the WP plugin directory. This release fixes a few minor issues, converts to standard shortcode conventions, and has been tested with the recently released WordPress 3.0.

Changelog

  1. FIX: Shortcodes within an inlined post are now processed. Uses do_shortcode().
  2. FIX: Comment metadata now shows correct number of comments made.
  3. NEW: Change code convention to shortcode which allows use of the standard shortcode functions. Old insert methods are deprecated but will still work.
  4. NEW: Recursive inlining now allowed when using new shortcode styling. Protection against infinite loop coded.
  5. NEW Added the showcontent attribute to control display of the post’s content.

(more…)

Release of ggis-InlinePost v1.0

Today, I release the version 1.0 of ggis-InlinePost. It is available for download from the WP plugin directory. This release fixes the improper newline formatting reported by a few users. Additionally, it adds or enhances the following:

  1. FIX: Correct paragraph/newline formatting.
  2. NEW: Inlined post now recognizes the ‘more’ shortcode.
  3. NEW: If a post requires a password, the password entry form will be displayed.
  4. UPDATE: Improved display of metadata.

(more…)

Plugin ggis-InlinePost for WordPress

New plugin for Wordpress developed. It should be available on the their site shortly. In the meantime, it will be available for download here.

If you have any comments or questions, please add them here.

//UPDATE 5/11/2010

Usage is convered on the ggis-inlinepost page.