News script version 1.3
Thu, 27 Jul 2006
OK, version 1.3 of the news script is available now. I've just updated the FAQ related to it as well.
If you want to enable search-engine friendly URLs, follow the instruction in the "htaccess.txt" file included. Hope it isn't too hard for anyone not familiar with mod_rewrite. I'll write a script to generate the ".htaccess" file automatically later as I'm too sleepy right now.
Posted at 12:24 am in PHP scripts
Comments
-
So sweet, downloading it atm. This is a 10/10!
Keep up the good work!by meepy.dk on Thu, 27 Jul 2006, 09:52 am # -
Uhm, weird. Having some "errors" - I did a clean install, CHMOD the files and such, logged in as "demo/demo" but then none of the tabs were working, and only displayed a blank field where the content goes. Tried everything, making new user and such - still nothing, I have to close the browser and log in again - and still it does the same thing.
I tried upload all the files again, same result.by meepy.dk on Thu, 27 Jul 2006, 10:07 am # -
installed and working at http://www.robinsonchristopher.com/about.php just to test it, loving it!
only problem is, how can i get the search engine friendly uri's to work, tryed everything (i think) and couldnt work it :(by christopher on Thu, 27 Jul 2006, 11:23 am # -
can't get the .htaccess file to work so i've disabled friendly url's for now, working perfectly and think its great! (but be even better with the url's working :p)
p.s. meepy.dk - it worked first time here, have you tryed again?by christopher on Thu, 27 Jul 2006, 11:50 am # -
>meepy:
Try putting
<?php error_reporting(E_ALL); ?>
at the top of "index.php" and see what the errors are.
>christopher:
Have you modified the "htaccess.txt" file included as in the instruction?
In your case, the RewriteBase should be "/" and change "index.php" to "about.php"by NT on Thu, 27 Jul 2006, 12:03 pm # -
NT >
Gives me this error; error3
I dont know what it means, do you?by meepy.dk on Thu, 27 Jul 2006, 01:59 pm # -
NT >
Gives me this error; error3
I dont know what it means, do you?by meepy.dk on Thu, 27 Jul 2006, 02:05 pm # -
Yup. That's the error I set to check if there's any hacking attempt. But it shouldn't have happened in normal situations. If you comment out line 366 in index.php, it won't throw the error anymore.by NT on Thu, 27 Jul 2006, 02:17 pm #
-
just got back and read your post, tryed it again, and perfect! working great :)
the problem was the RewriteBase i had it set to "/about.php" instead of just the folder the file is located in, changed that, and it works. fantastic :)
(get better support here than at my web host, hope your hosting is sorted now)by christopher on Thu, 27 Jul 2006, 04:03 pm # -
NT > Will do, will do.
Any particular reason why it happens? Am I doing something wrong? Hmm..by meepy.dk on Fri, 28 Jul 2006, 06:07 pm # -
Still wont work, I have comment out line 366.
Weird. Never had this problem wit the earlier versionsby meepy.dk on Sat, 29 Jul 2006, 09:08 am # -
That's sure weird. I've no idea either.by NT on Sat, 29 Jul 2006, 02:59 pm #
-
got it installed on another site of mine, www.edg3.co.uk which is going to be my main site for design etc. and once again it installed perfectly, even got the friendly url's set-up first time with thanks to NT for the help on my first site :)
really hope you get yours sorted meepy.dk as there is no reason why it shouldn't, good luck!
p.s. thanks again NT and you've got yet more backlinks to this site so hopefully even more people will become aware of this wonderful script ;)
p.p.s. i only learnt the other day that i could show news from certain catergories! its like a fully functional CMS if you used it with PHP includes for certain catergories only, superb!by christopher on Sat, 29 Jul 2006, 06:07 pm # -
Hi
Im getting
'Warning: Cannot use a scalar value as an array in index.php on line 59'
When I'm trying to log in...
Anuone who knows why that hapens?
Thanks /Kby Kalle on Mon, 31 Jul 2006, 01:00 am # -
Kalle, put this code in line 3 of index.php should solve the problem:
$_SESSION['news'] = array();
This looks like an old bug in PHP prior version 4.3by NT on Mon, 31 Jul 2006, 02:00 pm # -
NT, I tried putting that in line 3 but no luck, I still get:
Warning: Cannot use a scalar value as an array in "my url"/index.php line 59
I put it before and after include('./functions.php');
that was on line 3 also and I played around with line 59. Still no luck :(.by Steve on Mon, 7 Aug 2006, 08:14 pm # -
Ignore my previous comment, it's wrong. You might try this instead: do a Find/Replace to replace all instances of $news by $thenews.
If this still doesn't work, check your PHP version by phpinfo(). I'm pretty sure it's a bug in PHP older than 4.3by NT on Mon, 7 Aug 2006, 10:16 pm # -
Find and replace worked. :), It's not a bug for PHP Older than 4.3 because my PHP version wasn't. But thanks very much!by Steve on Mon, 7 Aug 2006, 11:03 pm #
-
I get this error when i try to log in with demo.
-----------------------------------------------
Warning: Cannot use a scalar value as an array in /home/virtual/magverlag.com/public_html/news/index.php on line 61
----------------------------------------------
Thanks,
Johnby John on Tue, 8 Aug 2006, 01:44 am # -
Hi again, I think I found the error. I first used “Mozilla Firefox” when I got the error. And then I tried out with “Internet Explorer” and then everything works just find. Could it be some compatible issues with “Mozilla Firefox”? How to make it run with “Mozilla Firefox”?
Thanks,
Johnby John on Tue, 8 Aug 2006, 01:52 am # -
I've just tried logging on your web page at http://magverlag.com/news/ and there wasn't any problem at all. I used Firefox of course.by NT on Tue, 8 Aug 2006, 02:04 am #
-
Love the script first of all. Having trouble though. I need to display the Categories like the script allows. But I need to display them in a different area of the page than that of the main news. If I duplicate the news include it tells me that I cannot duplicate the class. Any idea?by AJ on Mon, 28 Aug 2006, 08:54 am #
-
Use include_once() instead of include().by NT on Mon, 28 Aug 2006, 08:00 pm #
-
Love the script first of all. Having trouble though. I need to display the Categories like the script allows. But I need to display them in a different area of the page than that of the main news. If I duplicate the news include it tells me that I cannot duplicate the class. Any idea?by AJ on Tue, 29 Aug 2006, 06:37 pm #
-
AJ - didn't you just get a reply when you asked the same question the other day?by christopher on Tue, 29 Aug 2006, 09:24 pm #
-
Yes, still has page up and reloading it re-submitted the question. Simple mistake.by AJ on Wed, 30 Aug 2006, 08:03 am #
-
I just wish removing the <p> tag enclosing lines of the {MESSAGE} part.
I found a workaround:
i edited the file function.php and replaced the line
$replace = '<p>$1</p>$2';
with
$replace = '$1$2';
Is this the correct way of doing that?
Thanks for helpby Simone on Thu, 31 Aug 2006, 04:35 pm # -
Uhm, automatic paragraph generation is a feature. Don't know why you want to remove it.
If that workaround works for you then that's fine. But there's an easier way, which is to comment out all lines of the str2para() function and put in this code:
return $text;by NT on Thu, 31 Aug 2006, 08:34 pm # -
Thank you for your answer.
Your way is much better.
Great script, keep on!by Simone on Fri, 1 Sep 2006, 08:06 am # -
Hi, just wondering, is there any way to add the friendly url's to the rss feed as well?
Thanks, great script by the way :)by @lun on Sun, 3 Sep 2006, 11:11 am # -
It's not possible at the moment. I'll implement this in the future.by NT on Sun, 3 Sep 2006, 04:37 pm #
-
Hi,
It's a very sweet script, but I have a little problem. I'm from Hungary, so I'm using the "Hungary" local, and I want to use the UTF-8 codepage. Your script is using the ISO-8859-2 standard (yes, I know, it's a standard). So because my index.php have the UTF8 coding, and the script insert the post in ISO-8859-2, the outcome is very bad... There's any solution for this? Thank you!by Credence_The_Hun on Wed, 6 Sep 2006, 10:20 pm # -
You can edit the character set in "/template/default/header.tpl"by NT on Wed, 6 Sep 2006, 11:53 pm #
-
Hey NT, when can we expect something new from you? Checking out your site everyday.
Cheers! :)by meepy on Thu, 7 Sep 2006, 10:46 am # -
Wow, it was a strange thing, I didn't think that I must edit the header of the contol panel for this :) (well, okay, it's logical after all, but I thought the local setting do the coding). Anyway, it's really solve my problem, so I'm a happy Hun right now :). Thank you!by Credence_The_Hun on Thu, 7 Sep 2006, 11:41 am #
-
Wow, it was a strange thing, I didn't think that I must edit the header of the contol panel for this :) (well, okay, it's logical after all, but I thought the local setting do the coding). Anyway, it's really solve my problem, so I'm a happy Hun right now :). Thank you!by Credence_The_Hun on Thu, 7 Sep 2006, 12:36 pm #
-
Sorry for the duplicate post, it was an accident (refresh page -> repost). But I have another question. Now everything is fine, but one. In the news the date format is okay, just like I set on the control panel (2006. szeptember 6. /hungarian/). But in the archive, there's September 2006 (in the tpl, there's the {MONTH} {YEAR} format). Can I format this to my setting, like: '2006 szeptember'?by Credence_The_Hun on Thu, 7 Sep 2006, 01:39 pm #
-
Yep, edit the "/display/basic/note.tpl" file.by NT on Thu, 7 Sep 2006, 04:51 pm #
-
Hi there, just asking for some newbie help. Can't get my web-page to display the news. PHP Fatal error: Call to undefined function: show_news() in .....\\t3st.php on line 26 (which is show_news)
And it looks like this:
<?php
include('http://test.lorden.net/news/news.php');
show_news(10);
?>
what am I doing wrong?by Lorden on Thu, 7 Sep 2006, 08:28 pm # -
Use server path instead of HTTP path, e.g. include('news/news.php');by NT on Thu, 7 Sep 2006, 09:16 pm #
-
Hi! Thank you for the quick answers, everything works fine - but one :). As you remember, I'm edited the header.tpl for the sake of the UTF-8 coding, and it's okay. But in the archive, the names of the months (in the 'posted on...' part) goes wrong - like it's a different encoding. It's strange, because it's okay in my index.php, where I'm display the news, and the index.php and the archive.php is in UTF-8, and everything is okay, except this. Any suggestion?by Credence_The_Hun on Fri, 8 Sep 2006, 05:12 pm #
-
Have you specified UTF-8 in the <meta> tag of your "archive.php"? Aside from that, I've no idea either.by NT on Fri, 8 Sep 2006, 06:32 pm #
-
Where is a capcha for comments system?by Alex on Sat, 9 Sep 2006, 11:41 am #
-
There isn't.by NT on Sat, 9 Sep 2006, 12:42 pm #
-
Yes, utf-8 everywhere. You can check the problem here: www.komi-picurka.hu. The problem is in the "Hírarchívum" (bottom right link), please check f.e. the "2006 július" link! Thanks!
ps.: it's a fresh install, I will add a "powered by Winged News System" link asap! :)by Credence_The_Hun on Sat, 9 Sep 2006, 08:43 pm # -
You may try this. In "functions.php", look for function getZoneDate() around line 56 and replace the return line with this code
return utf8_encode(gmstrftime($format, $time + $this->configs['zone']*3600));by NT on Sat, 9 Sep 2006, 10:11 pm # -
NT, you are simply the best! :) That solved my problem, and my news system is really perfect now. Thank you very much!!by Credence_The_Hun on Sun, 10 Sep 2006, 01:08 am #
-
I did a clean install, CHMOD the files and such, logged in as "demo/demo" published some stuff and changed my settings and password than all of a sudden the control panal goes dead won't do anything. Did a reinstall and the same thing happens.by Doug on Mon, 11 Sep 2006, 12:40 pm #
-
What sort of error messages did you get?by NT on Mon, 11 Sep 2006, 05:04 pm #
-
Hi, me again, just a suggestion, if you are going to make version 1.4, any way you can include the news subject as the page's title?
Other than that this script is perfect, so great job :)
@lunby @lun on Mon, 11 Sep 2006, 06:41 pm # -
Yep, that's easy. I'll note it for future releases.by NT on Mon, 11 Sep 2006, 07:02 pm #
-
I don't get any error msg. It just won't let me do anything. Just now when it happened, I logged off the site and the internet than logged back on and it let me right in so it must be a session thing.by Doug on Mon, 11 Sep 2006, 09:01 pm #
-
OK I just tried it again and when I tried to post a msg. I got that error 3 page even though I restarted the session it still won't let me in, I even removed the htaccess files and that didn't make any differance. and the date seems to be screwed up todays post sept. 11 06, reads Posted at Sep:30 in Todays News.
I wonder if this could be related? I really do like the script and don't like sounding like a winer here. Thanks for your help and a nice bit of codeby Doug on Mon, 11 Sep 2006, 09:31 pm # -
I just had a thought. Could the cookie from your page be affecting the cookie that I have set on my machine from my page? Maybe I'm just grasping at straws.by Doug on Mon, 11 Sep 2006, 09:35 pm #
-
First, the best way to reset the session is to close your browser and open it again. Second, cookies can affect pages where they were created only.
The screwed up date is because your server doesn't support strftime() specs, but this is very strange (read: unlikely) because I've tested the script successfully on Linux, FreeBSD and Windows.
The error3 happened when you posted a new entry only? What about other actions, e.g. editing existing posts, deleting stuff, etc.?by NT on Mon, 11 Sep 2006, 10:27 pm # -
OK I'm not sure why but I seem to have it working now. I did notice in my temporary files folder on my computer that I was getting the spellcheck files cached when I hadn't even tried to use it, since you said that it won't work with IE. So I remaved all of those file from my server. I also started logging out everytime I left the control panel to do something. what ever, it seems to be working now I will keep playing around with it and if I figure out what I did right I'll let you know.by Doug on Wed, 13 Sep 2006, 12:04 am #
-
I got the time fixed it was my fault. I tried to change it early on and forgot about it. Although the comments display the correct EDT, the Posts display GMT. I still don't know why the control panel started working but I'm not going to complain about it. I've repaced the htaccess files but not the spellcheck. I tried to configure that htacces file of yours but no matter what I did it didn't seem to work. I'm sure it's opperator error.by Doug on Thu, 14 Sep 2006, 01:17 am #