- Posts: 4
- Thank you received: 0
OS Property support center
Hide Property details page if not registered
- Brian Harkin
- Topic Author
- Offline
- New Member
-
Less
More
11 years 10 months ago #32279
by Brian Harkin
Hide Property details page if not registered was created by Brian Harkin
Does anyone know how to modify osproperty so that if a property is set to registered you can still view the listing but when a user clicks to view the full details they are re-directed to the registration page
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13024
- Thank you received: 1690
11 years 10 months ago #32288
by Mr. Dam
Replied by Mr. Dam on topic Re: Hide Property details page if not registered
Hi Brian,
With your request, we should modify the source code, please following these steps.
1. Open file
components > com_osproperty > classes > listing.php
2. in Function listproperties
find
if(intval($user->id) > 0){
$special = HelperOspropertyCommon::checkSpecial();
if($special){
$query .= " and a.`access` in (0,1,2) ";
}else{
$query .= " and a.`access` in (0,1) ";
}
}else{
$query .= " and a.`access` = '0' ";
}
and remove it
in function advSearch
if(intval($user->id) > 0){
$special = HelperOspropertyCommon::checkSpecial();
if($special){
$where .= " and a.`access` in (0,1,2) ";
}else{
$where .= " and a.`access` in (0,1) ";
}
}else{
$where .= " and a.`access` = '0' ";
}
and remove it
Good luck
Dam
With your request, we should modify the source code, please following these steps.
1. Open file
components > com_osproperty > classes > listing.php
2. in Function listproperties
find
if(intval($user->id) > 0){
$special = HelperOspropertyCommon::checkSpecial();
if($special){
$query .= " and a.`access` in (0,1,2) ";
}else{
$query .= " and a.`access` in (0,1) ";
}
}else{
$query .= " and a.`access` = '0' ";
}
and remove it
in function advSearch
if(intval($user->id) > 0){
$special = HelperOspropertyCommon::checkSpecial();
if($special){
$where .= " and a.`access` in (0,1,2) ";
}else{
$where .= " and a.`access` in (0,1) ";
}
}else{
$where .= " and a.`access` = '0' ";
}
and remove it
Good luck
Dam
Please Log in or Create an account to join the conversation.
- Brian Harkin
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
11 years 10 months ago #32294
by Brian Harkin
Replied by Brian Harkin on topic Re: Hide Property details page if not registered
Dam Thanks very much for that, it works a treat, however I would like to redirect the user to the registration page rather than the homepage with the 'You dont have permission to view this' error, any help you could offer on implementing this redirect would be greatly appreciated.
Many Thanks Again
Your support level is excellent.
Brian
Many Thanks Again
Your support level is excellent.
Brian
Please Log in or Create an account to join the conversation.
- Mr. Dam
-
- Offline
- Administrator
-
Less
More
- Posts: 13024
- Thank you received: 1690
11 years 10 months ago #32295
by Mr. Dam
Replied by Mr. Dam on topic Re: Hide Property details page if not registered
Hi,
To solve that issue, please go to file, please following these steps.
1. Open file
components > com_osproperty > classes > listing.php
function details
$access = $property->access;
if(!HelperOspropertyCommon::checkAccessPersmission($access)){
$mainframe->redirect("index.php",JText::_('OS_YOU_DO_NOT_HAVE_PERMISION_TO_GO_TO_THIS_AREA'));
}
and change to
$access = $property->access;
if(!HelperOspropertyCommon::checkAccessPersmission($access)){
$mainframe->redirect(JURI::root()."index.php?option=com_users&task=login",JText::_('OS_YOU_DO_NOT_HAVE_PERMISION_TO_GO_TO_THIS_AREA'));
}
Good luck
Dam
To solve that issue, please go to file, please following these steps.
1. Open file
components > com_osproperty > classes > listing.php
function details
$access = $property->access;
if(!HelperOspropertyCommon::checkAccessPersmission($access)){
$mainframe->redirect("index.php",JText::_('OS_YOU_DO_NOT_HAVE_PERMISION_TO_GO_TO_THIS_AREA'));
}
and change to
$access = $property->access;
if(!HelperOspropertyCommon::checkAccessPersmission($access)){
$mainframe->redirect(JURI::root()."index.php?option=com_users&task=login",JText::_('OS_YOU_DO_NOT_HAVE_PERMISION_TO_GO_TO_THIS_AREA'));
}
Good luck
Dam
Please Log in or Create an account to join the conversation.
- Brian Harkin
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
11 years 8 months ago #33771
by Brian Harkin
Replied by Brian Harkin on topic Re: Hide Property details page if not registered
Hi Dam,
I have just noticed, after making the changes to the system previously so that users could see the property listing but not the full details until they had registered, the search funtion does not show any property listing unless you are logged in. Could you tell me what file I need to change to get the search listings to show when the property is set to registered. At the moment the search function only shows the property listing if the property is set to public
Many Thanks
Brian
I have just noticed, after making the changes to the system previously so that users could see the property listing but not the full details until they had registered, the search funtion does not show any property listing unless you are logged in. Could you tell me what file I need to change to get the search listings to show when the property is set to registered. At the moment the search function only shows the property listing if the property is set to public
Many Thanks
Brian
Please Log in or Create an account to join the conversation.
- Brian Harkin
- Topic Author
- Offline
- New Member
-
Less
More
- Posts: 4
- Thank you received: 0
11 years 8 months ago #33772
by Brian Harkin
Replied by Brian Harkin on topic Re: Hide Property details page if not registered
Sorry Dam I forgot to say, it is the search module that I have activated.
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam, Nguyen Phu Quan
Support
Documentation
Information
Copyright © 2025 Joomla Extensions by Joomdonation. All Rights Reserved.
joomdonation.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.
The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries.