Advertisement

Membreship/paywall to access old content

This forum is for general questions about extensions for Joomla! 4.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
jan91
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed May 15, 2024 9:06 am

Membreship/paywall to access old content

Post by jan91 » Tue Sep 10, 2024 1:28 pm

hello, i am looking to implement a membreship that let people access content that have have more then 1 month of existence, a kind of archive, how it can be achieved ? any extension or hack to do this ?

Advertisement
User avatar
AMurray
Joomla! Master
Joomla! Master
Posts: 10193
Joined: Sat Feb 13, 2010 7:35 am
Location: Australia

Re: Membreship/paywall to access old content

Post by AMurray » Tue Sep 10, 2024 10:00 pm

The paid content part shouldn't be an issue - any subscription extension would work.
https://extensions.joomla.org/instant-s ... bscription

The Paid members would for example, be placed in a user group called "Subscribed". That user group would then have the sole access to the articles in a category called "archived" or perhaps even access to articles with a status of "archived" (rather than published).

As to making the articles 'archived' after one month (I assume until then the articles are public access (?)), it could be automated e.g. through task scheduler (introduced in Joomla 4.1). A script could automatically run that either changes the article's category to "archived" or its status to "archived". This would be done through Task Scheduler in conjunction with the server's CRON Job functionality and (as I see it - and just thinking aloud) - based on the published date + 30 days. I'm not a coder so I don't know the specifics of what you need to write in that respect.

In Pseudo code, perhaps something like this (but would be coded in PHP, possibly as a plugin or something)

Code: Select all

IF [published-date] = today() - 30 THEN
  Move [Article] to [Category]

ENDIF
Otherwise, it would be a manual task to make all the relevant articles "archived" through whatever means you plan to do so.
Regards - A Murray
General Support Moderator

jan91
Joomla! Apprentice
Joomla! Apprentice
Posts: 8
Joined: Wed May 15, 2024 9:06 am

Re: Membreship/paywall to access old content

Post by jan91 » Wed Sep 11, 2024 8:04 am

thank you !
the probleme is that i need to keep actual categories and in joomla i thnk its not possible to have an article assigned to many categories. this is why i need some extra "thing" "field" that help me filtering articles.

i didnt mentionned it but i need to implement this on many kind of content accross many extensions (easyblog, discuss ..)

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

Re: Membreship/paywall to access old content

Post by Per Yngve Berg » Wed Sep 11, 2024 1:12 pm

Joomla has an archive function that does not interfere with categories.

Advertisement

Post Reply

Return to “Extensions for Joomla! 4.x”