• [MOD] PMv2 Tutorial Republished here 5 0 5 1
Currently:  

Author Topic: [MOD] PMv2 Tutorial Republished here  (Read 809202 times)

0 Members and 2 Guests are viewing this topic.

Offline Foto-Portal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #360 on: January 15, 2007, 12:32:51 PM »
hier ist die original pm_install

Code: [Select]
<?php

define
('ROOT_PATH''./');
include(
ROOT_PATH.'config.php');
include(
ROOT_PATH.'global.php');
$upgrade 0;
$mod_name "MOD Private Messaging v2";
$mod_author "V@no";
$sql_data = array(
            
"CREATE TABLE `".PM_TABLE."` ( `pm_id` mediumint(10) unsigned NOT NULL auto_increment, `pm_type` tinyint(2) NOT NULL default '0', `pm_to` mediumint(8) NOT NULL default '0', `pm_from` mediumint(8) NOT NULL default '0', `pm_subject` varchar(255) NOT NULL default '', `pm_text` text, `pm_date` int(11) NOT NULL default '0', `pm_date_rcvd` int(11) NOT NULL default '0', `pm_ip` varchar(20) NOT NULL default '0', `pm_html` tinyint(1) NOT NULL default '0', `pm_bbcode` tinyint(1) NOT NULL default '0', `pm_smiles` tinyint(1) NOT NULL default '0', KEY `pm_id` (`pm_id`,`pm_to`,`pm_from`)) TYPE=MyISAM",
            
"ALTER TABLE `".USERS_TABLE."` ADD `user_pm_inbox` int(11) NOT NULL default '0', ADD `user_pm_sentbox` int(11) NOT NULL default '0', ADD `user_pm_email` tinyint(1) NOT NULL default '1', ADD `user_pm_popup` tinyint(1) NOT NULL default '0'",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm', '1')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_inbox', '30')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_sentbox', '10')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_html', '0')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_bbcode', '1')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_img', '1')"
);
$error_log = array();
$error_msg "";

if (
$action == "modinstall") {

if ((isset(
$_POST['upgrade']) && $_POST['upgrade']) && (isset($_POST['pms_table']) && $_POST['pms_table'])) {
  
$upgrade 1;
}
?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  <link rel="stylesheet" href="admin/cpstyle.css">
  <title>4images Installer</title>
</head>
<body leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" bgcolor="#FFFFFF">
  <table cellpadding="0" cellspacing="0" border="0" width="500" align="center">
    <tr><td class="tableborder"><img src="admin/images/logo_installer.gif" width="500" height="45"><br />
        <table cellpadding="3" cellspacing="1" border="0" width="100%">
          <tr class="tablerow2"><td><b><?php echo $mod_name?></b>&nbsp;&nbsp;&nbsp;&nbsp;(by <?php echo $mod_author?>)</td></tr>
  </table>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
  <tr class="tableheader"><td colspan="2"><b><span class="tableheader"><?php echo (($upgrade) ? "Upgrade" "Installation"?> status</span></b></td></tr>
  <tr class="tablerow2"><td colspan="2"><br /><blockquote>
<?php
$date 
time();
if (
$upgrade) {
  
$sql_data = array(
            
"ALTER TABLE `".$_POST['pms_table']."` RENAME `".PM_TABLE."`",
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_id` `pm_id` MEDIUMINT( 10 ) UNSIGNED NOT NULL AUTO_INCREMENT",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_type` `pm_type` TINYINT( 2 ) DEFAULT '0' NOT NULL",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_to` `pm_to` mediumint(8) NOT NULL default '0'",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_from` `pm_from` mediumint(8) NOT NULL default '0'",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_subject` `pm_subject` varchar(255) NOT NULL default ''",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_text` `pm_text`text",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_date` `pm_date` int(11) NOT NULL default '0'",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_date_rcvd` `pm_date_rcvd` int(11) NOT NULL default '0'",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_ip` `pm_ip` varchar(20) NOT NULL default '0'",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_html` `pm_html` tinyint(1) NOT NULL default '0'",
            
"ALTER TABLE `".PM_TABLE."` CHANGE `pms_bbcode` `pm_bbcode` tinyint(1) NOT NULL default '0'",
            
"ALTER TABLE `".PM_TABLE."` ADD `pm_smiles` tinyint(1) NOT NULL default '0'",
            
"ALTER TABLE `".USERS_TABLE."` CHANGE `user_pms_email` `user_pm_email` tinyint(1) NOT NULL default '1'",
            
"ALTER TABLE `".USERS_TABLE."` CHANGE `user_pms_popup` `user_pm_popup` tinyint(1) NOT NULL default '0'",
            
"ALTER TABLE `".USERS_TABLE."` ADD `user_pm_inbox` int(11) NOT NULL default '0'",
            
"ALTER TABLE `".USERS_TABLE."` ADD `user_pm_sentbox` int(11) NOT NULL default '0'",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm', '1')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_inbox', '30')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_sentbox', '10')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_html', '0')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_bbcode', '1')",
            
"INSERT INTO `".SETTINGS_TABLE."` ( `setting_name` , `setting_value` ) VALUES ('pm_img', '1')"
  
);
}
$error 0;
foreach (
$sql_data as $val){
if ($site_db->query($val)) {
 
  $log[$val] = "<font color=\"green\">Done</font>";
}
else {
  $log[$val] = "<font color=\"red\">Error</font>";
  $error 1;
  }

}
if (!
$error) { echo "<center><h4>Database successfuly updated!</h4></center>"; }
$error_msg .= "<ol>";
foreach (
$log as $key => $val) {
  
$error_msg .= sprintf("<li>%s</li>&nbsp;&nbsp;$key"$val);
}
$error_msg .= "</ol>";
echo 
"<p class=\"rowtitle\">".$error_msg."</p>";
?>


  </blockquote></td></tr>
 <tr class="tablefooter"><td colspan="2">&nbsp;</td></tr>
        </table>
      </td>
    </tr>
  </table>
</table>
<p align="center"> Powered by <b>4images</b> <?php echo SCRIPT_VERSION?><br />Copyright &copy; 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a><br />Installer by SLL</p>
</body>
</html>
<?php
exit;
}

$error 0;
$pms_table "";
$pm_error = (defined('PM_TABLE')) ? 1;
$result $site_db->query_firstrow("SHOW TABLES LIKE '".str_replace("_""\_"$table_prefix)."pms'");
if (
$result) {
  
$pms_table $result[0];
  
$upgrade 1;
}
$result $site_db->query_firstrow("SHOW TABLES LIKE '".str_replace("_""\_"$table_prefix)."pm'");
echo 
"SHOW TABLES LIKE '".str_replace("_""\_"$table_prefix)."pm'";
if (
$result) {
  
$error 1;
}

?>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
  <meta content="text/html; charset=windows-1252" http-equiv="Content-Type">
  <link rel="stylesheet" href="admin/cpstyle.css">
  <title>4images Installer</title>
</head>
<body leftmargin="20" topmargin="20" marginwidth="20" marginheight="20" bgcolor="#FFFFFF">
<form action="<?php echo $self_url?>" name="form" method="post">

  <table cellpadding="0" cellspacing="0" border="0" width="500" align="center">
    <tr><td class="tableborder"><img src="admin/images/logo_installer.gif" width="500" height="45"><br />
        <table cellpadding="3" cellspacing="1" border="0" width="100%">
          <tr class="tablerow2"><td><b><?php echo $mod_name?></b>&nbsp;&nbsp;&nbsp;&nbsp;(by <?php echo $mod_author?>)</td></tr>
          <tr class="tablefooter"><td align="center">&nbsp;</td></tr>
  </table>
<table cellpadding="3" cellspacing="1" border="0" width="100%">
  <tr class="tablerow"><td colspan="2" align="right"></td></tr>
  <tr class="tablerow2"><td colspan="2"><center>
<?php
if ($error || $pm_error) {
?>

<h2>Sorry, can not continue, <?php echo (($pm_error) ? "you missed some steps of the installation." : (($upgrade) ? "both \"old\" and \"new\" PMS tables are present" "PM table is present")) ?>.</h2></center></td></tr>

<?php
}
else {
?>

  This script will modify your 4images database, so please<br><b>
  <font color="#FF0000">ALWAYS BACKUP YOUR DATABASE BEFORE RUNNING THIS MOD!</b></font><br><br>
  Please check out all fields shown below.<br>
  If they do not correspond to your settings, please<br><b>DO NOT START INSTALLER</b>!
  </center></td></tr>
  <tr class="tableheader"><td colspan="2"><b><span class="tableheader">Database configuration</span></b></td></tr>
  <tr class="tablerow"><td>Database server type</td><td><?php echo $db_servertype?></td></tr>
  <tr class="tablerow2"><td>Database server hostname</td><td><?php echo stripslashes($db_host); ?></td></tr>
  <tr class="tablerow"><td>Database name</td><td><?php echo stripslashes($db_name); ?></td></tr>
  <tr class="tablerow2"><td>Prefix for tables in database</td><td><?php echo stripslashes($table_prefix); ?></td></tr>
<?php
if ($upgrade) {
?>

  <tr class="tableheader"><td colspan="2"><b><span class="tableheader">Upgrade</span></b></td></tr>
  <tr class="tablerow2"><td>Found old PMS. Do u want do Upgrade?</td><td><input type="radio" name="upgrade" value="1" checked> Yes&nbsp;<input type="radio" name="upgrade" value="0"> No</td></tr>
  <tr class="tablerow2"><td><u>Old</u> PMS table name</td><td><input type="text" name="pms_table" value="<?php echo $pms_table?>"></td></tr>
<?php
}
?>

  <tr class="tablefooter"><td colspan="2"><center><input type="hidden" name="action" value="modinstall"><input type="submit" value="Start modify database" class="button" name="submit"></center></td></tr>
<?php
}
?>

        </table>
      </td>
    </tr>
  </table>
</form>
<p align="center"> Powered by <b>4images</b> <?php echo SCRIPT_VERSION ?><br />Copyright &copy; 2002 <a href="http://www.4homepages.de" target="_blank">4homepages.de</a><br />Installer by SLL</p>
</body>
</html>


HEEEELLLPPPP!!!!!

there is an ERROR:
Sorry, can not continue, you missed some steps of the installation..

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #361 on: January 15, 2007, 12:41:55 PM »
@ Foto-Portal
... hast es schon hiermit versucht ...
http://www.4homepages.de/forum/index.php?topic=6692.msg30080#msg30080

... wenn du die Installationsdatei nicht im Post findest, bist du dir dann sicher die restliche Installation richtig ausgeführt zu haben ... ?
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Foto-Portal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #362 on: January 15, 2007, 12:56:01 PM »
@ Foto-Portal
... hast es schon hiermit versucht ...
http://www.4homepages.de/forum/index.php?topic=6692.msg30080#msg30080

... wenn du die Installationsdatei nicht im Post findest, bist du dir dann sicher die restliche Installation richtig ausgeführt zu haben ... ?



@mawenzi

so jetzt habe ich nochmal step 1-9 alles überprüft.
nun führe ich die installationsdatei aus und der gibt mir eine fehlermeldung aus.

ich glaube da sind mehrere dateien die ich nicht habe.
z.B.: pm.php
usw...

welche NEUE dateien brauche ich überhaupt für diese Geschickte?
Momentan habe ich nur als neue Datei, die Installationsdatei, mehr nicht.

Braucht man da nicht die "PMS" package
Das habe ich nähmlich nicht! :((((((((((((((

Offline mawenzi

  • Moderator
  • 4images Guru
  • *****
  • Posts: 4.500
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #363 on: January 15, 2007, 03:00:36 PM »
... die pms_*.* Dateien gehören nicht zum [MOD] Private Messages v2.5.x ... !
... ich hänge nochmals ein vollständiges Installationspaket mit allen erforderlichen Dateien an ...
Your first three "must do" before you ask a question ! ( © by V@no )
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

You are on search for top 4images MOD's ?
- then please search here ... Mawenzi's Top 100+ MOD List (unsorted sorted) ...

Offline Mirwais

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #364 on: January 15, 2007, 06:53:34 PM »
Hello!!
mawenzi  please help me too !!
when I try to install i get error (see error in attachment file
Please Help

Offline Aleksey

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #365 on: January 16, 2007, 11:53:48 AM »
ok...  use phpMyadmin and this sql

Code: [Select]
-- phpMyAdmin SQL Dump
-- version 2.6.1-rc2
-- http://www.phpmyadmin.net

CREATE TABLE `4images_pm` (
  `pm_id` mediumint(10) unsigned NOT NULL auto_increment,
  `pm_type` tinyint(2) NOT NULL default '0',
  `pm_to` mediumint(8) NOT NULL default '0',
  `pm_from` mediumint(8) NOT NULL default '0',
  `pm_subject` varchar(255) NOT NULL default '',
  `pm_text` text,
  `pm_date` int(11) NOT NULL default '0',
  `pm_date_rcvd` int(11) NOT NULL default '0',
  `pm_ip` varchar(20) NOT NULL default '0',
  `pm_html` tinyint(1) NOT NULL default '0',
  `pm_bbcode` tinyint(1) NOT NULL default '0',
  `pm_smiles` tinyint(1) NOT NULL default '0',
  KEY `pm_id` (`pm_id`,`pm_to`,`pm_from`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
       

Offline Foto-Portal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #366 on: January 16, 2007, 12:28:46 PM »
ok...  use phpMyadmin and this sql

Code: [Select]
-- phpMyAdmin SQL Dump
-- version 2.6.1-rc2
-- http://www.phpmyadmin.net

CREATE TABLE `4images_pm` (
  `pm_id` mediumint(10) unsigned NOT NULL auto_increment,
  `pm_type` tinyint(2) NOT NULL default '0',
  `pm_to` mediumint(8) NOT NULL default '0',
  `pm_from` mediumint(8) NOT NULL default '0',
  `pm_subject` varchar(255) NOT NULL default '',
  `pm_text` text,
  `pm_date` int(11) NOT NULL default '0',
  `pm_date_rcvd` int(11) NOT NULL default '0',
  `pm_ip` varchar(20) NOT NULL default '0',
  `pm_html` tinyint(1) NOT NULL default '0',
  `pm_bbcode` tinyint(1) NOT NULL default '0',
  `pm_smiles` tinyint(1) NOT NULL default '0',
  KEY `pm_id` (`pm_id`,`pm_to`,`pm_from`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
       



@Aleksey

Ok thx .
I have done step 1 to step 8.
Step 9 ist what you have witten. I made the sql table ->  4images_pm .

Now i paste :

{pm_boxes} {pm}
{pm_inbox} {pm_sentbox} {pm_outbox} {pm_newpm}

in headder.html

but nothing happens!!

What should i do now?
Please Help me!



Offline Mirwais

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #367 on: January 16, 2007, 06:36:55 PM »
ok...  use phpMyadmin and this sql

Code: [Select]
-- phpMyAdmin SQL Dump
-- version 2.6.1-rc2
-- http://www.phpmyadmin.net

CREATE TABLE `4images_pm` (
  `pm_id` mediumint(10) unsigned NOT NULL auto_increment,
  `pm_type` tinyint(2) NOT NULL default '0',
  `pm_to` mediumint(8) NOT NULL default '0',
  `pm_from` mediumint(8) NOT NULL default '0',
  `pm_subject` varchar(255) NOT NULL default '',
  `pm_text` text,
  `pm_date` int(11) NOT NULL default '0',
  `pm_date_rcvd` int(11) NOT NULL default '0',
  `pm_ip` varchar(20) NOT NULL default '0',
  `pm_html` tinyint(1) NOT NULL default '0',
  `pm_bbcode` tinyint(1) NOT NULL default '0',
  `pm_smiles` tinyint(1) NOT NULL default '0',
  KEY `pm_id` (`pm_id`,`pm_to`,`pm_from`)
) ENGINE=MyISAM AUTO_INCREMENT=1 ;
       


Thanks again aleksey!
I got errors after doing this, and by switching off Pm, error disappear.
But now  pages cruches alot.
 :(

Offline Aleksey

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #368 on: January 17, 2007, 03:28:19 PM »
after insert sql dump, see table prefix  4images_pm correct?

If all correct, then attentively compare all steps modify code gallery. 
All works is fine on version 1.7.4

Good luck!

Offline Mirwais

  • Newbie
  • *
  • Posts: 39
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #369 on: January 18, 2007, 02:27:55 AM »
after insert sql dump, see table prefix  4images_pm correct?

If all correct, then attentively compare all steps modify code gallery. 
All works is fine on version 1.7.4

Good luck!


I get this errors
Quote
DB Error: Bad SQL Query: SELECT COUNT(pm_id) AS total FROM PM_TABLE WHERE pm_to = 1 AND (pm_type = PM_SENT OR pm_type = PM_SDLT OR pm_type = PM_UNREAD OR pm_type = PM_USDLT)
Unknown column 'PM_SENT' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(pm_id) AS total FROM PM_TABLE WHERE pm_from = 1 AND (pm_type = PM_UNREAD OR pm_type = PM_USDLT)
Unknown column 'PM_UNREAD' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(pm_id) AS total FROM PM_TABLE WHERE pm_from = 1 AND (pm_type = PM_SENT OR pm_type = PM_RDLT)
Unknown column 'PM_SENT' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(pm_id) AS new FROM PM_TABLE WHERE pm_to = 1 AND (pm_type = PM_UNREAD OR pm_type = PM_USDLT) ORDER BY pm_date DESC
Unknown column 'PM_UNREAD' in 'where clause'

DB Error: Bad SQL Query: SELECT pm_date FROM PM_TABLE WHERE pm_to = 1 AND (pm_type = PM_UNREAD OR pm_type = PM_USDLT) ORDER BY pm_date DESC
Unknown column 'PM_UNREAD' in 'where clause'

 :(

Offline Maeva55

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #370 on: January 18, 2007, 10:35:39 AM »
Hello,
Many many pages on this MOD, but i am a little lost for install it.
Is anyone can make a tutorial with modifs on all files.
Or give links for install in one time with files attached ?
I have 1.7.4 version, and after all these pages i dont understand for correct install.
Many thank's and kisses.

Offline Aleksey

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #371 on: January 18, 2007, 12:08:19 PM »
Congraculations!  :)
I modify this installer for 1.7.4 version...  Use it..
Need fresh 4images database!

Offline Maeva55

  • Newbie
  • *
  • Posts: 12
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #372 on: January 18, 2007, 12:20:08 PM »
Congraculations!  :)
I modify this installer for 1.7.4 version...  Use it..
Need fresh 4images database!
Hi,
Many thank's for this  :lol:
Now  :oops: can you tell me if i must make modifis at stage 1 at the topic beginning or if others files are needed ?
Kisses

Offline Foto-Portal

  • Newbie
  • *
  • Posts: 43
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #373 on: January 19, 2007, 10:44:54 AM »
Congraculations!  :)
I modify this installer for 1.7.4 version...  Use it..
Need fresh 4images database!


Hi,

i have version 1.7.4 too.
But it just doesn't work.

Please Help me.
What should i do.

Offline jotabonfim

  • Jr. Member
  • **
  • Posts: 67
    • View Profile
Re: [MOD] PMv2 Tutorial Republished here
« Reply #374 on: January 25, 2007, 03:13:28 AM »
???????????????????????????????????????????????????????????????????

Hi,

i have version 1.7.4 too. But it just doesn't work.