booxvid Posted August 30, 2012 Share Posted August 30, 2012 I'm planning to make a simple website wherein users can have their own page with the help of my web service. Right now, I'm quite confuse of would be the exact term of this kind of function, wherein a certain user's page template design can be changed by choosing different themes that's given by the web site. Best example would be the tumblr: I want to edit my tumblr site to be edited through uploading images in header, or... just use the random templates that's given by the tumblr themes. Quote Link to comment https://forums.phpfreaks.com/topic/267798-changing-the-template-from-a-default-template-design/ Share on other sites More sharing options...
trq Posted August 30, 2012 Share Posted August 30, 2012 What is your question then? Quote Link to comment https://forums.phpfreaks.com/topic/267798-changing-the-template-from-a-default-template-design/#findComment-1373813 Share on other sites More sharing options...
booxvid Posted September 2, 2012 Author Share Posted September 2, 2012 How do the tumblr or wix site do the customizing stuff? what kind of language did they in building their own website builder, just like wix.com Quote Link to comment https://forums.phpfreaks.com/topic/267798-changing-the-template-from-a-default-template-design/#findComment-1374619 Share on other sites More sharing options...
Christian F. Posted September 2, 2012 Share Posted September 2, 2012 This is actually a very open question, with a lot of different answers depending upon the wanted end result. To take it from the easiest to the most complex solutions: [*]Most sites offer different designs via CSS. Using alternative stylesheets the visitor can use the browser to select which of the available styles s/he wants to use. This won't stick between visits, nor will it allow users to customize the site on their own, but does not require any knowledge beyond CSS. [*]You can expand upon the above, using JavaScript to set a cookie to remember this choice. Not the best solution, as it'll cause a flicker between loading the page and the JS loads the desired stylesheet. [*]Next step is used-defined CSS, where you'll need to use a server-side language and cookies to allow and keep track of the users. In this case you'll use the server-side language to read the cookie and spit out the address to the correct CSS file, avoiding the aforementioned flicker. You'll also have to create an upload form, so that you can save the user-defined CSS files to the correct folder. After verifying that it's indeed a valid CSS file, of course. [*]Then we're getting to adding custom images in the mix. Basically the same procedure as above, only with input controls and validation for the images as well. Quite easy to implement, if you have alternative 3 implemented already. [*]Next step is Content Management Systems, which will allow you (or your users) to define just about anything on the site itself via a web interface. While they can be very complex to write, requiring a lot of knowledge and experience to do correctly, there are a number of pre-made CMS available. It's therefore highly recommended to use one of those instead of writing your own, unless you want to learn how to write one. (In which case, it shouldn't be used for a live site.) [*]Then you come to page builders, like wix.com. Which is basically a half-way automated CMS for multiple different sites, often written to automatically configure the database and/or HTTP servers in addition to everything else discussed above. As for what language they have used; Could be any server-side language, coupled with HTML, CSS and JavaScript. If you want to learn how to make your own, I recommend that you start with HTML. When you have a good understanding of how to apply markup to your content, then it's time to move onto CSS to learn how to make a layout for your site. Next step is JS or a server-side language, depending upon what you want to make the most: JS is for things happening on the client only, and server-side for stuff that should happen on the server. Meaning if you want something to happen so that it's available for more than just the one person doing the changes, and only in his browser, then you'll need to use a server-side language. Be prepared to spend months, if not years, to properly learn everything you need. How long exactly depends upon how far up the difficulty ladder you want to go, in respect to the list above. Quote Link to comment https://forums.phpfreaks.com/topic/267798-changing-the-template-from-a-default-template-design/#findComment-1374708 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.