Question about page access based on settings stored in DB

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
paladin
New Member
New Member
Posts: 2
Joined: Thu Aug 19, 2010 11:30 pm

Question about page access based on settings stored in DB

Post by paladin »

Hey guys im trying to work out how to do a bit more with custom content.

So that if a setting in a table in the DB is set to ON then content A will be displayed or if its set to OFF content B would be displayed.

We use custom content at the moment im just trying to work out how to make my own function that can be accessed from the templates.

Atm i use this code

Code: Select all

{if $ccuser->loggedin() && $ccuser->memberof('basicmembers')}
{content} 
{else}{/if}
I would like to have something like

Code: Select all

{if $ccuser->loggedin() && $ccuser->memberof('basicmembers')}
{if $mymod->systemstatus() == 'OFF'}
{content} 
{else}
please wait until this page is online
{/if}
{else}{/if}
I just cant work out how to write a function so that it can be used here

Any help would be great
owr_bgld

Re: Question about page access based on settings stored in DB

Post by owr_bgld »

Take a look at the module AdvancedContent from NaN - there you have more possivilities with different contents aso.
Post Reply

Return to “Developers Discussion”