Getting a function To Work For Vb

hello,

I’m trying to add this in plug both for header and footer.What I’m trying to do is incorporate the wordpress skin with vb.It worked on my local server but going live its not working

example for header

ob_start();
include(‘../path/to/wp-load.php’);
include(‘../blog/wp-content/themes/sandbox/header.php’);
$wp_header = ob_get_contents();
ob_end_clean();

then in header template at very top i would add

$wp_header

then example for footer plugin

ob_start();
include(‘../blog/wp-content/themes/sandbox/footer.php’);
$wp_footer = ob_get_contents();
ob_end_clean();

the in footer template i will add this to the very end

$wp_footer

going live i get this error

Warning: include(xxxxxxx/htdocs/xxxx/forums/wp/themes/OneTheme/header.php) [function.include]: failed to open stream: No such file or directory in [path]global.php(400) : eval()’d code on line 3

Warning: include(xxxxxx/htdocs/xxx/forums/wp/themes/OneTheme/header.php) [function.include]: failed to open stream: No such file or directory in [path]global.php(400) : eval()’d code on line 3

Warning: include() [function.include]: Failed opening ‘xxxx/htdocs/xxx/forums/wp/themes/OneTheme/header.php’ for inclusion (include_path=’.;D:wwwserverPHP5PEAR’) in [path]global.php(400) : eval()’d code on line 3

thank you

Views: 24

8 thoughts on “Getting a function To Work For Vb”

  1. puertoblack2003 dit :

    the path is correct when i set it up..

  2. nexia dit :

    the error is simple to correct. at the begining of your process, you set it that way:
    [php]
    ob_start();
    chdir(‘../blog/’);
    # here you put everything
    chdir(DIR);
    ob_end_clean();[/php]

    what this will do is redirect all script activity to your blog level, and then you come back to your origin *(DIR is a defined variable)

  3. puertoblack2003 dit :

    @nexia 22821 wrote:

    the error is simple to correct. at the begining of your process, you set it that way:
    [php]
    ob_start();
    chdir(‘../blog/’);
    # here you put everything
    chdir(DIR);
    ob_end_clean();[/php]

    what this will do is redirect all script activity to your blog level, and then you come back to your origin *(DIR is a defined variable)

    man having a hard time with this..I’m gonna take a break and start over..thanks nexia

  4. puertoblack2003 dit :

    ok i went back and tackled it. i used yours but i couldn’t get it to work right. so i reverted back to my previous

    ob_start();

    include(‘G:xxx/xxx/htdocs/xxx.com/wp/wp-load.php’);

    include(‘G:/xxxx/htdocs/xxx.com/wp/wp-content/themes/star-mag/header.php’);

    $wp_header = ob_get_contents();

    ob_end_clean();

    that’s for the header now i later found out that one of the wordpress plugin was causing a conflict so i removed every single plugin till i get this right.Now everything is working well using that code.But now i’m stumped because now i can’t make any post. The error i’m getting is

    Invalid Forum specified. If you followed a valid link, please notify the administrator

    I’m willing to donate a few dollars if you can get this sorted. thanks

  5. nexia dit :

    i will not be able to sort it out actually, your code is making vBulletin nervous, as WordPress is parsing any $_REQUEST and delete them afterward, making any page load without any information…

    vBulletin is not made to be “integrated” for templates, even 4.0 will not be, even if they promised a bridge. You can not clearly integrate vBulletin inside a header/footer because the engine can only do the opposite, integrate a tool inside vBulletin. it’s done on purpose.

    btw, your best shot would be to replicate your header/footer in html and insert them directly in the header/footer templates of vBulletin.

  6. puertoblack2003 dit :

    @nexia 22827 wrote:

    i will not be able to sort it out actually, your code is making vBulletin nervous, as WordPress is parsing any $_REQUEST and delete them afterward, making any page load without any information…

    vBulletin is not made to be “integrated” for templates, even 4.0 will not be, even if they promised a bridge. You can not clearly integrate vBulletin inside a header/footer because the engine can only do the opposite, integrate a tool inside vBulletin. it’s done on purpose.

    btw, your best shot would be to replicate your header/footer in html and insert them directly in the header/footer templates of vBulletin.

    thanks nexia i understand.I tried and did your method and i thought it will be complicated but it tuned out to be ok with a little tweaking ..I’m good now.

    Oh by the way that was not my code i happen to find it here http://depressedprogrammer.wordpress.com/2009/07/06/integrating-vbulletin-with-a-wordpress-theme/
    [/CODE] and decided to try it..

    pb[CODE]http://depressedprogrammer.wordpress.com/2009/07/06/integrating-vbulletin-with-a-wordpress-theme/
    [/CODE] and decided to try it..

    pb

  7. nexia dit :

    yeah, i was aware of the source, and as i work with WordPress for ages, i knew what was the problem… 🙂

    it’s always a try/burn test… lol

  8. puertoblack2003 dit :

    @nexia 22833 wrote:

    yeah, i was aware of the source, and as i work with WordPress for ages, i knew what was the problem… 🙂

    it’s always a try/burn test… lol

    lol..yea after i found out that one of the wordpress plugin was causing a minor error using the above codes.I then deactivated it. So i used your code.Everything was nice the board was perfectly placed the way i wanted.But i couldn’t post..I hope someone can get it to work.Using that code, it kinda uniformed the forum perfect.

Laisser un commentaire

Ce site utilise Akismet pour réduire les indésirables. En savoir plus sur comment les données de vos commentaires sont utilisées.

En savoir plus sur Un Papa Pro

Abonnez-vous pour poursuivre la lecture et avoir accès à l’ensemble des archives.

Continue reading