WebsiteBaker Community Forum

General Community => WebsiteBaker Website Showcase => Topic started by: gokcer on November 12, 2006, 07:00:13 PM

Title: A Shopping Center in Turkey (Turkish)
Post by: gokcer on November 12, 2006, 07:00:13 PM
Bilkent Center:
http://www.bilkentcenter.com.tr
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: kweitzel on November 12, 2006, 11:52:11 PM
and obviously no WB ...
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: gokcer on November 13, 2006, 07:37:49 AM
It's completely WB.

Some properties may seem different to you. For example links are targeted to page_id's not pages. Because of "php safe mode property", no page files are generated in my modified WB. I call the page data directly from the MySQL database. I posted a lot to WB forum about working WB in "safe mode" two years ago. You may search and read those posts.

And I used "latest news" function which has been posted to WB forum last year. You may search it.

The template may seem different to you because it is a "very modified" template plus a flash menu. I think I like to write css, html, xml and actionscript :)

It is completly WB's 2.5.x "PhpSafeMode" version.
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: kweitzel on November 13, 2006, 08:40:04 AM
and you also changed at least the admin login and removed the WB References ... not good.

Take a look at the features on the about page: http://www.WebsiteBaker.org/2/about/
Quote
Total freedom - only requirements besides those in the GNU GPL are the need to retain the copyright notice on Administration footer - no need for "link-back's" to our website (although it is much appreciated)

I followed this discussion and you posts quite closely, that's why I didn't think you would do this ... and commented on that fact ... but here is the proof.

cheers

Klaus

[gelöscht durch Administrator]
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: gokcer on November 13, 2006, 09:05:35 AM
Yeah you are right, i missed that because all the template files (including admin templates) are re-generated by me. I had copied the php functions only. Now i have solved that point and waiting for your comments about the site, template and my modifications about safe-mode. Thanks :)
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: fortis on April 20, 2007, 11:36:36 PM
İ dont know why anybody give comments but its perfect

dostum harika olmuş eline emeğine sağlık.Daha fazla yazacam ama olmayacak :D
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: gokcer on April 22, 2007, 05:19:59 PM
Thanks Fortis, this software can be a perfect solution for every type of websites, because you can succeed in modifying its source code to every type of structure, design and server... I've learned a lot about php and mysql by this way, too. I also want to announce that, I've upgraded the "safe mode solution codes" to version 2.6.5. :-)

In Turkish:
Teşekkürler Fortis, bu yazılım her türlü web sitesi için mükemmel bir çözüm olabilir, çünkü kaynak kodlarını her türlü yapı, tasarım ve server için uyarlamayı başabilirsin. Bu şekilde php ve mysql hakkında da çok şey öğrendim. Ayrıca "Safe Mode problemi kodlarını" 2.6.5 versiyonu için güncellediğimi de duyurmak isterim. :-)
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: kweitzel on April 22, 2007, 10:37:48 PM
Hey Gokcer,

will you write a little tutorial about that one please? That would be a great addition, especially for people you don't wnat or can not change their hoster and want to use WB.

cheers

Klaus
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: gokcer on April 22, 2007, 11:58:31 PM
Basicly all you must do is to delete the codes which command to create .php files and folders.  And the link creation code must be like this for the pages:
Code: [Select]
<a href='.WB_URL.'/index.php?page_id='.$page['page_id'].' target="'.$page['target'].'">
And for the posts:
Code: [Select]
$post_link = WB_URL.'/index.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id;
Also other modules link codes can be converted like Image Gallery:
Code: [Select]
$image_link = WB_URL.'/index.php?page_id='.$page_id.'&section_id='.$section_id.'&image_id='.$image_id;
My English and my time is not enough to write a tutorial; but I wrote a lot about this in the forum; you may search with "safe mode" tag to find that posts. The problem is that I've changed a lot of things and I've forgotten to log them.

This is an example for excluding file and folder creation codes in modules/news/save_post.php:



<?php

require('../../config.php');

// Get id
if(!isset($_POST['post_id']) OR !is_numeric($_POST['post_id'])) {
   header("Location: ".ADMIN_URL."/pages/index.php");
   exit(0);
} else {
   $id = $_POST['post_id'];
   $post_id = $id;
}

// Include WB admin wrapper script
$update_when_modified = true; // Tells script to update when this page was last updated
require(WB_PATH.'/modules/admin.php');

// Validate all fields
if($admin->get_post('title') == '' AND $admin->get_post('url') == '') {
   $admin->print_error($MESSAGE['GENERIC']['FILL_IN_ALL'], WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
} else {
   $title = $admin->add_slashes($admin->get_post('title'));
   $short = $admin->add_slashes($admin->get_post('short'));
   $long = $admin->add_slashes($admin->get_post('long'));
   $commenting = $admin->get_post('commenting');
   $active = $admin->get_post('active');
   $old_link = $admin->get_post('link');
   $group_id = $admin->get_post('group');
}

// Get page link URL
$query_page = $database->query("SELECT level,link FROM ".TABLE_PREFIX."pages WHERE page_id = '$page_id'");
$page = $query_page->fetchRow();
$page_level = $page['level'];
$page_link = $page['link'];

// Include WB functions file
require(WB_PATH.'/framework/functions.php');

// Work-out what the link should be
$post_link = WB_URL.'/index.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$post_id;





/*
PHP SAFE MODE!!!




// Make sure the post link is set and exists
// Make news post access files dir
make_dir(WB_PATH.PAGES_DIREC TORY.'/posts/');
if(!is_writable(WB_PATH.PAGES_DIREC TORY.'/posts/')) {
   $admin->print_error($MESSAGE['PAGES']['CANNOT_CREATE_ACCES S_FILE']);
} elseif($old_link != $post_link OR !file_exists(WB_PATH.PAGES_DIREC TORY.$post_link.'.php')) {
   // We need to create a new file
   // First, delete old file if it exists
   if(file_exists(WB_PATH.$old_link.'.php')) {
      unlink(WB_PATH.$old_link.'.php');
   }
   // Specify the filename
   $filename = WB_PATH.PAGES_DIREC TORY.'/'.$post_link.'.php';
   // The depth of the page directory in the directory hierarchy
   // '/pages' is at depth 1
   $pages_dir_depth=count(explode('/',PAGES_DIRECTORY))-1;
   // Work-out how many ../'s we need to get to the index page
   $index_location = '../';
   for($i = 0; $i < $pages_dir_depth; $i++) {
      $index_location .= '../';
   }
   // Write to the filename
   $content = ''.
'<?php
$page_id = '.$page_id.';
$section_id = '.$section_id.';
$post_id = '.$post_id.';
define("POST_ID", $post_id);
require("'.$index_location.'config.php");
require(WB_PATH."/index.php");
?>';
   $handle = fopen($filename, 'w');
   fwrite($handle, $content);
   fclose($handle);
   change_mode($filename);
}



PHP SAFE MODE!!!
*/


// Update row
$database->query("UPDATE ".TABLE_PREFIX."mod_news_posts SET group_id = '$group_id', title = '$title', link = '$post_link', content_short = '$short', content_long = '$long', commenting = '$commenting', active = '$active', posted_when = '".mktime()."', posted_by = '".$admin->get_user_id()."' WHERE post_id = '$post_id'");

// Check if there is a db error, otherwise say successful
if($database->is_error()) {
   $admin->print_error($database->get_error(), WB_URL.'/modules/news/modify_post.php?page_id='.$page_id.'&section_id='.$section_id.'&post_id='.$id);
} else {
   $admin->print_success($TEXT['SUCCESS'], ADMIN_URL.'/pages/modify.php?page_id='.$page_id);
}

// Print admin footer
$admin->print_footer();

?>
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: kweitzel on April 23, 2007, 10:34:18 AM
Thanks for sharing with us. Don't worry about not having the time for a complete Tutorial.

cheers

Klaus
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: gokcer on April 23, 2007, 01:26:52 PM
Thanks, you de stressed me :-)
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: applepie on April 23, 2007, 04:53:43 PM
This is a great site. It shows what WB can do. It would be great if you can find the time to share with us how you did it.  :-)
Title: Re: A Shopping Center in Turkey (Turkish)
Post by: ruebenwurzel on April 23, 2007, 05:55:29 PM
Hello,

i also like the side. It really shows the possibilitys of WB. Unfortunately you have disabled one of the greatest features wich WB has. The producing of "normal" pagenames instead of long lines with variables. This makes your page very search engine unfriendly. I know you had to do this becaus of the safe mode problematik. But in your case i think changing the hoster to a safe mode off server and using the normal pagename system of WB would make your page one of the best WB pages  :wink:

Matthias

Title: Re: A Shopping Center in Turkey (Turkish)
Post by: gokcer on April 23, 2007, 06:55:22 PM
Hello ruebenwurzel,
It's almost impossible to find a safe mode enabled server in my country because of too many hackers. And also most of the servers are IIS servers with php support. I use Google's "webmaster tool" file to make all my pages indexed by google automatically and periodically. It is based on word count and works very fine for me. :-)

Thanks applepie,
Most of the popular CMS softwares are compatible with safe mode; but i think WB is the "number one" CMS software, except the safe mode problem.