Author Topic: [Plugin] View Users PM for PM 2.0  (Read 36333 times)

0 Members ve 1 Ziyaretçi konuyu incelemekte.

b.o.fan

  • Guest
[Plugin] View Users PM for PM 2.0
« on: Mart 14, 2005, 05:24:23 ÖS »
EDIT FROM A FORUM ADMINISTRATOR:

This plugin requires the installation of the "[MOD] Private Message System (PMS) not supported anymore!"
http://www.4homepages.de/forum/index.php?topic=5374.0

i know PM are private.
but i think i show the code from my pms-viewer.php
Code: [Select]
<?php // PLUGIN_TITLE: Private Nachrichten anzeigen

$nozip 1;
define('IN_CP'1);

$root_path = (eregi("\/plugins\/"$PHP_SELF)) ? "./../../" "./../";
define('ROOT_PATH'$root_path);
require(
ROOT_PATH.'admin/admin_global.php');
show_admin_header();

if (
$sort == "") {
$sort "pm_id";
}

if (
$order == "") {
$order "ASC";
}

if (
$number == "") {
$number "100";
}

if (
$from == "") {
$from "0";
}

$nextfrom $from $number;

if (
$action == "") {
global 
$site_db;

   echo 
"<form action=\"pms_viewer.php\" method=\"post\" name=\"Viewer\" id=\"Viewer\">
Sortieren nach:
  <select name=\"sort\" id=\"sort\">
<option value=\"
$sort\" selected=\"selected\">$sort</option>
    <option value=\"pm_id\">pm_id</option>
    <option value=\"pm_from\">pm_from</option>
    <option value=\"pm_to\">pm_to</option>
    <option value=\"pm_subject\">pm_subject</option>
    <option value=\"pm_type\">pm_type</option>
  </select>
    <select name=\"order\" id=\"order\">
   <option value=\"
$order\" selected=\"selected\">$order</option>
    <option value=\"ASC\">ASC</option>
    <option value=\"DESC\">DESC</option>
  </select>
    Beginne bei Nachricht:
  <input name=\"from\" type=\"text\" id=\"from\" value=\"
$nextfrom\" size=\"4\">
  Nachrichten pro Seite:
  <input name=\"number\" type=\"text\" id=\"number\" value=\"
$number\" size=\"4\">
    <input type=\"submit\" class=\"button\" name=\"Submit\" value=\"Anzeigen\">
</form>"
;

   echo 
"<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\"><tr><td class=\"tableborder\"><table cellpadding=\"3\" cellspacing=\"1\" border=\"0\"><td class=\"tableheader\" colspan=\"4\">Private Nachrichten in der Datenbank</td>";

    
$sql "SELECT * FROM ".PM_TABLE."
           ORDER BY 
$sort $order
            LIMIT 
$from$number";
    
$result $site_db->query($sql);
    while(
$row $site_db->fetch_array($result)){

      
$id $row["pm_id"];
     
$from $row["pm_from"];
       
$to $row["pm_to"];
        
$subject $row["pm_subject"];
      
$type $row["pm_type"];
     if (
$type == 0) {
     
$pmtype "<b><font color=blue>gelöscht</font></b>&nbsp;<font color=gray>(Empfänger)</font>";
     }
     if (
$type == 1) {
     
$pmtype "<b><font color=blue>gelöscht</font></b>&nbsp;<font color=gray>(Absender)</font>";
     }
     if (
$type == 2) {
     
$pmtype "<b><font color=green>gelesen</font></b>";
     }
     if (
$type == 3) {
     
$pmtype "<b><font color=red>ungelesen</font></b>";
     }

     
$sql "SELECT ".get_user_table_field("""user_name")."
              FROM "
.USERS_TABLE."
              WHERE "
.get_user_table_field("""user_id")." LIKE '$from'";
      
$result_from $site_db->query($sql);
      if (
$result_from) {
       while (
$row $site_db->fetch_array($result_from)) {
        
$from_name $row["user_name"];
       }
       
$site_db->free_result($result_from);
      }
     if (
$from == 0) {
      
$from_name "anonym";
      }

     
$sql "SELECT ".get_user_table_field("""user_name")."
              FROM "
.USERS_TABLE."
              WHERE "
.get_user_table_field("""user_id")." LIKE '$to'";
      
$result_to $site_db->query($sql);
      if (
$result_to) {
       while (
$row $site_db->fetch_array($result_to)) {
        
$to_name $row["user_name"];
       }
       
$site_db->free_result($result_to);
      }

echo <<<END
  <tr class="tablerow2" valign="top">
    <td><b>ID:</b>&nbsp;
$id</td>
    <td><b>Von:</b>&nbsp;<a href="../../member.php?action=showprofile&user_id=
$from" target="_blank">$from_name</a></td>
    <td><b>An:</b>&nbsp;<a href="../../member.php?action=showprofile&user_id=
$to" target="_blank">$to_name</a></td>
    <td><b>Betreff:</b>&nbsp;<a href="pms_viewer.php?action=show&id=
$id&from_name=$from_name&to_name=$to_name" target="_blank">$subject</a></td>
   <td>
$pmtype</td>
  </tr>
END;

}
       
$site_db->free_result($result);
echo 
"</td></tr></table></table><br><br>";
}


if (
$action == "show") {
global 
$site_db;

     
$sql "SELECT *
              FROM "
.PM_TABLE."
              WHERE pm_id = 
$id";
            
$result $site_db->query($sql);

    while(
$row $site_db->fetch_array($result)){

     
$from $row["pm_from"];
       
$ip $row["pm_ip"];
       
$to $row["pm_to"];
        
$subject $row["pm_subject"];
      
$date format_date($config['date_format']." ".$config['time_format'], $row["pm_date"]);
      
$rcvd $row["pm_date_rcvd"];
     if (
$rcvd != 0) {
     
$received format_date($config['date_format']." ".$config['time_format'], $rcvd);
     }
     
$text $row["pm_text"];
     
$type $row["pm_type"];
     if (
$type == 0) {
     
$pmtype "<b><font color=blue>gelöscht</font></b>&nbsp;<font color=gray>(Empfänger)</font>";
     }
     if (
$type == 1) {
     
$pmtype "<b><font color=blue>gelöscht</font></b>&nbsp;<font color=gray>(Absender)</font>";
     }
     if (
$type == 2) {
     
$pmtype "<b><font color=green>gelesen</font></b>";
     }
     if (
$type == 3) {
     
$pmtype "<b><font color=red>ungelesen</font></b>";
     }

echo <<<END
<table cellpadding="0" cellspacing="0" border="0" align="center"><tr><td class="tableborder"><table cellpadding="3" cellspacing="1" border="0"><td class="tableheader" colspan="4">ID: $id</td>
  <tr class="tablerow2" valign="top">
    <td><b>Von:</b>&nbsp;<a href="../../member.php?action=showprofile&user_id=
$from" target="_blank">$from_name</a></td>
    <td><b>IP:</b>&nbsp;
$ip</td>
    <td><b>An:</b>&nbsp;<a href="../../member.php?action=showprofile&user_id=
$to" target="_blank">$to_name</a></td>
   </tr>
  <tr class="tablerow" valign="top">
      <td><b>gesendet:</b>&nbsp;
$date</td>
    <td><b>gelesen:</b>&nbsp;
$received</td>
   <td><b>Status:</b>&nbsp;
$pmtype</td>
</tr>
     <tr class="tablerow2" valign="top">
    <td colspan="3"><b>Betreff:</b>&nbsp;
$subject</td>
  </tr>
  <tr class="tablerow" valign="top">
    <td colspan="3"><b>Nachricht:</b><br>
$text</td>
   </tr>
</table>
</table>
<p align="center"><a href="javascript:window.close()">[schließen]</a></p>
END;
}
       
$site_db->free_result($result);
}

show_admin_footer();
?>

you must name it pms_viewer.php and you must drop it into admin/plugin


log into your ACP an have fun! ^^
b.o.fan
« Last Edit: Mart 14, 2005, 06:13:38 ÖS by Chris »

Offline ascanio

  • Hero Member
  • *****
  • Posts: 569
    • View Profile
    • http://www.surfourspace.net
Re: [Plugin] View Users PM for PM 2.0
« Reply #1 on: Nisan 12, 2005, 02:55:05 ÖS »
Any body has make a modificatios of this file for the new version of the Private Messages MOD?

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [Plugin] View Users PM for PM 2.0
« Reply #2 on: Nisan 13, 2005, 12:54:16 ÖÖ »
Ah! another one who does not understand the meaning of "private" or "privacy" or just not respecting people's privacy
Sorry for that mess, but the impression of administrator-sleuths makes me feel somehow sick.
MAяTRIX


Offline mentally

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #3 on: Ağustos 30, 2005, 11:53:36 ÖS »
Any body has make a modificatios of this file for the new version of the Private Messages MOD?


update?

Offline badass

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #4 on: Ağustos 31, 2005, 03:26:23 ÖÖ »
i tried this mod i got an error

Parse error: parse error in /home/www/aleali.farvista.net/dm/admin/plugins/pms_viewer.php on line 180



???
any  clues

Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #5 on: Ağustos 31, 2005, 11:28:09 ÖS »
this plugin give me that error too  =/

Offline martrix

  • Hero Member
  • *****
  • Posts: 755
    • View Profile
    • overlord.cz
Re: [Plugin] View Users PM for PM 2.0
« Reply #6 on: Eylül 09, 2005, 10:58:56 ÖÖ »
Quote
This plugin requires the installation of the "[MOD] Private Message System (PMS) not supported anymore!"

please note, that the subject-name is wrong - if you use that (without modifications) on PM v.2 you will get an error.
MAяTRIX


Offline beseech

  • Full Member
  • ***
  • Posts: 150
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #7 on: Eylül 09, 2005, 03:37:16 ÖS »
I'm using the PMS version , and this still giving a error on line 180 (unspected $ ) .......


(sorry my english)

Offline fast

  • Jr. Member
  • **
  • Posts: 99
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #8 on: Şubat 24, 2008, 10:42:51 ÖS »
leider wird in der email, die an die user gesendet wird, ein unvollständiger link angegeben. d.h. der anfang fehlt, es geht erst mit /pm... los.

kann das jmd fixen?



Offline Bob

  • Jr. Member
  • **
  • Posts: 79
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #9 on: Mayıs 27, 2008, 03:21:10 ÖS »
PERFEKT !!!

Offline Mr Kennedy

  • Jr. Member
  • **
  • Posts: 81
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #10 on: Temmuz 26, 2011, 01:11:43 ÖS »
Ich nutze dieses Plugin für den PM-Mod von KurtW, den es hier ja leider nicht mehr gibt...

An sich funktioniert der PM-Viewer, allerdings bewirkt der Klick auf "Anzeigen" nix.
Um weitere PMs zu sehen, muss man die Zahlen in der .php bearbeiten.
Vielleicht könnte ja einer das Plugin bearbeiten, dass es wieder voll funktionstüchtig ist? :)

Offline kumotobi

  • Pre-Newbie
  • Posts: 5
    • View Profile
Re: [Plugin] View Users PM for PM 2.0
« Reply #11 on: Eylül 14, 2012, 01:51:22 ÖÖ »
this plugin give me that error both :x