Welcome, Guest. Please login or register.
Did you miss your activation email?
May 26, 2012, 09:11:31 PM

Login with username, password and session length
Search:     Advanced search
Interested in joining the WebsiteBaker team?
For more Information read here or on our new website.
155553 Posts in 21715 Topics by 7737 Members
Latest Member: gx-world
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: Template part of community page  (Read 2183 times)
Stefan
Guest
« on: January 30, 2005, 04:01:00 PM »

Although it is not yet set up, we can start thinking about how we want the community page to work.
This is my proposal for the template section:
If we have all downloadable templates also installed on the server we can very easily have the following page:
A list of all templates (with or without thumbnail preview pictures - adding this would mean work for every template) with a view and a download link.
Clicking the download link obviously sends the .zip file, but the view link changes the template of the site directly and leads back to the currently displayed page.
Example for code page:
Code:
echo '<a href="'.$_SERVER['PHP_SELF'].'?template=round">Switch to round template</a>';

And the code to include in WB_PATH/index.php before line 236 in WB 2.3.1 (any version: directly before the comment //Figure out what template to use)
Code:
if ($_GET['template']!="")
       if(file_exists(WB_PATH.'/templates/'.$_GET['template'].'/index.php'))
       define('TEMPLATE',$_GET['template']);

We could have a simple loop over all files within, say, /media/templates, check if the respective template is also installed and if so display the "preview this template" link. With a small change of the install-template script, which copies the .zip file into the respective download directory, we could have this all automatically via template installation.

As soon as the user clicks any link in the menu, the standard template of the page is restored (automatically, because no template code is sent with the link)
Logged
Craig

Offline Offline

Posts: 112



WWW
« Reply #1 on: January 30, 2005, 04:08:04 PM »

Some very good ideas there!

Though, the on-fly-template changing would obviously change the template for the whole site wouldn't it; and would this be a problem for visitors seeing contantly changing templates? I think that a single page on the site that could be changed would be better if it can be achieved.

A good start though  Cheesy
Logged

Craig Rodway, IT Support, Bishop Barrington School.
Stefan
Guest
« Reply #2 on: January 30, 2005, 04:17:07 PM »

Well, check out a demo at my web-page.
Logged
Craig

Offline Offline

Posts: 112



WWW
« Reply #3 on: January 30, 2005, 04:19:09 PM »

That's excellent that is  Cheesy
Logged

Craig Rodway, IT Support, Bishop Barrington School.
fienieg
Guest
« Reply #4 on: January 30, 2005, 05:16:16 PM »

That is real nifty what you got there...
a kind of template system like phpbb or vbullitin has.

[NAME]                                                       [TRUMBNAIL] <-- Link to bigger
[DESCRIPTION]                                                                     picture.

[DOWNLOAD] [PREVIEW TEMPLATE]

Adding such a module would be great  wink
Logged
Ryan

Offline Offline

Posts: 2048



WWW
« Reply #5 on: January 30, 2005, 10:04:53 PM »

I was thinking along the same lines as you, however my version was slightly different. I was simply going to have the same script for mods, templates, and lang. files.
I planned for it to work a little like this:
1. It would upload and unzip only the info.php file for each file (and rename it to match the name of the template [or mod, or lang.] zip file).
2. The script would loop through the dir containing both the zip's and the info files.
3. The script would print out a list of them, including relevant details such as Author.
4. If the zip also contained an image file specifically called "screenshot", it would display it (at a smaller size), and link to view it larger.

Just thought I would let you know my idea - I think yours is better for templates though, because being able to "preview" the template would be cool. Cool
Logged

Website Baker Project Founder
www.websitebaker.or g

To contact me via email, visit:
www.ryandjurovich.c om
Stefan
Guest
« Reply #6 on: January 30, 2005, 10:34:08 PM »

The most important thing for modules is really a description of what it does.
Language files don't need any further details, whereas templates are best chosen after previewing.
I have a working version of the proposed script up and running on my website, but a core file (the root index.php) has to be changed to achieve this.
Logged
Pages: [1]   Go Up
Print
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!