Steps to display the database value in block

Hai,

Am new to drupal 7 and i like to develop a custom block to display a value from the data base.

I dont know to fetch the values from database

My simple code is as follow,

function example_block_view($delta='') {
$block = array();
switch ($delta) {
case 'my-block-id':
$block['subject'] = '';
$block['content'] = example_contents();
break;
}
return $block;
}

"An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (128 MB) that this server supports."

Hello all,

I'm stumped. Every time I upload a file larger than ~5MB, I get the error "An unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (128 MB) that this server supports" in place of where the uploaded filename should have appeared.

I have a Drupal 7.10 site running on Dreamhost, which is running Apache 2 with PHP 5.3 w/ CGI.

I have set all the pertinent PHP config variables to accept large files, and Drupal seems to recognize it. phpinfo() tells me the variables are set correctly. I've even gone as far as upping the limits of the applicable variables (ex. suhosin.post.max_value_length) for the suhosin PHP module to no avail.

Files that are less than ~5MB I have no issues with. But files over 5MB, the upload seems to get to 100%, and then I get the error.

What else might be limiting my uploads to ~5MB? I've tried Googling and reading, but all the results seem to have to do with Drupal 6. I've tried them anyway, and they don't seem to help.

I'm not sure if it is related, but the PECL progress bar always says "starting upload" but never shows progress.

Any ideas what I might try next? phpinfo() attached: And removed, not applicable anymore since I found the fix. See next post.

Looking For Ways To Moderate Comments

Currently avoiding spam with both Mollom and HTTP:BL modules.

What I'd like to do is have users mark comments that are spam (as well as rate the comment). Once the comment has been marked as spam it will be queued for review.

How can I change $content css , style , etc

I have to change the node style, I can change the node type by node--[type].tpl.php but there is a $content variable that renders the content out of templates control (it seems). I know I can change the $content order from CSS and also Drupal Admin panel field structure but it's the question, How can I render each $content element separately in Drupal 7 to feel full freedom in making themes. Is there any separate template to assign my custom css classes to each $content part? I've searched and read a lot, but didn't find a suitable solution for my question.

Thanks

How to change the title link for generic files?

I have a bunch of files that are displayed in pages; i'm using 'generic files' setting to display them; the problem is that some files have really ugly names like '212441242_.pdf'; i'd like to change the name to 'Draft Paper' but keep the 'mime' detection (small icon on the left side; like pdf, word etc).
How could that be accomplished?

Printing "Today" or "Tomorrow" for Upcoming Events instead of D/M/Y

Hi Everyone,

I'm a bit of newbie to PHP and drupal, so sorry if this is trivial.

I'm working on an community calendar. I have an upcoming events listing with the dates currently being formatted with D/M/Y. However, for events which are happening today or tomorrow, I'd like for it to literally print out "today" or "tomorrow". Any way someone could provide an assist?

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x