JustRob Posted April 11, 2013 Share Posted April 11, 2013 (edited) Hello guys. I'm working on a website, and right now I am working on the "articles" page. What do I want? Look at the picture. So here's the rundown: When a letter is clicked, I want to show only the articles that start with that letter. When All is clicked, I want to show them all. Beneath that is a dropdown menu. When it is clicked, it shows the options "Title", "Author", and "Date". I want it so that when one of these options is selected, and "go" is clicked, it sorts the articles by that criteria. Next to that is an input box that shows "xx items per page". Same story, I want it so that if a number is entered and go is clicked, it shows that amount of items per page. All of these should obviously also work in combination with each other. And now for the problem: I have no idea how to make this. I know HTML and I know CSS, but I can't figure this out. Could anyone give me advice or point me in the right direction? Edited April 11, 2013 by JustRob Link to comment Share on other sites More sharing options...
thescientist Posted April 11, 2013 Share Posted April 11, 2013 (edited) Neither HTML nor CSS will do this. At mimimum Javascript will be required if you wanted to sort the articles in the users browsers without a reload, or with a server side language leveraging the backend to sort the content before the page loads, and would require a reload of the page for each new sort. Edited April 11, 2013 by thescientist Link to comment Share on other sites More sharing options...
jeffman Posted April 11, 2013 Share Posted April 11, 2013 1. How much JavaScript do you know? This is mostly a JavaScript project. Maybe AJAX if there's a lot of data involved. 2. Are you planning to hardcode the data into your document? Is it stored in a database? In an XML document? Doing as much preparation on your server before sending it to the browser could really speed things along. The data could even be stored in an easily editable "flat file," which would save you from having to update a lot of HTML every time you need to make a change. Link to comment Share on other sites More sharing options...
JustRob Posted April 12, 2013 Author Share Posted April 12, 2013 I don't know much about JavaScript, I've never written it myself. And I just want to use the way that's easiest, fastest, best, and most easily editable later. Link to comment Share on other sites More sharing options...
Ingolme Posted April 12, 2013 Share Posted April 12, 2013 This is probably best as a PHP project, actually, with a database that can retrieve data by letters. The most Javascript would be involved in, is to make a request to PHP to do this without reloading. Link to comment Share on other sites More sharing options...
JustRob Posted April 12, 2013 Author Share Posted April 12, 2013 Is PHP hard to learn? Link to comment Share on other sites More sharing options...
Ingolme Posted April 12, 2013 Share Posted April 12, 2013 Much harder than HTML or CSS (which are not programming languages), but not anything as difficult as C or C++ because there's no memory management.It's a programming language (some may argue it's a "scripting language") so principles of programming need to be learnt to use it. The W3Schools tutorial is good, but it might fall a little short. http://php.net/ has a manual with more information which you can refer to after studying the W3Schools tutorial. Link to comment Share on other sites More sharing options...
JustRob Posted April 12, 2013 Author Share Posted April 12, 2013 I've done some ActionScript in the past, so I do know some of the programming principles, but that was pretty long ago. Should I try to learn PHP in general, or should I just focus on the stuff I want right now? Link to comment Share on other sites More sharing options...
Ingolme Posted April 12, 2013 Share Posted April 12, 2013 (edited) The only way I see what you requested getting done correctly without PHP is to have hundreds of HTML pages with links between eachother, and that's one tedious site to work with. Just a little example of the list of pages you would need without a programmed system:All - page 1All - page 2...A - page 1A - page 2...Z - page 1Z - page 2...A Guide to EvilGame Creation Process... If you want this done soon, you can ask somebody else to do it in PHP, else you can learn PHP and do it yourself, though that's going to be a slow process. Edit: Hey! there's a third option. You can look for a content management system that's already built for this as well. Unfortunately, I can't name any specific ones at the moment, I'd have to search for it on Google (or you can use your favorite search engine) Edited April 12, 2013 by Ingolme Link to comment Share on other sites More sharing options...
JustRob Posted April 12, 2013 Author Share Posted April 12, 2013 Managing hundreds of HTML pages is virtually impossible, I don't have that much free time nor the strength of mind to not go insane while doing it. That was never an option to begin with. Alright, I guess what I want to know now is what else can I do with PHP. You may have noticed in my screenshot earlier there's a login field. Eventually, I want to make it so people can register and log in on my website, have their own profile page, and the ability to submit articles and videogames (which will then be moderated by me and either accepted or denied). Does that also fall under PHP? Because in that case even if it takes a long time, it's worth learning. I do have the idea to get this website running and manage it, and I doubt anyone would invest that much of their time for free. Link to comment Share on other sites More sharing options...
JustRob Posted April 12, 2013 Author Share Posted April 12, 2013 Edit: Hey! there's a third option. You can look for a content management system that's already built for this as well. Unfortunately, I can't name any specific ones at the moment, I'd have to search for it on Google (or you can use your favorite search engine) I actually tried this, with WordPress. But turns out WordPress is simply a "blog" type of system which I do not want. I want my website to look and function exactly as I want to, as in the above screenshot. Unless that's possible, it's not something I will consider. Link to comment Share on other sites More sharing options...
scout1idf Posted April 12, 2013 Share Posted April 12, 2013 Managing hundreds of HTML pages is virtually impossible, I don't have that much free time nor the strength of mind to not go insane while doing it. That was never an option to begin with. Alright, I guess what I want to know now is what else can I do with PHP. You may have noticed in my screenshot earlier there's a login field. Eventually, I want to make it so people can register and log in on my website, have their own profile page, and the ability to submit articles and videogames (which will then be moderated by me and either accepted or denied). Does that also fall under PHP? Because in that case even if it takes a long time, it's worth learning. I do have the idea to get this website running and manage it, and I doubt anyone would invest that much of their time for free.PHP and MySQL are used for register/log-in systems. Link to comment Share on other sites More sharing options...
JustRob Posted April 12, 2013 Author Share Posted April 12, 2013 So basically I need to learn JavaScript, PHP, and MySQL? This is gonna be a long year... Link to comment Share on other sites More sharing options...
jeffman Posted April 12, 2013 Share Posted April 12, 2013 So basically I need to learn JavaScript, PHP, and MySQL? This is gonna be a long year...It's a big project with lots of parts. Link to comment Share on other sites More sharing options...
JustRob Posted April 12, 2013 Author Share Posted April 12, 2013 I just hope I can pull it off... PHP programming is as far as I'm concerned a minor problem. I know how variables, operators, and if statements work, all I'd need to learn is PHP's way of writing the syntax. But this MySQL database stuff is confusing the ###### out of me. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now