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.

Vanilla to WP theme

edited November 2006 in Vanilla 1.0 Help
OK, i am going to try and be as clear about this as possible. I use to use a plugin for WP, called xdforum. This forum would integrate into the theme of my WP theme. Example: www.mytimewithgod.net/xdforum. Notice how this page has both sidebars and a WP header and footer. Now, goto www.mytimewithgod.net/forum, you will see the Vanilla forum does not integrate into my WP theme. I want Vanilla to "appear" just as the xdforum did; in the "content area of my site with both sidebars and a WP header and footer. Path of WP is /doc_root and path for Vanilla is /doc_root/forum. I am not a php guru (like Mark) but it seems that WP and Vanilla are not aware of each other as far as the theme goes (i DO have it integrated with users (DB)). I have been to the devlounge site and tried their suggestion to no avail (it seems like they are doing something different than i want to do (using a header banner)). I have tried to add a function to Vanilla head.php, called <?php get_bp_header(); ?> and get a call to undefined function error. I then tried to tell the Vanilla head.php file where the functions.php file is (which has the function) and get a WP cache error. Now i am completely lost. I have also asked this question on the WP forum and no one seems to be able to help. can someone here help me with this?
«1

Comments

  • Hi, If you're going to be integrating the themes, I think the first thing you should be including this in your vanilla theme's head.php inside the <head> tag is: <?php require('../wp-blog-header.php'); ?> # you may need to correct this path to be correct Hope that helps, Rachel
  • Here is the Vanilla head.php file from my "themes" folder: <?php // Note: This file is included from the library/Framework/Framework.Control.Head.php class. $HeadString = '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="'.$this->Context->GetDefinition('XMLLang').'"> <head> <title>'.$this->Context->Configuration['APPLICATION_TITLE'].' - '.$this->Context->PageTitle.'</title> <link rel="shortcut icon" href="'.$this->Context->StyleUrl.'favicon.ico" />'; if (is_array($this->StyleSheets)) { while (list($Key, $StyleSheet) = each($this->StyleSheets)) { $HeadString .= ' <link rel="stylesheet" type="text/css" href="'.$StyleSheet['Sheet'].'"'.($StyleSheet['Media'] == ''?'':' media="'.$StyleSheet['Media'].'"').' />'; } } if (is_array($this->Scripts)) { $ScriptCount = count($this->Scripts); $i = 0; for ($i = 0; $i < $ScriptCount; $i++) { $HeadString .= ' <script type="text/javascript" src="'.$this->Scripts[$i].'"></script>'; } } if (is_array($this->Strings)) { $StringCount = count($this->Strings); $i = 0; for ($i = 0; $i < $StringCount; $i++) { $HeadString .= $this->Strings[$i]; } } $BodyId = ""; if ($this->BodyId != "") $BodyId = ' id="'.$this->BodyId.'"'; echo $HeadString . '</head> <body'.$BodyId.' '.$this->Context->BodyAttributes.'>'; ?> I have put that line inbetween the < head > tag and i get this now: Parse error: parse error in /srv/www/htdocs/forum/themes/head.php on line 12 I have put that line all over the place in this file and get the same error. However, it does give me some of the forum page. Look here www.mytimewithgod.net/forum Thanks for any help!
  • Can anyone help me in this matter? willing to pay monies :)
  • Make sure you don't add the <?php tags in again - since the whole head.php file is php.
  • Yes, i am aware of this. So, when just require('../wp-blog-header.php'); and in between the <head> tags, i get the same error. Also, the "require" part is red. When i move it out of the <head> tags, the "require" part is green (like it is suppose to be).
  • OK, look (www.mytimewithgod.net/forum/people.php), i can change the people.php file to the way i want the head.php. why can i not change the forum (once you are logged in) to look like the people.php (sign-on) page? I think i am modifying the wrong file (head.php)?
  • Can no one help me mod this file to "fit" into my WP theme? How about if you have access to the files directly, would this help? I can proved direct access. Thanks for any help.
  • That's a very nice WP design. I will try to help you as I've seen your posts not only here but also on the WP forum.
  • Thank you for the kind words and any help! Will you be needing direct access?
  • Let me ask a question to cut through all the posts. Do you only want the integration to be purely cosmetic (look like your WP blog) or do you want complete integration with users, etc.? I think you only want to make Vanilla look like your blog, but I want to be sure.
  • edited September 2006
    That is correct. I have used Mark's "how-to" to integrate the users/DB. Purely cosmetic. I also wanted to mention that i can be reached on aim, carnold0201 (if you have aim). This may avoid many posts on this thread/forum.
  • Do you want the forum to appear in the wp content area when you click on the link such that the header, footer and sidebars are retained?
  • Correct.
  • edited September 2006
    In looking through the forum posts for vanilla and wp and looking at the vanilla doc, there are 3 ways in which to do this integration: modify the Vanilla files, create an extension to avoid modifying the Vanilla files, and create a page template to be used in WP in which to contain the forum.

    In looking at your site which is a 3-column site like mine, the content area will not hold the forum. It is too wide, at least the way I am doing it for my site. I had to remove the sidebars, keeping the header and footer. If this is not okay for you, how would you get the forum to fit?

    If you want to see how this looks, click here. Then look for "My forum" link in the right sidebar and click on it.
  • edited September 2006
    I am comfortable with modd'ing the Vanilla files. But which ever one will accomplish my goal ("fit" Vanilla into the content area). So, there is no way to "shrink" the vanilla forum (wherever it is, CSS or something)? Thanks again for the help! I do remember seeing some post on WP that integrated phpbb into the WP theme and this person was able to "shrink" the phpbb forum into the theme. I may have to search again for that post. *EDIT* that didn't take long, here is one of them http://www.lejournaldemourial.com/forums/. It looks like their forum is down or something but you will see that it is integarted into the content area at about 60% of the page
  • I tried the easiest solution first - to add a WP page and put an iframe in it with the forum url and add a customized page template.

    I will try modifying the Vanilla code next.
  • When i integrate other files into the WP theme, i usually have to put <?php require('../wp-blog-header.php');?> in the file being integrated. Here are some samples http://www.mytimewithgod.net/kjvdict/indexFRMB01C001.php Here is the original file http://www.mytimewithgod.net/kjvdict/indexFRMB01C001.htm You will see on the original file, it is 100% of the page. When i made it integrate into my WP theme, it automagically "fit" into my theme. I did not have to do anything to the htm file except put <?php require('../wp-blog-header.php');?> and the call to get the sidebar, header and footer. My theme is a fluid theme (i don't know if that has anything to do with it) but as i said before, it fit without any modifications (except <?php require('../wp-blog-header.php');?> and the call to get the sidebar, header and footer). Shouldn't i be able to do this with the Vanilla forum?
  • From what I read, that is not in the instructions (unless I missed it).
  • Not sure if it is in the instructions or not, but this is how people on the WP forum have told me how to integrate external web pages into WP theme. did you see the links? The php link has <?php require('../wp-blog-header.php');?> and the call to get the sidebar, header and footer and is integrated into the theme. The htm link does not have <?php require('../wp-blog-header.php');?> and the call to get the sidebar, header and footer and is not integrated into the theme. How about i give you access to my wp-admin page so you can look first hand at the vanilla head.php file. While you are there, put in <?php require('../wp-blog-header.php');?> and watch the file changes colors (which makes me think i am just not putting <?php require('../wp-blog-header.php');?> in the right place). Thanks again for your help.
  • Well, i am still trying this :) See www.mytimewithgod.net/people.php to see that page is completely (all reset link and apply links) integrated with my WP theme. And all i had to do was add was <?php require('../wp-blog-header.php');?> and the call to get the sidebar, header and footer. And of course, adjust some Vanilla CSS. Now why in the world can i not do that to the Vanilla head.php file?
This discussion has been closed.