Home
Download
Add-ons
Help
Forum
Organisation
Project
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 27, 2012, 01:35:55 AM
1 Hour
1 Day
1 Week
1 Month
Forever
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
.
155555
Posts in
21715
Topics by
7737
Members
Latest Member:
gx-world
WebsiteBaker Community Forum
English
Help & Support
(Moderators:
Argos
,
badknight
)
Integrating WordPress and websitebaker
Pages: [
1
]
Go Down
Author
Topic: Integrating WordPress and websitebaker (Read 3096 times)
evildmp
Offline
Posts: 64
Integrating WordPress and websitebaker
«
on:
January 14, 2007, 03:40:06 PM »
I am extremely pleased with the work I have done with WebsiteBaker at
http://vurt.org
especially on the design side (check out those rounded borders! the 100% valid XHTML! the 100% CSS-based styling! and particularly the great <h2> headings, for example on
http://vurt.org/pages/learning-support/essays-and-articles/what-i-learned-at-school.php
).
See
http://vurt.org/pages/about.php
for more information.
Anyway, I want to add a weblog to the site, using WordPress, and I want it integrated into the design. So I need to add a menu link to the WordPress pages (easy enough to do in WB) but I also want my WB menu to appear in WordPress pages.
So I guess I need to add some PHP to the WordPress templates, to get them to read in the menus from WB's MySQL database.
I also wondered about having WB and WordPress share a database (and each would use tables with a prefix, to avoid the danger of them writing over each other's tables).
Before I start exploring this myself, has anyone done something similar?
Daniele
Logged
kweitzel
Forum administrator
Offline
Posts: 6977
Re: Integrating WordPress and websitebaker
«
Reply #1 on:
January 14, 2007, 04:26:51 PM »
Haven't done that, but I would say, it is no problem using the same DB for that. I used 1 DB with more than 1 WB installation without issues.
You could maybe call the menu directly by making an include in the WP Template ... since they are both running on the same DB, you wouldn't even have to redeclare DB connections etc ...
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
evildmp
Offline
Posts: 64
Re: Integrating WordPress and websitebaker
«
Reply #2 on:
January 21, 2007, 10:55:31 AM »
Quote from: kweitzel on January 14, 2007, 04:26:51 PM
You could maybe call the menu directly by making an include in the WP Template ... since they are both running on the same DB, you wouldn't even have to redeclare DB connections etc ...
I now have WebsiteBaker and WordPress running happily on the same database.
So, I'm trying to get WordPress to use WB's show_menu functions.
I think this is what I need to do:
In WP's index.php, I make a call to require the WB file which includes the definition of the show_menu functions
then wherever I need them in WP, I can call those functions as I would in WB.
However, as soon as I add:
Quote
require('../frameworks/class.frontend.php');
into WP's index.php, it simply executes class.frontend.php, coming out of WP and going back to the WB front page.
Thanks for any suggestions.
Daniele
Logged
evildmp
Offline
Posts: 64
Re: Integrating WordPress and websitebaker
«
Reply #3 on:
January 21, 2007, 02:12:39 PM »
Success!
This is what I did:
In index.php of WordPress I added:
Quote
define('WB_PATH', '/var/www/vurt/public_html');
define('DB_TYPE', 'mysql');
define('DB_HOST', 'localhost');
define('DB_USERNAME', 'xxx');
define('DB_PASSWORD', 'xxx');
define('DB_NAME', 'xxx');
define('TABLE_PREFIX', 'wb_');
define('WB_URL', '
http://vurt.org
');
require_once(WB_PATH.'/framework/initialize.php');
require_once(WB_PATH.'/framework/class.frontend.php');
// Create new frontend object
$wb = new frontend();
// Figure out which page to display
// Stop processing if intro page was shown
$wb->page_select() or die();
// Collect info about the currently viewed page
// and check permissions
$wb->get_page_details();
// Collect general website settings
$wb->get_website_setting
s();
// Load functions available to templates, modules and code sections
// also, set some aliases for backward compatibility
require(WB_PATH.'/framework/frontend.functions.php');
This has to go in before anything else is required in index.php.
Daniele
Logged
kweitzel
Forum administrator
Offline
Posts: 6977
Re: Integrating WordPress and websitebaker
«
Reply #4 on:
January 21, 2007, 02:26:34 PM »
I was just testing in the same direction ...
... but won't bother now since you made it.
[EDIT]
btw, I like your integration approac
h
[/EDIT]
cheers
Klaus
«
Last Edit: January 21, 2007, 02:29:19 PM by kweitzel
»
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
evildmp
Offline
Posts: 64
Re: Integrating WordPress and websitebaker
«
Reply #5 on:
January 24, 2007, 10:51:44 PM »
OK, next step in integrating WebsiteBaker and WordPress.
I want to pass some variables to the WebsiteBaker modules I call from within WordPress.
For example, at the moment I call show_menu from WordPress, which works well, but I want the show_menu fuction to add a class="currentpage" to the link for the page we're on.
What happens is that the WebsiteBaker modules think that I'm currently on the home page of the site.
WordPress is in my WebsiteBaker installation, on a Menu Link of page_id=32. How can I get WordPress to set $page_id to 32, so that when it calls the WebsiteBaker modules WebsiteBaker returns the results I want?
Is this even going to be possible?
Daniele
Logged
evildmp
Offline
Posts: 64
Re: Integrating WordPress and websitebaker
«
Reply #6 on:
January 24, 2007, 11:40:22 PM »
Quote from: evildmp on January 24, 2007, 10:51:44 PM
WordPress is in my WebsiteBaker installation, on a Menu Link of page_id=32. How can I get WordPress to set $page_id to 32, so that when it calls the WebsiteBaker modules WebsiteBaker returns the results I want?
Well, I have found a really ugly way of doing it; in WordPress's index.php I add:
define('PAGE_ID', '32');
and that seems to do the trick. But it's not very nice.
Also, for my next trick I was going to try to get something going in WordPress with websitebaker's breadcrumbs, and I don't think I can build on this for that.
Daniele
Logged
kweitzel
Forum administrator
Offline
Posts: 6977
Re: Integrating WordPress and websitebaker
«
Reply #7 on:
January 25, 2007, 08:44:37 AM »
Actually the way you integrated the WB index file, you should be able to call all the internal WB function (including the breadcrumb function ...)
cheers
Klaus
Logged
WebsiteBaker Org e.V. - for WebsiteBaker
Argos
Moderator
Offline
Posts: 2161
Re: Integrating WordPress and websitebaker
«
Reply #8 on:
July 13, 2008, 10:51:11 AM »
I want to try to do something similar with an articles script (interspire website publisher), but since they are on different databases, I cannot us this directly. I am no coder, so I'm lost. Is there a way to call the WB database even though the "defines" are the same? I guess these are the commands that go wrong:
//define('DB_USERNAME', 'xxx');
//define('DB_PASSWORD', 'xxx');
//define('DB_NAME', 'xxx');
So is there a way to say something like this (in psuedo code):
//define WB_DB ('DB_USERNAME', 'xxx');
//define WB_DB ('DB_PASSWORD', 'xxx');
//define WB_DB ('DB_NAME', 'xxx');
Or should they really share databases? And if so, can I easily copy/move the current WB database data into the other one and edit the WB install accordingly? Or would it be easier to just do a new install into that database and rebuild pages and menu?
------------------------------- edit----------------------------
I got it working by adding a wb_ prefix to all tables of the WB database, copying the WB db into the Interspire db, editing the WB config to use the new db, saving the WB menu as a separate php file (menu.php), adding the above code to that menu file, and including the menu file into the Interspire main template. Works like a charm. I'll post an URL when the site is finished.
«
Last Edit: July 13, 2008, 12:15:20 PM by Argos
»
Logged
Jurgen Nijhuis
Argos Media
Heiloo, The Netherlands
WB Showcase:
http://www.mywebsitebaker.com/pages/showcase.php?v&category_id=1242&count=30
----------------------------------------------------------------
Please don't request personal support, use the forums!
flaa
Offline
Posts: 1
Re: Integrating WordPress and websitebaker
«
Reply #9 on:
September 19, 2008, 09:50:26 AM »
Quote from: evildmp on January 21, 2007, 02:12:39 PM
Success!
This is what I did:
In index.php of WordPress I added:
(block of code)
Hello evildmp, I'm glad you've explored this integration task. I have tried integrating WP and WB without success. I tried using your approach but I think something is not working. What I have achieved so far is this: Wordpress can render the navigation menu from WebsiteBaker but by achieving this the Wordpress blog entries do not render, even though everything else does. So it's still an either-or situation, they just don't play together. I suspect there might be a collision with WP and WB database related definitions but I can't figure out where and why. Are you sure the operations you mentioned were everything that you did? To get the whole page to render I had to add this bit to the code you presented:
$page_id = 11;
The page id number has to be > 0. So if it's not even rendering without that I must be doing something very wrong, right?
Logged
lehrer
Offline
Posts: 2
Re: Integrating WordPress and websitebaker
«
Reply #10 on:
September 22, 2009, 03:56:48 PM »
Hi,
Has anyone here an idea on how to do this for the newest release?
Logged
Pages: [
1
]
Go Up
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> General Announcements
=> Security Announcements
=> Documentation
=> WebsiteBaker Website Showcase
=> Guest Area & Off-Topic
-----------------------------
English
-----------------------------
=> WebsiteBaker 2.9
===> Announcements
===> Help/Support
=====> Modules / Extensions
===> Suggestions
===> Software bugs
=> Help & Support
=> Modules
=> Droplets (PHP code for use with Droplet module) & Snippets (raw PHP code)
=> jQuery
=> Templates, Menus & Design
=> WebsiteBaker Language Files
=> WebsiteBaker 2.x discussion
=> WebsiteBaker 3
=> Archive (posts up to 2007)
-----------------------------
Deutsch (German)
-----------------------------
=> Ankündigungen
=> WebsiteBaker 2.9
===> Ankündigungen
===> Hilfe/Support
=====> Module / Extensions
===> Vorschläge
===> Softwarefehler
===> Erfahrungs und Testberichte
=> Hilfe/Support
=> Module & Snippets
=> Templates & Design
=> Tutorials
=> jQuery
=> Diskussion über WB
=> Off-Topic
=> Archiv für Themen bis 2007
-----------------------------
Nederlands (Dutch)
-----------------------------
=> Aankondigingen
=> Hulp & Ondersteuning
=> Niet-Terzake (Off Topic)
-----------------------------
Francais (French)
-----------------------------
=> Help/Support
-----------------------------
Italiano (Italian)
-----------------------------
=> Help/Support
-----------------------------
Bakery (WB shop module)
-----------------------------
=> Bakery English
=> Bakery Deutsch
-----------------------------
KeepInTouch (Multi Contact Module)
-----------------------------
=> KeepInTouch English
=> KeepInTouch Deutsch
Loading...