is there any blog mod that works with icy phoenix?
i found wp united that integrates withs phpbb 2.x.x but i don't know how to install it withs icy phoenix. anyone can help me?
Blog Mod
Subject: Re: Blog Mod
It would be interesting to connect with a blog Icyphoenix Wordpress but on the same host where this forum, but with the news that are published on the portal.
It can be done but it phpBB2
It can be done but it phpBB2
Subject: Re: Blog Mod
i have the mod but it works with phpbb2. the question is that can anyone help me integrated with icy phoenix?
Spoiler: [ Show ]
Spoiler: [ Hide ]
##############################################################
## MOD Title: WP-UNITED WordPress - phpBB Integration Mod
## MOD Author: Jhong < > (John Wells) www.wp-united.com
## MOD Description: Tightly integrates phpBB2 and WordPress.
## MOD Version: 0.9.5-beta
##
## Installation Level: (Medium)
## Installation Time: 35 Minutes
## Files To Edit:
## includes/page_header.php
## includes/page_tail.php
## viewonline.php
## admin/index.php
## includes/bbcode.php
## includes/constants.php
## includes/functions.php
## templates/subSilver/overall_header.tpl
## language/lang_english/lang_main.php
## language/lang_english/lang_admin.php
## login.php
## includes/usercp_register.php
## templates/subSilver/overall_footer.tpl
## includes/usercp_viewprofile.php
## templates/subSilver/viewtopic_body.tpl
## templates/subSilver/profile_view_body.tpl
## templates/subSilver/privmsgs_read_body.tpl
## templates/subSilver/subSilver.cfg
## viewtopic.php
## privmsg.php
##
## Included Files: templates/subsilver/blog.tpl
## blog.php
## wp-united/wordpress-entry-point.php
## wp-united/wp-functions.php
## wp-united/wp-template-loader.php
## wp-united/mod-settings.php
## wp-united/wp-integration-class.php
## wp-united/wpu-actions.php
## wp-united/wpu-plugin.php
## wp-united/wpu-latest-posts.php
## wp-united/wpu-template-funcs.php
## wp-united/widgets.php
## wp-united/abstractify.php
## wp-united/wpu-helper-funcs.php
## wp-united/options.php
## wp-united/cache/cache_readme.txt
## admin/wpu_usermap.php
## admin/admin_wordpress.tpl
## language/lang_english/lang_wordpress_admin.php
## language/lang_english/lang_wp-united.php
## templates/subSilver/blog.tpl
## templates/subSilver/wpu-blogs-homepage.css
## templates/subSilver/images/lang_english/icon_wpu_blog.gif
## templates/subSilver/images/lang_english/wpu_no_avatar.gif
## templates/subSilver/images/lang_english/wpu_unregistered.gif
## templates/subSilver/admin/wordpress_admin_body.tpl
## templates/subSilver/images/wp-united-working.gif
## templates/subSilver/images/wp-united-logo.gif
##
## License: http://opensource.org/licenses/GPL-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: Make sure you follow the instructions in the DIY INSTRUCTIONS section, in order for this MOD to work properly!
##############################################################
## Last updated: 04 June 2007
##
## MOD History: Refer to the included changelog for details.
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
After installing this mod, you must complete the following steps:
STEP 1. Install WordPress before installing this mod, and ensure it is workng properly. If you need help, look at the instructions on the WordPress Codex, here: http://codex.wordpress.org/Installing_WordPress
STEP 2. Go to your phpBB Admin Control Panel, and run the Setup Wizard on the "WP-United" page. Further instructions are included there to help you.
NOTEs:
- You can move/rename the blog.php file to wherever you like. For example, you could have it replace WordPress' index.php if you don't want our WordPress path to change. Just run the setup Wizard after you move it, and set the appropriate location, then open the file and enter the relative path back to your forum.
- You must run the Setup Wizard all the way through, and be able to reach Step 6 error-free. If you don't, then don't expect WP-United to work properly!
- If WordPress is already installed, and you plan to integrate logins, please run the integration mapping tool after running the Setup Wizard.
- You should review the blog.tpl and make any changes necessary if you re not using the stock subSilver theme.
- The "admin" WordPress user will never be integrated. So therefore the phpBB user named "admin" cannot have a corresponding WordPress account. This is for security reasons.
- Whenever you upgrade WP-United or WordPress, you MUST delete any files that have appeared in the WP-United/cache folder. (Don't worry, they will be automatically recreated)
- Additional options can be found in your wp-united/options.php file.
- If you are integrating users, be sure to review the mapping tool in the WP-United Admin Panel every so often to ensure that everything is running smoothly.
#
#-----[ SQL ]------------------------------------------
#
# (Use correct table prefix if not phpbb)
#
CREATE TABLE `phpbb_wpu_integration` (
`fullUri` VARCHAR( 255 ) NOT NULL, `fullPath` VARCHAR( 255 ) NOT NULL,
`wpLogin` TINYINT( 1 ) NOT NULL, `permMapping` VARCHAR( 511 ) NOT NULL,
`showInside` VARCHAR ( 255 ) NOT NULL, `dtdChange` TINYINT ( 1 ) NOT NULL,
`ownBlogs` TINYINT ( 1 ) NOT NULL, `profileBtn` TINYINT ( 1 ) NOT NULL,
`postBtn` TINYINT ( 1 ) NOT NULL, `styleSwitch` TINYINT ( 1 ) NOT NULL,
`installStage` TINYINT ( 1 ) NOT NULL, `blogsEntry` VARCHAR ( 255 ) NOT NULL,
`blogHomePage` TINYINT ( 1 ) NOT NULL, `blogHomeTitle` VARCHAR( 255 ) NOT NULL,
`blogIntro` VARCHAR( 255 ) NOT NULL, `numBlogsPerPage` TINYINT ( 1 ) NOT NULL,
`wpublStyles` TINYINT ( 1 ) NOT NULL, `encoding` VARCHAR ( 32 ) NOT NULL,
`censorPosts` TINYINT ( 1 ) NOT NULL, `wpHdrSimple` TINYINT( 1 ) NOT NULL,
`cssFirst` VARCHAR( 255 ) NOT NULL, `wpPage` VARCHAR( 255 ) NOT NULL,
`pPadding` VARCHAR( 255 ) NOT NULL, `ugRun` TINYINT( 1 ) NOT NULL,
`mustLogin` TINYINT ( 1 ) NOT NULL, `wpuVer` VARCHAR( 32 ) NOT NULL
);
ALTER TABLE phpbb_users ADD user_wpublog_id VARCHAR(10) NULL DEFAULT NULL;
ALTER TABLE phpbb_users ADD user_wpuint_id VARCHAR(10) NULL DEFAULT NULL;
#
#-----[ COPY ]------------------------------------------
#
# Note: blog.php is the entry point to your integrated blog. You can put it anywhere you like, and rename it to anything you
# like, provided you open it and provide the correct path to phpBB where shown. If you want to put it in your WordPress root
# as index.php, it is OK to rename the existing WordPress' index.php to something like index-old.php
copy blog.php to blog.php
copy wp-united/wordpress-entry-point.php to wp-united/wordpress-entry-point.php
copy wp-united/wp-functions.php to wp-united/wp-functions.php
copy wp-united/wp-template-loader.php to wp-united/wp-template-loader.php
copy wp-united/wp-integration-class.php to wp-united/wp-integration-class.php
copy wp-united/mod-settings.php to wp-united/mod-settings.php
copy wp-united/wpu-actions.php to wp-united/wpu-actions.php
copy wp-united/wpu-plugin.php to wp-united/wpu-plugin.php
copy wp-united/wpu-latest-posts.php to wp-united/wpu-latest-posts.php
copy wp-united/wpu-template-funcs.php to wp-united/wpu-template-funcs.php
copy wp-united/wpu-widgets.php to wp-united/wpu-widgets.php
copy wp-united/abstractify.php to wp-united/abstractify.php
copy wp-united/options.php to wp-united/options.php
copy wp-united/cache/cache_readme.txt to wp-united/cache/cache_readme.txt
copy wp-united/wpu-helper-funcs.php to wp-united/wpu-helper-funcs.php
copy admin/admin_wordpress.php to admin/admin_wordpress.php
copy admin/wpu_usermap.php to admin/wpu_usermap.php
copy templates/subSilver/blog.tpl to templates/subSilver/blog.tpl
copy templates/subSilver/wpu-blogs-homepage.css to templates/subSilver/wpu-blogs-homepage.css
copy templates/subSilver/admin/wordpress_admin_body.tpl to templates/subSilver/admin/wordpress_admin_body.tpl
copy templates/subSilver/images/wp-united-working.gif to templates/subSilver/images/wp-united-working.gif
copy templates/subSilver/images/wp-united-logo.gif to templates/subSilver/images/wp-united-logo.gif
copy language/lang_english/lang_wordpress_admin.php to language/lang_english/lang_wordpress_admin.php
copy language/lang_english/lang_wp-united.php to language/lang_english/lang_wp-united.php
copy templates/subSilver/images/lang_english/icon_wpu_blog.gif to templates/subSilver/images/lang_english/icon_wpu_blog.gif
copy templates/subSilver/images/lang_english/wpu_no_avatar.gif to templates/subSilver/images/lang_english/wpu_no_avatar.gif
copy templates/subSilver/images/lang_english/wpu_unregistered.gif to templates/subSilver/images/lang_english/wpu_unregistered.gif
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]--------------------------------------------
#
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//WP-United
require_once($phpbb_root_path . 'wp-united/mod-settings.' . $phpEx);
global $wpSettings;
$wpSettings = get_integration_settings();
//Do a reverse integration?
if ( $wpSettings['showHdrFtr'] == 'REV' ) {
if (empty($gen_simple_header)) {
define('WPU_REVERSE_INTEGRATION', true);
ob_start();
}
}
#
#-----[ FIND ]------------------------------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_BLOG' => $lang['Blog'],
'U_BLOG' => append_sid($wpSettings['blogsUri']),
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
//WordPress Integration MOD -- DTD switcher
//
if ( !empty($wpHeader) ) {
$template->assign_block_vars('switch_wp_dtd', array(
'WP_DTD' => $lang['WP_DTD'])
);
} else {
$template->assign_block_vars('switch_phpbb_dtd', array());
}
#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]--------------------------------------------
#
$template->pparse('overall_footer');
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WP-United
global $pfContent;
if ( defined('WPU_REVERSE_INTEGRATION') ) {
$pfContent = ob_get_contents();
ob_end_clean();
//Now insert phpBB into a wordpress page
include ($phpbb_root_path . 'wp-united/wordpress-entry-point.' . $phpEx);
}
#
#-----[ OPEN ]------------------------------------------
#
viewonline.php
#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "faq.$phpEx";
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_BLOG:
$location = $lang['Blog'];
$location_url = $wpSettings['blogsUri'];
break;
#
#-----[ OPEN ]------------------------------------------
#
admin/index.php
#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_BLOG:
$location = $lang['Blog'];
$location_url = $wpSettings['blogsUri']. "?pane=right";
break;
#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_BLOG:
$location = $lang['Blog'];
$location_url = $wpSettings['blogsUri']. "?pane=right";
break;
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('PAGE_GROUPCP', -11);
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('PAGE_BLOG', -1385);
#
#-----[ FIND ]------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WordPress Integration MOD
define('WP_INT_TABLE', $table_prefix.'wpu_integration');
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
function get_userdata($user, $force_str = false)
{
#
#-----[ BEFORE, ADD ]------------------------------------------
#
global $IN_WP_ADMIN;
if ( !$IN_WP_ADMIN ) {
#
#-----[ FIND ]------------------------------------------
#
global $db;
if (!is_numeric($user) || $force_str)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
global $IN_WORDPRESS;
if ($IN_WORDPRESS) {
return wp_get_userdata($user);
} else { //do standard phpBB function
#
#-----[ FIND ]------------------------------------------
#
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
}
}
#
#-----[ FIND ]------------------------------------------
#
global $db, $board_config;
#
#-----[ AFTER, ADD ]------------------------------------------
#
global $phpbb_root_path, $phpEx;
require_once($phpbb_root_path . 'wp-united/mod-settings.' . $phpEx);
$wpSettings = get_integration_settings();
#
#-----[ FIND ]------------------------------------------
#
$url = preg_replace('#^/?(.*?)/?$#', '/1', trim($url));
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WP-United flexible redirect for blogs
if ( isset($wpSettings) ) {
if ( !(strpos($url, '/wp-united-blog') === FALSE) ) {
$server_protocol = $server_name = $server_port = $script_name = '';
$url = htmlentities(append_sid($wpSettings['blogsUri']));
}
}
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
function make_clickable($text)
{
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if (!function_exists('make_clickable')) {
#
#-----[ FIND ]--------------------------------------------
#
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "1:", $text);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
global $IN_WORDPRESS;
if ($IN_WORDPRESS) {
return wp_make_clickable($text); //WP version
} else {//phpBB version
#
#-----[ FIND ]------------------------------------------
#
return($ret);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
}
}
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_phpbb_dtd -->
#
#-----[ FIND ]------------------------------------------
#
<html dir="{S_CONTENT_DIRECTION}">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- END switch_phpbb_dtd -->
<!-- BEGIN switch_wp_dtd -->
{switch_wp_dtd.WP_DTD}
<!-- END switch_wp_dtd -->
#
#-----[ FIND ]------------------------------------------
#
<title>{SITENAME} :: {PAGE_TITLE}</title>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN switch_phpbb_base -->
<base href="{switch_phpbb_base.PHPBB_BASE}" />
<!-- END switch_phpbb_base -->
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN switch_enable_pm_popup -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
{WP_HEADERINFO}
#
#-----[ FIND ]------------------------------------------
#
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{L_LOGIN_LOGOUT}</a>
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<a href="{U_BLOG}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif"width="12" height="13" border="0" alt="{L_BLOG}" hspace="3" />{L_BLOG}</a>
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]--------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//WordPress Integration MOD
$lang['Blog'] = 'WordPress Blog';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]--------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//WordPress Integration MOD
$lang['WordPress_Integration'] = 'WP-United';
#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]--------------------------------------------
#
else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
//WordPress Integration MOD - Log out from WordPress
//
//Get integration settings
include($phpbb_root_path . 'wp-united/mod-settings.' . $phpEx);
$wpSettings = get_integration_settings();
if ( ($wpSettings == FALSE) || ($wpSettings['wpPath'] == "") ) {
message_die(GENERAL_ERROR, $lang['WP_DBErr_Gen'], __LINE__, __FILE__, $sql);
}
if ( !empty($wpSettings['integrateLogin']) ) {
require_once($phpbb_root_path . 'wp-united/wp-integration-class.' . $phpEx);
$wpUtdInt = WPU_Integration::getInstance(get_defined_vars());
if ($wpUtdInt->can_connect_to_wp()) {
$wpUtdInt->enter_wp_integration();
eval($wpUtdInt->exec());
$wpUtdInt->wp_logout();
$wpUtdInt->exit_wp_integration();
$wpUtdInt = null; unset ($wpUtdInt);
}
}
//end of WordPress Integration MOD
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
else
{
$user_active = 1;
$user_actkey = '';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WP-United -- update the user in WP
$wpuAction = 'PROFILE UPDATE';
require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_footer.tpl
#
#-----[ FIND ]------------------------------------------
#
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{TRANSLATION_INFO}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<br />{WP_CREDIT}
#
#-----[ OPEN ]------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------
#
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------
#
//WP-UNITED Mod -- Blog buttons in profile
if ( $wpSettings != FALSE ) {
if (!empty($wpSettings['buttonsProfile'])) {
if ( !empty($profiledata['user_wpublog_id']) ) {
$blog_uri = append_sid($wpSettings['blogsUri'] . "?author=" . $profiledata['user_wpublog_id']);
$blog_img = '<a href="' . $blog_uri . '"><img src="' . $images['icon_wpu_blog'] . '" alt="' . $lang['Blog'] . '" title="' . $lang['Blog'] . '" border="0" /></a>';
} else {
$blog_img = "";
}
}
}
//end WP-United Mod
#
#-----[ FIND ]------------------------------------
#
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------
#
'BLOG_IMG' => $blog_img,
#
#-----[ FIND ]------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD]------------------------------------
#
'L_BLOG' => $lang['Blog'],
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------
#
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
#
#-----[ IN-LINE FIND ]------------------------------------
#
{postrow.MSN_IMG}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
{postrow.BLOG_IMG}
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------
#
//--></script><noscript>{ICQ_IMG}</noscript></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_BLOG}:</span></td>
<td class="row1" valign="middle"><span class="gen">{BLOG_IMG}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/privmsgs_read_body.tpl
#
#-----[ FIND ]------------------------------------
#
{WWW_IMG} {AIM_IMG} {YIM_IMG} {MSN_IMG}</td><td> </td><td valign="top" nowrap="nowrap"><script language="JavaScript" type="text/javascript"><!--
#
#-----[ IN-LINE FIND ]------------------------------------
#
{MSN_IMG}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
{BLOG_IMG}
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/subSilver.cfg
#
#----[ FIND ]------------------------------------
#
$images['icon_msnm'] = "$current_template_images/{LANG}/icon_msnm.gif";
#
#----[ AFTER, ADD ]------------------------------------
#
$images['icon_wpu_blog'] = "$current_template_images/{LANG}/icon_wpu_blog.gif";
$images['wpu_logo'] = "$current_template_images/wp-united-logo.gif";
$images['wpu_logo_working'] = "$current_template_images/wp-united-working.gif";
$images['wpu_no_avatar'] = "$current_template_images/{LANG}/wpu_no_avatar.gif";
$images['wpu_unregistered'] = "$current_template_images/{LANG}/wpu_unregistered.gif";
#
#----[ FIND ]------------------------------------
#
?>
#
#----[ BEFORE, ADD ]------------------------------------
#
global $wpu_stylesheet;
$wpu_stylesheet = $current_template_path . '/wpu-blogs-homepage.css';
#
#-----[ OPEN ]------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
#-----[ IN-LINE FIND ]------------------------------------
#
pt.bbcode_uid
#
#----[ IN-LINE AFTER, ADD ]------------------------------------
#
, u.user_wpublog_id
#
#-----[ FIND ]------------------------------------
#
$aim_img = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
#
#-----[ BEFORE, ADD ]------------------------------------
#
//WP-UNITED Mod -- Blog buttons in viewtopic
if ( $wpSettings != FALSE ) {
if (!empty($wpSettings['buttonsPost'])) {
if ( !empty($postrow[$i]['user_wpublog_id']) ) {
$blog_uri = append_sid($wpSettings['blogsUri'] . "?author=" . $postrow[$i]['user_wpublog_id']);
$blog_img = '<a href="' . $blog_uri . '"><img src="' . $images['icon_wpu_blog'] . '" alt="' . $lang['Blog'] . '" title="' . $lang['Blog'] . '" border="0" /></a>';
} else {
$blog_img = "";
}
}
}
//end WP-United Mod
#
#-----[ FIND ]------------------------------------
#
$icq = '';
#
#-----[ AFTER, ADD ]------------------------------------
#
$blog_img = '';
#
#-----[ FIND ]------------------------------------
#
'ICQ' => $icq,
#
#-----[ AFTER, ADD ]------------------------------------
#
'BLOG_IMG' => $blog_img,
#
#-----[ OPEN ]------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username AS username_1, u.user_id AS user_id_1, u2.username AS username_2, u2.user_id AS user_id_2, u.user_sig_bbcode_uid, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, PM.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text
#
#-----[ IN-LINE FIND ]------------------------------------
#
u.user_avatar,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
u.user_wpublog_id,
#
#-----[ FIND ]------------------------------------
#
$aim_img = ( $privmsg['user_aim'] ) ? '<a href="aim:goim?screenname=' . $privmsg['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
#
#-----[ BEFORE, ADD ]------------------------------------
#
//WP-UNITED Mod -- Blog buttons in privmsg
if ( $wpSettings != FALSE ) {
if (!empty($wpSettings['buttonsPost'])) {
if ( !empty($privmsg['user_wpublog_id']) ) {
$blog_uri = append_sid($wpSettings['blogsUri'] . "?author=" . $privmsg['user_wpublog_id']);
$blog_img = '<a href="' . $blog_uri . '"><img src="' . $images['icon_blog'] . '" alt="' . $lang['Blog'] . '" title="' . $lang['Blog'] . '" border="0" /></a>';
} else {
$blog_img = "";
}
$blog_img = "";
}
}
//end WP-United Mod
#
#-----[ FIND ]------------------------------------
#
'ICQ' => $icq,
#
#----[ AFTER, ADD ]------------------------------------
#
'BLOG_IMG' => $blog_img,
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
## MOD Title: WP-UNITED WordPress - phpBB Integration Mod
## MOD Author: Jhong < > (John Wells) www.wp-united.com
## MOD Description: Tightly integrates phpBB2 and WordPress.
## MOD Version: 0.9.5-beta
##
## Installation Level: (Medium)
## Installation Time: 35 Minutes
## Files To Edit:
## includes/page_header.php
## includes/page_tail.php
## viewonline.php
## admin/index.php
## includes/bbcode.php
## includes/constants.php
## includes/functions.php
## templates/subSilver/overall_header.tpl
## language/lang_english/lang_main.php
## language/lang_english/lang_admin.php
## login.php
## includes/usercp_register.php
## templates/subSilver/overall_footer.tpl
## includes/usercp_viewprofile.php
## templates/subSilver/viewtopic_body.tpl
## templates/subSilver/profile_view_body.tpl
## templates/subSilver/privmsgs_read_body.tpl
## templates/subSilver/subSilver.cfg
## viewtopic.php
## privmsg.php
##
## Included Files: templates/subsilver/blog.tpl
## blog.php
## wp-united/wordpress-entry-point.php
## wp-united/wp-functions.php
## wp-united/wp-template-loader.php
## wp-united/mod-settings.php
## wp-united/wp-integration-class.php
## wp-united/wpu-actions.php
## wp-united/wpu-plugin.php
## wp-united/wpu-latest-posts.php
## wp-united/wpu-template-funcs.php
## wp-united/widgets.php
## wp-united/abstractify.php
## wp-united/wpu-helper-funcs.php
## wp-united/options.php
## wp-united/cache/cache_readme.txt
## admin/wpu_usermap.php
## admin/admin_wordpress.tpl
## language/lang_english/lang_wordpress_admin.php
## language/lang_english/lang_wp-united.php
## templates/subSilver/blog.tpl
## templates/subSilver/wpu-blogs-homepage.css
## templates/subSilver/images/lang_english/icon_wpu_blog.gif
## templates/subSilver/images/lang_english/wpu_no_avatar.gif
## templates/subSilver/images/lang_english/wpu_unregistered.gif
## templates/subSilver/admin/wordpress_admin_body.tpl
## templates/subSilver/images/wp-united-working.gif
## templates/subSilver/images/wp-united-logo.gif
##
## License: http://opensource.org/licenses/GPL-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes: Make sure you follow the instructions in the DIY INSTRUCTIONS section, in order for this MOD to work properly!
##############################################################
## Last updated: 04 June 2007
##
## MOD History: Refer to the included changelog for details.
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################
#
#-----[ DIY INSTRUCTIONS ]------------------------------------------
#
After installing this mod, you must complete the following steps:
STEP 1. Install WordPress before installing this mod, and ensure it is workng properly. If you need help, look at the instructions on the WordPress Codex, here: http://codex.wordpress.org/Installing_WordPress
STEP 2. Go to your phpBB Admin Control Panel, and run the Setup Wizard on the "WP-United" page. Further instructions are included there to help you.
NOTEs:
- You can move/rename the blog.php file to wherever you like. For example, you could have it replace WordPress' index.php if you don't want our WordPress path to change. Just run the setup Wizard after you move it, and set the appropriate location, then open the file and enter the relative path back to your forum.
- You must run the Setup Wizard all the way through, and be able to reach Step 6 error-free. If you don't, then don't expect WP-United to work properly!
- If WordPress is already installed, and you plan to integrate logins, please run the integration mapping tool after running the Setup Wizard.
- You should review the blog.tpl and make any changes necessary if you re not using the stock subSilver theme.
- The "admin" WordPress user will never be integrated. So therefore the phpBB user named "admin" cannot have a corresponding WordPress account. This is for security reasons.
- Whenever you upgrade WP-United or WordPress, you MUST delete any files that have appeared in the WP-United/cache folder. (Don't worry, they will be automatically recreated)
- Additional options can be found in your wp-united/options.php file.
- If you are integrating users, be sure to review the mapping tool in the WP-United Admin Panel every so often to ensure that everything is running smoothly.
#
#-----[ SQL ]------------------------------------------
#
# (Use correct table prefix if not phpbb)
#
CREATE TABLE `phpbb_wpu_integration` (
`fullUri` VARCHAR( 255 ) NOT NULL, `fullPath` VARCHAR( 255 ) NOT NULL,
`wpLogin` TINYINT( 1 ) NOT NULL, `permMapping` VARCHAR( 511 ) NOT NULL,
`showInside` VARCHAR ( 255 ) NOT NULL, `dtdChange` TINYINT ( 1 ) NOT NULL,
`ownBlogs` TINYINT ( 1 ) NOT NULL, `profileBtn` TINYINT ( 1 ) NOT NULL,
`postBtn` TINYINT ( 1 ) NOT NULL, `styleSwitch` TINYINT ( 1 ) NOT NULL,
`installStage` TINYINT ( 1 ) NOT NULL, `blogsEntry` VARCHAR ( 255 ) NOT NULL,
`blogHomePage` TINYINT ( 1 ) NOT NULL, `blogHomeTitle` VARCHAR( 255 ) NOT NULL,
`blogIntro` VARCHAR( 255 ) NOT NULL, `numBlogsPerPage` TINYINT ( 1 ) NOT NULL,
`wpublStyles` TINYINT ( 1 ) NOT NULL, `encoding` VARCHAR ( 32 ) NOT NULL,
`censorPosts` TINYINT ( 1 ) NOT NULL, `wpHdrSimple` TINYINT( 1 ) NOT NULL,
`cssFirst` VARCHAR( 255 ) NOT NULL, `wpPage` VARCHAR( 255 ) NOT NULL,
`pPadding` VARCHAR( 255 ) NOT NULL, `ugRun` TINYINT( 1 ) NOT NULL,
`mustLogin` TINYINT ( 1 ) NOT NULL, `wpuVer` VARCHAR( 32 ) NOT NULL
);
ALTER TABLE phpbb_users ADD user_wpublog_id VARCHAR(10) NULL DEFAULT NULL;
ALTER TABLE phpbb_users ADD user_wpuint_id VARCHAR(10) NULL DEFAULT NULL;
#
#-----[ COPY ]------------------------------------------
#
# Note: blog.php is the entry point to your integrated blog. You can put it anywhere you like, and rename it to anything you
# like, provided you open it and provide the correct path to phpBB where shown. If you want to put it in your WordPress root
# as index.php, it is OK to rename the existing WordPress' index.php to something like index-old.php
copy blog.php to blog.php
copy wp-united/wordpress-entry-point.php to wp-united/wordpress-entry-point.php
copy wp-united/wp-functions.php to wp-united/wp-functions.php
copy wp-united/wp-template-loader.php to wp-united/wp-template-loader.php
copy wp-united/wp-integration-class.php to wp-united/wp-integration-class.php
copy wp-united/mod-settings.php to wp-united/mod-settings.php
copy wp-united/wpu-actions.php to wp-united/wpu-actions.php
copy wp-united/wpu-plugin.php to wp-united/wpu-plugin.php
copy wp-united/wpu-latest-posts.php to wp-united/wpu-latest-posts.php
copy wp-united/wpu-template-funcs.php to wp-united/wpu-template-funcs.php
copy wp-united/wpu-widgets.php to wp-united/wpu-widgets.php
copy wp-united/abstractify.php to wp-united/abstractify.php
copy wp-united/options.php to wp-united/options.php
copy wp-united/cache/cache_readme.txt to wp-united/cache/cache_readme.txt
copy wp-united/wpu-helper-funcs.php to wp-united/wpu-helper-funcs.php
copy admin/admin_wordpress.php to admin/admin_wordpress.php
copy admin/wpu_usermap.php to admin/wpu_usermap.php
copy templates/subSilver/blog.tpl to templates/subSilver/blog.tpl
copy templates/subSilver/wpu-blogs-homepage.css to templates/subSilver/wpu-blogs-homepage.css
copy templates/subSilver/admin/wordpress_admin_body.tpl to templates/subSilver/admin/wordpress_admin_body.tpl
copy templates/subSilver/images/wp-united-working.gif to templates/subSilver/images/wp-united-working.gif
copy templates/subSilver/images/wp-united-logo.gif to templates/subSilver/images/wp-united-logo.gif
copy language/lang_english/lang_wordpress_admin.php to language/lang_english/lang_wordpress_admin.php
copy language/lang_english/lang_wp-united.php to language/lang_english/lang_wp-united.php
copy templates/subSilver/images/lang_english/icon_wpu_blog.gif to templates/subSilver/images/lang_english/icon_wpu_blog.gif
copy templates/subSilver/images/lang_english/wpu_no_avatar.gif to templates/subSilver/images/lang_english/wpu_no_avatar.gif
copy templates/subSilver/images/lang_english/wpu_unregistered.gif to templates/subSilver/images/lang_english/wpu_unregistered.gif
#
#-----[ OPEN ]------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]--------------------------------------------
#
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//WP-United
require_once($phpbb_root_path . 'wp-united/mod-settings.' . $phpEx);
global $wpSettings;
$wpSettings = get_integration_settings();
//Do a reverse integration?
if ( $wpSettings['showHdrFtr'] == 'REV' ) {
if (empty($gen_simple_header)) {
define('WPU_REVERSE_INTEGRATION', true);
ob_start();
}
}
#
#-----[ FIND ]------------------------------------------
#
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_BLOG' => $lang['Blog'],
'U_BLOG' => append_sid($wpSettings['blogsUri']),
#
#-----[ FIND ]------------------------------------------
#
$template->assign_block_vars('switch_enable_pm_popup', array());
}
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
//WordPress Integration MOD -- DTD switcher
//
if ( !empty($wpHeader) ) {
$template->assign_block_vars('switch_wp_dtd', array(
'WP_DTD' => $lang['WP_DTD'])
);
} else {
$template->assign_block_vars('switch_phpbb_dtd', array());
}
#
#-----[ OPEN ]------------------------------------------
#
includes/page_tail.php
#
#-----[ FIND ]--------------------------------------------
#
$template->pparse('overall_footer');
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WP-United
global $pfContent;
if ( defined('WPU_REVERSE_INTEGRATION') ) {
$pfContent = ob_get_contents();
ob_end_clean();
//Now insert phpBB into a wordpress page
include ($phpbb_root_path . 'wp-united/wordpress-entry-point.' . $phpEx);
}
#
#-----[ OPEN ]------------------------------------------
#
viewonline.php
#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "faq.$phpEx";
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_BLOG:
$location = $lang['Blog'];
$location_url = $wpSettings['blogsUri'];
break;
#
#-----[ OPEN ]------------------------------------------
#
admin/index.php
#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_BLOG:
$location = $lang['Blog'];
$location_url = $wpSettings['blogsUri']. "?pane=right";
break;
#
#-----[ FIND ]------------------------------------------
#
case PAGE_FAQ:
$location = $lang['Viewing_FAQ'];
$location_url = "index.$phpEx?pane=right";
break;
#
#-----[ AFTER, ADD ]------------------------------------------
#
case PAGE_BLOG:
$location = $lang['Blog'];
$location_url = $wpSettings['blogsUri']. "?pane=right";
break;
#
#-----[ OPEN ]------------------------------------------
#
includes/constants.php
#
#-----[ FIND ]------------------------------------------
#
define('PAGE_GROUPCP', -11);
#
#-----[ AFTER, ADD ]------------------------------------------
#
define('PAGE_BLOG', -1385);
#
#-----[ FIND ]------------------------------------------
#
define('VOTE_USERS_TABLE', $table_prefix.'vote_voters');
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WordPress Integration MOD
define('WP_INT_TABLE', $table_prefix.'wpu_integration');
#
#-----[ OPEN ]------------------------------------------
#
includes/functions.php
#
#-----[ FIND ]------------------------------------------
#
function get_userdata($user, $force_str = false)
{
#
#-----[ BEFORE, ADD ]------------------------------------------
#
global $IN_WP_ADMIN;
if ( !$IN_WP_ADMIN ) {
#
#-----[ FIND ]------------------------------------------
#
global $db;
if (!is_numeric($user) || $force_str)
#
#-----[ BEFORE, ADD ]------------------------------------------
#
global $IN_WORDPRESS;
if ($IN_WORDPRESS) {
return wp_get_userdata($user);
} else { //do standard phpBB function
#
#-----[ FIND ]------------------------------------------
#
return ( $row = $db->sql_fetchrow($result) ) ? $row : false;
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
}
}
#
#-----[ FIND ]------------------------------------------
#
global $db, $board_config;
#
#-----[ AFTER, ADD ]------------------------------------------
#
global $phpbb_root_path, $phpEx;
require_once($phpbb_root_path . 'wp-united/mod-settings.' . $phpEx);
$wpSettings = get_integration_settings();
#
#-----[ FIND ]------------------------------------------
#
$url = preg_replace('#^/?(.*?)/?$#', '/1', trim($url));
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WP-United flexible redirect for blogs
if ( isset($wpSettings) ) {
if ( !(strpos($url, '/wp-united-blog') === FALSE) ) {
$server_protocol = $server_name = $server_port = $script_name = '';
$url = htmlentities(append_sid($wpSettings['blogsUri']));
}
}
#
#-----[ OPEN ]------------------------------------------
#
includes/bbcode.php
#
#-----[ FIND ]------------------------------------------
#
function make_clickable($text)
{
#
#-----[ BEFORE, ADD ]------------------------------------------
#
if (!function_exists('make_clickable')) {
#
#-----[ FIND ]--------------------------------------------
#
$text = preg_replace('#(script|about|applet|activex|chrome):#is', "1:", $text);
#
#-----[ BEFORE, ADD ]------------------------------------------
#
global $IN_WORDPRESS;
if ($IN_WORDPRESS) {
return wp_make_clickable($text); //WP version
} else {//phpBB version
#
#-----[ FIND ]------------------------------------------
#
return($ret);
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
}
}
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_header.tpl
#
#-----[ FIND ]------------------------------------------
#
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- BEGIN switch_phpbb_dtd -->
#
#-----[ FIND ]------------------------------------------
#
<html dir="{S_CONTENT_DIRECTION}">
#
#-----[ BEFORE, ADD ]------------------------------------------
#
<!-- END switch_phpbb_dtd -->
<!-- BEGIN switch_wp_dtd -->
{switch_wp_dtd.WP_DTD}
<!-- END switch_wp_dtd -->
#
#-----[ FIND ]------------------------------------------
#
<title>{SITENAME} :: {PAGE_TITLE}</title>
#
#-----[ AFTER, ADD ]------------------------------------------
#
<!-- BEGIN switch_phpbb_base -->
<base href="{switch_phpbb_base.PHPBB_BASE}" />
<!-- END switch_phpbb_base -->
#
#-----[ FIND ]------------------------------------------
#
<!-- BEGIN switch_enable_pm_popup -->
#
#-----[ BEFORE, ADD ]------------------------------------------
#
{WP_HEADERINFO}
#
#-----[ FIND ]------------------------------------------
#
<td height="25" align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_PROFILE}" class="mainmenu">
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{L_LOGIN_LOGOUT}</a>
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<a href="{U_BLOG}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_profile.gif"width="12" height="13" border="0" alt="{L_BLOG}" hspace="3" />{L_BLOG}</a>
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]--------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//WordPress Integration MOD
$lang['Blog'] = 'WordPress Blog';
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_admin.php
#
#-----[ FIND ]--------------------------------------------
#
?>
#
#-----[ BEFORE, ADD ]-------------------------------------
#
//WordPress Integration MOD
$lang['WordPress_Integration'] = 'WP-United';
#
#-----[ OPEN ]------------------------------------------
#
login.php
#
#-----[ FIND ]--------------------------------------------
#
else if( ( isset($HTTP_GET_VARS['logout']) || isset($HTTP_POST_VARS['logout']) ) && $userdata['session_logged_in'] )
{
#
#-----[ AFTER, ADD ]------------------------------------------
#
//
//WordPress Integration MOD - Log out from WordPress
//
//Get integration settings
include($phpbb_root_path . 'wp-united/mod-settings.' . $phpEx);
$wpSettings = get_integration_settings();
if ( ($wpSettings == FALSE) || ($wpSettings['wpPath'] == "") ) {
message_die(GENERAL_ERROR, $lang['WP_DBErr_Gen'], __LINE__, __FILE__, $sql);
}
if ( !empty($wpSettings['integrateLogin']) ) {
require_once($phpbb_root_path . 'wp-united/wp-integration-class.' . $phpEx);
$wpUtdInt = WPU_Integration::getInstance(get_defined_vars());
if ($wpUtdInt->can_connect_to_wp()) {
$wpUtdInt->enter_wp_integration();
eval($wpUtdInt->exec());
$wpUtdInt->wp_logout();
$wpUtdInt->exit_wp_integration();
$wpUtdInt = null; unset ($wpUtdInt);
}
}
//end of WordPress Integration MOD
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
else
{
$user_active = 1;
$user_actkey = '';
}
#
#-----[ AFTER, ADD ]------------------------------------------
#
//WP-United -- update the user in WP
$wpuAction = 'PROFILE UPDATE';
require_once($phpbb_root_path . 'wp-united/wpu-actions.' . $phpEx);
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/overall_footer.tpl
#
#-----[ FIND ]------------------------------------------
#
Powered by <a href="http://www.phpbb.com/" target="_phpbb" class="copyright">phpBB</a> © 2001, 2005 phpBB Group<br />{TRANSLATION_INFO}</span></div>
#
#-----[ IN-LINE FIND ]------------------------------------------
#
{TRANSLATION_INFO}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
<br />{WP_CREDIT}
#
#-----[ OPEN ]------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------
#
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
#
#-----[ AFTER, ADD ]------------------------------------
#
//WP-UNITED Mod -- Blog buttons in profile
if ( $wpSettings != FALSE ) {
if (!empty($wpSettings['buttonsProfile'])) {
if ( !empty($profiledata['user_wpublog_id']) ) {
$blog_uri = append_sid($wpSettings['blogsUri'] . "?author=" . $profiledata['user_wpublog_id']);
$blog_img = '<a href="' . $blog_uri . '"><img src="' . $images['icon_wpu_blog'] . '" alt="' . $lang['Blog'] . '" title="' . $lang['Blog'] . '" border="0" /></a>';
} else {
$blog_img = "";
}
}
}
//end WP-United Mod
#
#-----[ FIND ]------------------------------------
#
'YIM' => $yim,
#
#-----[ AFTER, ADD ]------------------------------------
#
'BLOG_IMG' => $blog_img,
#
#-----[ FIND ]------------------------------------
#
'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD]------------------------------------
#
'L_BLOG' => $lang['Blog'],
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------
#
<td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} {postrow.PM_IMG} {postrow.EMAIL_IMG} {postrow.WWW_IMG} {postrow.AIM_IMG} {postrow.YIM_IMG} {postrow.MSN_IMG}<script language="JavaScript" type="text/javascript"><!--
#
#-----[ IN-LINE FIND ]------------------------------------
#
{postrow.MSN_IMG}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
{postrow.BLOG_IMG}
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------
#
//--></script><noscript>{ICQ_IMG}</noscript></td>
</tr>
#
#-----[ AFTER, ADD ]------------------------------------
#
<tr>
<td valign="middle" nowrap="nowrap" align="right"><span class="gen">{L_BLOG}:</span></td>
<td class="row1" valign="middle"><span class="gen">{BLOG_IMG}</span></td>
</tr>
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/privmsgs_read_body.tpl
#
#-----[ FIND ]------------------------------------
#
{WWW_IMG} {AIM_IMG} {YIM_IMG} {MSN_IMG}</td><td> </td><td valign="top" nowrap="nowrap"><script language="JavaScript" type="text/javascript"><!--
#
#-----[ IN-LINE FIND ]------------------------------------
#
{MSN_IMG}
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
{BLOG_IMG}
#
#-----[ OPEN ]------------------------------------
#
templates/subSilver/subSilver.cfg
#
#----[ FIND ]------------------------------------
#
$images['icon_msnm'] = "$current_template_images/{LANG}/icon_msnm.gif";
#
#----[ AFTER, ADD ]------------------------------------
#
$images['icon_wpu_blog'] = "$current_template_images/{LANG}/icon_wpu_blog.gif";
$images['wpu_logo'] = "$current_template_images/wp-united-logo.gif";
$images['wpu_logo_working'] = "$current_template_images/wp-united-working.gif";
$images['wpu_no_avatar'] = "$current_template_images/{LANG}/wpu_no_avatar.gif";
$images['wpu_unregistered'] = "$current_template_images/{LANG}/wpu_unregistered.gif";
#
#----[ FIND ]------------------------------------
#
?>
#
#----[ BEFORE, ADD ]------------------------------------
#
global $wpu_stylesheet;
$wpu_stylesheet = $current_template_path . '/wpu-blogs-homepage.css';
#
#-----[ OPEN ]------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_sig_bbcode_uid, u.user_avatar, u.user_avatar_type, u.user_allowavatar, u.user_allowsmile, p.*, pt.post_text, pt.post_subject, pt.bbcode_uid
#
#-----[ IN-LINE FIND ]------------------------------------
#
pt.bbcode_uid
#
#----[ IN-LINE AFTER, ADD ]------------------------------------
#
, u.user_wpublog_id
#
#-----[ FIND ]------------------------------------
#
$aim_img = ( $postrow[$i]['user_aim'] ) ? '<a href="aim:goim?screenname=' . $postrow[$i]['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
#
#-----[ BEFORE, ADD ]------------------------------------
#
//WP-UNITED Mod -- Blog buttons in viewtopic
if ( $wpSettings != FALSE ) {
if (!empty($wpSettings['buttonsPost'])) {
if ( !empty($postrow[$i]['user_wpublog_id']) ) {
$blog_uri = append_sid($wpSettings['blogsUri'] . "?author=" . $postrow[$i]['user_wpublog_id']);
$blog_img = '<a href="' . $blog_uri . '"><img src="' . $images['icon_wpu_blog'] . '" alt="' . $lang['Blog'] . '" title="' . $lang['Blog'] . '" border="0" /></a>';
} else {
$blog_img = "";
}
}
}
//end WP-United Mod
#
#-----[ FIND ]------------------------------------
#
$icq = '';
#
#-----[ AFTER, ADD ]------------------------------------
#
$blog_img = '';
#
#-----[ FIND ]------------------------------------
#
'ICQ' => $icq,
#
#-----[ AFTER, ADD ]------------------------------------
#
'BLOG_IMG' => $blog_img,
#
#-----[ OPEN ]------------------------------------
#
privmsg.php
#
#-----[ FIND ]------------------------------------
#
$sql = "SELECT u.username AS username_1, u.user_id AS user_id_1, u2.username AS username_2, u2.user_id AS user_id_2, u.user_sig_bbcode_uid, u.user_posts, u.user_from, u.user_website, u.user_email, u.user_icq, u.user_aim, u.user_yim, u.user_regdate, u.user_msnm, u.user_viewemail, u.user_rank, u.user_sig, u.user_avatar, PM.*, pmt.privmsgs_bbcode_uid, pmt.privmsgs_text
#
#-----[ IN-LINE FIND ]------------------------------------
#
u.user_avatar,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
u.user_wpublog_id,
#
#-----[ FIND ]------------------------------------
#
$aim_img = ( $privmsg['user_aim'] ) ? '<a href="aim:goim?screenname=' . $privmsg['user_aim'] . '&message=Hello+Are+you+there?"><img src="' . $images['icon_aim'] . '" alt="' . $lang['AIM'] . '" title="' . $lang['AIM'] . '" border="0" /></a>' : '';
#
#-----[ BEFORE, ADD ]------------------------------------
#
//WP-UNITED Mod -- Blog buttons in privmsg
if ( $wpSettings != FALSE ) {
if (!empty($wpSettings['buttonsPost'])) {
if ( !empty($privmsg['user_wpublog_id']) ) {
$blog_uri = append_sid($wpSettings['blogsUri'] . "?author=" . $privmsg['user_wpublog_id']);
$blog_img = '<a href="' . $blog_uri . '"><img src="' . $images['icon_blog'] . '" alt="' . $lang['Blog'] . '" title="' . $lang['Blog'] . '" border="0" /></a>';
} else {
$blog_img = "";
}
$blog_img = "";
}
}
//end WP-United Mod
#
#-----[ FIND ]------------------------------------
#
'ICQ' => $icq,
#
#----[ AFTER, ADD ]------------------------------------
#
'BLOG_IMG' => $blog_img,
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
Subject: Re: Blog Mod
I'm so glad I found this topic. I'm looking to add this to my site as well. I went to the ACP and started the "Setup Wizard", but got this error when continuing to STEP 5:
This would be a fantastic addition to IP because it would allow each user to create and manage their own personal blog.
Any help would greatly be appreciated.
Thanks
Spoiler: [ Show ]
Spoiler: [ Hide ]
Fatal error: Cannot redeclare get_page() (previously declared in /home/thelo7/public_html/MAcommunity/includes/functions.php:1210) in /home/thelo7/public_html/MAcommunity/wp-includes/post.php on line 1704
This would be a fantastic addition to IP because it would allow each user to create and manage their own personal blog.
Any help would greatly be appreciated.
Thanks
Subject: Re: Blog Mod
dunno about it - but could it be that this function "get_page()" is declared twice in different ways within the mentioned files?
Subject: Re: Blog Mod
Thats what I was thinking but if you compare both of the files mentioned, it's a headache. There are so many "get_page" lines.
Page 1 of 1
You cannot post new topicsYou cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events
This is a "Lo-Fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by Icy Phoenix based on phpBB
Generation Time: 0.0971s (PHP: 23% SQL: 77%)
SQL queries: 10 - Debug Off - GZIP Enabled