Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
adding wordpress functions to vanilla
hey,
found an article on the web about how to get wordpress functions to work in the vanilla themes, which would be cool, once you have integrated wp with vanilla.
this is how it should work:
1. add
2. edit the beginning of library/Framework/Framework.Class.MySQL.php so that it looks like this:
seemed easy enough, but i was wrong:
line 18 is
does anyone know a solution to this? i really would like to include some sidebar functions and the same dropdown menu i use on my blog, but it uses wp-functions.
cheers
found an article on the web about how to get wordpress functions to work in the vanilla themes, which would be cool, once you have integrated wp with vanilla.
this is how it should work:
1. add
<?php require_once('../wp-blog-header.php'); ?>
to the end of conf/database.php. that inclues the wp-functions.2. edit the beginning of library/Framework/Framework.Class.MySQL.php so that it looks like this:
class MySQL extends Database {
function CloseConnection() {
if ($this->Connection) @mysql_close($this->Connection);
global $wpdb;
$wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
}
apparently, this needs to be done to reconnect wordpress to the database because vanilla will close the connection early .seemed easy enough, but i was wrong:
Fatal error: Cannot instantiate non-existent class: wpdb in /www/htdocs/forum/library/Framework/Framework.Class.MySQL.php on line 18
line 18 is
$wpdb = new wpdb(DB_USER, DB_PASSWORD, DB_NAME, DB_HOST);
does anyone know a solution to this? i really would like to include some sidebar functions and the same dropdown menu i use on my blog, but it uses wp-functions.
cheers
0
This discussion has been closed.
Comments
that'd be great if you could send the files over. my email address is on my account page. nice work on the integration.
cheers,
bo