Requirements
Joomla! 4.4 PHP 8.1 PHP 8.2
Joomla! 5.1 Joomla! 5.2 PHP 8.1PHP 8.2 PHP 8.3
- Basic Joomla! knowledge available between the chair and the keyboard :)
Installation is easy!
- Download the plugin
- in the Back-end go to menu Extensions > Manage
- in the tab [Upload file package] click [browse] and select your downloaded plugin
- click [Upload & Install], wait for the installation to finish
Configuration
- Call2Action content preparation:
- In the back-end create a content category that you will use for you Call2Action content articles
- Create (and publish) Joomla! articles and assign them to the category created in previous step
- Plugin configuration:
- in the back-end go to menu Extensions > Plugins
- search / locate the 'ochCall2Action' content plugin
- open the plugin
- in the tab [Plugin] set status to [Enabled]
- in the tab [Call2action content] configure your Call2action category (the category created in step 1.) > look at the tool-tips for information about what each setting does
- in the tab [Auto Call2action] configure the automatic insertion of the Call2action content on selected categories (top, bottom, both position) or views
- click [Save & Close] and you are good to go
Advanced Replacements
ochCall2Actions comes out-of-the-box with fixed insertion positions. But in some cases these predefined positions are not enough and you want to target a specific position on your page.
For this you can use Advanced Replacements.
A Advanced Replacement is a search string (regex) that will point to the position that you want to insert the ochCall2Action articles in: you can then replace the search with the article or inject the article before or after the search result.
As an example: you want to add an ochCall2Action article after ever 3rd <p> element in your article. You can then configure the Advanced Replament as follows:
- Match regex: /<p>.+?<\/p>/i
- Action: Add after
- Occurance: 3
So what will happen here? ochCall2Action will use the regex "/<p>.+?<\/p>/i" on your article text. This regex will look for a string that starts with <p> then has any text (.+?) and ends with </p> case insensitive. It will find one or more and after the 3rd occasion it will add the ochCall2Action article.
This is very powerful feature as it opens up ANY position and because you can have multiple replacements you are not limited to only one position.
So you can add an ochCall2Action article after every image, before the 2nd h2 element, you can even replace every occurrence of any word in your text: the sky is the limit.
Please note that creating and using regex syntax is an advanced topic and this is not a learning guide on how to create a good regex. There are a lot of good resources on the internet explaining regex and how to use them.
Activate Joomla! One Click update and change-log integration
When you install the extension, it will automatically integrate with the Joomla Updater for both updates and change-logs.
On first use, the Joomla updater will prompt you with a 'Download Key is missing!' message.
- On this site: Go to [Tools > My Account > My Download Keys], and copy your Download ID#.
- On your site: Go to System > Update Sites, locate the extension, and paste the Download ID into the 'Download Key' field. Click [Save and Close].
Important:
If you're using this Download ID on a new server, you’ll receive an email to approve the device. Click the link in the email to enable downloads from this server.
Without approval, updates won’t be authorized, and the Joomla updater will display a 401 Unauthorized error when trying to fetch updates.
That’s it! You're all set.
Manually add Call2Action content in your blog / article
You can place the Call2Action content automatically on the top or bottom (or both) positions of the selected article categories, but the real power lies in the manual placement of the Call2Action content:
- open the blog / article (or even HTML module!) that you want to place the Call2Action content in
- insert {call2action} into the location where you want to automagically display the Call2Action content
- click [Save & Close]
- when surfing to your article / blog on the front-end, the Call2Action content should automagically show up: Cool :)
The {call2action} tag below is automatically replace with the contents of a Joomla! article (which in this case holds an ad)
Tips & Tricks
- Looking for a good resource on creating and testing regex? https://regexr.com/
Technical support and feature requests via our forum (You need a valid subscription to be able to post)