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

Adsense not displaying

I've recently upgraded to drupal 5.1 and installed the latest adsense module. I believe I followed the instructions exactly however I cannot get my site to display the ads.

The site I'm playing with is:

http://highat.com

Can anyone please help me? I never had this problem in drupal 4.7. What am I doing wrong?

Please let me know if you require and additional information.

Thanks,

Willy

Signup with "code" and get added to role..?

I'm trying to find out if there is a module or other "hack" to allow the following situation:

I have setup a role on my website that is allowed access to certain features that normal users are not allowed to access.

What I would like to do is to have a feature where, upon registration, if a user enters a special code (like a bonus code) they get added to this special role (and therefore have access to these special features).

Image submit buttons

Has anyone any idea how to get image submit buttons in Drupal 5?

Generating an HTML table from a query

Hi folks,

I've got a module on the go that requires listing of content in database tables. I want to create a function where I just give it the table and fields I want, and it will return a nicely formatted HTML table.

Like so:

/* In my code */
$table = {mymodule_table};
$fields = "name:age:weight";
$output = mymodule_display_table($table, $fields);

/* The function */
function mymodule_display_table($table, $fields) {
    
    // use the parameters passed to identify which fields we want to retrieve.
    $fields_array = explode(":", $fields);

    $header = array_values($fields_array);
    
    foreach($fields_array as &$value) {
      $value = '$row->' . $value;
    }    
    $query = "SELECT * FROM " . $table;
    $queryResult = db_query($query);
    
    while ($row = db_fetch_object($queryResult)) {
      $rows[] = $fields_array;  //Here's where the trouble is... This outputs the correct stuff from $fields_array, but as a set of strings, not as variables.
    }    
 
    $fullTable = theme_table($header, $rows);
    return $fullTable;
}

My questions are:
1.) Is there a 'more drupally' way of doing this? If so, how?
2.) My difficulty lies in the fact that I'm working with two arrays - I need to generate an array of fields to be passed to the $rows[] array, which will then generate an array of rows for the HTML table.

webserver authentication for 5.x

Will there be a release of the "webserver authentication"-module for drupal 5?

Pending approval account and without approval for different roles

I have two roles in my website. For one role I want them to create account automatically, without pending approval by any administrator. BUT, for the other role, I want them to be pending to approval by administrator.

I am using rolesignup.module so I am able to catch different roles when they create their accounts in the website. Actually, previously they choose what role they want to be. And, depending on what you chose, I want you to approve your account or not.

Do I express myself? I hope I did.

Thanks in advance all you guys

/Pablo

Pages

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