This forum is for less technical discussions about the Drupal project, not for support questions.

Drupal 4.6 and PHP 5

Does Drupal 4.6 work with php 5 ? becuse i could'n find any info about this. I know that the stable release can't.

Menu in Drupal 4.6

I recently installed Drupal 4.6 RC and found that MENU option is not there in admin menu. Has it been replace by something else? The feature is disabled? Its a different module or is it removed? That option is very important as everything can not be organised through taxonomy.

rss and pathauto.module....

Is there anyway to make pathauto and rss play nice together? Both rss and pathauto work well in 4.5...seperately. However, pathauto will not recognize the "feed" in "mynode/123/feed". I have to create a seperate url alias by hand for that. So, if I want rss for my nodes, I must have 2 url paths for each posting...one for the normal "mynode/123" and a second for it's feed "mynode/123/feed". Additionally, when a node is deleted, I must go in and manually delete the feed path url, the first alias is automatically deleted. Any suggestions on simplifying this cumbersome process?

RSS Output for Aggregator Feed

I've created these two PHP scripts for outputting RSS from the data in your News Aggregator. One is for RSS 1.0, the other for RSS 2.0. They both work great, but if someone can suggest a way to include a published date, it would help. It seems that the news aggregator uses a timestamp function that doesn't translate into a good pubdate. When I place the feeds into MyYahoo, it says there are no new feeds (within the last 3 days). Feed free to play with these and mark them up as you see fit.

What you will need to change in the scripts are:

RSS 1.0 Script:
"title" "description," "link," and "items" information.
Database "username," "password," and "database name."

RSS 2.0 Script:
"title," "link," "description," and "language" (if other than English).
I've included a badge for my site - and feel free to leave it there :) - but if you want to use your own, change the image "url," "link," "title," "height," and "width" information. You can also leave this information blank between the tags.
Database "username," "password," and "database name."

Save the script of your choice as "rss.php" and upload it to the main directory. I went into CPanel and redirected "index.rdf," "index.xml," and "rss.xml" to this page, since this is what search engines crawl for when looking for an RSS file.

Here are the scripts, and like I said, please offer any suggestions for fixes or better usability:

RSS 1.0

<?php

/**********************************************************************************
 * rss.php
 * Version: 1.00
 * Author: Jeffrey Smith
 * Date: 03/19/2001
 * http://www.bloggator.com
 *
 **********************************************************************************
 This program is distributed in the hope that it will be useful, but WITHOUT ANY
 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 PARTICULAR PURPOSE.

 This work is hereby released into the Public Domain. To view a copy of the public
 domain dedication, visit http://creativecommons.org/licenses/publicdomain/ or
 send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
 94305, USA.
 **********************************************************************************/
//create header information and call the database

header ("");

echo ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
?>
<rdf:RDF xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:hr="http://www.w3.org/2000/08/w3c-synd/#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns="http://purl.org/rss/1.0/">
    <channel rdf:about="http://www.bloggator.com/rss.php">
        <title>Put Title Here</title>
        <description>Put Description Here</description>
        <link>Put Link Here</link>
        <items>Put Item Description Here</items>
</channel>

<?php
mysql_connect ("localhost", "username", "password") or die ("Cannot
connect to database server.");
mysql_select_db ("database name") or die ("Cannot connect to database.");


// change the sql look up so that you can format the date correctly// 
// $result = mysql_query ("select * from aggregator_item order by iid desc limit 0,10") or die (mysql_error());
$myq = 'SELECT iid, title, link, description, DATE_FORMAT( timestamp, \'%Y-%m-%d\' ) AS mydate'
        . ' FROM aggregator_item'
        . ' ORDER BY timestamp DESC '
        . ' LIMIT 0 , 15';
$result = mysql_query($myq) or die (mysql_error());



// change the item to items as directed by the RSS Validator// 

while ($row = mysql_fetch_array ($result)) {
    echo ("<item rdf:about><title>");
    echo $row['title'];
    echo ("</title>
        <description>");
    echo $row['description'];
    echo ("</description><link>");
    echo $row['link'];
    echo ("</link><date>");
    echo $row['timestamp'];
    echo ("</date>");    
    echo ("</item>\n\n");
}

mysql_free_result ($result);

?></rdf:RDF>

RSS 2.0

<?php

/**********************************************************************************
 * rss.php
 * Version: 2.00
 * Author: Jeffrey Smith
 * Date: 03/19/2001
 * http://www.bloggator.com
 *
 **********************************************************************************
 This program is distributed in the hope that it will be useful, but WITHOUT ANY
 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
 PARTICULAR PURPOSE.

 This work is hereby released into the Public Domain. To view a copy of the public
 domain dedication, visit http://creativecommons.org/licenses/publicdomain/ or
 send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California
 94305, USA.
 **********************************************************************************/
//create header information and call the database
header ("");

echo ("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
?>
<rss version="2.0"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:itms="Website Address">
    <channel>
        <title>Put Title Here</title>
        <link>Put your URL Here</link>
        <description>Put Description Here</description>
        <language>en</language>
        <ttl>60</ttl>
		<dc:creator>Bloggator.com</dc:creator>
		<dc:date>2002-10-02T10:00:00-05:00</dc:date>

		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
		<sy:updateBase>2003-09-01T12:00+00:00</sy:updateBase>
		<image>
			<url>http://www.bloggator.com/images/bloggator_badges/bloggator_88x31.gif</url>
			<link>http://www.bloggator.com</link>
			<title>Bloggator.com</title>
			<height>31</height>
			<width>88</width>
		</image>

<?php
mysql_connect ("localhost", "username", "password") or die ("Cannot
connect to database server.");
mysql_select_db ("database name") or die ("Cannot connect to database.");


// change the sql look up so that you can format the date correctly// 
// $result = mysql_query ("select * from aggregator_item order by iid desc limit 0,10") or die (mysql_error());
$myq = 'SELECT iid, title, link, description, DATE_FORMAT( timestamp, \'%Y-%m-%d\' ) AS mydate'
        . ' FROM aggregator_item'
        . ' ORDER BY timestamp DESC '
        . ' LIMIT 0 , 15';
$result = mysql_query($myq) or die (mysql_error());



// change the item to items as directed by the RSS Validator// 

while ($row = mysql_fetch_array ($result)) {
    echo ("<item><title>");
    echo $row['title'];
    echo ("</title>
        <description>");
    echo $row['description'];
    echo ("</description><link>");
    echo $row['link'];
    echo ("</link><date>");
    echo $row['timestamp'];
    echo ("</date>");    
    echo ("</item>\n\n");
}

mysql_free_result ($result);

?></channel></rss>

coral cache .htaccess entry

Hi again. I was wondering anyone has any experience using coral cache and if they might help me get my entry in .htaccess correct? I've been fudging with the RewriteRule for a while now and can't seem to get it right. Every time I try my site falls down. :P So I have to hurry up and comment it all back out real quick! :D

Thing is, I'm experimenting with one particular story as an example for now in hopes of just getting the settings right so I can employ coral cache next time I get that slashdot effect, but I don't want to use it all the time.

Blocking Content Spam via .htacess

While others are working on better solutions, I've been blocking IPS via Apache with .htaccess. I'm updating my list here:
http://lefttochance.com/banned_ips.txt

Pages

Subscribe with RSS Subscribe to RSS - General discussion