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

user login module disabled: stucked outside!

Ok, now i know its a bit of a dumb situation but seems like i've disabled my user login module and log out as admin. Now i don't know how to bring back my admin permission...

Anyone can help with this one?

Flexinode Query

Good afternoon,

I am the founder of many drupal sites and I have just started to use the flexinode modules with my sites. There is something I would like to know, if possible and how we do it?

I would like to know if we can create a flexinode of some kind that goes like this.
-----------------------------------------------------------------

User enters a title: My simple image gallery

User enters a description(or the text field, I would name this:"Enter HTML here"): HIS HTML CODE HERE

Full error messages

Hi

I am getting an error on a sql command in a custom module I am developing. The error is logged in Drupal as follows:

Determine module version programatically?

Is there an official way to determine an installed module's version programatically? I don't see any official API or hook for this purpose. (But I may have missed something)

This would be very handy... if you know of a way, or there is documentation or an example showing how this may be done, I'd love to see it.

-Mike

Display Event until End Time

I'm using the Event Module and would like to have the events displayed on my front page until the end time of the event. Right now the event disappers on the day of the event. That's a bad thing. Is there a setting or do I need to modify the code somewhere to enable the event to display or did I possibly do something wrong when I set up the event?

THANKS.

Search hook... Strange behavior

Hello,

I'm trying to implement the search hook in a very simple block module that only adds a directory of all users with the role "doctor" and a search tab for finding only users with the doctor role. So the weird thing is that it works but only for some users and not others.

"dobson" and "marigold" are both doctors for example. Dobson does not come up, but marigold does get retrieved by the search.

The SQL query works for ALL users when I enter it directly into MySql's command line, so it can be the SQL query in and of itself. The only space for variation is in the $keys parameter which is clearly working for the other users.

Also, I am doing the search as the root drupal administrator so it can't be that I am restricted to not be aware of that one user (dobson).

Below is the search hook implementation I wrote. Any comments or suggestions are greatly appreciated! -Rob

function doctor_update_index() {
// do nothing. We do not want anything indexed
}

function doctors_search($op = 'search', $keys = NULL) {
global $user;

switch($op) {
case 'name': $results = t('doctor');
break;

case 'search':
$results = array();
$q = "select distinct u.uid, u.name from {users} u, {users_roles} ur, {role} r " .
"where u.uid=ur.uid and ur.rid=r.rid and r.name='doctor' and" .
"(u.name LIKE '%" . $keys . "%')";
$r = db_query($q);
while ($usr = db_fetch_object($r)) {
$results[] = array('link' => '?q=user/' . $usr->uid, // link to node for USER
'snippet' => '',
'title' => $usr->name
);
}
break;

case 'reset':
variable_del('node_cron_last');
break;

case 'status':
$results = array('remaining' => 0, 'total' => 0);
break;
}
return $results;
}

function doctors_search_item($item) {
$o.= '

Pages

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