The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Details »» | |||||||||||||||||||||||||
We've all seen plenty of news hacks here before. I'm talking about a hack that gets all new threads in a specific forum and shows the first post from the new threads on a separate, non-vB page. These hacks usually show a specific number of threads that you specify, or all threads from the past number of days that you specify. The forum that these threads come from is setup by you, by putting the forumid numbers in a variable in the hack's code file.
I feel that this is a limited system. You are limited to posting news items only in the one or few threads that you specify up front are to be used to get news items from, and then those forums are limited to only posting news items in (because every new thread in it becomes a news item). This just didn't seem like the best solution to me, because if I wanted to cover a particular topic, for example, computer hardware, I would have to have two separate forums: One to post hardware news, and one for non-news items like help and tips. So what makes my hack different is that you can now post news items in ANY forum. When you post a new thread, there will be a new option in the same area as "parse urls" and "disable smilies"; this new option is called, "make a news item?" If you leave that box unchecked, the thread gets posted as normal. But if you check it, then not only does the thread get posted, but it will also show up on a separate page. So now, you can post news items and non-news items in the same forum, in any forum, and only the threads you want to be news items will show up as news items. I have set up a permission for this checkbox, so it will only appear for the usergroups you want it to appear for. Setting this permission is just like setting any other usergroup permission, like the ability for the usergroup to post new threads, move threads, download attachments, etc. You can change the news status of a thread, in other words, change a thread from being a news item to not a news item, or vice-versa, via a new option that appears on the Edit Thread screen from the Admin Tools. This hack also includes a simple "latest threads" feature, that on the same page as the news items will show the most recently-replied to threads (the most recently active threads). I did these two things together because I knew they would be very similar to code, and would appear on the same page. However, each part is completely separate from the other part, and it is very easy to only use one part of the hack or the other. Here is an image of the checkbox: Here is the new permission setup (by default, for any new usergroups you create, this permission will be set to 'NO'): There is a working demo of this hack. The test forums is located here, and the news page is located here. You can use the test forums as an unregistered user; I have set up the unregistered usergroup to have Super Moderator powers, so you should be able to play around with the Edit Thread admin tool, etc. I'm posting this in the Beta forums because I'd like for some other people to let me know it works OK for them. It works fine for me, on two boards; I originally wrote it and developed it for my regular board, which was heavily hacked to begin with. I then setup a clean, unhacked, totally stock board as a testing grounds, and recreated the hack, and again, it worked fine. I want to confirm that it works fine for at least one other person, but I'm also hoping that someone more experienced than myself can take a look at it to see if I've coded it the best way possible. The other issue I hope to address here in Beta relates to how the text from news item threads is formatted to appear on the news page. Currently, this hack gets the entire contents of the first post of a thread, and it is run through the bbcode parser, so what you see on the news page is just like what you see in the thread itself, including smilies, all vB Code tags converted, etc. Also, the entire post is used; it is not run through any process that limits it to a certain number of characters. The reason I did not set up a character limit was mainly so that the bbcode parser would not get confused if a closing tag was completely or partially cut out. I figured that since I included a permission system, that at least for me would limit the ability to make a thread a news item to Admins and Mods, I could teach my staff to keep news item threads short. However, I have toyed with the idea (in my mind) of changing the hack so that if you check a box to make a thread a news item, when you submit the thread, instead of the thread being posted straight away, instead, first you are taken to another page with a textarea containing the contents of the post. In this second textarea, which contains what you just typed in the normal newthread screen, you can edit or change what you typed, and what you do here would get stored in an additional field added to the thread table, and this is what would get shown on the news page. That way, you could start a thread, put an entire news article in it or whatever, mark it to be a news item, submit it, then pare down the contents of the post to just a little blurb suitable for a news item display on the news page, while the original bit you typed gets saved as a post and shown in the thread as normal. (Hope that makes sense.) If I hear enough of a demand for something like this, or get any other ideas, I may consider it. The downside to this is it becomes a little more complicated to post a news item thread. OK, so install it or play with the demo, and let me know if it's ready for a full release! Edit on Jan. 1, 2002: This hack has been updated to Version 2, with new features as discussed throughout this thread. Please go to this post: https://vborg.vbsupport.ru/showthrea...281#post210281 Show Your Support
|
Comments |
#112
|
|||
|
|||
[QUOTE]Originally posted by ptenthus
Polls don't work for anyone on my board since I put this hack in place. Everything else works fine, just anyone trying to post a poll goes to a blank white screen. Ideas? |
#113
|
||||
|
||||
Awesome, this worked. Thanks.
|
#114
|
|||
|
|||
[QUOTE]Originally posted by slideboxer
Awesome, this worked. Thanks. |
#115
|
||||
|
||||
UPDATE
I have updated this hack. Updates include a fix to the poll vs. news issue which goes a bit beyond what's just been discussed...Now you will be able to BOTH post a poll AND a news item at the same time! If you check both boxes, first you are redirected to the poll setup page, you do that as normal, then after submitting the poll you are redirected to the news item setup page, which again is done as normal. The new redirect scheme does work correctly now if you ONLY selected to post a poll, ONLY selected to post a news item, or selected BOTH. (The correct action or result will happen.) I've also built in the image feature I mentioned earlier. This news is FYI only at this time, as I am not releasing the updated hack just yet. I have only just completed testing of the new redirection and poll+news system; I still need to document it. Additionally, I am re-writing all of the variables used so that they more closely resemble the style of vBulletin (the $xxx[yyy] style). It is my hope that once I get all of that done, that we can get this out of beta and make it an official release. |
#116
|
|||
|
|||
I am SO ready to help beta test your new implementation... even, *sigh* help write/proof-read documentation (do you hate writing it as much as everyone else?). Whatever I can do to help.
Did I mention? THANKS for this hack. |
#117
|
||||
|
||||
dlst, check your PMs!
|
#118
|
|||
|
|||
I would love to help test this as well as I would like to port it to phpportals. Please let me know if your accepting any beta testers. TIA!
|
#119
|
||||
|
||||
OK, you have a PM too!
Just as an update to everyone else, unless I hear about any problems from the few pre-release beta testers of the new version, I will be publically releasing it in a few days. |
#120
|
|||
|
|||
JJR512,
this is the best hack I've seen to date!! Congrats! I'm setting up my site with it and I'll soon make a post here for everyone to see it. I have a small problem though! How can I use the include or require statement on the homeindex.php? What I need to do is include a Poll (not a thread with a poll) on the homeindex.php But I can't use php code on the vBulleting templates. Any ideas? FYI the Poll that I want to include on the homeindex.php is a separate poll script and in its readme file it says to add the following on the page. [QUOTE]<?php $newest_poll = 1; require("http://www.mysite.com/poll/booth.php"); ?> |
#121
|
||||
|
||||
JJR512 see the attch file that's my problem!!
i want the blank part show something where should i edit?? and sorry use ur forum's pic to do my example! |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|