chatserv
Member Emeritus
Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico
|
Posted:
Fri Nov 05, 2004 12:24 pm |
|
Here's one of them, it looks like it should work.
Code:##############################################################
##
## MOD Title: Private Message Review
##
## MOD Author: aUsTiN => [ Only registered users can see links on this board! Get registered or login! ]
##
## MOD Description: A Very Much Needed Upgrade.
##
## MOD Version: 1.0.1
##
## MOD Help: http://phpbb-amod.com/
##
## Installation Level: Easy
##
## Installation Time: 2 Minutes
##
## Files To Edit: 3
##
## Included Files: 0
##
##############################################################
##############################################################
##
## Author Notes:
##
##
## Copyright © aUsTiN-Inc, 2003/4
##
## If you add anything or want anything added, please visit
## http://phpbb-amod.com/
##
## ALL FILES WERE DOWNLOADED DIRECTLY FROM MY SITE TO BUILD THIS INSTALL.
##
## Tested versions:
##
## phpBB:
##
## 2.0.4 - 2.0.10
##
## phpMyAdmin Versions:
##
## 2.5.6-rc1
##
## MySql Versions:
##
## 4.0.18-standard
##
## PHP Versions:
##
## 4.3.3 - 4.3.4
##
## Feel free to see it in action at http://phpbb-amod.com/
##
##############################################################
##
## MOD History:
##
## ??? ???? 2004 - Version 1.0.0
## - Beta
##
## Aug 28th 2004 - Version 1.0.1
## - Final
##
##############################################################
##
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##
##############################################################
##
## Definitions:
##
## Root: Folder your config.php is located
## templates/*/: Your template folder (All template folders are suggested)
## lang_*/: Your current language folder (All lang folders are suggested)
##
##############################################################
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
modules/Private_Messages/index.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
//
// Send smilies to template
//
-----------------------------------
----[ ADD, BEFORE ]----------------
-----------------------------------
/* Start Private Message Review By aUsTiN */
$post_to_review = $HTTP_GET_VARS['p'];
$q = "SELECT privmsgs_text , privmsgs_bbcode_uid
FROM ". PRIVMSGS_TEXT_TABLE ."
WHERE privmsgs_text_id = '". $post_to_review ."'";
$r = $db -> sql_query($q);
$row = $db -> sql_fetchrow($r);
$post_to_add_beneath = $row['privmsgs_text'];
$post_to_add_beneaths_bbcode = $row['privmsgs_bbcode_uid'];
$prv_msg_review_1 = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($post_to_add_beneath, $post_to_add_beneaths_bbcode) : preg_replace('/\:[0-9a-z\:]+\]/si', ']', $post_to_add_beneath);
$prv_msg_review_2 = make_clickable($prv_msg_review_1);
if($board_config['allow_smilies'])
{
$prv_msg_review_3 = smilies_pass($prv_msg_review_2);
}
else
{
$prv_msg_review_3 = $prv_msg_review_2;
}
if(!$prv_msg_review_3)
{
$prv_msg_review_3 = $lang['private_msg_review_error'];
}
$prv_msg_review = $prv_msg_review_3;
if($HTTP_GET_VARS['mode'] == "reply")
{
$block_var_switch = "switch_prv_msg_review";
}
else
{
$block_var_switch = "";
}
$template->assign_block_vars($block_var_switch, array(
'PRIVATE_MSG_REVIEW' => $prv_msg_review,
'PRIVATE_MSG_TITLE' => $lang['private_msg_review_title'])
);
/* End Private Message Review By aUsTiN */
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ OPEN ]-----------------------
-----------------------------------
modules/Forums/language/lang_*/lang_main.php
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
?>
-----------------------------------
----[ ADD, BEFORE ]----------------
-----------------------------------
/* Start Private Message Review By aUsTiN */
$lang['private_msg_review_title'] = 'Message You\'re Replying To';
$lang['private_msg_review_error'] = 'Error Finding Private Message!';
/* End Private Message Review By aUsTiN */
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
themes/your_theme/forums/posting_body.tpl
-----------------------------------
----[ FIND ]-----------------------
-----------------------------------
{POLLBOX}
-----------------------------------
----[ ADD, BEFORE ]----------------
-----------------------------------
<!-- BEGIN switch_prv_msg_review -->
<tr>
<th class="thHead" colspan="2">
<b>
{switch_prv_msg_review.PRIVATE_MSG_TITLE}
</b>
</th>
</tr>
<tr>
<td align="left" valign="top" colspan="2" width="65%" class="row2">
<span class="gensmall">
{switch_prv_msg_review.PRIVATE_MSG_REVIEW}
</span>
</td>
</tr>
<!-- END switch_prv_msg_review -->
-----------------------------------
----[ CLOSE & SAVE ]---------------
-----------------------------------
-----------------------------------
----[ EoM ]------------------------
-----------------------------------
|
|
|
|
chatserv
|
Posted:
Fri Nov 05, 2004 12:33 pm |
|
Here's the other:
install instructions file:
Code:#####################################################################################
##
## MOD Title: PM Export
##
## MOD Author: FR (www.php-styles.com - [ Only registered users can see links on this board! Get registered or login! ])
##
## MOD Description: Displays an extra link in the private-messages area.
## Exports all sent and received private messages.
##
## MOD Version: 1.0 - 7th June 2004
##
## Installation Level: (Easy)
##
## Installation Time: 5 Minutes
##
## Files To Edit: privmsg.php
## /templates/subSilver/privmsgs_body.tpl
## /templates/subSilver/subSilver.cfg
## /lanaguage/lang_english/lang_main.php
##
#####################################################################################
##
## If you dont like the place of the added esport-link, just change it
## how you want. Need help with it? --> [ Only registered users can see links on this board! Get registered or login! ]
##
#####################################################################################
##
## This hack is released under the GPL License.
## This hack can be freely used, but not distributed, without permission.
## Intellectual Property is retained by the author listed above.
##
#####################################################################################
##
## Credits: Leuchte (mail@leuchte.net) for beta-testing
##
#####################################################################################
#####################################################################################
##
## Before Adding This MOD To Your Forum,
## you Should Back Up All Files Related To This MOD
##
#####################################################################################
Copy privmsg_export.php into the root directory of your phpBB
msg_export.gif into themes/your_theme/forums/images
#
#-----[ OPEN ]------------------------------------------
#
modules/Private_Messages/index.php
#
#-----[ FIND ]-------------------------------------------------
#
// Dump vars to template
//
$template->assign_vars(array(
'BOX_NAME' => $l_box_name,
'INBOX_IMG' => $inbox_img,
'SENTBOX_IMG' => $sentbox_img,
'OUTBOX_IMG' => $outbox_img,
'SAVEBOX_IMG' => $savebox_img,
'INBOX' => $inbox_url,
'SENTBOX' => $sentbox_url,
'OUTBOX' => $outbox_url,
'SAVEBOX' => $savebox_url,
#
#-----[ AFTER, ADD ]----------------------------------------
#
'EXPORT' => "<a href='" . append_sid("privmsg_export.php") . "' target='_new'>" . $lang['Export'] . " </a>",
'EXPORT_IMG' => "<a href='" . append_sid("privmsg_export.$phpEx") . "'><img src='" . $images['pm_export'] . "' border='0' alt='" . $lang['Export'] . "' /></a>",
#
#-----[ OPEN ]------------------------------------------
#
themes/your_theme/forums/privmsgs_body.tpl
#
#-----[ FIND ]-------------------------------------------------
#
<td>{SAVEBOX_IMG}</td>
<td><span class="cattitle">{SAVEBOX} </span></td>
#
#-----[ AFTER, ADD ]----------------------------------------
#
<td>{EXPORT_IMG}</td>
<td><span class="cattitle">{EXPORT} </span></td>
#
#-----[ OPEN ]------------------------------------------
#
themes/your_theme/forums/your_theme.cfg or themes/your_theme/forums/forums.cfg
#
#-----[ FIND ]-------------------------------------------------
#
$images['pm_readmsg'] = "$current_template_images/folder.gif";
#
#-----[ AFTER, ADD ]----------------------------------------
#
$images['pm_export'] = "$current_template_images/msg_export.gif";
#
#-----[ OPEN ]------------------------------------------
#
modules/Forums/language/lang_english/lang_main.php
#
#-----[ FIND ]-------------------------------------------------
#
//
// That's all, Folks!
// -------------------------------------------------
#
#-----[ AFTER, ADD ]----------------------------------------
#
$lang['export_pm_from'] = 'From: ';
$lang['export_pm_to'] = 'To: ';
$lang['export_pm_subject'] = 'Subject: ';
$lang['export_pm_time'] = 'Time: ';
$lang['export_pm_text'] = 'Text: ';
$lang['Export'] = 'Export';
$lang['sign_in_to_export'] = 'You need to login to export your pms';
#
# OR GERMAN
#
#-----[ AFTER, ADD ]----------------------------------------
#
$lang['export_pm_from'] = 'Von: ';
$lang['export_pm_to'] = 'An: ';
$lang['export_pm_subject'] = 'Betreff: ';
$lang['export_pm_time'] = 'Zeit: ';
$lang['export_pm_text'] = 'Text: ';
$lang['Export'] = 'Exportieren';
$lang['sign_in_to_export'] = 'Du musst dich einloggen, um PN exportieren zu können.';
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
#####################################################################################
##
## FR - [ Only registered users can see links on this board! Get registered or login! ]
##
#####################################################################################
|
privmsg_export.php file:
Code:<?php
/***************************************************************************
* privmsg_export.php
* -------------------
* begin : June 2004
* copyright : (C) FR
* email : fr@php-styles.com
*
***************************************************************************/
/***************************************************************************
*
* This hack is released under the GPL License.
* This hack can be freely used, but not distributed, without permission.
* Intellectual Property is retained by the author listed above.
*
***************************************************************************/
if (!eregi("modules.php", $_SERVER['SCRIPT_NAME'])) {
die ("You can't access this file directly...");
}
if ($popup != "1"){
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");
}
else
{
$phpbb_root_path = 'modules/Forums/';
}
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include('includes/bbcode.'.$phpEx);
include('includes/functions_post.'.$phpEx);
// Start session management
$userdata = session_pagestart($user_ip, PAGE_PRIVMSGS, $nukeuser);
init_userprefs($userdata);
// End session management
// Start Include language file
$language = $board_config['default_lang'];
if( !file_exists($phpbb_root_path . 'language/lang_' . $language . '/lang_main.'.$phpEx) )
{
$language = 'english';
} // if
if ( $userdata['user_id'] < 1 )
{
message_die(GENERAL_ERROR, $lang['sign_in_to_export'], '', __LINE__, __FILE__, $sql);
}
include($phpbb_root_path . 'language/lang_' . $language . '/lang_main.' . $phpEx);
// end include language file
$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, pmt.privmsgs_bbcode_uid
FROM (" . PRIVMSGS_TABLE . " pm
LEFT JOIN " . PRIVMSGS_TEXT_TABLE . " pmt ON pmt.privmsgs_text_id = pm.privmsgs_id
LEFT JOIN " . USERS_TABLE . " u ON pm.privmsgs_from_userid = u.user_id
LEFT JOIN " . USERS_TABLE . " u2 ON pm.privmsgs_to_userid = u2.user_id)
WHERE pmt.privmsgs_text_id = pm.privmsgs_id
AND ( u.user_id = " . $userdata['user_id'] . "
OR u2.user_id = " . $userdata['user_id'] . ")
ORDER BY pm.privmsgs_date DESC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query private message post information', '', __LINE__, __FILE__, $sql);
}
$total_messages = 0;
while( $row = $db->sql_fetchrow($result) )
{
$messages_rowset[] = $row;
$total_messages++;
} // while
echo "<html><body>";
for($i = 0; $i < $total_messages; $i++)
{
echo "###################################################################################################<br>";
echo "<b>" . $lang['export_pm_from'] . " </b>" . $messages_rowset[$i]['username_1'] . "<br>";
echo "<b>" . $lang['export_pm_to'] . " </b>" . $messages_rowset[$i]['username_2'] . "<br>";
echo "<b>" . $lang['export_pm_subject'] . " </b>" . $messages_rowset[$i]['privmsgs_subject'] . "<br>";
echo "<b>" . $lang['export_pm_time'] . " </b>" . create_date("m/d/Y - h:i:s", $messages_rowset[$i]['privmsgs_date'], $board_config['board_timezone']) . "<br>";
echo "<b>" . $lang['export_pm_text'] . " </b><br>" . bbencode_second_pass($messages_rowset[$i]['privmsgs_text'], $messages_rowset[$i]['privmsgs_bbcode_uid']) . "<br>";
echo "###################################################################################################<br><br>";
}
echo "</body></html>";
?>
|
|
|
|