vizmotion
Offline
Posts: 105
|
 |
« on: March 24, 2009, 04:55:50 PM » |
|
Hello Everyone, Today seems like a busy day for new modules. I have just built an admin modules that helps non-designers with being able to edit css files very easily. This is a new module and I am looking for feedback. The issue that I have is that people love WB but they want to have some control over changing the templates. Currently they have to be able to understand html and css to do that. What I wanted was a way - for developers to easily specify what parameters can and can not be changes,
- to quickly be able to use the templates that are already there,
- to get more templates developed that can fit into the above structure, and
- to allow a single template to take on many different looks
Please give the module a try. I have included a very rough description of how to install the module. Template Modifier: This admin module allows you to make modifications to the css file of a template in an easy to understand fashion and quickly see the effect of your changes. Requires: WB 2.7 To get the full use of the system: 1) Install the templatemodifier module 2) Make a chnage to the index.php file at the top level. Add the following to line 36: if(isset($_GET['template']) and $_GET['template'] != '') define('TEMPLATE',$_GET['template']); This will allow you to see the template changes easily. 3) Add-on the bizbox template that has the edit file as part of it 4) Go to the admin tools and click on the template modifer. You will then be able to select the bizbox template to make changes to. 5) You can make changes to set parameters, you can change the entire css file or you can restore the file back to its old state. 6) To add a new template to the list copy the a) edit.php file to the new template directory b) make sure the css file is called screen.css c) add editdef.inc if you want to specify the parameters that a user can change
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #1 on: March 25, 2009, 01:24:38 PM » |
|
To help everyone understand how the template modifier works for a short time I put up a website to demonstrate. Go to http://proto.glulife.com/templates/bizbox/edit.php. This should allow you to make changes to the template on the left and see those changes in the frame to the right. NOTE: Sometimes you have to reload the frame or the page to get the system started. Not sure why. If anyone has any insight please let me know.
|
|
|
|
|
Logged
|
|
|
|
crnogorac081
AddOn Development
Offline
Posts: 1680
|
 |
« Reply #2 on: March 25, 2009, 02:01:34 PM » |
|
looks nice  )
|
|
|
|
|
Logged
|
Wow, I coded something myself: PM Messanger Modul ,Searchbox with suggestions
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #3 on: March 25, 2009, 02:56:47 PM » |
|
Thanks crnogorac081, I really appreciate the comment. Did you have any ideas of how to improve it.
I think this may help a lot of people that are not designers and the designers and keep better control of their designs with only allowing people to change only certain parameters. I am willing to do more development work on the module just need to get some feedback.
|
|
|
|
|
Logged
|
|
|
|
|
kweitzel
|
 |
« Reply #4 on: March 25, 2009, 06:30:02 PM » |
|
Indeed nice Idea ... what about some image functions? Like upload a banner image and resize it?
cheers
Klaus
|
|
|
|
|
Logged
|
WebsiteBaker Org e.V. - for WebsiteBaker
|
|
|
marathoner
Offline
Posts: 495
|
 |
« Reply #5 on: March 25, 2009, 08:48:52 PM » |
|
Yes, this is a great idea. Especially for those clients that have no idea what they really want in terms of colors, etc.
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #6 on: April 03, 2009, 08:09:58 AM » |
|
Hello Everyone,
Here is an update of the templatemodifer code. I think I fixed the refreshing problem. You should be able to install it over an existing installation without problems.
I am also giving some thought about how to best handle images.
Please feel free to give any other suggestions or feedback. Thanks.
|
|
|
|
|
Logged
|
|
|
|
erpe
Offline
Posts: 2077
|
 |
« Reply #7 on: April 04, 2009, 09:48:27 AM » |
|
Hi installed 0.91 in a wb 2.7. Following error occured: Notice: Undefined index: button in /var/kunden/webs/test3/modules/templatemodifier/tool.php on line 13
Fatal error: Call to a member function fetchRow() on a non-object in /var/kunden/webs/test3/modules/templatemodifier/tool.php on line 23 rgds erpe
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #8 on: April 04, 2009, 10:19:13 AM » |
|
Hi Erpe,
Here is the latest fix. I think I got the two bugs worked out. Let me know how it goes and any other suggestions you may have.
VizMotion
see later version
|
|
|
|
« Last Edit: April 04, 2009, 11:09:17 AM by vizmotion »
|
Logged
|
|
|
|
erpe
Offline
Posts: 2077
|
 |
« Reply #9 on: April 04, 2009, 10:26:56 AM » |
|
Hi Fatal error: Call to a member function fetchRow() on a non-object in /var/kunden/webs/test3/modules/templatemodifier/tool.php on line 22 rgds erpe
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #10 on: April 04, 2009, 10:36:17 AM » |
|
Getting closer. Are you using TABLE_PREFIX? Give this a try.
See later version.
|
|
|
|
« Last Edit: April 04, 2009, 11:08:47 AM by vizmotion »
|
Logged
|
|
|
|
erpe
Offline
Posts: 2077
|
 |
« Reply #11 on: April 04, 2009, 10:52:51 AM » |
|
Yes, we are getting closer and yes, i am using table_prefix Notice: Undefined variable: checkbox in /var/kunden/webs/test3/modules/templatemodifier/tool.php on line 29
Notice: Undefined variable: list in /var/kunden/webs/test3/modules/templatemodifier/tool.php on line 39 rgds erpe
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #12 on: April 04, 2009, 11:07:06 AM » |
|
Hey Erpe,
OK this should fix all the notice and errors. Thank you for all your help in testing. Please continue to give feedback once you have used the system. I have also included a sample editdef.inc file for restricting what a user is able to change. This is very much experimental and would like to continue to get feedback.
VizMotion
|
|
|
|
|
Logged
|
|
|
|
erpe
Offline
Posts: 2077
|
 |
« Reply #13 on: April 04, 2009, 11:46:56 AM » |
|
Hi no errors and notices at all.  Works well. The restore function is very useful. But only "advance" is working. What is "limited" for? rgds erpe
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #14 on: April 04, 2009, 12:30:43 PM » |
|
Limit allows you to have a template that you want to limit what a user can modify. So for example with my template I only want the user to modify the background-color and menu color. I put that in a editdef.inc file in my template directory and then they can only make those modifications in limit.
Try adding on the bizbox template at the beginning of this thread to see how limit works.
Once again thanks for trying the templateModifier.
|
|
|
|
|
Logged
|
|
|
|
erpe
Offline
Posts: 2077
|
 |
« Reply #15 on: April 04, 2009, 12:55:10 PM » |
|
Oh, that is a good idea. I will try it later. Thankk you for sharing this module  rgds erpe
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #16 on: April 13, 2009, 11:32:30 AM » |
|
Hello All, If you are following this thread TemplateModifier is being integrated with EasyMenu. You can see the results at a different thread: http://www.websitebaker2.org/forum/index.php/topic,13427.60.html. kweitzel - we did add image upload. Check it out and see what you think. As we continue to extend the two systems it is my hope to get better templates created that make use of the features. Any designers out there want to take a crack at it? Thanks. VizMotion
|
|
|
|
|
Logged
|
|
|
|
schloety
Offline
Posts: 1
|
 |
« Reply #17 on: April 21, 2009, 03:10:28 PM » |
|
Hi, I tried to install your tool but I could not add the bizbox.
What can I do to solve the problem?
Thanks in advance
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #18 on: April 23, 2009, 06:26:08 PM » |
|
BizBox is a template. It is just an example of how template editing can be done. To see the latest discussion about TemplateModifier see the EasyMenu discussion.
|
|
|
|
|
Logged
|
|
|
|
marcel
Offline
Posts: 14
|
 |
« Reply #19 on: January 27, 2010, 07:36:52 PM » |
|
Hi,
this module works only with 2.7 version, or works with 2.8 with too ? If not works with 2.8, what is need to ?
Thanks, Marcel
|
|
|
|
|
Logged
|
|
|
|
cliffman
Offline
Posts: 8
|
 |
« Reply #20 on: March 28, 2010, 10:27:40 PM » |
|
This one is not working at all for me on the 2.8 version. I never tried the 2.7 version, as I just started using websitebaker.
I installed the module, it is on my Admin Tools page, but when I click it nothing happens, I just get a blank page. Then I added the PHP code to index.php (I presume that "highest level" means in the wb folder, and not along side of it), same result. And I don't find any bizbox template. Can you offer any suggestions? Does this work on version 2.8?
Thanks.
|
|
|
|
|
Logged
|
|
|
|
vizmotion
Offline
Posts: 105
|
 |
« Reply #21 on: March 28, 2010, 11:06:18 PM » |
|
It does work in 2.8.1. Three things that need to happen. 1) You can select any template to be a part of the template modification. Once you select it from the right side then it goes to the left and can be used in the template modifier. This once you have selected template modifier in admin-tools section. 2) The template .css file has to be named screen.css. That is what is pulled into the system to be modified 3) You need to add the following code to the index.php file file after the initial check to see if the config file has been set up. if(isset($_GET['template']) and $_GET['template'] != '') { define('TEMPLATE',$_GET['template']); if($_GET['perm'] == 'yes') { $_SESSION['template'] = $_GET['template']; } } else if ($_SESSION['template'] != "" and isset($_SESSION['template'])) { define('TEMPLATE',$_SESSION['template']); }
I have also enclosed a template that you can use to see how the system works. You just install bizbox make the changes to the index.php file and away you go. Still needs some work if anyone is interested in continuing to help refine it.
|
|
|
|
|
Logged
|
|
|
|
cliffman
Offline
Posts: 8
|
 |
« Reply #22 on: March 29, 2010, 01:15:11 PM » |
|
Great thanks.
Does that code go into: wb | -> index.php ?
I added that code to that file at line 36, after the check for the config file, and I still get the same blank page. Installing the bizbox template doesn't seem to make any difference. Am I missing something really basic? Should I be clicking on Admin-Tools, then on the Template Modifier box? Or is there some option on the Pages or Templates tab that I'm missing?
Thanks for your help.
|
|
|
|
|
Logged
|
|
|
|
|
|
|
|
|