Topic: An idea for a news plugin

As you all know, the less crap I can include in the default install of PunBB, the happier I am. Some of you may also know that we've had requests for adding some sort of news support to PunBB. People want to be able to use a forum in PunBB to post news bits that they can show on the front page of their site. Visitors can then post comments on these news bits directly in the forums. There are a couple of ways to solve this, but most of them involve adding stuff to PunBB in the form of new database fields and PHP scripts. As I was thinking about this, I had an idea.

How about a news admin plugin? You would start by adding a new forum to your boards dedicated to news with the appropriate permissions (no one can post topics, only replies). You would then setup the admin plugin by selecting which forum is the news forum so it knows where to look. The admin would then post/edit/delete topics via this admin plugin and the plugin would generate static markup that could be included on the front page.

There are two problems with this approach:

1. The topics in the news forum would have to be added/edited and deleted via the plugin, not directly in the forum itself.
2. It wouldn't be possible to show whether a news bit has comments or not (or how many). A "Comment" link wouldn't be a problem though.

What do you think?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

2

Re: An idea for a news plugin

I'm trying to follow, because I'm not a programmer.

1 - That shouldn't be a problem, because the news is intended for the front page anyway and not the forum. So why should it be able to be edited for the forum?

2 - Why isn't it possible?

Re: An idea for a news plugin

right now im usein the externnews.php file, and that seems to work perfect for me.

and i have an idea for the viewtopic.php, maybe you can have the first post look like a normal post and the rest just look like comments with just the comment.

4

Re: An idea for a news plugin

I'm more inclined to use an app for what's intended.

A CMS for front page content and a forum for discussion.

#2 is already possible using the plugin for Blog:CMS, the new version shows replies to posts in your news item. Will be applying these new capabilites to the plugin being used in Nucleus.

I hope no one thinks I'm trying to force Nucleus or Blog:CMS on you. What has been accomplished in bridging Nucleus/PunBB can be accomplished with any CMS that has a well written plugin or module system.

5

Re: An idea for a news plugin

As far as I can see the most important thing was to implement forum permissions which has now been done. Any forum could serve as a newsfeed simply by setting its permissions.

I would rather see a seperate script which could simply use PunBB's database. I really don't see that including a news widget as part of PunBB is necessary.

Re: An idea for a news plugin

Joey wrote:

1 - That shouldn't be a problem, because the news is intended for the front page anyway and not the forum. So why should it be able to be edited for the forum?

it is a forum since you might want people to comment on it, but you can only create topics from the admin menu

Joey wrote:

2 - Why isn't it possible?

as the plugin generates a static html page to stop the database being used for every news request it could only be generated when a topic is created

Re: An idea for a news plugin

The good thing here is that if anything, it would be a plugin. If someone wants to do one, go ahead. I'll remove it from the TODO list.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

8

Re: An idea for a news plugin

Rickard wrote:

The good thing here is that if anything, it would be a plugin. If someone wants to do one, go ahead. I'll remove it from the TODO list.


Well at least we know the real reason you mentioned it now.

Re: An idea for a news plugin

hey less work for him is better. less work also means the 1.2 will be out sooner.....YAY sooner hehe

Re: An idea for a news plugin

but, what would be the use of the plugin? it would require modding code anyway, and what would you do in the admin plugin? why not pull the data straight from the database and display it to the screen?

with 1.2, its possible to make reply only topics, so this should be done wink

Indocron
$theQuestion = (2*b) || !(2*b);

Re: An idea for a news plugin

it would not need modding it would just generate a news file when you added a topic through it

Re: An idea for a news plugin

i still dont understand, and it wold be much easier to just mod it in yourself..

Indocron
$theQuestion = (2*b) || !(2*b);

Re: An idea for a news plugin

Gary13579 wrote:

but, what would be the use of the plugin? it would require modding code anyway, and what would you do in the admin plugin? why not pull the data straight from the database and display it to the screen?

Because most people don't know how to program that?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: An idea for a news plugin

possibly just copy some of the code in extern.php and make it work for a certain forum. i really dont think it would be all that hard..

Indocron
$theQuestion = (2*b) || !(2*b);

Re: An idea for a news plugin

Yes, but now that we have the plugin system, why not use it? It's not like it would be a lot harder to do a plugin than to do a modified version of extern.php? A plugin has many advantages. It's more user friendly, it can generate static output which will help performance (no need to contact the database to show the front page) etc.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: An idea for a news plugin

but what i still dont understand is what the plugin would do? only admins can access them, so how would the users see the page?

Indocron
$theQuestion = (2*b) || !(2*b);

Re: An idea for a news plugin

The plugin would generate markup that you would include on your website front page (via PHP include() or SSI). The plugin interface would only be used to post/edit/delete news.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: An idea for a news plugin

i still dont completley understand. where would the comments, news posts, and everything else stored?

if its stored into the database, just under the forum, how would the main page access it? i understand the include(), but what file would it include?

my way is much easier big_smile

Indocron
$theQuestion = (2*b) || !(2*b);

19

Re: An idea for a news plugin

what must
1 - is must use "posts" table to post a news or must create "news" table,
2 - is must create index search tables also
3 - archive by dates on front pages
4 - moderators can post a news
5 - adding comments (i don't agree with commeting on news)
6 - showing the news as links or whale the post with date like punbb frontpage, as option

If your people come crazy, you will not need to your mind any more.

20 (edited by zaher 2004-11-08 00:52)

Re: An idea for a news plugin

the easy way it is
Make one of "forums" as news and it must me for admin or for all "replay only",
every topic in this forum is a news and every post in is this topic  like a comment,
Admin create new topic in this forum mean create a new news etc...
i think some one make it, is that PunNewz or some else ?-)

If your people come crazy, you will not need to your mind any more.

Re: An idea for a news plugin

No need for mod. Simple solution for that is http://movabletype.org/
I have integrated on my (still) under construction web site and it's great! Simple, fast and powerful!!

22 (edited by zaher 2004-11-08 04:13)

Re: An idea for a news plugin

What is the features?

i like electric tools big_smile

If your people come crazy, you will not need to your mind any more.

Re: An idea for a news plugin

I give up.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

24 (edited by Gizzmo 2004-11-08 14:16)

Re: An idea for a news plugin

i think usein a extern type file is kinda better and easyer...its just a simple include function and your done.

maybe you can make a plugin that edits a template that the extern file works around, like the main tpl file that punbb uses...

Re: An idea for a news plugin

When 1.2 is out, I'm gonna write the plugin myself just to show you.

"Programming is like sex: one mistake and you have to support it for the rest of your life."