0

Pretty basic question, I know... I just don't know how it's done.

I want to be able to sort out my content in my websites by most viewed, most commented, most popular, best rating, etc... But I don't know how "sort by" works!

Which scripting language should it be written in? JavaScript? PHP? Can it be done with XML?

Do I have to have a database set up like MySQL? Is there a good tutorial anywhere that explains it? I need to be taught the exact process of how it works. As you can see I really need direction!

Shog9
  • 156,901
  • 35
  • 231
  • 235
Oneezy
  • 4,881
  • 7
  • 44
  • 73
  • 1
    if you don't have a database, what exactly you want to sort? – mohdajami Mar 24 '10 at 22:49
  • It must be done in server side. If you want to sort e.g. by most commented or by best rating, you already must have that kind of functionality (commenting, rating) implemented in your website, right? Then it should not be too hard to implement the sorting. Do you already have a website? If so, what software / blog engine / cms it is using? – jholster Mar 24 '10 at 22:52
  • Thankyou guys for your comments! my website is http://name-ninja.com and I'm in the process of doing seo work on it and a fresh design so it has more user interactivity, thats why im asking these questions. ok.., I feel dumb now for just realizing that i have to have a database in order for all these things to be "sorted by". So then, I guess my question now is.., how would i setup a MySQL database with all of these functions so that people can log in, comment, and it keep track of views, etc... and i guess i would have to learn some php to make it all work, right? – Oneezy Mar 24 '10 at 23:23

3 Answers3

2

You need a CMS.. Of which there are 2 main routes you can go down:

  1. Build it yourself
  2. Use a 'ready made' CMS such as Wordpress, Drupal, or a Forum with a CMS plugin such as Simple Machines Forum (SMF - formerly YaBBSE and YaBB)

IF you are choosing to make it yourself then expect a learning curve. You will probably need to learn a bit of Javascript, a lot pf PHP and get ready to hand code any HTML.

It's not an easy task, but if you want to do it I would suggest:

  1. tizag http://www.tizag.com
  2. google 'php content management systems' and find a tutorial (e.g. http://www.intranetjournal.com/php-cms/)

I would recommend MySQL for starters instead of XML, though you can get nearly the same base functionality out of an XML file as a MySQL DB (MySQL has a number of functions and is better overall than XML... but XML will do if you just want to store data in a flat file).

Good luck, and remember this is the place to ask questions... So if you choose to learn PHP and don't understand why something isn't working, or don't grasp a concept... Give us all a shout :)

http://www.php.net <- useful...

Darbio
  • 11,286
  • 12
  • 60
  • 100
  • I definitely want to build it myself. I have no problem hand writing HTML.., I have no problem going in and editing php or javascript buut I don't exactly know how it works. I know how to be careful in code though and change out things here and there. Thanks for your great info i will check the links out! – Oneezy Mar 24 '10 at 23:12
1

Sounds like you need a Content Management System that incorporates both server-side technology & a database. For a beginner, I would recommend Wordpress or Drupal to get started. they both have all the features you mentioned baked in, and the online community is excellent.

tomwolber
  • 506
  • 1
  • 7
  • 18
  • well, I'm sort of a beginner sort of not.., i know html, css, and have dipped into php and javascript. Just dipped in tho hah..no offense but i really hate Content Management Systems.. Im a do it from scratch kind of guy. Do it from scratch because i really like understanding the full process of how it all works. I feel like if I had some guidance I can figure this thing out. – Oneezy Mar 24 '10 at 22:56
  • ^ after writing that over 2 years ago and me knowing everything that I kno now, i really feel dumb! (b'cuz literally everything is a content management system). I'm glad I asked all these questions tho b'cuz it really paved a way for me to understand this stuff! thanks again for all of your answers and help! – Oneezy Aug 02 '12 at 12:00
1

As very much a starter myself I have found youtube to be a great help I would have been completely lost without it, and of course this site. I found this lad to be one of the best http://www.youtube.com/user/phpacademy

bsandrabr
  • 143
  • 2
  • 8