Hello,
I started implementing the excelent feature of scheduled content but stubled on a problem, which I assume has a "simple" fix. I have multiple categories where I plan to implement scheduled content, for example, workout plans. Say a workout plan has 30 sessions. How I have my website setup, with custom layouts, I can show a category with those 30 sessions (articles), all are and should be clickable, obviously only those articles for which scheduled content allows acces shoud show the content, while if you click on an article, which isn't yet ready to show content it would be nice to say, for example, "This content will be available for you on DATE : TIME". What happens now in
/plugins/system/schedulecontent/schedulecontent.php
Code:
line 289
if (!$this->canAccess($articleId))
{
if (!$user->id)
{
// Redirect user to login page
$this->app->redirect(Route::_('index.php?option=com_users&view=login&return=' . base64_encode(Uri::getInstance()->toString())));
}
else
{
OSMembershipHelper::loadLanguage();
throw new Exception(Text::_('OSM_SCHEDULE_CONTENT_LOCKED'), 403);
}
}
I have modified this throw new Exception line to redirect to some custom article, with url /scheduled-content, which basically says, this content is scheduled for publishing, and added a java script back button, to return back to the category, where you have a list of your scheduled articles. I can do some modifying the code and such, so if you give me some code snippet, I will be happy to try it out and test it.
With kind regards,
Marck