Need "acticles" and "files" added to Members Only Mod

I have a site I am wanted to put on "lock down".   I am using Zarcon's "Member's Only Mod" but it does not include Articles and Files.   Does anyone know how to do it for these mods?   It just involves the placement of a few lines of code.   I could probably figure it out by trial and error, but if someone who knows a bit of code could come up with this it would be helpful.

Thanks

Rob

Quote · 24 Apr 2011

I use this, you can try, or use other coding in place of;

BACKUP FILES FIRST

For Articles-  modules-->boonex-->articles-->classes-->BxArlPageMain.php

Find;

bx_import('BxDolTextPageMain');

 


Right after add;

if (!isMember()) {
header('Location: ' . BX_DOL_URL_ROOT . 'join.php');
exit;
}

 

this will redirect non-members (or not logged in) to join page.  You can replace code with whatever your using and see if it works.

Quote · 24 Apr 2011

For files, similar;

Back up Files First!

modules-->boonex-->files-->classes-->BxFilesPageHome.php

 

find;

bx_import('BxDolPageView');
bx_import('BxDolPrivacy');
require_once('BxFilesSearch.php');

 


Right after add;

if (!isMember()) {
header('Location: ' . BX_DOL_URL_ROOT . 'join.php');
exit;

this will redirect non-members (or not logged in) to join page.  You can replace code with whatever your using and see if it works.

 

Hope it helps...

Quote · 24 Apr 2011

Cool - thank you.

Quote · 24 Apr 2011

Thanks.   I need just one more - classifieds.   I realize classified are usually public, but I have an application I want to secure.   The instructions on Zarcon's mod do not seem to work.   It says you should edit modules/boonex/ads/request.php as folllows, but it doesn't work.  Is that the right file?

require_once(BX_DIRECTORY_PATH_INC . 'profiles.inc.php');

check_logged();

require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolRequest.php');

//Check if Logged In
check_logged();
if(!isLogged()) {
login_form();
exit;
}

BxDolRequest::processAsAction($GLOBALS['aModule'], $GLOBALS['aRequest']);

?>

 

Quote · 28 Apr 2011

Backup Files First...:

For ads try this below:

 

modules-->boonex-->ads-->classified.php

find;

check_logged();

 


Right after add;

if (!isMember()) {
header('Location: ' . BX_DOL_URL_ROOT . 'join.php');
exit;
}

 

Or use whatever code your using in place of the above...

 

Hope i helps..

Quote · 29 Apr 2011

Alot of things have changed since that mod was done. I should probably take it off the Market since I do not have the time at the moment to update it.

Nothing to see here
Quote · 29 Apr 2011

This fix seemed to work ok.   The rest of your mod was fine.   Thanks again rhimpr

Quote · 30 Apr 2011
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.