[prev in list] [next in list] [prev in thread] [next in thread] 

List:       phpslash
Subject:    Re: [PHPSLASH] Mod_rewrite and cache
From:       "Costas Malamas" <costas () hotbot ! com>
Date:       2000-02-28 1:00:38
[Download RAW message or body]

 I am sorry, I forgot about that.  OK, since I don't have write access to the CVS (yeah, where's that password guys? ;-), I am gonna send a very peculiar diff.  This is a diff of the functions: updatestory() rmstory() and liststories() from admin.php3.  Cut those functions only out from admin.php3 w/o any whitespace on top or below them.  Then add the diff I am enclosing, and paste the result back into admin.php3.  These diffs are kinda of a brute force hack, but they will give you: a) editing privileges on all author stories for authors with seclev >100000 and, b) a notifier in the first admin page if there are any submissions pending.

Hope it helps,

Costas

27c27,29
<                       WHERE aid='$aid' AND sid='$sid'");
---
>                       WHERE sid='$sid'");
> // The following was the original; changed for God-like control of content
> //                    WHERE aid='$aid' AND sid='$sid'");
45a48,50
>   $sl_q->query("SELECT count(*) as count from submissions");
>       while ($sl_q->next_record()) $subm_count = $sl_q->f("count");
> 
48c53,59
<   if ($author!="") $q .= "WHERE '$author'=aid ";
---
>   if ($author!="") {
>      $sl_q->query("SELECT seclev FROM authors WHERE aid='$author'");
>      $sl_q->next_record();
>      if ($sl_q->Record["seclev"] < 100000) {
>         $q .= "WHERE aid='$author'";
>      }
>   }
52a64,66
>   if ($subm_count > 0) {
>      echo "<tr><td colspan=5><b>=====&gt; Submissions Pending: $subm_count</b><br></td></tr>\n";
>   }
--

On Sun, 27 Feb 2000 18:08:23   Joe Stewart wrote:
>Okay, traffic has been light so maybe just a little discussion time -
>
>Has anyone hacked their site to serve up Search engine friendly pages
>like:  www/yoursite.com/article/2000200501.html
>
>
>Bob Allen at home-networking.org seems to have done something like this.
>The method seen before is to use mod_rewrite rules in .htaccess or
>configuration in access.conf.
>
>What I would like to accomplish along with this is to possibly write a
>file that would check its age, and serve itself, or if too old, refresh
>from the database.
>
>Hopefully we'll have an elegant solution for cache to reduce database
>accesses and make our pages search engine friendly.
>
>Any thoughts?
>
>
>Costas - Have you thought more about posting your "Super User" changes?
>
>thanks,
>
>Joe Stewart
>joe@justreviewed.com
>http://www.justreviewed.com
>-
>PHP3 Base Library Mailing List. Send messages to <phpslash@lists.netuse.de>.
>To unsubscribe, send "unsubscribe" to <phpslash-request@lists.netuse.de> in
>the body, not the subject, of your message.
>


HotBot - Search smarter.
http://www.hotbot.com
-
PHP3 Base Library Mailing List. Send messages to <phpslash@lists.netuse.de>.
To unsubscribe, send "unsubscribe" to <phpslash-request@lists.netuse.de> in
the body, not the subject, of your message.

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic