Welcome to Geeklog, Anonymous Saturday, July 27 2024 @ 01:56 am EDT

Geeklog Forums

rating stories


Anonymous

Anonymous
i have posted this on squatty.com and was told what to do with the database and PHP, but im not up on PHP very much so could any body help me. what i want to do is take the rating fromt he file managment system and add it to the story so a story can be rated. can anybody help me?
 Quote

Anonymous

Anonymous
If you can't figure it out from squatty's instructions you might as well wait a bit for someone to release it. I doubt the wait will be long.
 Quote

Anonymous

Anonymous
Let me know if I'm wrong,but I think you can create two columns one for ratings and one for number of votes in the stories table. Everytime a person votes-1 is added to the number of votes column and their vote value( say they give it 4 out of 5) would be added to the ratings column for that story. In the example earlier 4 would be added to the rating column. To get the rating use ceil(ratings/votes). If the ratings column is 10 and two people voted the rating would be five. To put the rating of each article you will probably have to edit function COM_article in lib-common.php to show the rating for each article. To integrate such a feature wouldn't be hard but it might take a little thinking. -- Mr.GxBlock
 Quote

Status: offline

efarmboy

Forum User
Moderator
Registered: 02/26/02
Posts: 147
Well, on the surface it starts off as a small project. My FileMgmt Plugin code would be a good source as most of the logic is there. The Voting table tracks more then just the vote though. It also captures the user's IP and timestamp. The rating logic only allows one vote per user and prevents the posting user from voting. The admin can also view all the votes and see the IP's and user names for each vote. Additionally, the admin can delete a vote. Anytime there is a vote change, the average rating is recalculated. Adding this to the story would involve modify the article display code and templates. Adding the new table, and modifying the filemgmt voting code and then integrating it. I can add this to my list of projects and ideas I'm working on. What's your site and application ? How important is this ? Blaine
 Quote

Anonymous

Anonymous
The rating is so i can rate pubs which are stored in geeklog. ther is one pub per story so i fort if u can rate the story, ur rating the pub too. i wud say its pretty urgent, i have had a look but i cant figure the chuff out. i hope u can help Smile
 Quote

All times are EDT. The time is now 01:56 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content