- Posts: 3
- Thank you received: 0
All questions about EDocman extension
How to modify EDocman search module, to make Document Extra Fields searchable?
- Kreshna Aryaguna
- Topic Author
- Offline
- New Member
Less
More
2 years 6 months ago #152055
by Kreshna Aryaguna
How to modify EDocman search module, to make Document Extra Fields searchable? was created by Kreshna Aryaguna
Hello,
I just have deployed EDocman 1.22.0 for a web document management solution that uses quite a lot of Document Extra Fields . I have edited the proper document.xml file in <root>/administrator/components/com_edocman/model/forms/ location.
Then I activated EDocman search module on the website. Much to my dismay, it turned out EDocman search module can only search document title and description, but not document extra fields.
But then I found this post , where an EDocman user modified the EDocman search plugin (/plugins/search/edocman/edocman.php), to make it able to search indexed content, by modifying the SQL query inside that file. His codes are as follows:
So, the questions are:
To be honest this is my very first experience with EDocman, but I like to tinker.
Thank you very much.
I just have deployed EDocman 1.22.0 for a web document management solution that uses quite a lot of Document Extra Fields . I have edited the proper document.xml file in <root>/administrator/components/com_edocman/model/forms/ location.
Then I activated EDocman search module on the website. Much to my dismay, it turned out EDocman search module can only search document title and description, but not document extra fields.
But then I found this post , where an EDocman user modified the EDocman search plugin (/plugins/search/edocman/edocman.php), to make it able to search indexed content, by modifying the SQL query inside that file. His codes are as follows:
Code:
// /joomla/plugins/search/edocman/edocman.php : 101 - 103// replace with
$query = '
SELECT
a.id,
0 AS cat_id,
a.title AS title,
a.short_description,
a.description AS text,
a.indexed_content,
created_time AS `created`,
' . $db->Quote($section) . ' AS section,
"1" AS browsernav
FROM
#__edocman_documents AS a
WHERE
(' . $where . ') AND
(a.user_ids = "") AND
a.published = 1
ORDER BY ' . $order ;
So, the questions are:
- What file such I edit to modify EDocman search module instead of the search plugin?
- What database columns should I include in the modified SQL to include documents extra fields in the search?
- Are there better, simpler ways to achieve what I want?
To be honest this is my very first experience with EDocman, but I like to tinker.
Thank you very much.
Please Log in or Create an account to join the conversation.
- Mr. Dam
- Offline
- Administrator
Less
More
- Posts: 12818
- Thank you received: 1659
2 years 6 months ago #152058
by Mr. Dam
Replied by Mr. Dam on topic How to modify EDocman search module, to make Document Extra Fields searchable?
Hi Kreshna,
1. If you want to modify search function of component, you can modify function: _buildQueryWhere in file: [root] -> components -> com_edocman -> model -> list.php
2. Edocman doesn't support option to search through custom extra fields
Thanks
Dam
1. If you want to modify search function of component, you can modify function: _buildQueryWhere in file: [root] -> components -> com_edocman -> model -> list.php
2. Edocman doesn't support option to search through custom extra fields
Thanks
Dam
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.