Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
whew .... wordpress vanilla integration
TerminalAddict
New
Well after a couple of days of hacking .. learning .. reading . .then hacking some more, I now have a fairly well integrated wordpress and vanilla forum.
http://tivocentral.co.nz/vanilla/
Things I have done.
please note: I have wordpress installed in my web root, and vanilla installed in a subdirectory called vanilla
if you place wordpress and vanilla in different locations you will need to change some of these instructions.
setup single sign on (addon)
1. when initially setting up vanilla don't use the same admin username that you used for wordpress, they will clash later on.
2. followed the single sign on instructions, including the bit about upload the wordpress plugin in to your wp-content/plugins/ directory
3. after successfully setting up single sign on I manually run some sql to get the admin privileges shared across from my wordpress admin user.
3.1 firstly you need to find out the UserID of the wordpress user (it will have a password of ***** (that's right .. 5 asterisks) ) mine was UserID 2
3.2 based on the assumption that your UserID is 2, you will need to run some manual sql like so:
There you have it .. users and administration is now integrated.
Now on to the theme.
1.create a customer wordpress header and footer in your wordpress theme (I called mine vanilla_header.php and vanilla_footer.php)
2. in vanilla_header.php render the vanilla header ( <?php $this->RenderAsset('Head'); ?> )
3. in vanilla create a new theme called wordpress here is a list of files:
5. load the the wordpress variables . .the best place I could find to do this was in vanilla's index.php so right at the top I do this:
5.2 this is the only step that won't survive an upgrade .. if someone could advise a better way to do this, that would be awesome !!!!
I spent quiet a bit of time tuning the vanilla css "just so" .. I will likely still fiddle about with the vanilla menu, as the light blue drop down looks a little out of place.
all is well.
Paul.
http://tivocentral.co.nz/vanilla/
Things I have done.
please note: I have wordpress installed in my web root, and vanilla installed in a subdirectory called vanilla
if you place wordpress and vanilla in different locations you will need to change some of these instructions.
setup single sign on (addon)
1. when initially setting up vanilla don't use the same admin username that you used for wordpress, they will clash later on.
2. followed the single sign on instructions, including the bit about upload the wordpress plugin in to your wp-content/plugins/ directory
3. after successfully setting up single sign on I manually run some sql to get the admin privileges shared across from my wordpress admin user.
3.1 firstly you need to find out the UserID of the wordpress user (it will have a password of ***** (that's right .. 5 asterisks) ) mine was UserID 2
3.2 based on the assumption that your UserID is 2, you will need to run some manual sql like so:
update GDN_UserRole set RoleID=16 where UserID=2;You should now be a forum admin .. visit in your browser to confirm.
update GDN_User set Permissions='arr:{"0":"Garden.Email.Manage","1":"Garden.Settings.Manage","2":"Garden.Routes.Manage","3":"Garden.Messages.Manage","4":"Garden.Applications.Manage","5":"Garden.Plugins.Manage","6":"Garden.Themes.Manage","7":"Garden.SignIn.Allow","8":"Garden.Registration.Manage","9":"Garden.Applicants.Manage","10":"Garden.Roles.Manage","11":"Garden.Users.Add","12":"Garden.Users.Edit","13":"Garden.Users.Delete","14":"Garden.Users.Approve","15":"Garden.Activity.Delete","16":"Vanilla.Settings.Manage","17":"Vanilla.Categories.Manage","18":"Vanilla.Spam.Manage","Vanilla.Discussions.View":["1","2","3"],"Vanilla.Discussions.Add":["1","2","3"],"Vanilla.Discussions.Edit":["1","2","3"],"Vanilla.Discussions.Announce":["1","2","3"],"Vanilla.Discussions.Sink":["1","2","3"],"Vanilla.Discussions.Close":["1","2","3"],"Vanilla.Discussions.Delete":["1","2","3"],"Vanilla.Comments.Add":["1","2","3"],"Vanilla.Comments.Edit":["1","2","3"],"Vanilla.Comments.Delete":["1","2","3"]}' where UserID=2
There you have it .. users and administration is now integrated.
Now on to the theme.
1.create a customer wordpress header and footer in your wordpress theme (I called mine vanilla_header.php and vanilla_footer.php)
2. in vanilla_header.php render the vanilla header ( <?php $this->RenderAsset('Head'); ?> )
3. in vanilla create a new theme called wordpress here is a list of files:
./design/garden.css4. in the default.master.php (in your vanilla theme named wordpress) load the wordpress template like so:
./design/bckmenu.png
./design/menu.css
./design/conversations.css
./design/profile.css
./design/activity.css
./design/button_bg2.png
./design/reset.css
./design/vanilla.css
./about.php
./views/default.master.php
./views/profile/password.php
<?php include_once( TEMPLATEPATH . '/vanilla_header.php' ); ?>
5. load the the wordpress variables . .the best place I could find to do this was in vanilla's index.php so right at the top I do this:
<?php5.1 interesting note .. most people advise to load wp-blog-header.php however this will cause 404 headers if you have friendly permalinks turned on in wordpress (there is even post on this forum asking about this problem)
// PAUL WAS HERE
require_once('../wp-config.php');
$wp->init();
$wp->register_globals();
?>
5.2 this is the only step that won't survive an upgrade .. if someone could advise a better way to do this, that would be awesome !!!!
I spent quiet a bit of time tuning the vanilla css "just so" .. I will likely still fiddle about with the vanilla menu, as the light blue drop down looks a little out of place.
all is well.
Paul.
1
Comments
If I had this information two days ago life would have been a lot easier. I have however learnt a fair amount of how themes and views work in garden ...
I'd like to better load wp variables (putting in the index.php is just asking for trouble I reckon)
http://vanillaforums.org/page/PHPMasterView
bummer really .. I'll just have to make a note of it before I upgrade
//edit: I plan to go even further and integrate Wordpress comments with Vanilla, so a second addon is inevitable for me anyway.
code:
./design/garden.css
./design/bckmenu.png
./design/menu.css
./design/conversations.css
./design/profile.css
./design/activity.css
./design/button_bg2.png
./design/reset.css
./design/vanilla.css
./about.php
./views/default.master.php
./views/profile/password.php
I can find some of them, and others i can't. Am i looking hard enough? If not where should i get these files from?
any ideas?
@Wellsy89
Garden has evolved considerably .. it could quite well be in a different place.
tail -f /var/log/apache2/error.log
is your friend