*

Recent

Author Topic: Gamepage on Comments allow 10 comments then pagination  (Read 7457 times)

WhaaaaaTha

  • Newbie
  • *
  • Posts: 33
  • Force: +0/-0
Gamepage on Comments allow 10 comments then pagination
« on: April 14, 2009, 05:41:20 PM »
Gamepage on Comments allow 10 comments then pagination

so after 10 comments have been posted, it will show page 2, 3, 4 etc for the older comments.

WhaaaaaTha

  • Newbie
  • *
  • Posts: 33
  • Force: +0/-0
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #1 on: April 14, 2009, 05:48:50 PM »
Can you make the code because i believe it's real simple i've tried it myself but just could do it. I get some kinda of syntax error which i don't know what it means lol. So can an Admin or Mod post the code here and tell me where to put it that would be awesome. Thanks :D

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #2 on: April 14, 2009, 08:09:18 PM »
Not quite sure what you're asking, give us more details and maybe a URL to where it is doing so, so that we can take a look.

If you are asking what I kind of suspect you are then open the file /pages/play.php and find the code
Code: [Select]

$rrr = $db->query(sprintf('SELECT * FROM dd_comments WHERE gameid=\'%u\' AND approved=\'1\' ORDER BY date DESC', $ID));



and edit to
Code: [Select]

$rrr = $db->query(sprintf('SELECT * FROM dd_comments WHERE gameid=\'%u\' AND approved=\'1\' ORDER BY date DESC LIMIT 3 ', $ID));



and that will limit to 3 comments. You can replace it with any number of course.

Is that what you were asking? Let us know how it works.

WhaaaaaTha

  • Newbie
  • *
  • Posts: 33
  • Force: +0/-0
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #3 on: April 15, 2009, 08:59:07 PM »
Well basically im asking that after 10 messages, the older messages will be put into pages. Like on youtube after 15 messages the older messages go into pages which then can be viewed by users like this.

 Pages:  1  2  3   ... Next - Previous
 This happens because there are 30 comments

if you still don't understand what i mean i'll explain differently. Like in google.com when you search not all results are shown in one page they are shown in page 1, 2, 3, 4, 5, 6, 7 etc. SO i want older comments to show in pages like thats, but the user doesn't leave the game page like on youtube the user doesn't leave the video page.

Also i want to restrict who can comment. Only registerd members can comment on games.

Also thanks for the quick reply, i'll sure to donate so you can expand on the script ^_^ thanks again.

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #4 on: April 16, 2009, 11:16:48 AM »
OK, I think I understand what you want. We will think that one over, but to be perfectly honest I don't see that one happening real soon. Right now I've been puting the polish on 3 other mods, a 4th that is not wanting to cooperate in working the way it's supposed to, and hopefully a bigger game pack coming up real soon.

I'm not saying it won't happen, but we can only wrap our heads around so many things at once and right now we're already stretched to that point. Let us think about how to set that one up and we *will* try to work that one in down the road. Best we can do for right now, hope it's ok, and sorry if that isn't but it just isn't possible right now.

If you get somebody to make it for you, pass the code back along to us so that we can try and make it an option availible to everybody?

Danny

  • Newbie
  • *
  • Posts: 41
  • Force: +5/-0
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #5 on: April 18, 2009, 09:37:29 AM »
The easiest option would to be have the comments on a separate page, which then will contain the pagination. If you wouldn't mind it like that, I'll code something later tonight, or tomorrow =)

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #6 on: April 19, 2009, 03:36:55 PM »
If you would do that, it would be fantastic. If I can get it soon enough I might be able to work it into the upcoming release. I'm just too burried right now to even look at it for a while.

Thanks.

WhaaaaaTha

  • Newbie
  • *
  • Posts: 33
  • Force: +0/-0
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #7 on: April 20, 2009, 04:43:37 PM »
Hey Danny, your awesome in a seperate page will do :D for the pagination i don't really mind.

Also im not sure but i believe Kurt and someone else made the script. I just wanted to ask because i've been reading on security on PHP, is there anyway someone can hack into my Admin account by using MySQL injections. If they can't then i would be so grateful :D.

Also im working on my website and it should be open before the summer holidays because i have exams and have to study hard for them but i have created a new layout which i incoporated your script into, it's not finished yet but when it is finished i'll sure to post the link here for you guys to check it out.

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #8 on: April 20, 2009, 06:22:35 PM »
Danny wrote the script, and helps with new feature requests like this one. I have done some modifications to it since coming on board. Plus I have been working on more game packs, which should almost be ready. Things can move a bit slow around here though as we all have full time jobs lol.

We try to keep an eye on any potential security threats. We won't say it can't happen, because new things are figured out each day by hackers, but we try to keep on top of it. Make sure you keep backups for any sites, not just arcades.

And yes, we would love to see your new layout, please do post it.

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #9 on: April 24, 2009, 09:31:34 PM »
Just to keep you informed....

A mod for this is almost finished. Look at http://demo.freearcadescript.net/play/11-Metal-Ball.html to see what it looks like so far.

WhaaaaaTha

  • Newbie
  • *
  • Posts: 33
  • Force: +0/-0
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #10 on: May 03, 2009, 02:30:33 PM »
That looks great. But there's one thing, any body can comment. Is it possible just to restrict it so that only registered users can comment. Anonymouse people cannot post, it should state please register or login. Something like that is that possible?

kurt

  • Developer
  • Hero Member
  • ******
  • Posts: 634
  • Force: +16/-1
Re: Gamepage on Comments allow 10 comments then pagination
« Reply #11 on: May 03, 2009, 09:07:23 PM »
It's something that is already being planned for. We don't like the idea of just anybody being able to post a comment as some of the "guest comments" are spam. How best to do it, with current long term plans being taken into account, is already being thought out.