General Community > WebsiteBaker Website Showcase
Two websites working perfect under SAFE MODE
gokcer:
www.ardaerdik.com
Flash menu... Html Frames... every page is built on same template, same css file; but different css style. A personel site of young and famous creative director, in Turkish Language.
www.reta.com.tr
A website for an advertising company, in Turkish Language... Cool horizantal DHTML menu and cool horizantal design.
i2Paq:
How did you make them work under Safe Mode or do you never create new pages via the Admin panel?
Nice work btw!
gokcer:
I wrote a lot about safe mode problem last year. Stefan guided me with some homeworks on my way :-) I disabled all "file creating" code parts of WB. Then I made the links to be created with calling "page_id"s an "post_id"s in all files (including search, insert link etc... options). Also the new modules worked perfect like polls, massmail, bookmarks, downloads, faqbaker, calendar etc... with this solution. (a little modification can be needed for some of them). No new files, no ftp uploading, hurrah MySQL database :-)
PeterM:
--- Quote from: gokcer on April 17, 2006, 08:35:31 AM ---I wrote a lot about safe mode problem last year. Stefan guided me with some homeworks on my way :-) I disabled all "file creating" code parts of WB. Then I made the links to be created with calling "page_id"s an "post_id"s in all files (including search, insert link etc... options). Also the new modules worked perfect like polls, massmail, bookmarks, downloads, faqbaker, calendar etc... with this solution. (a little modification can be needed for some of them). No new files, no ftp uploading, hurrah MySQL database :-)
--- End quote ---
But i guess you have to change that for every new version of WB until version 3 where the safemode problem will be fixed.
Do you have a ready to use package of this? Or an how to, on what needs to be changed?
I guess it took a lot of work to get it working. Great job.
Peter
gokcer:
--- Quote ---But i guess you have to change that for every new version of WB until version 3 where the safemode problem will be fixed.
Do you have a ready to use package of this? Or an how to, on what needs to be changed?
--- End quote ---
I started my work with 2.4.x. The upgrades since 2.5.2 didnt make a problem for me on upgrading my WB for safemode. But version 2.6.x have several structural changes which take a lot of time to synchronize with my WB. And also i thougt it wasn't necessary to upgrade 2.6.x because i have learned some php and mysql during this process so i made my own upgrades for my special needs. But i couldn't developed a package for all these changes, because most of them found by trying lots of combinations and I cant remember "what I did" :-) All i can say is "dont create directories and files. And redirect your all links to datas on the database which are already created by WB admin panel". You must change the link making functions like:
--- Code: ---<a href = WB_URL."/posts.php?page_id='.$page_id.'§ion_id='.$section_id.'&post_id='.$post_id.'">This is a post link</a>
--- End code ---
returns:
--- Code: ---<a href = "http://www.something.com/posts.php?page_id=3§ion_id=5&post_id=2">This is a post link</a>
--- End code ---
and
--- Code: ---<a href = WB_URL."/index.php?page_id='.$page_id.'">This is a page link</a>
--- End code ---
returns:
--- Code: ---<a href = "http://www.something.com/index.php?page_id=3">This is a page link</a>
--- End code ---
I use different templates for the news page and for the posts on it. So my post links are calling "posts.php" file which is like:
--- Code: ---<?php
define("POST_ID", $post_id);
define('TEMPLATE', 'my_post_template');
// Function for page content
$globals[] = 'database';
$globals[] = 'admin';
$globals[] = 'TEXT';
$globals[] = 'MENU';
$globals[] = 'HEADING';
$globals[] = 'MESSAGE';
if(!function_exists('page_content')) {
function page_content($block = 1) {
// Get outside objects
global $globals;
if(isset($globals) AND is_array($globals)) { foreach($globals AS $global_name) { global $$global_name; } }
// Make sure block is numeric
if(!is_numeric($block)) { $block = 1; }
// Include page content
if(!defined('PAGE_CONTENT')) {
// First get all sections for this page
$query_sections = $database->query("SELECT section_id,module FROM ".TABLE_PREFIX."sections WHERE page_id = '".PAGE_ID."' AND block = '$block' ORDER BY position");
if($query_sections->numRows() > 0) {
// Loop through them and include there modules file
$section = $query_sections->fetchRow();
$section_id = $section['section_id'];
$module = $section['module'];
require(WB_PATH.'/modules/'.$module.'/view.php');
}
} else {
if($block == 1) {
require(PAGE_CONTENT);
}
}
}
}
require('index.php');
define('TEMPLATE_DIR', WB_URL.'/templates/my_post_template/');
?>
--- End code ---
Navigation
[0] Message Index
[#] Next page
Go to full version