Welcome, Guest. Please login or register.
Did you miss your activation email?
May 25, 2012, 09:18:15 AM

Login with username, password and session length
Search:     Advanced search
Wollen Sie dem WebsiteBaker Team beitreten?
Nähere Informationen finden Sie unter hier und auf unserer neuen Webseite.
155482 Posts in 21708 Topics by 7734 Members
Latest Member: adrielkhollis4
* Home Help Search Login Register
Pages: 1 [2]   Go Down
Print
Author Topic: New Module - Template Modifier  (Read 6237 times)
vizmotion

Offline Offline

Posts: 107


« Reply #25 on: April 01, 2010, 11:27:11 PM »

Hey Cliffman,

If you can turn debugging on then that would help show me what is going wrong. There is a php error happening which is causing the code not to get called. You can set the debugging in Settings then click the "advance features button" then set "PHP Error Reporting Level:" to all. Then send me what the error code is.

VizMotion
Logged
cliffman

Offline Offline

Posts: 8


« Reply #26 on: April 06, 2010, 01:35:43 PM »

Hi Vizmotion:

Thanks, didn't see your post till just now.  Did what you suggested, and the error message I got is:

 Administration Tools  » Template Modifier

Notice: Undefined index: button in /home/www/u14213/html_www.cliffadams.de/modules/templatemodifier/tool.php on line 13

Fatal error: Call to a member function fetchRow() on a non-object in /home/www/u14213/html_www.cliffadams.de/modules/templatemodifier/tool.php on line 23
Logged
vizmotion

Offline Offline

Posts: 107


« Reply #27 on: April 06, 2010, 01:42:37 PM »

Hello Cliffman,

What version are you using? Here is the latest 0.9.5. Uninstall old version and install this version. If you still have trouble send me what the error is that you get.

Vizmotion
Logged
cliffman

Offline Offline

Posts: 8


« Reply #28 on: April 09, 2010, 01:42:22 PM »

Hi Vismotion,

Thanks for your continuing help.  Here is the error message that I got:
 
Notice: Undefined index: template in /home/www/u14213/html_www.cliffadams.de/index.php  on line 41



And here is the piece of code in my index.php, in case I've copied anything incorrectly.

// Include config file
require_once(dirname(__FILE__).'/config.php');

// Check if the config file has been set-up
if(!defined('WB_PATH')) {
   header("Location: install/index.php");
   exit(0);
}
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']);                                                 
}                                                                                               This is line 41
require_once(WB_PATH.'/framework/class.frontend.php');
// Create new frontend object
$wb = new frontend();
Logged
vizmotion

Offline Offline

Posts: 107


« Reply #29 on: April 09, 2010, 02:10:10 PM »

Hello Cliffman,

What version of template modifier are you using? Did you try the latest one I put up on the page?

Also is that the error you get when you try and run the template_modifier tool? That is just a notice and can be ignored. It would not cause you to see a blank on the admin tools screen.

VizMotion
Logged
cliffman

Offline Offline

Posts: 8


« Reply #30 on: April 09, 2010, 11:19:20 PM »

Yes, I'm using the latest, and the tool seems to be working, but now something went wrong with the site.  Maybe I modified a file that I shouldn't.  When I point to my http://www.cliffadams.de , I get:

Notice: Undefined index: template in /home/www/u14213/html_www.cliffadams.de/index.php on line 41

Warning: Cannot modify header information - headers already sent by (output started at /home/www/u14213/html_www.cliffadams.de/index.php:41) in /home/www/u14213/html_www.cliffadams.de/framework/class.frontend.php on line 95

Nothing else shows up on the page.  I'm wondering if I should just re-install wb.
Logged
vizmotion

Offline Offline

Posts: 107


« Reply #31 on: April 09, 2010, 11:32:58 PM »

Turn error back to none.
Logged
slvvn

Offline Offline

Posts: 4


« Reply #32 on: June 21, 2010, 05:18:52 PM »

Where can this module be downloaded? and where can I find the example editdef.inc file and the bizbox example template.
Logged
slvvn

Offline Offline

Posts: 4


« Reply #33 on: June 21, 2010, 05:25:19 PM »

Never mind - for some reason I did not see the download links until after I logged in to post this question.  Seems to work, looks good, thanks a tun.
Logged
Han

Offline Offline

Posts: 41


WWW
« Reply #34 on: October 28, 2010, 11:10:56 AM »

Great idea!
I was looking for an add-on like this as I was used to work with a commercial CMS that has rather extensive possibilities to adapt the site layout by a visual editor.
As this CMS is no longer supported from PHP 5.3, I went to WB to make some websites, but as I am not a coder, I miss the visual editor. Your mod can be a great help.
As a suggestion I sent some screen pictures of the editor that worked for me. Maybe it can help you to develop the module further!
PS. For the users that are in need of this module, it might be a disadvantage to have to edit the index file 'at the top level'. It would be nice when this code line could be implemented in the standard installation of WB; together with a 'starter-template' maybe?
Logged

Groeten, HK Den Haag
Han

Offline Offline

Posts: 41


WWW
« Reply #35 on: October 28, 2010, 11:32:46 AM »

I see no menu in Admin Tools.

1) I installed the Template Modifier in my Website Baker Portable (works with WB 2.8.1).
2) Made a change to the index.php file at the 'top level'. Added the following to line 36:
Code:
if(isset($_GET['template']) and  $_GET['template'] != '') define('TEMPLATE',$_GET['template']);
I'm not really sure if I got the right index file. It is now between:
Code:
// Check if the config file has been set-up
if(!defined('WB_PATH')) {
header("Location: install/index.php");
exit(0);
}
and:
Code:
require_once(WB_PATH.'/framework/class.frontend.php');
// Create new frontend object
$wb = new frontend();
Is that right?
3) I did add-on the bizbox template that I found in the first post of this topic.
4) I did go to the admin tools and click on the template modifer. But here I don't see a menu.

What went wrong?
Logged

Groeten, HK Den Haag
vizmotion

Offline Offline

Posts: 107


« Reply #36 on: October 28, 2010, 12:04:32 PM »

The index file to make changes to is the top level index.php file. This will allow the system to call a page and specify the template in the URL.
Logged
Han

Offline Offline

Posts: 41


WWW
« Reply #37 on: October 28, 2010, 01:08:35 PM »

Index file was OK.
My mistake was that I installed the version attached to the first post (0.9.1)
The newer version 0.9.5 does give me a menu.
I will give it a try!
« Last Edit: October 28, 2010, 01:10:32 PM by HK » Logged

Groeten, HK Den Haag
Sherlock

Offline Offline

Posts: 5


« Reply #38 on: April 26, 2012, 10:50:47 AM »

Hi

I know this is an old topic, but I am new to Websitebaker.

Firstly I have installed template modifier with no problems.

I have downloaded bizbox zip, and installed it.

The problem I have is the modification to the index.php file, I am not sure which one to do, there is an index.php file in almost every folder, and I could not find one that looked like the example in the video that was posted.

I thought that it is possibly one of these, but which one:-
The one in the root directory
The one in the admin directory
or The one in the templates directory.

If anyone can help thanks in advance.
Logged
vizmotion

Offline Offline

Posts: 107


« Reply #39 on: April 26, 2012, 10:55:07 AM »

Hello it is the one in the root directory. This will allow you to specify a template in the URL.

By the way this is an old module and not being maintained so not sure if it will work correctly.
Logged
hillschmidt

Offline Offline

Posts: 29


« Reply #40 on: April 27, 2012, 02:24:19 PM »

Just installed under 2.8.3 and corrected the "deprecated" error in .inc lines 70 and 98 by eliminating the &.
Worked fine for me in editing my template.

Great: the definition of color variances! I like this!
Logged
vizmotion

Offline Offline

Posts: 107


« Reply #41 on: April 27, 2012, 02:47:17 PM »

Great. Thanks for letting people know about the change and that it works. All the best.
Logged
Pages: 1 [2]   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!