I have the basic functionality of the new version working, I'm pretty sure. I still have some details to clean up, such as a way to edit a news item now that news items are stored separately from the thread/post. But I am about to go to bed now, and I would like for some people to test out the new version on a basic level, in case there's something I've missed that doesn't work right.
Let me briefly re-explain how the new version works, first of all.
The old version simply looked in the thread table for threads marked as news items, then found the first post for the thread and got the message body from that post and re-displayed it on a separate page, the news page. What was shown as the news item was always whatever was in the first post of a thread marked as a news item. What I didn't like about that was that for the thread (as seen the normal way in the message board), I might want to post the entire news article that I've copied from some other site, but for the news item (what shows up on the news page), I might only want one or two paragraphs to show up. Just an excerpt, to keep things brief.
Now I could have easily set it up so the news page only shows the first 500 characters, or some other number you choose, of the message body from the thread's first post. But this can throw off bbcode parsing, for example if the 500 characters ends in the middle of a vB code tag. I could just not bbcodeparse what goes on the news page, but then we lose the nice formatting that imparts. Another added bonus is that with the new way I am introducing here, you aren't limited to the
first 500 characters; sometimes the second and third paragraphs are better to put on a news page, because the first few lines might just be sub-headline stuff you don't need there. This new method I am introducing here gives you much more flexibility, as you are about to see.
So what is this new method? Well, I described it in my previous post, but I'll reiterate. Basically, when you start a thread and check the box to make it a news item, now what will happen is you will go to a new page which looks a lot like the new thread or new reply page. This page will have the subject (or "headline") and message (or "article") areas already filled with the subject and message you already typed out in the new thread page. But this is where the magic is...you see, you can now
edit what is in those areas, to make it different from what shows up in the thread as seen in the message board. What you leave here will show up on the news page. You don't have to make any changes, if you don't want to; you can just leave it as it is, and click the Submit button again, what goes on the news page matches what goes in the thread. But you can change it, you can shorten it, you can remove or add vB Code tags, whatever. If you really wanted to, you could even completely change the text; I don't know why you would want to, I'm just illustrating the independence of the news item from the thread.
Please go here:
http://www.jjr512.com/testvb/index.php and test it out. Start a new thread (unregistered users should still have Super Moderator abilities), be sure to check it as a news item, and submit it. Then you see the new form; go ahead and change it, just so you see. After you submit the new form, you get taken to the news page; see how it has whatever you left in the previous form, before you submitted it. Then click the link that takes you to the thread, and see how it still has whatever you originally started the thread with, before you changed it for the news page.
I think all I have left to do is make a way for you to be able to edit the news item (what you see on the news page). Do not bother to do the Edit Thread process, because that now is not involved (the "is news" check box is still there, but that isn't used anymore, I just haven't taken it out yet).
Also, to
sianews: You will notice the URL field is there on the new form. So yes, that feature will be there. But so far, I haven't fixed the template so it shows up on the news page yet, but rest assured, it will be there; that's just a cosmetic fix now, since the structure is set up for it.
So please go try it out and let me know what you think. I have to make that edit method I just mentioned, I have to fix back the Edit Thread screen, I have to add that URL field to the news page, I have a few other minor things to put back on the news page, like the nav links...if there is anything else I need to do, let me know.
Once I get those details worked out, I will re-release this hack. But I already have plans for the NEXT release: making it multi-page ready, so you aren't just limited to a hard number of news items, but rather to a number of news items
per page, with a "next page" link that takes you to the next xx oldest news items. I also would like to add some type of search feature, that would search through the news items themselves. But we'll worry about these things later; let's focus on what we have now, see that the basic idea works OK, then I'll get those other details taken care of and we'll have us a new release in the next day or two.