|
From: mhewitson <mhe...@us...> - 2007-06-07 22:01:37
|
Update of /cvsroot/mxbb/mx_blogs/Installation In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv721/mx_blogs/Installation Added Files: Installation.txt mx_profilecp_weblogintegration.txt userprofileblogintegrationmod.txt viewforumintegrationmod.txt Log Message: mx_blogs, Initial checkin --- NEW FILE: viewforumintegrationmod.txt --- ############################################################## ## MOD Title: MX Blogs Module ## Original MOD Author: hyperion < vi...@ho... > Vincent Ng http://vince.dynalias.com/blog/ ## Develped for MX cryptoknight (cr...@cr...) ## MOD Description: This mod integrates the mx_blogs module into the viewtopic function to give a weblog link from the forums ## Note: This mod is optional...the module works without it!!! ## Note2: All files to edit are phpbb files: viewtopic_body.tpl and viewtopic.php ## Note3: You need to adapt the $mx_root_path to your own system ## MOD Description: Adds an entire weblog system to a phpbb forum. Allows the members of the forum to create ## a weblog, complete with entry permissions, style customization, weblog templates, a friends system ## and the ability for weblog owners to block users from their weblog. ## MOD Version: 0.1.0 # #-----[ OPEN ]------------------------------------------ # templates/subSilver/viewtopic_body.tpl # #-----[ FIND ]------------------------------------------ # (Partial Line) <td valign="middle" nowrap="nowrap">{postrow.PROFILE_IMG} # #-----[ IN-LINE FIND ]------------------------------------------ # {postrow.EMAIL_IMG} # #-----[ AFTER, ADD ]------------------------------------------ # {postrow.WEBLOG_IMG} # #-----[ OPEN ]------------------------------------------ # viewtopic.php # #-----[ FIND ]------------------------------------------ # $phpbb_root_path = './'; # #----[ AFTER, ADD ]------------------------------------- # //Change this to the relative path from phpbb to mx $mx_root_path = '../'; # #----[ FIND ]------------------------------------------- # // // Start session management // $userdata = session_pagestart($user_ip, $forum_id); init_userprefs($userdata); # #----[ AFTER, ADD ]------------------------------------- # // Weblog Viewtopic Mod include($mx_root_path . 'modules/mx_blogs/includes/weblogs_common.'.$phpEx); include($mx_root_path . 'modules/mx_blogs/includes/weblogs_constants.'.$phpEx); // # #-----[ FIND ]------------------------------------------ # Some mods replace "u.username, u.user_id, u.user_posts, u.user_from," with u.*. // // Go ahead and pull all data for this topic // $sql = "SELECT u.username, u.user_id, u.user_posts, u.user_from, # #-----[ IN-LINE FIND ]------------------------------------------ # u.user_posts, u.user_from, # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # u.user_weblog, # #-----[ FIND ]------------------------------------------ # $yim_img = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg"><img src="' . $images['icon_yim'] . '" alt="' . $lang['YIM'] . '" title="' . $lang['YIM'] . '" border="0" /></a>' : ''; $yim = ( $postrow[$i]['user_yim'] ) ? '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . $postrow[$i]['user_yim'] . '&.src=pg">' . $lang['YIM'] . '</a>' : ''; # #-----[ AFTER, ADD ]------------------------------------------ # $weblog_img = $weblog_img = ( $postrow[$i]['user_weblog'] ) ? '<a href="' . append_sid($mx_root_path . 'index.$phpEx?page=' . $weblog_config['mx_weblog_page'] . '&' . POST_WEBLOG_URL . '=' . $postrow[$i]['user_weblog']) . '"><img src="' . $mx_root_path .'modules/mx_blogs/templates/subSilver/images/lang_' . $use_lang . '/icon_weblog.gif" alt="Weblog" title="' . $lang['View_weblog'] . '" border="0" /></a>' : ''; $weblog = ( $postrow[$i]['user_weblog'] ) ? '<a href="' . append_sid($mx_root_path . "modules/mx_blogs/weblog.$phpEx?" . POST_WEBLOG_URL . "=".$postrow[$i]['user_weblog']) . '">' . $lang['Weblog'] . '</a>' : ''; # #-----[ FIND ]------------------------------------------ # $yim_img = ''; $yim = ''; # #-----[ AFTER, ADD ]------------------------------------------ # $weblog_img = ''; $weblog = ''; # #-----[ FIND ]------------------------------------------ # 'YIM_IMG' => $yim_img, 'YIM' => $yim, # #-----[ AFTER, ADD ]------------------------------------------ # 'WEBLOG_IMG' => $weblog_img, 'WEBLOG' => $weblog, # #-----[ SAVE, CLOSE ALL FILES ]-------------------------------- #EOM --- NEW FILE: Installation.txt --- MX_BLOGS Original Mod written by Hyperion Ported to MX by cryptoknight. Version 0.1.0 1. Upload the mx_blogs directory to your mx modules directory 2. Install the module as you would any other. 3. Put the Weblog config and Weblog list blocks on two seperate mx pages. Make a note of the page numbers each block is on. 4. On the Config page, enter the page numbers for the pages you put the config and list blocks on. 5. Install at least one of the provided templates Optional: Follow the instructions in the other three text files for each of the available mods to put links to a user's blog in their profile, or in their forum posts. mx_profilecp_weblogintegration.txt -- Installs into the mx profilecp a weblog icon/link userprofileblogintegrationmod.txt -- For non profilecp users, puts the icon/link in the standard phpbb profile viewforumintegrationmod.txt -- Puts a weblog icon and link in the row with the other icons in the viewtopic file (ICQ, Yahoo, etc) --- NEW FILE: mx_profilecp_weblogintegration.txt --- ############################################################## ## MOD Title: MX Blogs Module ## Original MOD Author: hyperion < vi...@ho... > Vincent Ng http://vince.dynalias.com/blog/ ## Develped for MX cryptoknight (cr...@cr...) ## MOD Description: This mod integrates the mx_blogs module into the a user's profile control panel profile ## Note: This mod is optional...the module works without it!!! ## Note1: This is for the mx version of profile control panel ## Note2: All files to edit are mx_profilecp files: def_userfuncs_custom.php, def_usermaps.php ## Note3: You need to adapt the $mx_root_path to your own system ## MOD Description: Adds an entire weblog system to a phpbb forum. Allows the members of the forum to create ## a weblog, complete with entry permissions, style customization, weblog templates, a friends system ## and the ability for weblog owners to block users from their weblog. ## MOD Version: 0.1.0 # #-------[ OPEN ]--------------------- # profilcp/def/def_userfuncs_custom.php # #-------[ FIND ]--------------------- # ?> # #-------[ BEFORE ADD ]--------------- # //----------------------------------- // // user_weblog output function // //----------------------------------- function pcp_output_weblog($field_name, $view_userdata, $map_name='') { global $board_config, $phpbb_root_path, $phpEx, $lang, $images, $userdata, $db; global $values_list, $tables_linked, $classes_fields, $user_maps, $user_fields; global $mx_root_path; $img = ''; $res = ''; if(($view_userdata['user_weblog'] > 0) && ($view_userdata['user_id'] != ANONYMOUS)) { $temp_url = append_sid($mx_root_path . "modules/mx_blogs/weblog.$phpEx?" . POST_WEBLOG_URL . "=" . $view_userdata['user_weblog']); $img = '<a href="' . $temp_url . '"><img src="' . $mx_root_path . 'modules/mx_blogs/templates/subSilver/images/lang_english/icon_weblog.gif' . '" alt="' . $lang['Weblog'] . '" title="' . $lang['Weblog'] . '" border="0" /></a>'; // result $res = pcp_output_format($field_name, $txt, $img, $map_name); } return $res; } # #--------[ OPEN ]-------------------------- # profilcp/def/def_usermaps.php # #--------[ FIND ]-------------------------- # ), ), 'PCP.viewprofile.base.real' => array( # #--------[ BEFORE, ADD ]-------------------- # 'user_weblog' => array( 'lang_key' => 'Weblog', 'leg' => true, 'dsp_func' => 'pcp_output_weblog', 'img' => true, ), # #--------[ FIND ]-------------------------- # ), ), 'PCP.viewprofile.base.real' => array( # #--------[ BEFORE, ADD ]-------------------- # 'user_weblog' => array( 'lang_key' => 'Weblog', 'leg' => true, 'dsp_func' => 'pcp_output_weblog', 'img' => true, ), # #-------[ FIND ]---------------------------- # 'user_pm' => array( 'img' => true, 'style' => '<td valign="absbottom" nowrap="nowrap"><span class="gensmall">%s </span></td>', ), # #--------[ AFTER, ADD ]---------------------- # 'user_weblog' => array( 'dsp_func' => 'pcp_output_weblog', 'img' => true, 'style' => '<td valign="absbottom" nowrap="nowrap"><span class="gensmall">%s </span></td>', ), # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM --- NEW FILE: userprofileblogintegrationmod.txt --- ############################################################## ## MOD Title: MX Blogs Module ## Original MOD Author: hyperion < vi...@ho... > Vincent Ng http://vince.dynalias.com/blog/ ## Develped for MX cryptoknight (cr...@cr...) ## MOD Description: This mod integrates the mx_blogs module into the a user's profile ## Note: This mod is optional...the module works without it!!! ## Note2: All files to edit are phpbb files: viewtopic_body.tpl and viewtopic.php ## Note3: You need to adapt the $mx_root_path to your own system ## MOD Description: Adds an entire weblog system to a phpbb forum. Allows the members of the forum to create ## a weblog, complete with entry permissions, style customization, weblog templates, a friends system ## and the ability for weblog owners to block users from their weblog. ## MOD Version: 0.1.0 # #-----[ OPEN ]------------------------------------------ # If you have the Profile Control Panel (PCP) mod, you won't be able to complete this portion of the instructions # Move on to the next file if you have the PCP mod installed. includes/usercp_viewprofile.php # #-----[ FIND ]------------------------------------------ # if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); exit; } # #-----[ AFTER, ADD ]------------------------------------ # // Change this to reflect the relative path from your phpbb system to your mx system. $mx_root_path = '../'; include($mx_root_path . 'modules/mx_blogs/includes/weblogs_constants.'.$phpEx); # #-----[ FIND ]------------------------------------------ # $temp_url = append_sid("search.$phpEx?search_author=" . urlencode($profiledata['username']) . "&showresults=posts"); $search_img = '<a href="' . $temp_url . '"><img src="' . $images['icon_search'] . '" alt="' . $lang['Search_user_posts'] . '" title="' . $lang['Search_user_posts'] . '" border="0" /></a>'; $search = '<a href="' . $temp_url . '">' . $lang['Search_user_posts'] . '</a>'; # #-----[ AFTER, ADD ]------------------------------------------ # if ( $profiledata['user_weblog'] ) { $sql = "SELECT weblog_name FROM " . WEBLOGS_TABLE . " WHERE weblog_id = " . $profiledata['user_weblog']; if( !$result = $db->sql_query($sql) ) { message_die(GENERAL_ERROR, "Couldn't obtain weblogs information.", "", __LINE__, __FILE__, $sql); } if( $row = $db->sql_fetchrow($result) ) { $weblog = '<a href="' . append_sid($mx_root_path . "modules/mx_blogs/weblog.$phpEx?" . POST_WEBLOG_URL . "=" . $profiledata['user_weblog']) . '">' . $row['weblog_name'] . '</a>'; } } # #-----[ FIND ]------------------------------------------ # 'YIM_IMG' => $yim_img, 'YIM' => $yim, # #-----[ AFTER, ADD ]------------------------------------------ # 'WEBLOG' => $weblog, 'L_WEBLOG' => $lang['Weblog'], # #-----[ OPEN ]------------------------------------------ # templates/subSilver/profile_view_body.tpl # #-----[ FIND ]------------------------------------------ # <tr> <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_INTERESTS}:</span></td> <td> <b><span class="gen">{INTERESTS}</span></b></td> </tr> # #-----[ AFTER, ADD ]------------------------------------------ # <tr> <td valign="top" align="right" nowrap="nowrap"><span class="gen">{L_WEBLOG}:</span></td> <td> <b><span class="gen">{WEBLOG}</span></b></td> </tr> # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM |