Not signed in (Sign In)

Categories

Vanilla 1.1.8 is a product of Lussumo. More Information: Documentation, Community Support.

Help keep Vanilla free:
Welcome Guest!
Want to take part in these discussions? If you have an account, sign in now.
If you don't have an account, apply for one now.
    • CommentAuthorcarnold
    • CommentTimeSep 4th 2006
     # 1
    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?
    • CommentAuthorcre8d
    • CommentTimeSep 5th 2006
     # 2
    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
    • CommentAuthorcarnold
    • CommentTimeSep 5th 2006
     # 3
    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!
    • CommentAuthorcarnold
    • CommentTimeSep 5th 2006
     # 4
    Can anyone help me in this matter? willing to pay monies :)
    • CommentAuthorcre8d
    • CommentTimeSep 5th 2006
     # 5
    Make sure you don't add the <?php tags in again - since the whole head.php file is php.
    • CommentAuthorcarnold
    • CommentTimeSep 5th 2006
     # 6
    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).
    • CommentAuthorcarnold
    • CommentTimeSep 6th 2006
     # 7
    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)?
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006
     # 8
    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.
    •  
      CommentAuthorjimw
    • CommentTimeSep 7th 2006
     # 9
    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.
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006
     # 10
    Thank you for the kind words and any help! Will you be needing direct access?
    •  
      CommentAuthorjimw
    • CommentTimeSep 7th 2006
     # 11
    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.
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006 edited
     # 12
    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.
    •  
      CommentAuthorjimw
    • CommentTimeSep 7th 2006
     # 13
    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?
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006
     # 14
    Correct.
    •  
      CommentAuthorjimw
    • CommentTimeSep 7th 2006 edited
     # 15
    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.
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006 edited
     # 16
    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
    •  
      CommentAuthorjimw
    • CommentTimeSep 7th 2006
     # 17
    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.
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006
     # 18
    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?
    •  
      CommentAuthorjimw
    • CommentTimeSep 7th 2006
     # 19
    From what I read, that is not in the instructions (unless I missed it).
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006
     # 20
    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.
    • CommentAuthorcarnold
    • CommentTimeSep 7th 2006
     # 21
    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?
    • CommentAuthorcarnold
    • CommentTimeSep 8th 2006
     # 22
    JW, check it out www.mytimewithgod.net/forum
    •  
      CommentAuthorjimw
    • CommentTimeSep 8th 2006
     # 23
    Great job! I keep on getting errors.
    • CommentAuthorcarnold
    • CommentTimeSep 8th 2006
     # 24
    Errors on my site or are you trying to do the same with yours? If you are trying to do the same with yours, here is what i had to do (thanks to the help of filosofo at WP forums):
    1)<?php require('./wp-blog-header.php'); ?> (make sure your path to the wp-blog-header is correct) at the bottom of the Vanilla file conf/database.php, nowhere else.
    2)Near the top of Vanilla's library/Framework/Framework.Class.MySQL.php you should see this:

    class MySQL extends Database {
    function CloseConnection() {
    if ($this->Connection) @mysql_close($this->Connection);
    }

    Add a line so it looks like this instead:

    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);
    }
    3)in head.php, very top of file, put in your call for the sidebar, header (<?php get_header(); ?>)
    4)in foot.php, put your call for your footer (<?php get_footer(); ?>

    My calls for the sidebar, header and footer were different than what i typed here and yours may be too.
    I have to do some CSS work and you may have to also. My DB is integrated according to Mark's instructions here at Lussomo.
    Hope this works for you. Let me know how it goes.
    •  
      CommentAuthorjimw
    • CommentTimeSep 9th 2006
     # 25
    They were my wp errors, not yours. I will try what you have described above. I don't have mine integrated, just want to get the look of the theme. Thank you.
    • CommentAuthorcarnold
    • CommentTimeSep 9th 2006
     # 26
    No problems, my friend. Thank you for the help!
    •  
      CommentAuthorStriker
    • CommentTimeNov 25th 2006 edited
     # 27
    carnold, thanks for your solution! I started with your, but ended with slightly different approach:
    http://melnikov.net.ru/vanilla-and-wordpress-integration/en/
Add your comments
    Username Password
  • Format comments as