TeamPhotoshop
Reviews, updates and in depth guides to your favourite mobile games - AppGamer.com
Forum Home Latest Posts Search Help Subscribe

viewers adding comments ...

Page: 1 2 Reply
Dec 2nd 2003#131407 Report
Member since: Dec 13th 2002
Posts: 904
Ok, I'm having trouble with something. I want people to be able to comment on tracks on our site, but I'm not really sure how to go about it. I want it to have, under every track, a link that says "add comment" so they can simply add a comment for that track. But I'm not sure how to go about doing it. Would I set i up like a shout box? Or is there a neater and more cleaner way of doing this?
Reply with Quote Reply
Dec 2nd 2003#131416 Report
Member since: May 22nd 2003
Posts: 315
By tracks do you mean like 'entries'? If they're run througha database, what I'd do is make a script that prints out a comment link at each one... then when the user submits the comment, a collumn of the comment table has to ID or some way of indentifying what they actually commented on... did that make any sense?
Reply with Quote Reply
Dec 2nd 2003#131421 Report
Member since: Nov 26th 2001
Posts: 2586
So you want an "Add Comment" next to each track, then maybe a link to "View All Comments" about that track? That is easy enough....

Are you connected to a database and using php?

And the site looks nice (the one on your www link) did you design that?

Looking at it:

each track will have a link with some kind of id:
for example:

comment.php?id=1 -> for track one....

Then some script will "get" that id and add it to a database (you could also use a text file). Add the comment where id=# in the db. Make sense?

Then when you view comments, just view all comments where id=# and you will see all comments on that track.
Reply with Quote Reply
Dec 2nd 2003#131425 Report
Member since: Dec 13th 2002
Posts: 904
[QUOTE]Originally posted by Marble
[B]So you want an "Add Comment" next to each track, then maybe a link to "View All Comments" about that track? That is easy enough....

Are you connected to a database and using php?
[/QUOTE]

I can use php, but I'm not sure if deker has set up a database for me yet. I have a mail form that I think uses a database, not sure tho. I'm just starting to learn about php and server side type coding.

And the site looks nice (the one on your www link) did you design that?


Thanks. :D Yeah, I designed it. I plan on expanding on it a lot more tho.

[QUOTE]Looking at it:

each track will have a link with some kind of id:
for example:

comment.php?id=1 -> for track one....

Then some script will "get" that id and add it to a database (you could also use a text file). Add the comment where id=# in the db. Make sense?

Then when you view comments, just view all comments where id=# and you will see all comments on that track. [/B][/QUOTE]

Ok, I'm pretty new to this kinda coding, so no ... it really made no sense, lol. I can't find anything on any script sites for this kinda coding either so this is like ... a really big pain in the rear. Heh.
Reply with Quote Reply
Dec 2nd 2003#131430 Report
Member since: Dec 13th 2002
Posts: 904
Ok, here it is. http://partrauma.soktdesign.com/bmachine/index.php

BUT, I can't figure out how to get this to match my site.
Reply with Quote Reply
Dec 2nd 2003#131562 Report
Member since: May 22nd 2003
Posts: 315
Ok, yes what Marble and I explained is what you want.. You have all the tracks having an ID, and the comments have a "collum" or "field" that stores the id of the comment it is under...
Reply with Quote Reply
Dec 2nd 2003#131563 Report
Member since: Nov 26th 2001
Posts: 2586
The other option (if you don't have a db) would be to use a text file to store the comments.... you could have one text file where each song is concerned. But a db runs soooo much smoother than using files.... imo and is easier to control the data. So bug Deker.... uhm is that example you are showing, is it using a db or a flat file?
Reply with Quote Reply
Dec 3rd 2003#131618 Report
Member since: Mar 24th 2002
Posts: 3114
if derek's not letting you in on SQL goodness, let me know. I have made a flat file commenting system for my galleries, and it works fast. It just makes a text file with the same name as the image (in this case .mp3) and writes the comments down, simple as GWB's brain.
Reply with Quote Reply
Dec 3rd 2003#131621 Report
Member since: Dec 13th 2002
Posts: 904
Word paavo. That would be awesome cause the one I'm workin on now, which I think uses a database, is really frikkin complicated. I got somewhat far on getting it to look how I want, but ... I just got stopped in my tracks after a while.
Reply with Quote Reply
Dec 3rd 2003#131625 Report
Member since: Mar 24th 2002
Posts: 3114
ok, here you go ->
http://astudios.org/2004/comment_script_for_danneh.php <--

What you need to do though, is create a folder named "comments" and CHMOD it to 777. And then link to the files with
href='comment.php?image=asong' .....leave the ".mp3" out I think. If you feel comfy with it, you can change it so that the urls will be "comment.php?song=asong" if you don't want the word "image" there......it's a bit misleading.
If you run into problems I'll help to revamp the script for your needs...a bit in a hurry now to do that.

Good luck
Reply with Quote Reply
Page: 1 2 Back to top
Please login or register above to post in this forum