How can i do this in drupal 7?

Hello i am still new in drupal and i have this problem. Code below doesn't work on drupal.

$query = "SELECT COUNT(*) as num FROM $tbl_name";
$total_pages = mysql_fetch_array(mysql_query($query));
$total_pages = $total_pages[num];

Recipe Blog and Theme Suggestion

Could you please suggest a good looking contributed theme for a drupal 7 based Curry Recipe Blog?

Install Problem : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'l576_PVPom.blocked_ips' doesn't exist

Hi guys,

I'm having trouble getting Drupal 7 to install.

After I enter the database information I get the following message :

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'l576_PVPom.blocked_ips' doesn't exist

I576_PVPom is the name of the database (and user name.) I copied and pasted it from the hosting sites database settings page so I know the format of the name is correct.

The hosting site (www.freeola.com) is running the following versions:

MySQL 5.0.67
PHP 5.2.10

Theming user-register.tpl.php in Drupal 7

Hello,

I get the following error message preventing the rendering of the user registration page:

 Notice: Undefined index: render element in theme() (line 824 of /home/volunteermark/www/www/includes/theme.inc).
    Warning: Missing argument 2 for user_register_form(), called in /home/volunteermark/www/www/sites/all/themes/volunteermark/template.php on line 164 and defined in user_register_form() (line 3643 of /home/volunteermark/www/www/modules/user/user.module).
    Recoverable fatal error: Argument 1 passed to drupal_array_get_nested_value() must be an array, null given, called in /home/volunteermark/www/www/modules/field/field.form.inc on line 450 and defined in drupal_array_get_nested_value() (line 6339 of /home/volunteermark/www/www/includes/common.inc).

Here is what my user-register.tpl.php source code looks like:


Testing that this is my own user registration form

print render($form['form_id']);
print render($form['form_build_id']);

print render ($form['field_firstname']);
print render ($form['field_lastname']);
print render ($form['field_dob']);
print render ($form['name']);
print render ($form['mail']);
print render ($form['pass']);
print render ($form['timezone']);
print render ($form['form_token']);

print drupal_render($form['actions']); 

Upgrading drupal from 7.0 to 7.4

Can I upgrade drupal from 7.0 straight to 7.4 or do I need to do it incrementally like 7.0->7.1->7.2->7.3->7.4?

Theming block-block-#

I can't seem to get the right search terms to find this. I know how to theme blocks from modules like views, etc, however I can't seem to set a theme for a standard block.

The specific block is block 9 which has an id of block-block-9. I've tried these templates

block-9.tpl.php
block--9.tpl.php
block-block-9.tpl.php
block-block--9.tpl.php
block--block-9.tpl.php

Nothing seems to override a standard block. Is this possible? I don't want to override all blocks, just that one.

Thank you for your time and any help is appreciated.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x