Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PHP + MySQL News Script

0 views
Skip to first unread message

Agelmar

unread,
Mar 13, 2002, 7:59:46 PM3/13/02
to
Alright... just a quick question. I know there are a few free PHP + MySQL
news script/database programs out there for websites, but I didn't like any
of them. I wrote my own that supports multiple users, user levels etc, the
full 9 yards. It works 100%, although I'm currently doing an addon so that
it writes a .txt file with info from the MySQL DB whenever someone adds new
content / updates old content, so that rather than having to have the main
webpage do a bunch of SQL queries to include the news it can just do an
include() statement. My only question is, should I spend time building a
"Configuration of output" interface and release the script to the public, or
just hard code in my format preferences and keep it for my personal site?
I'm not looking to make money or anything like that, just trying to figure
out if I should spend the time to add some configuration sections to the
script and release it, or just not bother because there area already others
available... any ideas?


Lindsay Adams

unread,
Mar 14, 2002, 1:07:30 PM3/14/02
to
On 3/13/02 4:59 PM, in article a6osm2$g4bin$1...@ID-30799.news.dfncis.de,
"Agelmar" <ia...@mediaone.net> wrote:

well, you obviously prefer your own scripts to those that others have done.
There must be something good about them then.

Is there a URL that we all can see that shows what the output looks like?

if you are willing, I think it would be great if you rolled all the scripts
(directory structure and all) and the MySQL table creation information into
a tarball and made it available.

Stick in a README that states NO SUPPORT available, and let people dissect
it.

You never know, you met get a bunch of us that do the clean up for you. a
group project.

you might want to submit it to phpclasses.upperdesign.com as your download
source.

just my thoughts.

Agelmar

unread,
Mar 14, 2002, 5:19:51 PM3/14/02
to
It's not done yet, it's still a work in progress... Anyhow, I'm running a
copy on my computer at home. You can check it out at
http://68.40.129.43:8765/post.php with the output being at
http://68.40.129.43:8765/news.php (I'm still working on the formatting, my
focus thus far has been getting the script to work. news.php just does an
include of news.txt which is rebuilt from the mysql database each time an
update is made to cut back on MySQL queries. In other words, I finished my
addon :)

Anyhow, you can log in with lindsay pass lindsay. I'd appreciate any
feedback.

Thanks :)
P.s. if you want a copy let me know and I'll post it... it's a 25kb php
script. (I haven't written a script to create the tables automatically,
because this was originally just for me ^-^ I'll probably write up a script
to do it if i release it publically.) It uses two tables, (referenced by a
variable name throughout, but on my server I made them "users" and "news").
users is as follows:
+-------------+--------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------------+--------------+------+-----+---------+-------+
| name | varchar(20) | | PRI | | |
| displayname | tinytext | YES | | NULL | |
| password | text | YES | | NULL | |
| email | varchar(250) | YES | | NULL | |
| admin | char(1) | YES | | NULL | |
| sesskey | int(11) | YES | | NULL | |
+-------------+--------------+------+-----+---------+-------+
And news is as follows:
+-------------+--------------+------+-----+---------------------+-----------
----
-+
| Field | Type | Null | Key | Default | Extra
|
+-------------+--------------+------+-----+---------------------+-----------
----
-+
| messageid | int(11) | | PRI | NULL |
auto_increment
|
| title | tinytext | | | |
|
| author | tinytext | | | |
|
| displayname | tinytext | YES | | NULL |
|
| email | varchar(255) | YES | | NULL |
|
| postdate | datetime | | | 0000-00-00 00:00:00 |
|
| story | text | | | |
|
+-------------+--------------+------+-----+---------------------+-----------
----
-+

Sorry if that looks wierd, I just did a cut and paste from MySQL :) Anyhow,
I should probably change things to NOT NULL, but they will never be null if
input is done by the script... the password is stored encrypted using
password(). A randomly generated session key is created each logon and is
passed around with the username during the entire session, but not the
password. Each time the page loads it checks the sesskey against the
database and what is submitted by the client's computer... I've put a lot of
work into the script ^-^

-Ian

"Lindsay Adams" <noe...@nospam.com> wrote in message
news:B8B626E0.A345%noe...@nospam.com...

Agelmar

unread,
Mar 14, 2002, 8:04:33 PM3/14/02
to
OK, it might not work for the next few hours, I'm currently rewriting it to
not require register_globals, i.e. replacing everything with $HTTP_POST_VARS

"Agelmar" <ia...@mediaone.net> wrote in message
news:a6r7m9$gj1sf$1...@ID-30799.news.dfncis.de...

Agelmar

unread,
Mar 14, 2002, 8:44:03 PM3/14/02
to
register_globals is now off, and it works. I might have missed a variable
somehwere but I don't think so... I'm pretty sure I tested every function.

Now its time to relax ^-^

"Agelmar" <ia...@mediaone.net> wrote in message

news:a6rhb2$gp38f$1...@ID-30799.news.dfncis.de...

0 new messages