![]() ![]() |
Aug 25 2007, 07:39 PM
Post
#26
|
|
|
CuteNews Support Crew Pimp ![]() ![]() ![]() Group: Support Posts: 16,501 Joined: 28-August 05 From: Belgium Member No.: 5,662 |
SO i checked out the 2 hacks. Only the approve hack adds something to index.php, and got nothing to do with headers.
CODE <?php I dont believe that this code goes into the cutenews index.php file but rather your websites main page. (index.php is the most common filename for the websites main page.)
header("Cache-Control: must-revalidate"); header("Pragma: cache"); $if_modified_since = preg_replace('/;.*$/', '', $_SERVER['HTTP_IF_MODIFIED_SINCE']); $mtime = filemtime("./cutenews/data/comments.txt"); $gmdate_mod = gmdate('D, d M Y H:i:s', $mtime) . ' GMT'; if ($if_modified_since == $gmdate_mod) { header("HTTP/1.0 304 Not Modified"); die(); } header("Last-Modified: $gmdate_mod"); ?> -------------------- General FAQ Spam Protection In Cutenews Comments get deleted _______________________ << If you appreciate my help |
|
|
|
Aug 25 2007, 08:36 PM
Post
#27
|
|
|
Member ![]() ![]() Group: Members Posts: 73 Joined: 18-August 07 Member No.: 21,660 |
i see... That makes sense to me.
Thanks |
|
|
|
Nov 7 2007, 06:28 PM
Post
#28
|
|
|
Member ![]() ![]() Group: Members Posts: 92 Joined: 19-August 07 From: UK, England Member No.: 21,678 |
Hey, this is a good hack but I want it to refresh when I edit or delete something so I don't have to add a comment and delete to make it update again.
Thanks if you can help me. |
|
|
|
Jan 9 2008, 11:09 PM
Post
#29
|
|
|
Newbie ![]() Group: Members Posts: 8 Joined: 4-February 07 Member No.: 17,669 |
So does it work or not?
And what is the official code because I see it's been modified a lot. Has anyone tested it? And where exactly do you add the code? This post has been edited by Shellz: Jan 9 2008, 11:10 PM -------------------- My Corner of the Web: Bubbly-Chica.Info |
|
|
|
May 6 2008, 02:25 PM
Post
#30
|
|
|
CuteNews Support Crew Pimp ![]() ![]() ![]() Group: Support Posts: 16,501 Joined: 28-August 05 From: Belgium Member No.: 5,662 |
No hack is official, that's why it's called a hack
To answer your question: don't know. -------------------- General FAQ Spam Protection In Cutenews Comments get deleted _______________________ << If you appreciate my help |
|
|
|
Oct 20 2008, 10:59 PM
Post
#31
|
|
|
Newbie ![]() Group: Members Posts: 40 Joined: 29-December 06 Member No.: 16,884 |
Hi,
The final code is the one from post #7? This post has been edited by Newsuser: Nov 7 2008, 09:56 PM |
|
|
|
Oct 21 2008, 04:46 PM
Post
#32
|
|
|
CuteNews Support Crew Pimp ![]() ![]() ![]() Group: Support Posts: 16,501 Joined: 28-August 05 From: Belgium Member No.: 5,662 |
yep
-------------------- General FAQ Spam Protection In Cutenews Comments get deleted _______________________ << If you appreciate my help |
|
|
|
Nov 7 2008, 11:44 PM
Post
#33
|
|
|
Newbie ![]() Group: Members Posts: 40 Joined: 29-December 06 Member No.: 16,884 |
|
|
|
|
Nov 8 2008, 10:04 AM
Post
#34
|
|
|
CuteNews Support Crew Pimp ![]() ![]() ![]() Group: Support Posts: 16,501 Joined: 28-August 05 From: Belgium Member No.: 5,662 |
yes
-------------------- General FAQ Spam Protection In Cutenews Comments get deleted _______________________ << If you appreciate my help |
|
|
|
Nov 11 2008, 11:47 PM
Post
#35
|
|
|
Newbie ![]() Group: Members Posts: 40 Joined: 29-December 06 Member No.: 16,884 |
|
|
|
|
Nov 14 2008, 05:56 AM
Post
#36
|
|
|
Newbie ![]() Group: Members Posts: 1 Joined: 14-November 08 Member No.: 28,802 |
Cheers for the hack. Noticeable difference.
One thing however... when I go to the 'admin' page of Cute News, I have the following errors at the top of the page. CODE Warning: filemtime() [function.filemtime]: stat failed for ./cutenews/data/comments.txt in /home/paramore/public_html/cutenews/index.php on line 7 Warning: Cannot modify header information - headers already sent by (output started at /home/paramore/public_html/cutenews/index.php:7) in /home/paramore/public_html/cutenews/index.php on line 14 I presume it's something small I must of did wrong when applying the hack. |
|
|
|
Nov 14 2008, 01:50 PM
Post
#37
|
|
|
CuteNews Support Crew Pimp ![]() ![]() ![]() Group: Support Posts: 16,501 Joined: 28-August 05 From: Belgium Member No.: 5,662 |
like Newuser pointed out on line 7 you must change the path to comments.txt
the 2nd warning might be related to the first. -------------------- General FAQ Spam Protection In Cutenews Comments get deleted _______________________ << If you appreciate my help |
|
|
|
Nov 16 2008, 09:47 PM
Post
#38
|
|
|
Newbie ![]() Group: Members Posts: 40 Joined: 29-December 06 Member No.: 16,884 |
|
|
|
|
Nov 16 2008, 10:21 PM
Post
#39
|
|
|
CuteNews Support Crew Pimp ![]() ![]() ![]() Group: Support Posts: 16,501 Joined: 28-August 05 From: Belgium Member No.: 5,662 |
QUOTE Can you please reply to my last post? i thought i had answered both of you with my previous post changing that path would seem ok i think, altough i think that you could use this page caching also on the pages where you have CN include codes; And then you do need ./cutenews/data/comments.txt -------------------- General FAQ Spam Protection In Cutenews Comments get deleted _______________________ << If you appreciate my help |
|
|
|
Nov 17 2008, 01:22 AM
Post
#40
|
|
|
Newbie ![]() Group: Members Posts: 40 Joined: 29-December 06 Member No.: 16,884 |
i thought i had answered both of you with my previous post changing that path would seem ok i think, altough i think that you could use this page caching also on the pages where you have CN include codes; And then you do need ./cutenews/data/comments.txt Thanks. How do i use that caching on the pages with CN include codes? |
|
|
|
Feb 9 2013, 09:09 PM
Post
#41
|
|
|
Newbie ![]() Group: Members Posts: 3 Joined: 16-January 13 From: Melaka, Malaysia Member No.: 87,380 |
Means only cache get the page download more faster .. but if the first time user from the organic search engine it still have to download all the page. so the site speed still slow, is the CSS in CuteNews.. Sorry for my humble question.
Thank very much you in advance ... |
|
|
|
Feb 13 2013, 08:53 AM
Post
#42
|
|
|
Newbie ![]() Group: Members Posts: 4 Joined: 12-January 13 Member No.: 87,103 |
Someone told me you will find there's bug using IE cache and it is advisable to add "must-revalidate" inside cache command header or perhaps IE is not going to refresh the particular page just like Netscape/Firefox may.
-------------------- http://upfrontconsultants.com
|
|
|
|
![]() ![]() ![]() |
|
Lo-Fi Version | Time is now: 22nd May 2013 - 10:30 AM |