- Posts: 9
- Thank you received: 0
All questions about EDocman extension
Category Search
- Rich
- Topic Author
- Offline
- New Member
Less
More
11 years 11 months ago #23771
by Rich
Category Search was created by Rich
Hi Tuan,
I've set up some categories that must only be available to particular users. I've done this by populating the 'user id' field when setting up these categories. However, when you login to view your documents you can search the categories that belong to other users. I need the search to only show categories that belong to the current user.
I found post #18014 that seems to be talking about a similar request and I uploaded the replacement search.php file, however this didn't solve the issue.
Any pointers?
Joomla! V2.5.8
Edocman V1.5.0
Thanks!
I've set up some categories that must only be available to particular users. I've done this by populating the 'user id' field when setting up these categories. However, when you login to view your documents you can search the categories that belong to other users. I need the search to only show categories that belong to the current user.
I found post #18014 that seems to be talking about a similar request and I uploaded the replacement search.php file, however this didn't solve the issue.
Any pointers?
Joomla! V2.5.8
Edocman V1.5.0
Thanks!
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 11 months ago #23822
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Category Search
Hi Rich
I believe EDocman doesn't provide categories search function, it doens't allow search for categories. Could you please explain more details ?
Tuan
I believe EDocman doesn't provide categories search function, it doens't allow search for categories. Could you please explain more details ?
Tuan
Please Log in or Create an account to join the conversation.
- Rich
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
11 years 11 months ago #23884
by Rich
Replied by Rich on topic Re: Category Search
Hi Tuan,
I'll try to explain what I'm doing in steps...
Firstly, my installation included: mod_edocman_search.zip and plug_search_edocman.zip.
1. Using the Edocman -> Categories page I created a number of categories for different users by entering their id into the 'User ids' field.
2. I then created a menu item for one of the users selecting 'edocman -> Categories List' as the menu item type. In the 'Required Setting' I selected the desired parent category from the dropdown.
3. From the 'Module Assignment' options on the 'Menu Manager' page I selected 'Edocman Categories' and 'Edocman Search' and positioned them on the page.
When I log in via the front end of the website a list of categories that belong to this user appears ... perfect!
Also a search facility appears with a 'Keyword' field and a 'Category' dropdown.
The problem I have is that the dropdown contains categories that do not belong to this user althought the categories list only includes this users categories.
I hope that's enough to go on? Thanks.
I'll try to explain what I'm doing in steps...
Firstly, my installation included: mod_edocman_search.zip and plug_search_edocman.zip.
1. Using the Edocman -> Categories page I created a number of categories for different users by entering their id into the 'User ids' field.
2. I then created a menu item for one of the users selecting 'edocman -> Categories List' as the menu item type. In the 'Required Setting' I selected the desired parent category from the dropdown.
3. From the 'Module Assignment' options on the 'Menu Manager' page I selected 'Edocman Categories' and 'Edocman Search' and positioned them on the page.
When I log in via the front end of the website a list of categories that belong to this user appears ... perfect!
Also a search facility appears with a 'Keyword' field and a 'Category' dropdown.
The problem I have is that the dropdown contains categories that do not belong to this user althought the categories list only includes this users categories.
I hope that's enough to go on? Thanks.
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 11 months ago #24047
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Category Search
Hi
I understand the issue now. Please get the file here, unzip it and upload to modules/mod_edocman_search folder. After that, it will work as expected .
Tuan
I understand the issue now. Please get the file here, unzip it and upload to modules/mod_edocman_search folder. After that, it will work as expected .
Tuan
Please Log in or Create an account to join the conversation.
- Rich
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
11 years 11 months ago #24072
by Rich
Replied by Rich on topic Re: Category Search
Hi Tuan,
Thank you very much for the updated script. Unfortunately the page gave me the following error.
Notice: Undefined variable: userId in /home/testsite/public_html/testbed/modules/mod_edocman_search/helper.php on line 14
I changed the $userId variable to $user and this got rid of the error but no categories appear in the dropdown!?
Thank you very much for the updated script. Unfortunately the page gave me the following error.
Notice: Undefined variable: userId in /home/testsite/public_html/testbed/modules/mod_edocman_search/helper.php on line 14
I changed the $userId variable to $user and this got rid of the error but no categories appear in the dropdown!?
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 11 months ago #24073
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Category Search
Hi
I am sorry. I forgot to test it before sending it to you. Please get the updated file here and It will work well.
Regards,
Tuan
I am sorry. I forgot to test it before sending it to you. Please get the updated file here and It will work well.
Regards,
Tuan
Please Log in or Create an account to join the conversation.
- Rich
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
11 years 11 months ago #24085
by Rich
Replied by Rich on topic Re: Category Search
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 11 months ago #24094
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Category Search
Could you please submit a support ticket sending me administrator and FTP account of your site so that I can check and solve the issue directly on your site ?
Tuan
Tuan
Please Log in or Create an account to join the conversation.
- Rich
- Topic Author
- Offline
- New Member
Less
More
- Posts: 9
- Thank you received: 0
11 years 11 months ago #24203
by Rich
Replied by Rich on topic Re: Category Search
Hi Tuan,
I managed to get it working.
I ran the query on line 14 directly on the database and it was not happy with the column name 'a.user_ids'. I changed it to 'user_ids' and it worked.
$query->where("((a.user_ids = '' AND access IN (".implode(',', $user->getAuthorisedViewLevels()).")) OR ....
Now, I'm not 100% sure what the 'a.' means in the string and therefore whether this fix is stricty correct. Is it some kind of alias?
Cheers
Rich
I managed to get it working.
I ran the query on line 14 directly on the database and it was not happy with the column name 'a.user_ids'. I changed it to 'user_ids' and it worked.
$query->where("((a.user_ids = '' AND access IN (".implode(',', $user->getAuthorisedViewLevels()).")) OR ....
Now, I'm not 100% sure what the 'a.' means in the string and therefore whether this fix is stricty correct. Is it some kind of alias?
Cheers
Rich
Please Log in or Create an account to join the conversation.
- Tuan Pham Ngoc
- Offline
- Administrator
11 years 11 months ago #24206
by Tuan Pham Ngoc
Replied by Tuan Pham Ngoc on topic Re: Category Search
Hi Rich
I am sorry. I copied the code from the model (too busy these days and don't have time to check it carefully). Yes, in this case, you can simply remove a from a.user_ids and It will works well .
a can be alias of #__edocman_categories but I didn't add this alias to the query and that's the reason it didn't work. Will update this code to download package soon .
Tuan
I am sorry. I copied the code from the model (too busy these days and don't have time to check it carefully). Yes, in this case, you can simply remove a from a.user_ids and It will works well .
a can be alias of #__edocman_categories but I didn't add this alias to the query and that's the reason it didn't work. Will update this code to download package soon .
Tuan
Please Log in or Create an account to join the conversation.
Moderators: Mr. Dam
Support
Documentation
Information
Copyright © 2024 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.