User Guide

Articles Anywhere

Download Free Buy Pro   € 20

1) Introduction

This guide provides in-depth information about Articles Anywhere and will tell you:

  • what it does
  • how to install it
  • how to set-up and use it

2) What is Articles Anywhere?

Articles Anywhere is a Joomla! system plugin (and editor button plugin).

You can place articles anywhere in your site, including within 3rd party components, modules and even inside other articles.

You can, for instance, place the title and intro text of article 'My Article' in a Custom HTML module by simply placing:

{article My Article}{title} - {introtext}{/article}

3) How to use it (syntax)

You can place data from articles via Articles Anywhere by using plugin style tags right into your WYSIWYG editor.

To place a single article, you can use the {article} tag.

The PRO version also allows you to place multiple articles in the format defined within the tags, by using the {articles} tag.

Note: You should place the tags into the normal WYSIWYG view of your editor and NOT in the HTML/code view.

3.1) Single article

The syntax works in the following way:

You start of by defining what article you want to place data from. You can do this by using the title, alias or id of the article:

{article Some article}...{/article}
{article some-article}...{/article}
{article 123}...{/article}

Then, within those tags, you define what data you want to get displayed by placing data type tags within the {article} and {/article} tags. For instance, to show only the title of article with id 123, you can do:

{article 123}{title}{/article}

You can choose from these data types:

  • {text} the entire text: introtext+fulltext
  • {readmore} a read more link)
  • {url} the url to the article)
  • {link}...{/link} open and close tag to add a link of the article to any other text or tags
  • {introtext}
  • {fulltext} the text part below the read more bar
  • {id}
  • {title}
  • or any other data available (must match the column name in the database)

3.2) Multiple articles PRO ONLY

The PRO version also supports an {articles} tag to output the data of multiple articles. You can simply give a comma separated list of article titles, aliases or ids of the desired articles.

This will output the title and text of the 3 articles defined in the {articles} tag:

{articles Some Article,another-article,123}{title}

{text}
{/articles}

3.3) Multiple articles: by category PRO ONLY

You can also give the {articles} tag one or more categories. You can use the titles, aliases or ids of the desired categories.

All you need to do is place cat: before the list of categories

This will output the title and text of all articles of the defined categories in the {articles} tag:

{articles cat:Some Category,another-cat,12}{title}

{text}
{/articles}

Article Limit/Range

By default Articles Anywhere will show all articles of the category. 

In the Articles Anywhere system plugin settings you can define a default limit.

You can also define the limit in the {articles} tag by adding the desired ordering after the cat:.

 To place only the first 20 articles in category  'Some Category'  :

{articles cat:20:Some Category}

To show a range of articles not starting from the start, so for instace, show articles 21 to 40, you can do:

{articles cat:21-40:Some Category}

Article Ordering

In the Articles Anywhere system plugin settings you can define the default ordering of the articles that are placed through the cat: option.

You can overrule the ordering in the {articles} tag by adding the desired ordering after the cat:.

You can choose from these orderings:

  • ordering Article Manager Order
  • hits Hits
  • title Title
  • id ID
  • alias Alias
  • created Created Date
  • modified Modified Date
  • publish_up Start Publishing Date
  • publish_down Finish Publishing Date
  • random Random

 To place all articles in category 12 in descending alphabetical order:

{articles cat:title DESC:12}

To place all articles in categories 'Some Category' and 'another-cat'  in random order:

{articles cat:random:Some Category,another-cat}

To place all articles in category 'Some Category' in random order and after that all articles in category 'another-cat' in default order:

{articles cat:random:Some Category|cat:another-cat}

To place article 'Some Article', then all articles in category 'Some Category', then article with id 123:

{articles Some Article|cat:Some Category|123}

If you are also using a limit/range (see above), it doesn't matter what you define first.

So to show the first 20 articles in random order from category ' Some Category', you can use both these syntaxes:

{articles cat:20:random:Some Category}
{articles cat:random:20:Some Category}

3.4) Styling the data

You can give the tags any styling you want simply by using the styling options in your editor.

For instance, you can make the title a 'Heading 3' by selecting the {title} tag and choosing 'Heading 3' in your editors styles.

So something like this can be done:

{article Some Article}{title}
{introtext}
{readmore}{/article}

3.5) Limiting and stripping text

With the text data tags - {text}, {introtext} and {fulltext} - you can limit the tag to only show a certain amount of characters. HTML tags and images are not counted, only the text.

For example, to show the first 100 characters of the entire text, simply use:

{text:100}

If you want to strip the text from html tags for any reason, you can do:

{text:strip}
{text:100:strip}

To limit the text to a number of words, you can do:

{text:20words}

Using the word limiter will however force the text to be stripped from tags.

3.6) Read more link

When showing the read more link, you can also overrule the standard "Read more..." text.
For example, if you want the text 'Please read on!' to link to the article:

{readmore:Please read on!}

The readmore link gets the default 'readmore' classname. If you want to overrule that, you can do:

{readmore:Please read on!|myownclass}

Or if you only want to overrule the class (and not the text):

{readmore:|myownclass}

3.7) Dates

You can add a date syntax to any data tags that have a date value, like:

{article 123}{created:F jS Y}{/article}

That would result in something like: November 26th 2014

The date is format via the PHP date function. You can see what date characters you can use PHP date function.

3.8) If-Else structures

Articles Anywhere allows you to use (simple) if-else structures inside the tags.

The if-else tag syntax looks like:

{if:...}...{else}...{/if}

This way you can check whether a data types is not empty or false, like:

{if:fulltext}...{/if}

Or check if a data type is (or is not) a certain value, like:

{if:created_by=62}...{/if}
{if:alias!='some text'}...{/if}

For instance, if you only want the readmore tag placed if the article has a fulltext, you can do:

{if:fulltext}{readmore}{/if}

Or if you want a different readmore text if the article has a fulltext, you can do:

{if:fulltext}{readmore:Read full story}{else}{readmore:See intro}{/if}

For full control via php, you could use Sourcerer to output the {article} tag depending on your custom checks.

3.9) Div tags

To help align and group the articles, you can place special {div}...{/div} tags within the {article} tags, like:

{article 123}{div}{title}{/div}{/article}

You have basic styling abilities too. You can give the div a certain height, width, alignment (float) and a custom classname, like:

{article 123}{div width:200|height:300|float:left|class:my-class}{text}{/div}{/article}

With the PRO version this can also be easily inserted via the editor button.

3.10) K2 support PRO ONLY

The PRO version of Articles Anywhere also supports K2 items. To get the K2 item, just precede the item name/alias/id with 'k2:', like:

{article k2:Some K2 item}...{/article}
{article k2:some-k2-item}...{/article}
{article k2:123}...{/article}

4) Editor Button

You can enter the tags directly into your content. However, to save time typing and remembering what the exact syntax is, Articles Anywhere comes with a handy editor button.

You can use this editor button (located below the text input area) to place an {article} tag with the desired (basic) data type tags into your article (or other editor fields).

You can customise the default tag settings in the Articles Anywhere system plugin settings.

5) Examples

Example: title, intro, read more link

{article 123}{title}
{introtext}
{readmore:>> READ MORE >>}{/article}

Example: linked title and first 100 characters of intro

{article 123}{link}{title}{/link} - {introtext:100}{/article}

Example in HTML: title with link to article, first 120 characters of (entire) text.
(For use in HTML view of your editor)

{article 123}<h2><a href="/{url}">{title}</a></h2>{text:120}{/article}

Example: list of linked titles of series of articles PRO ONLY

{articles 101,102,103,104,105}- {link}{title}{/link}
{/articles}

 

6) Settings

Articles Anywhere is packed with options, giving you control over how it works and behaves. Here is the full list of the options you can find in the Articles Anywhere system plugin settings:

Tag Syntax

Article tag The word to be used in the tags.

Note: If you change this, all existing tags will not work anymore.
Articles tag PRO ONLY The word to be used in the tags for multiple articles.

Note: If you change this, all existing tags will not work anymore.

Behaviour

Default Maximum Articles PRO ONLY Define the default maximum articles to return when using categories in the articles tag. Set to 0 or leave empty for no limit.
Article Field to Order By PRO ONLY Define the default article ordering field when using categories in the articles tag.
Ordering Direction PRO ONLY Select the direction you would like Articles to be ordered by.
Ignore Article Access Level

If selected, the article access level selection will be ignored.

Ignore Article State If selected, unpublished articles will still be placed by the tag.
Use Ellipsis If enabled, an ellipsis (...) will be added to the end of texts that are limited to a number of characters/words.
Place HTML comments By default HTML comments are placed arround the output of this extension.

These comments can help you troubleshooting when you don't get the output you expect.

If you prefer to not have these comments in your HTML output, turn this option off.

Security Options PRO ONLY

Articles

These settings have effect on Articles and Categories.

Enable in articles Select whether to enable the use of the syntax in articles.
Security Level Set the level of security. Articles Anywhere tags will be stripped from articles with an owner (creator) below this group level.

Components

These settings have effect on the component area.
You can select in which components Articles Anywhere should not be enabled. Advise is to not allow Articles Anywhere in components that non-backend users can post content in.

Enable in components Select whether to enable the use of the syntax in components.
Disable on Components Select in which components NOT to enable the use of the syntax in. This is a list of your installed frontend components.

Other Areas

These settings have effect on areas outside the component area (so in Modules and the rest of the website).
Enable other areas Select whether to enable the use of the syntax in all remaining areas, like the modules. The tag will not be handled/shown in the html head (META tags and such).

Editor Button Options

Button Text This text will be shown in the Editor Button.
Show Button Icon J2.5 ONLY If selected, the icon will be displayed in the Editor Button.
Enable in frontend If enabled, it will also be available in the frontend.

Default Data Tag settings

Set the default values of the Data Tag selections for the Articles Anywhere popup

Enable Title Tag Select to insert the {title} tag by default
Enable Text Tag Select to insert one of the Text tags by default
Text Type Select which text type to use.
All text = Intro + Full text
Maximum text length Set the number of characters to trim the text to (html tags are not counted). Set to 0 or leave empty to disable trimming.
Strip HTML tags Select to strip html tags from the articles text (for raw text with no styling / markup)
Enable Readmore tag Select to insert the {readmore} tag by default
Readmore text Override the default Readmore text. Leave empty to use default.
Classname Override the default Readmore classname. Leave empty to use default (readmore).
Enable ID Tag Select to insert the {id} tag by default
Embed in a DIV PRO ONLY Select to wrap the output in a div tag.
You can use this to align the aricle and add extra styling to it.
Width PRO ONLY Enter a desired width if necessary.
You can use any valid css width value (auto, ...px, ...%).
Numeric values are interpreted as px.
Height PRO ONLY Enter a desired height if necessary.
You can use any valid css height value (auto, ...px, ...%).
Numeric values are interpreted as px.
Alignment PRO ONLY Define the alignment of the div.
Div Classname PRO ONLY Enter a classname for the div.
You can use this to style the div and it contents through css.
Content Type PRO ONLY Select what content type to use by default

7) Requirements

Articles Anywhere will only work correctly if your setup meets these requirements:

  • Up-to-date version of Joomla:
    • Joomla 2.5.10 or higher
    • Joomla 3.2.2 or higher
  • PHP 5.3+ ( No PHP 5.2 support! )
  • PHP mbstring (Multibyte String) functions enabled
  • MySQL 5+

Important: I can only provide support for setups that:

  • meet the above requirements;
  • do not have extension files or Joomla! core files which have been altered in any way.

8) Installation

You can either install Articles Anywhere by using the core extension manager available in the Joomla! Administrator Control Panel, or by using the powerful NoNumber Extension Manager.

Note: When updating Articles Anywhere, you do not need to uninstall it first. The package will update all the files automatically.

Keep in mind that when you update to a major new version (or uninstall first), you might lose some configuration settings.

8.1) NoNumber Extension Manager

It is very easy to install/update any NoNumber Extension using the NoNumber Extension Manager.

Please see the User Guide for the NoNumber Extension Manager for more detailed information...

NoNumber Extension Manager

8.2) Joomla! Extension Manager

To install via the Joomla! Extension Manager, just follow these steps (based on Joomla 2.5 setup):

  1. Download the extension zip.
  2. Log into your Joomla administrator
  3. In the menu, choose: Extensions >> Extension Manager
  4. Under 'Upload Package File' select the extension zip.
  5. Click on 'Upload & Install'
Joomla! Installer

If you have problems installing Articles Anywhere, please try the manual installation process as described here: docs.joomla.org/Installing_an_extension

9) Uninstallation

You can either uninstall Articles Anywhere by using the core extension manager available in the Joomla! Administrator Control Panel, or by using the powerful NoNumber Extension Manager.

If you no longer use any NoNumber extensions, you can also uninstall the NoNumber Framework plugin by using the Joomla! core extension manager.