如何在 vbulletin 4.2 中添加 wordpress 页眉和页脚 [英] how to add wordpress header and footer in vbulletin 4.2

查看:34
本文介绍了如何在 vbulletin 4.2 中添加 wordpress 页眉和页脚的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 wordpress 开发 vbulletin 4.2.我需要 wordpress 页眉和页脚,因为我有一些关于 url 的教程:- http://bythegram.ca/2012/07/tutorials/wordpress-meets-vbulletin/ 我已经按照给定的教程完成了但没有成功.

 文件包含在 vbulletin 论坛页面中,但未显示在 vbulletin 中.请帮帮我.提前致谢.

问候

解决方案

经过长时间的搜索,我找到了解决方案......我想与所有使用 vbulletin 的人分享它......

WordPress 与 vBulletin 相遇:

所以你有一个 vBulletin 论坛和一个 WordPress 网站,但它们之间的关系并不好.

本教程将通过将您的页眉、页脚和侧边栏(如果有).

首先,如果您喜欢在 WordPress 中工作,对不起,这实际上更像是 vBulletin 插件/模板中的教程,不过别担心,这很容易.

第 1 步:

创建一个 WP 头插件:

钩子位置:global_start标题:WP 标题执行顺序:5(或默认)

ob_start();包括('../wp-load.php');include('../wp-content/themes/rt_iridium_wp/header2.php');$globalWPHeader= ob_get_contents();ob_end_clean();$preRegister['globalWPHeader'] = $globalWPHeader;vB_Template::preRegister('header', $preRegister);

<块引用>

说明:包含‘../htdocs/wp-load.php’;这条线正在寻找对于您的wp-load.php"文件,请根据您的情况更改位置设置.包括(‘../htdocs/wp-content/themes/gazette/header.php’);找到您的header.php"文件,相应地更改位置.$wp_header= ob_get_contents();

将‘header.php’内容分配给变量$wp_header

编辑标题模板:

样式管理器-编辑模板-标题:

我确定您的标题模板看起来与我的略有不同但这是您包含 $wp_header 插件,它将插入您的wordpress 标题进入您的 vBulletin 论坛.

{vb:raw $globalWPHeader}

通过admincp在vbulletin的模板头部添加这一行.

谢谢

I am working on the vbulletin 4.2 with wordpress. I need wordpress header and footer for that I got some tutorial on url :- http://bythegram.ca/2012/07/tutorials/wordpress-meets-vbulletin/ I have done accroding to the given tutorial but didnt get success.

  The files are included in the vbulletin forum page but they are not showing on vbulletin.

  Please help me out. Thanks in advance.

Regards

解决方案

After a Long Search I got the solution... And I want to share it will all the person who is working with vbulletin...

WordPress meet vBulletin:

So you have a vBulletin Forum and a WordPress website but they just don’t play nice with each other.

This tutorial will help trick your vBulletin Forum to look and feel like your WordPress site by integrating your header, footer and sidebars (if you have them).

First if you love working in WordPress, I’m sorry, this is actually more of a tutorial in vBulletin plugin/templates, but don’t worry it is easy.

Step 1:

Create a WP Header Plugin:

Hook Location: global_start Title: WP Header Execution Order: 5 (or default)

ob_start();
include('../wp-load.php');
include('../wp-content/themes/rt_iridium_wp/header2.php');
$globalWPHeader= ob_get_contents();
ob_end_clean();

$preRegister['globalWPHeader'] = $globalWPHeader;
vB_Template::preRegister('header', $preRegister);

explaination: include ‘../htdocs/wp-load.php’; This line is looking for your ‘wp-load.php’ file so change the location according to your setup. include(‘../htdocs/wp-content/themes/gazette/header.php’); Finds your ‘header.php’ file, change location accordingly. $wp_header = ob_get_contents();

Assigns the ‘header.php’ content to the variable $wp_header

Edit the header Template:

Style Manager-Edit Templates-header:

I’m sure you’re header template will look a little different from mine but this is were you include $wp_header plugin which will insert your wordpress header into your vBulletin forum.

{vb:raw $globalWPHeader}

Add this line in header of template of the vbulletin via admincp.

Thanks

这篇关于如何在 vbulletin 4.2 中添加 wordpress 页眉和页脚的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆