rx3mer Posted March 30, 2010 Share Posted March 30, 2010 Hi I`m making new website about some music and videos and I want guests to be able to comment on each song... I know some php but i have never done something big like this. I know how to make for example comment box for one page but Im not sure about the other pages. If i do it one by one its going to take a lot of writing for each page and the pages are a lot. Is there simple way to make something like this. If you didn`t understand me take for example youtube... users can comment on each video.. this is what im trying to do Thanks Raddy [attachment deleted by admin] Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/ Share on other sites More sharing options...
ignace Posted March 30, 2010 Share Posted March 30, 2010 What is your current setup? One page for every song? If so then at the minimum you are going to have to write at every page: include('modules/comments/index.php'); Edit: nevermind read it wrong What do you actually want in the system? user registration/login, promote/demote, mark as spam? Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034298 Share on other sites More sharing options...
rx3mer Posted March 30, 2010 Author Share Posted March 30, 2010 only the comments but as i tryed to explain i want comment input for each different page, so people are going to be able to comment for each section for example Page1: Eminem - comment Page2: Timbaland - comment Page3.... if i use include('modules/comments/index.php'); this is going to echo the same comment everyware i put it... I dont want this. Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034327 Share on other sites More sharing options...
ignace Posted March 31, 2010 Share Posted March 31, 2010 this is going to echo the same comment everyware i put it... I dont want this. No it is not as it would use the parameters in $_GET or $_POST. Anyway you can use one page for all songs as they all will look the same except will differ in content. Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034615 Share on other sites More sharing options...
rx3mer Posted March 31, 2010 Author Share Posted March 31, 2010 i will think about it but imagine if i have 20 songs on page with 20 pictures with 20 play sample buttons and allo thouse information about them... Thats why i want to make the comments seperated so people can coment on each song/artist... but i got no idea how to make it simple rather than making manualy myslq rolls and connect to them... Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034637 Share on other sites More sharing options...
ignace Posted March 31, 2010 Share Posted March 31, 2010 That's why they invented caching Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034660 Share on other sites More sharing options...
rx3mer Posted March 31, 2010 Author Share Posted March 31, 2010 I dont think you understand my question, caching has nothing to do with my question. Caching is totaly different thing Please read the question and then answer only if you can... Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034814 Share on other sites More sharing options...
ignace Posted March 31, 2010 Share Posted March 31, 2010 I understand your question quite well you are worried about performance because you would hit the database with so many queries Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034819 Share on other sites More sharing options...
rx3mer Posted March 31, 2010 Author Share Posted March 31, 2010 yep Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034832 Share on other sites More sharing options...
ignace Posted March 31, 2010 Share Posted March 31, 2010 yep And my response still stands CACHE your page (keep separate caches for both the song details and the comments) invalidate the comment cache upon receiving a new comment. Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1034908 Share on other sites More sharing options...
YourNameHere Posted April 2, 2010 Share Posted April 2, 2010 I feel like I am missing something here as the answer seems too simple. You pass in the artist/song in the URL like so. www.example.com/song.php?artist=Bond&song=Shine and the will query the DB for all comments for that song, loop through the result and you're done. There is no need to write code for each song/page. Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1035608 Share on other sites More sharing options...
rx3mer Posted April 2, 2010 Author Share Posted April 2, 2010 Sounds easy but i dont think I know what are you talking about. I will think about it and see whats gona happend.. Thank you Quote Link to comment https://forums.phpfreaks.com/topic/197004-comment-system-phpmysql-just-like-youtube/#findComment-1035765 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.