Wanted: extension to rotate content for weekly newsletter Topic is solved

This forum is for general questions about extensions for Joomla! 3.x.

Moderators: pe7er, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
vincebodie
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Thu Sep 02, 2010 3:57 am

Wanted: extension to rotate content for weekly newsletter

Post by vincebodie » Sun Sep 20, 2020 5:08 pm

We currently use the automated features of the AcyMailing 5 Enterprise version for our newsletter which is generated weekly via a cron script.

We have the need to rotate ads in the newsletter, in other words showing one different ad each week. This functionality is not available natively in AcyMailing, so we have resorted to creating different newsletter templates that alternate on a weekly basis. This is not ideal because any changes to other areas of the newsletter must be replicated in each template, and to complicate things further we are now up to 5 different ads that we want to rotate weekly which would mean 5 different templates to manage.

What AcyMailing can do is automatically include articles, modules, native Joomla banner ads, etc. via its tag system. So something that can automatically publish and unpublish either articles, modules, or banner ads on a weekly basis would do the trick. Does such a thing exist? I have not found anything yet.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27308
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Wanted: extension to rotate content for weekly newsletter

Post by Per Yngve Berg » Sun Sep 20, 2020 7:26 pm

In the Banner Component, client setup - a purchase plan Weekly can be set.

vincebodie
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Thu Sep 02, 2010 3:57 am

Re: Wanted: extension to rotate content for weekly newsletter

Post by vincebodie » Sun Sep 20, 2020 8:49 pm

Per Yngve Berg wrote:
Sun Sep 20, 2020 7:26 pm
In the Banner Component, client setup - a purchase plan Weekly can be set.
I see that, but it is not clear how to have each ad active for a week in rotation without managing it manually.

vincebodie
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Thu Sep 02, 2010 3:57 am

Re: Wanted: extension to rotate content for weekly newsletter

Post by vincebodie » Tue Sep 29, 2020 7:23 pm

Per Yngve Berg wrote:
Sun Sep 20, 2020 7:26 pm
In the Banner Component, client setup - a purchase plan Weekly can be set.
Furthermore I have since uncovered an issue with the Banners component and module that seems to go back to the Joomla! 1.0 days - there is no way to have the banner description show on the front end. This has been documented here and here among other places.

In the second link above there are two solutions given:

1.

You need to go to the front-end component, models of com_banners for banners.php.Navigation for it is components\com_banners\models\banners.php in this file on the getListQuery you need to add the following line of code in the 'a.description as description,'. in $query->select like others. That's it for this file.

Now go to your modules\mod_banners\tmpl\default.php and access that variable description as you tried echo $item->description.


I tried that with no luck, nothing showed up.

2.

Add this code to modules/mod_banners/tmpl/default.php (or better yet in an override at template/html/mod_banners/default.php)

Code: Select all

<?php 
     /** Description from the Banner  **/
     $db = &JFactory::getDBO();
         $bid = $item->id;
         $sql = "SELECT `description` FROM `rlz1b_banners` WHERE '$bid'"; 
                 /*rlz1b_banners is your database name*/
         $db->setQuery($sql);
         $db->query();
         $res = $db->loadAssocList(); 
?>
<p><?php  echo $res[0][description]; ?></p>
I changed the code to reflect my db name, and this seemed to work until I discovered that it was showing a description from the same ad over and over no matter which banner image is being displayed.

So either I need to find a fix to make the Banners component work, or I need another way to rotate content on a weekly basis.

Another option is to just have Joomla articles that get published and un-published on a weekly basis, though I have found no way to automate this. Assuming I were to manually handle this part of it, I could then just create a module for these articles to display in and include that module in the newsletter.

I have also looked into using DJ Classifieds, but that seems to be quite a bit of overhead for something that should be pretty simple really.

So I guess I'm stuck until I find a solution... Beuller...?

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27308
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: Wanted: extension to rotate content for weekly newsletter

Post by Per Yngve Berg » Tue Sep 29, 2020 7:52 pm

Isn't there anything here that fit your needs?

https://extensions.joomla.org/category/ ... s-display/

Shur
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu May 04, 2006 6:26 am

Re: Wanted: extension to rotate content for weekly newsletter

Post by Shur » Tue Sep 29, 2020 9:38 pm

vincebodie wrote:
Tue Sep 29, 2020 7:23 pm
Another option is to just have Joomla articles that get published and un-published on a weekly basis, though I have found no way to automate this. Assuming I were to manually handle this part of it, I could then just create a module for these articles to display in and include that module in the newsletter.

So I guess I'm stuck until I find a solution... Beuller...?
Since you asked me this question directly (by giving a link to this topic), I will also answer here:

See what features the RAXO All-mode PRO module has for displaying articles, and especially about filtering them by date: Basic Options > FILTER SETTINGS > Date Filtering
https://www.raxo.org/forum/viewtopic.php?f=5&t=255


Hope this helps in your situation.

vincebodie
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Thu Sep 02, 2010 3:57 am

Re: Wanted: extension to rotate content for weekly newsletter

Post by vincebodie » Wed Sep 30, 2020 1:58 am

Per Yngve Berg wrote:
Tue Sep 29, 2020 7:52 pm
Isn't there anything here that fit your needs?

https://extensions.joomla.org/category/ ... s-display/
I have looked at page after page of those but none seem to be able to turn articles on/off on a weekly basis.
Shur wrote:
Tue Sep 29, 2020 9:38 pm
vincebodie wrote:
Tue Sep 29, 2020 7:23 pm
Another option is to just have Joomla articles that get published and un-published on a weekly basis, though I have found no way to automate this. Assuming I were to manually handle this part of it, I could then just create a module for these articles to display in and include that module in the newsletter.

So I guess I'm stuck until I find a solution... Beuller...?
Since you asked me this question directly (by giving a link to this topic), I will also answer here:

See what features the RAXO All-mode PRO module has for displaying articles, and especially about filtering them by date: Basic Options > FILTER SETTINGS > Date Filtering
https://www.raxo.org/forum/viewtopic.php?f=5&t=255


Hope this helps in your situation.
I do see a LOT of date based options, but none that can turn articles on/off on a weekly basis. Did I miss something?

Just to be really clear here, I need a module that will serve one content item per week in rotation, for example like this:

Week 1 - Shoes
Week 2 - Surfboards
Week 3 - Books
Week 4 - Bar mats
Week 5 - Pool cues
Week 6 - Shoes
Week 7 - Surfboards
Week 8 - Books
Week 9 - Bar mats
Week 10 - Pool cues
Etc...

I would really like this to be based on the Banners component, because then I can use the built in click tracking and client functions.

Then again the Content component could be made to work too. But it seems counter intuitive to have articles published and un-published on a weekly basis. Most article display systems are based on sliders or archiving of old articles for obvious reasons.

Any other ideas...?

Shur
Joomla! Apprentice
Joomla! Apprentice
Posts: 14
Joined: Thu May 04, 2006 6:26 am

Re: Wanted: extension to rotate content for weekly newsletter

Post by Shur » Wed Sep 30, 2020 8:47 am

vincebodie wrote:
Wed Sep 30, 2020 1:58 am
I do see a LOT of date based options, but none that can turn articles on/off on a weekly basis. Did I miss something?

Just to be really clear here, I need a module that will serve one content item per week in rotation...
Any other ideas...?
Each Joomla article have two dates - created date and published date.
In one day (creation date), you can create many articles with a publication date over the next several months, or even for the whole year.

Let's say you want to see 8 different articles one at a time during the week. You need to create these articles and assign them the appropriate publication date, distributing them by week:

28.09.2020 Article 1
05.10.2020 Article 2
12.10.2020 Article 3
19.10.2020 Article 4
26.10.2020 Article 5
02.11.2020 Article 6
09.11.2020 Article 7
16.11.2020 Article 8

Then you can copy these articles and assign them new publication dates. Thus, immediately create the required number of articles for several months in advance.


After that take the RAXO All-mode PRO module, specify to display articles from your category and set:
Date Filtering: This Week
Image

The module will process your articles and display only the one that corresponds to the current week. Moreover, next week the module will automatically show the next article, etc.

vincebodie
Joomla! Intern
Joomla! Intern
Posts: 85
Joined: Thu Sep 02, 2010 3:57 am

Re: Wanted: extension to rotate content for weekly newsletter

Post by vincebodie » Wed Sep 30, 2020 8:32 pm

Thanks for the suggestion Shur but I have found a solution using a modified version of the Banners component. You can see it in action here, refresh the page a few times and the various banners show along with the description text.

https://feminapt.com/babylife

In case anyone else wants to have the banner descriptions show, the modified code I used to make it happen is in these files:

https://feminapt.com/media/com_banners- ... rs.php.zip
https://feminapt.com/media/mod_banners- ... lt.php.zip

The second file can go in your overrides folder if you are hip to that.


Post Reply

Return to “Extensions for Joomla! 3.x”