hi Chris
here is the detailed instruction on how to integrate wordpress and Bans.First of all you need to decide whether you want to use wordpress on your main domain and Bans on sub folder or vice-versa.
Here in this tutorial I am assuming that we have wordpress on our main domain and bans on the sub folder.
The structure of websites are something like
www.example.com –wodpress installed on main domain
www.example.com/bans //the bans folder ,where bans is installed
in our case the website structure are as
crazyrchelicopters.com
crazyrchelicopters.com/buy-rc-helis/
Now to make a seamless integration,we need to create a wordpress theme and then using the same layout as a Bans theme.
In our case , you don’t have to do anything,as i have already created the bans theme.
1. Upload wordpress theme to themes directory, in our case in wp-content/themes/
2. Upload the bans theme in /buy-rc-helis/themes/chris-theme //bans theme uploaded
3. Activate the wordpress theme.
4. Activate the bans theme ,and you are done, but stop , you are not done yet,
There are 2-3 minor modifications that you have to do to make the themes functional.
1. Open the wp-chris-theme //i.e. the wordpress theme to be integrated.
2. Open the file bansinclude.php from the theme folder,I have included this in wp-chris-theme
3.Go to Line number 2 and locate something like below
2
| $rel_path_to_bans="/buy-rc-helis/"; |
Change the value with the relative path of the bans folder from public_html directory(i.e. from main domain).
4.Go to line number 14 and locate
14
| define("BLOG_BANS_PATH","/buy-rc-helis/"); |
Change the value with the relative path of the Bans installation from wordpress root directory.In our case it is same as the relative path from domain root directory.
5.Save the file and upload it to the themes directory (wp_chris_theme),overwriting the earlier one.
Congrats, you have completed the first part of integration.Now you are done, and Bans is integrated to wordpres
Now you are able to display the Bans categories in the Wordpress sidebar.
Part2:
Integrating wordpress to bans Store(i.e. we will dynamically display all the wordpress categories in the sidebar of bans store).
1.Go to bans theme directory(open chris-theme)
2.Open the file wpbans.php
3.Go to line number 4
4
| $wp_path="/";//path of wordpress installation from root directory of domain |
Change the value with the relative path of the wordpress main installation from the serveres web root.
4.Go to line 17, and locate
17
| define("BLOG_BANS_PATH","/buy-rc-helis/");//modify this line with the relative url of bans store |
Change the value with the relative path of the BANS store from the wordpress installation.
Wow, seems like I am done.uff no, yet,there exists a problem.Your wordpress Installation and integration will work fine, but when you will try to access yor store you will get something error like
Can not redeclare get_extended() in cont/xml.php ,allready declared in wp-include/posts.php
Well this is a conflict caused by wordpress integration to Bans Store,wordpress and Bans both uses a function with name, get_extended(),so there is a fatal error.
After an experiment of a few hour, i found that the get_extended() function is used in BANS in only one file cont/xml.php and there are four calls of it in the file.i manually changed the name get_extended() to get_extended2() and changed all the calls in xml.php appropriately.Wow, now everything is functional and working great.
Ins summary, I will mention again the steps.
1.Upload the wordpress theme wp-chris theme to wordpres theme directory
2.Upload the chris-theme to bans theme directory
3.Activate wordpres theme.
4.Activate the Bans theme
5.Modify the bansinclude.php in wp-chris-theme folder and upload
6.Modify the wpbans.php in chris-theme(bans theme ) and upload
4.Overwrite the /bans/cont/xml.php with the modyfied xml.php in order to avoid the conflict.
5.Go visit the website,you are done.