Having problems installing Drupal? See the Installation Guide for more information.

weather.module, unexpected t_string

Please bear with me -- I am comfortable in perl, not php.

I am trying to add weather.module with a Drupal 4.3.1 installation.

The weather.module fails because file_get_contents is not defined (though I have PHP 4.3.2, and file_get_contents is allegedly available in PHP 4 >= 4.3.0). So I added the following code, fished off the web somewhere:

function file_get_contents($filename, $use_include_path = 0) {
$file = @fopen($filename, "rb", $use_include_path);
if ($file) {
if ($fsize = @filesize($filename)) {
$data = fread($file, $fsize);
} else {
$data = ""; // just to be safe. Dunno, if this is really needed
while (!feof($file)) $data .= fread($file, 1024);
}
fclose($file);
}
return $data;
}

When I add this, the weather module displays an error that reads "unexpected t_string". However, it only flashes in the browser for about 500 msec, then is replaced by a drupal page. How can I get the error to hold still, or go to log page where I can read it at leisure?

Three questions:

1. What's wrong with the code?
2. How can I view the error without being a superhuman speed-reader?
3. Why, when I add pre /pre tags around the code above, does drupal reject my post because of "suspicious input data"?

Thanks!

Cheryl (migrating from ezpublish, and very grateful for a much more

Search weirdness w/ moderation

OK, I'm running Drupal 4.3.2., and I've noticed something strange:

Nodes which are in the moderation queue seem to have problems with the search indexer. In that, even if an article is promoted to the front page, but is also marked as in the moderation queue, the search module will NOT index the nodes or their attached comments. If you remove them from the moderation queue, it's too late, since they are behind the last index date.

Weblinks also displays an interesting problem, in that nodes in the moderation queue don't appear on the weblinks listing page.

Help with path definition

I was trying to define a block to show up on all pages, *except* all of the admin pages. I tried setting the block path PCRE to:

<(^/$|[^(admin)$/]+)>

This worked only for the /admin path. Whenever I descended to a second (or third (or fourth)) level within the admin structure, the block reappeared.

I tried modifying the PCRE with some of the basic expressions for matching, but am unable to get it. I'm hoping someone out there can help me with this? I need basically something like:

everything *except* /admin*

TIA!

Static content/escape drupal's url rewriting

How do I escape drupal's url rewriting? For instance, I would like to have a robots.txt file. Also, I would like to implement drupal, a little at a time, for a large website that is currently based on static html text files. My plan is to implement a drupal system, and migrate the content a little at a time. For all content that is not yet migrated, I would like the old URL to work. As I migrate, I would create a path alias in drupal for the old url.

Italian Localisation

Hi to everybody

I have finished a few weeks ago publishing my drupal-based site www.maxdanno.com, and I am working to the italian localisation and some migrating scripts.
Marco of tuttinudi.it told me of an existing localisation project, but I can't find the right /contrib

Can someone please help me getting introduced to the localisation project schema?

Pages

Subscribe with RSS Subscribe to RSS - Installing Drupal