May 26, 201115 yr Hello, I am interested in making a site like this : http://www.qubik.com/portfolio-index.php Where the work is under categories and therefore has lots of points of entry. I see it uses php Any pointers as to where to look for how to make this? thanks.
May 27, 201115 yr It will use a database to store all the work and then gets the work to display given by name called in the address bar (eg. http://www.qubik.com/category.php?cat=Branding) This can be done pretty easily with mysql and php. This website tells you everything you'll need to know how to do it!
July 6, 201115 yr Author Haven't seen a site that uses those horrible urls like that for a while. At OP: have a read up on SEO urls - as they are pretty much standard practice nowadays. What do u mean horrible? Any suggestions on how to go on about this instead? thanks
July 6, 201115 yr Haven't seen a site that uses those horrible urls like that for a while. At OP: have a read up on SEO urls - as they are pretty much standard practice nowadays. talking of horrible urls, Opera tidies them up for you in the browser. No idea why it does so lol
July 6, 201115 yr Author oh yes. I assume that this is something that can be achieved in development process as well? Yes, will have to look that up. In any case, if there's an article/guide/site you find appropriate to check out regarding, please let me know. Thanks.
July 6, 201115 yr Instead of creating your own system, which could be risky as it's your first time developing one. Why not use a pre-made system with plugins such as Wordpess. This allows you to create catagories, post under them categories etc. and all you have to do is use a pre-made template or create your own. If you really want to create your own, create a new row within your database table called 'catagory'. You would then add this to the end of your URL: ?catagory=general Then, within the file you are using to fetch your news data have something like the following: if(isset($_GET['catagory'])) { $catagory = strip_tags($_GET['catagory']); mysql_query("SELECT * FROM `news` WHERE `catagory`='$catagory' ORDER BY `date` DESC LIMIT 5"); } else { mysql_query("SELECT * FROM `news` ORDER BY `date` DESC LIMIT 5"); } ^This is just a basic example, as it doesn't include multi catagories etc. hope it helped!
July 6, 201115 yr In relation to SEO friendly URL's and the earlier post about horrible URL's, one method to achieve the URL tidying would be to use .htaccess and $_GET[''] hand in hand. You would have something like so: page.com?url=param1/param2/param3 so in essence you've got one $_GET string which is actually like this "param1/param2/param3". You would then want to explode this using $arr = explode("/",$_GET['url']); To get each segment you could then array_shift or just target the section you would directly. If you know how many sections you want to a url parameter use arrayshift, if not. then use the references directly. So lets assume you want to work with a category then query a particular category id, you could have a url like this: www.site.com/category/1 You would set up the $arr like so: $arr[0] is your first argument. So you know the site page being requested is categories. $arr[1] would be the category id, base your query off of that.
July 6, 201115 yr I really disagree to people jumping to Wordpress for simple web projects where thousands upon thousands lines of code are not needed I completely agree with this. Everyone wants to use Wordpress for everything nowadays. Thousands of lines of code as you say, loads of tables in the db, etc. - just to achieve one or two simple things. It makes things unnecessarily bloated.
July 6, 201115 yr The OP wants to display a simple category listing and list of products within a category simialr to http://www.qubik.com/category.php?cat=Book - imo using WordPress for something that simple is total overkill and if he hasn't used Wordpress before, he much more likely to run into time consuming problems learning how to template using Wordpress. I really disagree to people jumping to Wordpress for simple web projects where thousands upon thousands lines of code are not needed The title states 'Portfolio Website using PHP and catagories' Wordpress isn't 'overkill' for a portfolio website, in fact, it's very useful for portfolio websites. Fair enough, if he was creating a website where it was JUST for catagories I can see why you wouldn't use wordpress. In this situation, Wordpress can be successfully used and manipulated to what he wants it to do.
July 6, 201115 yr Author Thanks for all the replies.. To be honest, the Wordpress solution is kind of relevant, but yes, it would mean trying to strip things down to a bare minimum to get a result that seems achievable from the other way around....from scratch. That's the impression i'm under anyway The only thing that would make me go with Wordpress is that my client then would be able to manage his website by him self, without having to call me up to update the site adding a new project or new category etc. I will soon start developing this so watch out, I am sure I will be back for more PHP magic! thanks again.
August 26, 201115 yr Author Hello, Returning after some time to state that I am still lost! I have purchased this book Learning PHP, MySql & Javascript but I feel too intimidated to begin. Do you think the website you proposed is easier to follow? Is there any other resource aimed directly at this sort of dynamic site? Is HTML5 another option...?
Create an account or sign in to comment