Quote:
Originally posted by zonegray
Thanks. Seems like I should be able to modify the script so that it simply checks if the poster is a member of a certian group. Any special reason you didn't do it this way?
|
Yes there is a reason:
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:
Also, when I post a news item, the output contains a tag where the first intro tag was. So, when I browse in Mozilla, the whole paragraph lights up with the "hover" color when I pass the mouse over it. Anybody else notice this? That tag is in the regular message post, BTW, not the front page text.
|
Oh I see.. it's a trivial issue related to the bb tag of intro we created inside Admin CP. You can change it to something like <b></b> or any other non-posting HTML code to correct the issue..