Jump to content

Review,News Script


shujjah

Recommended Posts

i was just wondering instead of creating a new user login script since i will have a phpbb forum so is it possible to use that . i mean i will create gropus and each group will have different acces such as review editors, news editor and editor so is it possible to use that . i will put the certain members in those groups and like that they will be able to add , or edit reviews and news etc?is it possible and how?

Link to comment
Share on other sites

It's not possible out-of-the-box, you'll still have to write a lot of code. You can use the database and signup system for phpbb, but then on your pages you'll still need to check if they're logged in and have permissions and everything else, you'll just have to do it the way phpbb does it. So you can either build a system to do exactly what you want how you want to do it, or you can build a system to work within the bounds of something like phpbb. I prefer to do it myself just so that I know how everything works, but you can do it the other way if you want. If I do something like that where I want one account to sign in to several different applications like a forum, blog, gallery, whatever I'll set up my own account system for general website accounts, and then set it up so that when a website account is added accounts are also added to the forum and whatever else, and when they log in on the website it will also log in with the other systems also. That keeps it separate enough so that I can upgrade or change any of the other applications and not break anything.

Link to comment
Share on other sites

sorry to bug u again and agin and againone more thing is it possible that whenever a user submits a review it will be first seen the the overall editor or me(admin) and then submitted into the site?what kind of script i will need?

Link to comment
Share on other sites

Add another field to the reviews table, call it something like "validated" and make the data type a tinyint. The value can either be a 1 or a 0. If it's 0, then it's not validated and it doesn't show on the main page. So the query on the main page would have to include that when it gets the reviews:

$sql = "SELECT * FROM reviews WHERE validated=1";

Then you can make another page on the admin side that gets all the reviews where validated=0 and displays them to be validated. You could set that up several ways, the easiest way would probably just be to show a read-only version of the review with 2 links to validate it or delete it. If you wanted more then that you could have a form where you can read it and make changes to it if necessary, and then a checkbox or something where you say if it has been validated.

Link to comment
Share on other sites

Add another field to the reviews table, call it something like "validated" and make the data type a tinyint. The value can either be a 1 or a 0. If it's 0, then it's not validated and it doesn't show on the main page.
Why not use Boolean? What is the advantage/disadvantage of using one or the other?
Link to comment
Share on other sites

Boolean would work fine for PHP/MySQL. I tend to jump to integers because MS SQL Server will send a value of "true" instead of "1" for a boolean field (which is correct), but VBScript will not cast boolean true to integer 1, and the existing code we had was checking if the fields were 1 because they were previously ints. There's no reason to store a value of 1 in a 16-bit field, so I tried to change it to boolean in the database and it screwed everything up with the application, because all of the checks where checking for a value of 1 and VBScript would not evaluate the two. So I had to set that field to a tinyint to get it to work the same. PHP/MySQL wouldn't have that problem because PHP would still evaluate true and 1 to be value equivalent.

Link to comment
Share on other sites

You can if you want. Or even if you don't use it, you might want to see how they do it to get ideas how to do your own. But what I think you should do is irrelevant, you should do whatever you want to do.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...