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

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

Distributed Authentication Redesign

To continue a thread that was apparently started during DrupalCon over a few beers, I would like to discuss redesigning the distributed authentication system that drupal uses. One of the proposals that I favor is this one:

http://alec.bohemiandrive.com/perm/2005/02/18/distributed-authentication

The drupal-devel thread that started this discussion:

http://lists.drupal.org/archives/drupal-devel/2005-03/msg00708.html

I'll start with why the current design doesn't work very well for me.

My primary problem with it is that you (the user) have to trust the site that you're logging into using your remote server as an identity authority. You must trust that it is not logging your cleartext password anywhere for malicious purposes. This is a psychological barrier to using this technique in a widespread way. Especially considering the whole purpose of this is that you can go to some random drupal site and enter your local (say drupal.org) username/password to register. If I'm just now registering on a site, then I probably don't know enough about the site to say whether I should trust it or not.

My second problem is that the server that your logging into is sending your password to drupal.org (or your auth server) unencrypted. What this means is that any machine on the network between this server and drupal.org could sniff your username and password on drupal.org. It would be fairly easy to step into the middle of the communication line and either take over or listen in on this interaction. If a particularly popular site were targeted, many identities could be compromised this way.

how do i convert xoops to drupal?

Hi

I like the Drupal design very much. I already use xoops for my homepage, and I have a lot of users. Is it possible to convert the database from xoops to Drupal ?

Pages

Subscribe with RSS Subscribe to RSS - General discussion