Welcome, Guest. Please login or register.
Did you miss your activation email?
February 12, 2012, 03:47:11 AM

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.
149621 Posts in 21098 Topics by 7537 Members
Latest Member: lotte2
* Home Help Search Login Register
Pages: [1]   Go Down
Print
Author Topic: wbX2.7 - A version of wb2.7 that dosn't use physical php pages  (Read 1138 times)
fsuk

Offline Offline

Posts: 127



« on: August 18, 2008, 02:16:18 PM »

STILL IN DEVELOPMENT
Change files attatched. Does not yet support the Menu Link module and still uses php pages for news posts.

Compatability with none standard modules is unknown.


This branched of from what i did here: http://www.websitebaker2.org/forum/index.php/topic,9976.0.html

The idea is to remove all physical .php pages from the pages folder and to use a .htaccess rewrite engine to silenlty redirect the user to the baker.php page and pass it the varibale of the page link, baker.php then uses the database to match the page link to a page id and then retrives the page.

Intrestingly a similar idea is in development for WB 3, but i dont like waiting. See here: http://projects.websitebaker.org/websitebaker3/wiki/DatabaseForData


Advantages:
No /pages/... .php in URL
Reduces problems caused by permsions.

Requires server permisions to use .htaccess and Apache module mod_rewrite

Done:
Added .htaccess file
Added baker.php file
-Retrieve data
-Redirect to 404 search
Modified search/search.php to accept 404 and 403 and to remove '-' and '/'
Modified admin/pages/add.php to prevent file creation.
Modified framework/class.wb.php remove PAGES_DIRECTORY & PAGE_EXTENSION from function page_link($link)

To do:
Sort out what to do with news posts
Decide what to do with the PAGES_DIRECTORY variable
Add on/off option to WB settings.


Install:
Install wb 2.7 and then the attatched files to your server replacing the existings files.
--As this is still in development dont actualy implement it on a live system as it is no where near finished. Always make a backup--
« Last Edit: August 18, 2008, 03:57:37 PM by fsuk » Logged

You say deviant like its a bad thing...
doc
Guest
« Reply #1 on: August 18, 2008, 03:44:29 PM »

Hello,

thanks for sharing the code. Have you already tested your code for other modules? As far as I remember, this was the main issue with a solution posted by Ryan about 1.5 year ago in the WB forum.

Regards Christian
Logged
fsuk

Offline Offline

Posts: 127



« Reply #2 on: August 18, 2008, 03:54:02 PM »

Im still working on it but at the moment:

WYSIWYG - OK
CODE - OK

NEWS - OK but still uses .php pages for posts
FORM - Submit button dosn't work, htaccess issue
WRAPPER - OK
MENU LINK - Still looks in pages direcrtoy.

I will try and fix these problems, but the way i've moded wb other modules shouldn't have too much trouble as they can still create component files themselves in the pages directory such as for news posts.
Logged

You say deviant like its a bad thing...
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!