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

Searching

I have a search i am trying to perform. I have it set up at registration where business's fill in a business field and other people leave business field blank so when searching i want to search for business's or clients. heres my search

Theres 3 fields in the table

fid, uid, value

I need to search for instances of each matching fid and value. i believe i am doing it the wrong way as my sql_string is something like this:

SELECT * FROM profile_values WHERE fid='9' AND value='NY' AND fid='16' AND value='1' AND fid='17' AND value='1' AND fid='21' AND value='1' AND fid='19' AND value='1' AND fid='16' AND value='1' AND fid='18' AND value='1' AND fid='20' AND value='1' AND fid='4' AND value='' GROUP BY uid

so im sure since its looking for multiple values with different values, it returns 0 results. how can i go about making this search work?

$state = mysql_real_escape_string($_POST['state']);
$wearhat = mysql_real_escape_string($_POST['wearhat']);
$temptattoo = mysql_real_escape_string($_POST['temptattoo']);
$bumperstickers = mysql_real_escape_string($_POST['bumperstickers']);
$flyers = mysql_real_escape_string($_POST['flyers']);
$wearshirt = mysql_real_escape_string($_POST['wearshirt']);
$permtattoo = mysql_real_escape_string($_POST['permtattoo']);
$carmagnets = mysql_real_escape_string($_POST['carmagnets']);

Recently used terms?

Is there an easy way to generate a _clean_ list of taxonomy terms used in the most recently created nodes?

Playing with views, I could create a list of terms used, but not a list with duplicates removed, multiple terms split apart (ie no commas), etc.

I'm thinking along the lines of 'Recent Topics Discussed', so I don't want the cruft of doubles/etc, just a way for someone to see XYZ was discussed, and a single link (via taxonomy) to items using that term.

Seems simple enough, but for some reason I don't see an 'out of the box' way to generate it...

check_url help

Hello:

Since I had been using Drupal for all of a couple days before I wrote this, I'm hoping that someone can tell me whether I'm using check_url properly (or need to use another function). Yes, I've read the docs, searched the forums, and it looks good. But, I'd still feel better if someone gave me a thumbs up before deploying it (or telling me what's wrong).

Since DruTex doesn't have mimeTex support yet (my provider doesn't have a LaTeX installation nor will they), I needed to write a simple filter so I can write math. At any rate, here's the code. It works, but I'm just wondering about check_url (i.e. security).


function mtex_filter($op, $delta = 0, $format = -1, $text = '') {
switch ($op) {
case 'list':
return array(0 => t('mTex'));

case 'description':
return t("A simple module for rendering LaTeX equations using mimeTex");

case 'prepare':
$text = preg_replace("/(.+)<\/tex>/", "\xFEtex\xFF$1\xFE/tex\xFF", $text);
return t($text);

case 'process':
$text = preg_replace("/\xFEtex\xFF(.+)\xFE\/tex\xFF/", "Only local images are allowed.", $text);
return t($text);

default:

Custom node question

I am working on a simple node module, and I want to only allow this node type to be submitted in a specific input format. For example, the body of any content of type example_node must be submitted in the input format "Filtered HTML". How do I specify this to drupal?

Thanks,
cwgordon7

Upgrading Flickrstickr

I'm working on converting Flickrstickr from a 4.7.x module to a 5.x module. I've got the module to the point where it's displaying images for only the logged in user (yay!). Unfortunately when I try to drag and drop an image it is not (1) pasting the URL back to flickr (2) displaying the correct size of image. I assume this is a problem with the javascript functions, but I'm not sure where to start.

Image Assist + Tiny MCE "Popup Link" not working

I have Tiny MCE installed and I am using the plugin for it that came with Image Assist. I am having two problem:

1.) My default Image sizes do not work...IE: when I set the size of "Preview" in the settings for the Image module, it does not affect the size of the images that are inserted via Image Assist in "Preview" mode. Same goes for "Thumbnail" and "Original." Also the "max size for inline images" setting in the Image Assist settings has no affect on image sizes...What am I missing?

2.) When I insert images via Image Assist (+TinyMCE) I am able to select the "Open in popup window" option under the "Link" setting. It inserts the image properly but the image does not open in a popup when clicked. It opens a new browser window that loads the home page. Firebug reports the following error in the original window (so its trying...it looks like its missing 2 paramaters?)

----short----
syntax error
[Break on this error] launch_popup(42, , ); return false;

----long------
syntax error
(no name)([], Object editor_id=mce_editor_0 action=insert)tiny_mce.js (line 1)
(no name)([], Object editor_id=mce_editor_0 action=insert)editor_plugin.js (line 1)
(no name)("mce_editor_0", body#mceSpanFonts.mceContentBody, "mceDrupalImage", false, null)editor_plugin.js (line 75)

Pages

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