4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Plugins => Topic started by: b.o.fan on March 14, 2005, 05:24:23 PM

Title: [Plugin] View Users PM for PM 2.0
Post by: b.o.fan on March 14, 2005, 05:24:23 PM
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
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: ascanio on April 12, 2005, 02:55:05 PM
Any body has make a modificatios of this file for the new version of the Private Messages MOD?
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: martrix on April 13, 2005, 12:54:16 AM
Ah! another one who does not understand the meaning of "private" or "privacy" or just not respecting people's privacy (http://photo.overlord.cz/templates/blue_wonder/smiles/puke.gif)
Sorry for that mess, but the impression of administrator-sleuths makes me feel somehow sick.
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: mentally on August 30, 2005, 11:53:36 PM
Any body has make a modificatios of this file for the new version of the Private Messages MOD?


update?
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: badass on August 31, 2005, 03:26:23 AM
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
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: beseech on August 31, 2005, 11:28:09 PM
this plugin give me that error too  =/
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: martrix on September 09, 2005, 10:58:56 AM
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.
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: beseech on September 09, 2005, 03:37:16 PM
I'm using the PMS version , and this still giving a error on line 180 (unspected $ ) .......


(sorry my english)
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: fast on February 24, 2008, 10:42:51 PM
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?


Title: Re: [Plugin] View Users PM for PM 2.0
Post by: Bob on May 27, 2008, 03:21:10 PM
PERFEKT !!!
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: Mr Kennedy on July 26, 2011, 01:11:43 PM
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? :)
Title: Re: [Plugin] View Users PM for PM 2.0
Post by: kumotobi on September 14, 2012, 01:51:22 AM
this plugin give me that error both :x