- b2evolution CMS Support Forums
- b2evolution Support
- Plugins & Extensions
- Plugin development assistance
- Hacking the Search widget, for non-hackers
1 tomm86 Jan 11, 2008 22:23
I would like help in getting started on a hack of the search function widget in 2.3.x. What I would like to do is create a hack to allow me to search for key words not only in the blog posts (evo_items__item) table, but also search and display any Comments (evo_comments) that also contain the key word. Preferably this would show the post with the comments, but if I just got the comment with the key word I would be happy. My problem is that I'm not a programmer, I'm a sys admin ( which means, although I don't possess the ability to do this right, I just might be able to accomplish it with a little direction).
I was thinking that what I would do was just modify the SELECT statement to include searching the evo_comments.comments_content field as well, for my key word. Is there any reason this wouldn't work or is a bad idea? Since I always want to include searching the comments, I don't think I need to add a special radio button to include the comments section in my search.
Also, can anyone point out in what file/s this hack would need to take place? I took cursory look and couldn't find where these SELECT statements are formed and executed.
thanks.
Sorry friend, but I'm in the same situation as you. Poking through files trying to follow what happens when someone searches has not shown me exactly which file builds the query that will return the list of matching results.
I personally would like to do this a bit differently. I would like to search only titles for a project of mine, so we share similar goals here yah?