Include Content Item

Key Features
============
* support nested include
* fadein/out of fulltext right in the same article (without any reloading of page)
* support all Joomla versions: 1.0, 1.5, 1.6, 1.7 and 2.5!
Latest Update
=============
v2.5.11 (for Joomla 2.5)
Released January 26, 2012
Yes, native version of the plugin for Joomla 2.5 is now available!
v1.0.11 (for Joomla 1.0), v1.5.11 (for Joomla 1.5), v1.6.11 (for Joomla 1.6), v1.7.11 (for Joomla 1.7)
Released October 16, 2011
* Yes, native version of the plugin for Joomla 1.7 is now available!
* Updated the plugin to use the latest jquery library: jquery-1.6.4.js
* In this new version, you can now include an article more than once by using the tag $allow_multiple=1
v1.0.10 (for Joomla 1.0), v1.5.10 (for Joomla 1.5), v1.6.10 (for Joomla 1.6)
Released July 8, 2011
* Yes, native version of the plugin for Joomla 1.6 is now available!
* Updated the plugin to use the latest jquery library: jquery-1.6.2.js
* In this new version, the article will only be included if it is published. If you unpublish the included article, the article will NOT be displayed.
v1.0.8 (for Joomla 1.0) and v1.5.8 (for Joomla 1.5)
Released Jun 30, 2009
* added fadein/out of fulltext right in the same article (without any reloading of page)
* If you don't want nested include, use nested=0
* If you want nested include to stop at level 2, add level=2
* added support for type=button
You can see demos of the fadein/out of fulltext here:
http://www.kksou.com/php-gtk2/Joomla/Include-Content-Item-plugin.php#fadein
Version History
===============
version: 1.01/1.51
released: June 21, 2008
Main update: now works with PHP4!
version: 1.02/1.52
Released: July 23, 2008
This is an enhancement contributed by Aleksandar Bogdanovic.
Standard use: {include_content_item 123}
To add the title of the included article: {include_content_item 123 1}
To add the title and link to the included article: {include_content_item 123 1 1}
Parameter #1: id of the content/article to be included
Parameter #2: 1 means show title, 0 or ignore means don't show title.
Parameter #3: 1 means show title and link. 0 or ignore means don't show title and link.
version: 1.03/1.53
Released July 31, 2008
This is an enhancement requested by Denis.
New features:
* {include_intro 123} will include only the intro of the content item.
* {include_fulltext 123} will include only the fulltext (or maintext) of the content item.
* The original {include_content_item 123} will include both the intro and fulltext.
v1.0.5 (for Joomla 1.0) and v1.5.5 (for Joomla 1.5)
Released December 25, 2008
This is an enhancement requested by Rexkramer.
The "Include Content Item" plugin now allows you to display the "Read More" link.
v1.0.4 (for Joomla 1.0) and v1.5.4 (for Joomla 1.5)
Released August 17,
As tip: i created a new section "INCLUDES" and categories like "headers" or "footers" or "styles". There i can better group special headers or footers or styles which i just include in the articles with the {include_intro 123} line. Really great and timesaving!
In order to allow that in the same article, more than once the same include is processed, i did a little modification to the original php file of this plugin, and for me it works very good!
Here is what you have to do:
locate the original file: plugins/content/include_content_item/include_content_item.lib.php
download and open this file
then and add one line between line 54 and 55 as shown here:
original code:
if (in_array($include_id, $this->processed)) {
} else {
new code:
if (in_array($include_id, $this->processed)) {
$str = $this->process(array('', $matches[2], $matches[3]));
} else {
thats it! save the file with this modification.
Before uploading, rename the original file on the server, so it is not overwritten, for the case something goes wrong.
upload and enjoy! :-)
PS. The added line is nothing else than the line 57 of the original file, so you can just copy and paste it, instead of retyping the code.
with this change, the plugin will process all include statements in one article, not skipping after the first match. (i don't know why the author included this filter, maybe only for security for complex nested includes, but in my case i have also nested includes, and had never problems)
One problem with it is it doesn’t check to see if the content item it is inserting has been published yet or if it is still published, a pretty basic requirement.
In fact if you use it to insert content into a content item it can be very difficult to figure out how to get rid of that content item, short of deleting the include code on every page you put it on, which kind of diminishes the usefulness of the program. (to casual users like me who don’t know the intricate working of all things Joomla).
While testing (I know enough to do that before using on a live site) I had no problem getting the include to work. I set the item to expire, but after the expirations date it was still there. Figured it might be a cache issue but eliminated that. I tried to archive the item but it still was included. I deleted the item from the section but the little bugger still would not take the hint and just disappear, even after again ruling out Joomla and browser cache issues. Finally I remembered a tip from another program I had issues with, where you had to go as far as to delete the item from the Trash to get rid of it and yes that did work, at last, after a day of tinkering around.
The creator has explained their understandable reluctance to perform this and other modifications to the program (if you have kids the “if you give a mouse a cookie” story comes to mind) but I believe this is one modification that would increase the usability of the plugin considerably.
Again thanks to the creator, please reconsider making this one modification. (or some other PHP wiz please do and post it here.)
Hi George,
Thanks for your feedback.
In the latest version of the plugin, the article will only be included if it is published. If you unpublish the included article, the article will NOT be displayed.
Regards,
/kksuo
For example, I created a include-page that have embedded commands to show a Tab Slider. The command is:
{tab=My Tab Name}Some content to show inside tab{/tabs}
Now when I include the above page in an article, I do not see the actual tab, instead it simply shows: {tab=My Tab Name}Some content to show inside tab{/tabs}
Any solution to this issue?
I am using it as a sort of mini database application.
Say you are a web developer and have references to your pricing all throughout your site. Write an article with the content: "my standard development fees are X per hour" then use content include to insert that phrase whenever you need it on a page.
Rates go up? Just change the original article and boom - your site is updated with your new rates...
The developer even made a custom modification for me. These types of components and dedicated developers are what make Joomla number one in my book.






