This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

search module hacking

hi everyone

I'm trying to tweak the 4.7 search module in order to automatically include "type:story" to the search string. In theory it should be easy if I find the function that reads what the user writes in the search box: if I find that function I can append "type:story" to the input text. But I cannot locate it.
Any hint?

thanks a lot :-)
G

Virtual drive

I'm looking for such module which allow me

1. to have virtual disk like Google Virtual Disk http://www.viksoe.dk/code/gmail.htm
2. access to files, stored on such disk should be from drupal page

Is anybody knows simular php-project with available windows-drivers, which allow to create own virtual drive in internet ?
Thanks !

How to theme the radios?

I have a radios element in my form and I want to put each options into a single

or . How to do it? The radios element is generated by form API.

Search Forms: no keywords

Hi people,

With Flexinode the search form includes a number of fields to assist in narrowing down your search, i.e. you can multi-select categories that the results could be associated with.

My question is, is it possible to have a search form, with only these fields alone available - without the need for a keyword search?

I've tried a few quick hacks, with commenting out the error checking statements in search.module,

in the function, search_form_submit, removed: if ($keys == '')...
in the function, do_search, removed: if ($query[2] == '') and if ($query === NULL || $query[0] == '' || $query[2] == '').

This doesn't yield any results though... The drupal log shows there is a mysql error too:

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 0' at line 1 query: CREATE TEMPORARY TABLE temp_search_sids SELECT i.type, i.sid, SUM(i.score * t.count) AS relevance, COUNT(*) AS matches FROM search_index i INNER JOIN search_total t ON i.word = t.word INNER JOIN node n ON n.nid = i.sid INNER JOIN term_node tn ON n.nid = tn.nid INNER JOIN users u ON n.uid = u.uid WHERE n.status = 1 AND (tn.tid = 1) AND () AND i.type = 'node' GROUP BY i.type, i.sid HAVING COUNT(*) >= 0 in /home/#####/public_html/####/includes/database.mysql.inc on line 120.

Two user pictures: large version and thumbnail

Hello,

For a website on which I am working I require that there be two sizes for the user picture: a relatively large (200x200) image, and a smaller, 'thumbnail' version. What is the cleanest way to implement this? The image resizing occurs in user.module:user_validate_picture, so unfortunately if I make my own validation hook I no longer have access to the original image. Or do I? Resizing twice is not an option, i.e., please don't suggest that I produce the thumbnail from the larger version -- I need to produce both images from the original.

Any thoughts?

Guestbook Query

Hi All,

I have installed the Guestbook module. I know there is a lot floating about the forums about adding captcha to it, which I would love. Anyway, I have searched and searched for this next item. I want to seperate my guestbook so that I can have two links, one that just displays the guestbook (i.e. dosn't show the submit/sign portion) and another that just displays the sign/submit part.

I expect there is a simple solution, I just can't see it!!!

Thanks in advance,
Nick

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions