![]() |
Quote:
|
Quote:
Also, when I post a news item, the output contains a tag Quote:
That tag is in the regular message post, BTW, not the front page text. |
Quote:
The hack is coded to be a site main page script which means that it will be accessed very heavily everyday. So as to keep its performance high, I wanted to get rid of every possible SQL connection the script will make so hardcoding many things inside the code helps the code not to query your database for these information. If I programmed it to check usergroups to decide if user is a legitimate news poster, the script will make an extra SQL connection for every news message you have in your main page. Because post table does not save usergroup of message poster but only its userid/username so we should query the user table for every news poster to decide if he is from an allowed user group. If you have 10 news in your main page, this would mean the script would make 10 more SQL queries to your board which IMO too much for a main page script. So I dont suggest modifying the script to work with usergroups. But if you are determined here is a work-around for you: Instead of restricting user names, restrict news forums in the settings so that news can only be posted in forum X. Also loose the poster info and let EVERYONE can post news in the scripts settings. Then all you need to do is to restrict this forum's permissions to other usergroups than your special one via vb ADmin CP. So with this trick you can make only that usergroup can post news in the main page.. ;) Quote:
|
Zonegray - The way I do news posting on my forum, is have an actual 'news' forum that contains only news items for the front page. We then make our news posters into moderators for this 'news' forum and make it so that only moderators can post new threads. That way, only the news posters (moderators) can start new threads but everyone can reply to the news. This is similar to other sites where you can see the news on the frontpage and it also says something like '5 replies' or '5 comments'
|
Quote:
However they wouldnt know how to drag a message to the main page, so we can still say that you are safe (provided that you installed the tag remover step in installation instructions) |
hehe, actually I'm not using your script just yet (but hoping to soon when I give my forums a huge overhaul), I'm using one of the other news posting scripts, which just takes the first post from each thread.
Hmm... maybe you should make it so that your hack only takes the first post??? I mean when would you want a reply to become a separate post item? Seems unlikely in my opinion. |
Quote:
BTW. I dont agree it's unlikely to drag a non-first message as news. If you use [summary] tags it can be very useful to drag them. For example say you have a hot thread in forum X and you want to notify main page visitors about this thread. In your board you have to go and make a news thread in your specific forum. But in my board I can just click reply in that hot thread and write this: Hey I dont agree you! [news]Come Join Discussion[/news] [summary]We are discussing if Logician's News should drag non-first posts to main page or not. click [linkme]here[/linkme]to join! [/summary] Now all thread viewers will see only the message: Hey I dont agree you! in the thread and wouldnt even notice this post was a news, but in your main page a news will appear as: We are discussing if Logician's News should drag non-first posts to main page or not. click here to join! See the difference? ;) |
Thanks for the replies. Seems we could probably run one SQL query at the beginning of the script that would list the users in certain groups, and then just fill the array with the list. But, I think we have other more pressing hacks to do (we're still setting up)., so that will go on the "someday" list. If we eventually ended up with 5-6 hacks that required manual maintenace, it would be a pain, but we can deal with one for now. This hack works so well for us, since it distributes the load of maintaining the front page, meaning nobody has to be "on duty" when the news comes pouring in.
I hadn't noticed that it was possible to enable all users to post news... so we might take the approach Abbas suggested, at least to start; we'll just disable replies in the news sections. But... does anybody know of a hack that will redirect replies to a different section or something similar? The idea is to give users a "Comment" link, but one that takes them somewhere else. |
Just wondering... it seems I should be able to intergrate this with WebTemplates this way:
- make a copy of show.php (which would be called for pages that required news), assume it's called shownews.php. - edit shownews.php and require/include newconfig.php - assign output of news() to a variable, eg $newsoutput=news() - use variable in a WebTemplate. Obviously, I'd want to keep track of the number of queries so it didn't bog down. |
Quote:
|
All times are GMT. The time now is 07:40 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|