Hook on searchType

By Djulia - September 25, 2013 - edited: September 25, 2013

Hi,

Is it possible to apply a hook to searchType createdBy.fullname (special case for searching by record owner)?
I would like to limit the list to the editors/authors who have an access.

It is in continuity with this post:
http://www.interactivetools.com/forum/forum-posts.php?postNum=2215350#post2215350

Thanks!

Djulia

By Jason - September 25, 2013

Hi Djulia,

Are you looking to customize the "WHERE" clause when performing an advanced search in the CMS?  If so, you can use the list_where filter to alter the where clause.

Hope this helps

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Djulia - September 25, 2013 - edited: September 26, 2013

Hi Jason,

Yes, I had also thought of this approach. But, I obtain a warning message.
Field 'createdByUserNum' must be set to type 'none'

I also tried to modify the file of the schema, but that does not function.

Do you have another suggestion?

Thanks again!

Djulia

By Jason - September 26, 2013

Hi Djulia,

Can you provide some more information on exactly what you're trying to accomplish?  Is your code trying to change the field type in the schema? 

Let me know and we'll see what we can work out.

Thanks,

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Jason - September 30, 2013

Hi Djulia,

Okay, I see.  There aren't a  lot of simple options.  One approach would be to have an admin drop down field that only showed authorized users using an advanced MySQL query.  This field could be set by a custom plugin when a new record is selected.  This field could now be used in the advanced search.  Outside of that, you would need to actually customize the core CMSB code in order to make a special case for this search field.

Hope this helps

---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By Djulia - October 2, 2013

Hi Jason,

>This field could be set by a custom plugin...
I found a solution with list_postAdvancedSearch.

Thanks again!

Djulia