Permalink
Browse files

fix rss under safari, more mvc related cleanups

  • Loading branch information...
1 parent 4a1a219 commit d436d031443d353d25a830f91e877c3e32188538 @ahmedre ahmedre committed Jul 15, 2009
Showing with 16 additions and 3 deletions.
  1. +1 −0 .htaccess
  2. +6 −1 README
  3. +5 −0 index.php
  4. +1 −1 views/main.inc
  5. +3 −1 views/salatrss.inc
View
@@ -1,3 +1,4 @@
RewriteEngine on
RewriteBase /
RewriteRule ^rss(.*) index.php?rss=1 [QSA]
+RewriteRule ^about(.*) index.php?about=1
View
@@ -19,4 +19,9 @@ requirements:
<?php
$appid = ''; // put your yahoo app id here
-i am providing this code to help those muslims who want to put prayertimes on their websites. the source code is currently not very clean because it was quickly hacked together from an older version of the code that didn't rely on apis. the hope is that i will clean it up as i get some time insha'Allah :)
+- for apache, you need to use the .htaccess file for cleaner links
+- for lighttpd, something like this under the host should work:
+ url.rewrite = ( "^/rss(.*)" => "/index.php$1&rss=1",
+ "^/about(.*)" => "/index.php?about=1" )
+
+i am providing this code to help those muslims who want to put prayertimes on their websites.
View
@@ -1,4 +1,9 @@
<?php
+if (isset($_GET['about'])){
+ include 'views/about.inc';
+ return;
+}
+
// $ajax is set automagically from calculate.php for legacy purposes
// $_GET['ajax'] should be set by the javascript in an ajax call.
$ajax = isset($ajax)? true : (isset($_GET['ajax'])? true : false);
View
@@ -37,7 +37,7 @@
<body onload="javascript:$('location').focus();">
<div class="toplinks">
-<a href="about.php">About</a> | <a href="http://github.com/ahmedre/waqt.org">Github</a>
+<a href="/about">About</a> | <a href="http://github.com/ahmedre/waqt.org">Github</a>
</div>
<center>
View
@@ -1,5 +1,7 @@
<?php
header("Content-Type: text/xml");
+
+ $param = "q=$location";
print <<<RSSHEADER
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
@@ -19,7 +21,7 @@ RSSHEADER;
<item>
<title>$val - $time</title>
<description>$val is at $time.</description>
- <link>http://waqt.org</link>
+ <link>http://waqt.org?$param&amp;time=$i</link>
<pubDate>$pubdate</pubDate>
</item>

0 comments on commit d436d03

Please sign in to comment.