4images Forum & Community

4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: Mark Gunter on March 13, 2005, 02:41:55 PM



Title: [MOD] PMv2 Tutorial Republished here
Post by: Mark Gunter on March 13, 2005, 02:41:55 PM
PM v.2 with revisions by V@no is Republished below. Thanks V@no for this mod!  8)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mark Gunter on March 18, 2005, 02:47:11 PM
******************************
----------------------------------------------------
Originally posted by / Author: V@no
----------------------------------------------------

------------| What's new in this version |------

1) The structure is 90% different then in v1
2) Everything renamed to "pm" instead of "pms" (had to do that, because I was using "pm" from the beginning and every time I do some changes on my site, I'd have to do it twice to post it here...)
3) Admin can:
-turn on/off PM feature
-set limit of messages stored in inbox and sentbox, globaly or per user.
-alow/disalow use HTML, BBCode or [img] tags in messages.
4) No more members list dropdown menu in "New message" form. (member name search is avalable)
5) Advanced BBCode and Smiles are included in this mod. U'll need reinstall them if u have had installed it before separately.

------------| Versions history |------

2.5.4 (22/04/05)
- Fixed a bug that displayed pm link for guests in comments (redo Step 12.2)

2.5.3 (26/08/04)
- Fixed a bug that didnt display properly error page when visitor not authorised to use PM (pm.php)
- Fixed submit button didnt get disabled when its pressed. (pm_new.html)

2.5.2 (25/08/04)
Fixed a mini minor bug, no reason to explain what exactly...

2.5.1 (24/08/04)
Just updated pm_new.html template

2.5.1 (12/07/04)
Fixed a problem with "preview" button (just replace pm_new.html template or change in yours: name="Preview" to name="preview")
Added Step 18 witch redirect to index.php on logout from pm.php

2.5 (03/07/04)
Messages from administrators are not being count in alowed limit.
Changed files:
pm.php

2.4
Added new feature:
in view message mode is possible navigate to next/previous message without needed go back to inbox/sentbox/outbox.
Upgrade from v2.3 read here

-----------| Changed Files |--------------------

/member.php  
/details.php  
/includes/constants.php  
/includes/page_header.php  
/includes/functions.php  
/includes/paging.php
/lang/<yourlanguage>/main.php  
/lang/<yourlanguage>/admin.php  

<templates of your choice>

/includes/db_field_definitions.php
/templates/<yourtemplate>/member_editprofile.html  
/templates/<yourtemplate>/member_profile.html  
/templates/<yourtemplate>/comment_bit.html
/templates/<yourtemplate>/header.html  
/templates/<yourtemplate>/style.css  
/logout.php  



-----------| New files |---------------------------

pm.php
smiles.php
bbcode2.js  

-----------| New templates |-------------------

pm.html
pm_folder.html
pm_view.html
pm_new.html
pm_delete.html
pm_finduser.html
pm_perpage_dropdown_form.html
bbcode2.html  

-----------| New email template |------------

pm_notify.html  

-----------| New images |----------------------

asc_order.gif
desc_order.gif
pm.gif
scale.gif
scale-bar.gif
scale-end.gif
and
smiles pack  




-----------| Installation |-----------------------

NOTE! - If u have installed the old PMS mod, then read next reply below before u make any changes!



Remember: ALWAYS DO BACKUPS BEFORE YOU DO ANY CHANGES!

Step 1

Download "PM v2 (http://gallery.vano.org/file55dl)" package.

Extract files, preserve tree structure, and replace any already existing files - but dont forget do backup before overwriting!

/pm.php
/pm_install.php
/bbcode2.js
/includes/paging.php
/lang/<yourlanguage>/email/pm_notify.html
/templates/<yourtemplate>/pm.html
/templates/<yourtemplate>/pm_delete.html
/templates/<yourtemplate>/pm_folder.html
/templates/<yourtemplate>/pm_new.html
/templates/<yourtemplate>/pm_view.html
/templates/<yourtemplate>/pm_finduser.html
/templates/<yourtemplate>/pm_perpage_dropdown_form.html
/templates/<yourtemplate>/bbcode2.html
/templates/<yourtemplate>/images/asc_order.gif
/templates/<yourtemplate>/images/desc_order.gif
/templates/<yourtemplate>/images/scale.gif
/templates/<yourtemplate>/images/scale-bar.gif
/templates/<yourtemplate>/images/scale-end.gif
all files from smiles folder into:
/templates/<yourtemplate>/smiles/

 


Step 2

Open /includes/constants.php
At the end of the file, just before closing ?> add this:

1
2
3
4
5
6
7
8
9
10
11
// Advanced BBCode can be only "bbcode" or "bbcode2" SETTING TO OTHER VALUES WILL CAUSE FATAL ERROR!!!
define('BBCODE', "bbcode2");
//PM
define('PM_TABLE', $table_prefix.'pm');
//do not modify next 6 lines!
define('PM_RDLT', 0); //Recipient deleted message (message only in: Sender's Setbox)
define('PM_SDLT', 1); //Sender deleted message (message only in: Recipient's Inbox)
define('PM_SENT', 2); //Recipient read message (message in: Sender's Sentbox and Recipient's Inbox)
define('PM_USDLT', 3); //Recipient has not read message (message only in: Recipient's Inbox)
define('PM_UNREAD', 5); //Recipient has not read message (message in: Sender's Outbox and Recipient's Inbox - New Message)
define('PM_UNLIMITED', -1);




Step 3

Open /lang/<yourlanguage>/main.php
At the end of the file, just before closing ?> add this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121

//-----------------------------------------------------
//--- PM (Private Messenging) -------------------------
//-----------------------------------------------------
$lang['pm'] = "Private Messaging";
$lang['pm_inbox'] = "Inbox";
$lang['pm_outbox'] = "Outbox";
$lang['pm_sentbox'] = "Sentbox";
$lang['pm_link'] = "&nbsp;&nbsp;&nbsp;You have<br />&raquo&nbsp;<b>{msg_new_count}</b> new message(s)<br />&nbsp;&nbsp;&nbsp;in your <b>{inbox}</b>.";
$lang['pm_short'] = "PM";
$lang['pm_error'] = "Error";
$lang['pm_error_to'] = "You must select a recipient.";
$lang['pm_error_to_notfound'] = "Recipient not found.";
$lang['pm_error_subject'] = "You must enter a subject.";
$lang['pm_error_message'] = "You must enter a message.";
$lang['pm_error_folder'] = "No folder selected.";
$lang['pm_error_id'] = "Nothing to show.";
$lang['pm_error_delete'] = "Nothing to delete.";
$lang['pm_compose'] = "Compose";
$lang['pm_delete'] = "Delete";
$lang['pm_delete_selected'] = "Delete selected";
$lang['pm_delete_all'] = "Delete all";
$lang['pm_delete_success'] = "The messages where deleted successfuly";
$lang['pm_delete_confirm'] = "Are you sure you want to delete that message from <b>".$lang['pm_'.$mode]."</b>?";
$lang['pm_delete_confirm_select'] = "Are you sure you want to delete selected messages from <b>".$lang['pm_'.$mode]."</b>?";
$lang['pm_delete_confirm_all'] = "Are you sure you want to delete ALL messages from <b>".$lang['pm_'.$mode]."</b>?";
$lang['pm_new'] = "New message";
$lang['pm_new_messages'] = "New messages";
$lang['pm_new_is_one'] = "You have <b>{count}</b> new"; //You have xx new message(s)
$lang['pm_message_single'] = "message";
$lang['pm_message_plural'] = "messages";
$lang['pm_select_user'] = "Select a user";
$lang['pm_sent_success'] = "The message was send successfully";
$lang['pm_save_success'] = "The message was updated successfully";
$lang['pm_redirect'] = "Please wait a moment";
$lang['pm_empty'] = "No messages in this folder";
$lang['pm_reply'] = "Reply";
$lang['pm_view'] = "View message";
$lang['pm_mark'] = "Mark";
$lang['pm_edit'] = "Edit";
$lang['pm_subject'] = "Subject";
$lang['pm_message'] = "Message";
$lang['pm_to'] = "To";
$lang['pm_date'] = "Date";
$lang['pm_send'] = "Send";
$lang['pm_preview'] = "Preview";
$lang['pm_status'] = "Status";
$lang['pm_from'] = "From";
$lang['pm_html'] = "Enable HTML in this message";
$lang['pm_bbcode'] = "Enable BBCode in this message";
$lang['pm_smiles'] = "Enable emoticons (smiles) in this message";
$lang['pm_perpage'] = "Messages per page";
$lang['pm_user_pm'] = "PM";
$lang['pm_user_pm_alt'] = "Send Private Message";
$lang['pm_total'] = "Total messages";
$lang['pm_received'] = "Received";
$lang['pm_quote'] = "Quote";
$lang['pm_error_save'] = "Error saving message. (the message could has been received)";
$lang['pm_error_notfound'] = "Can't find message.";
$lang['pm_paging_stats'] = "You have {total_cat_images} message(s) {new} on {total_pages} page(s) in your {box}.<br />Displayed: massage {first_page} to {last_page}.";
$lang['pm_email'] = "Notify by email on new Private Messages";
$lang['pm_popup'] = "Pop up window on new Private Messages";
$lang['pm_popup_confirm'] = "You have a new private message. Click OK to view it, or cancel to hide this prompt.";
$lang['pm_popup_newwindow'] = "Open in new window?\\n\\n(Press cancel to open your Inbox in the current window.)";
$lang['pm_email_new'] = "New private message";
$lang['pm_comment_quote'] = "Comment posted by";
$lang['pm_mark_read'] = "Mark all messages read";
$lang['pm_storage'] = "Your {box} is {size}% full";
$lang['pm_storage_unlimited'] = "Your {box} is unlimited";
$lang['pm_user_limit_reached'] = "Sorry, {user}'s Inbox is full";
$lang['pm_inbox_limit'] = "Inbox messages limit";
$lang['pm_sentbox_limit'] = "Sentbox messages limit";
$lang['pm_finduser'] = "Find a username";
$lang['pm_finduser_notfound'] = "No username found";
$lang['pm_finduser_wildcards'] = "Use * as a wildcard for partial matches";
$lang['pm_select'] = "Select";
$lang['pm_finduser_many'] = "Found more then one member. Please select one.";
$lang['pm_user_id_priority'] = "User name <b>selection</b> has higher priority then user name <b>field</b>.";
$lang['pm_user_inbox'] = "Inbox limit<span class=\"smalltext\"><br />set to <font color=red><b>0</b></font> to use global settings<br>or <font color=red><b>-1</b></font> for unlimited</span>";
$lang['pm_user_sentbox'] = "Sentbox limit<span class=\"smalltext\"><br />set to <font color=red><b>0</b></font> to use global settings<br>or <font color=red><b>-1</b></font> for unlimited</span>";
$lang['pm_toosoon'] = "Sorry, you can not send messages so frequently";
$lang['pm_toosoon_user'] = "Sorry, you can not send messages to the same member so frequently";
$lang['pm_next'] = "Next &raquo;";
$lang['pm_prev'] = "&laquo; Previous";
//-----------------------------------------------------
//--- BBCode2 -----------------------------------------
//-----------------------------------------------------
$lang['code'] = "Code";
$lang['quote'] = "Quote";
$lang['wrote'] = "wrote";
$lang['close_tags'] = "Close all tags";
$lang['close_window'] = "Close window";
$lang['all_emoticons'] = "All emoticons";
$lang['all'] = "All";
$lang['bbc_help_default'] = "Tip: Styles can be applied quickly to selected text.";
$lang['bbc_help'] = array(
      "b" => "Bold text: [b]text[/b]  (alt+b)",
      "i" => "Italic text: [i]text[/i]  (alt+i)",
      "u" => "Underline text: [u]text[/u]  (alt+u)",
      "q" => "Quote text: [quote]text[/quote] or [quote=name]text[/quote] (alt+q)",
      "l" => "List: [list]text[/list] (alt+l)",
      "o" => "Ordered list: [list=]text[/list]  (alt+o)",
      "p" => "Insert image: [img]http://image_url[/img]  (alt+p)",
      "w" => "Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url]  (alt+w)",
      "a" => "Close all open bbCode tags",
      "s" => "Font color: [color=red]text[/color]  Tip: you can also use color=#FF0000",
      "f" => "Font size: [size=x-small]small text[/size]",
      "sh" => "Shadow: [shadow=red,left,1]text[/shadow]",
      "g" => "Glow: [glow=red,2,1]text[/glow]",
      "al" => "Align: [align=center]text[/align]",
      "t" => "Teletype: [tt]text[/tt]",
      "ff" => "Font face: [font=verdana]text[/font]",
      "h" => "Horisontal line: [hr]",
      "m" => "Move: [move]text[/move]",
      "fl" => "Flash: [flash=200,200]URL[/flash]",
      "sb" => "Subscript: [sub]text[/sub]",
      "sp" => "Superscript: [sup]text[/sup]",
      "st" => "Line through: [s]text[/s] (alt+s)",
      "e" => "Insert email: [email]name@domain[/email] or [email=name@domain]email text[/email]  (alt+e)",
      "sm" => "Emoticons"
);




Step 4

Open /admin/settings.php

Find the last set of code that starts with:

1
2

  show_table_separator($setting_group

Look what is the number of the last set:

Quote  [Expand]

show_table_separator($setting_group[XX], 2, "#setting_group_XX");

Now, add 1 to that number and remember it, u'll need it 2 times during this installation!
(for example if u have
Quote  [Expand]

show_table_separator($setting_group[7], 2, "#setting_group_7");


then 7+1=8 so your number to remmeber is number 8 )

Step 4.2
 
Find:
1
2

show_form_footer($lang['save_changes'], "", 2);


Add before:
1
2
3
4
5
6
7
8

  show_table_separator($setting_group[XX], 2, "#setting_group_XX");
  show_setting_row("pm", "radio");
  show_setting_row("pm_html", "radio");
  show_setting_row("pm_bbcode", "radio");
  show_setting_row("pm_img", "radio");
  show_setting_row("pm_inbox");
  show_setting_row("pm_sentbox");


Replace XX with the number u remmembered in Step 4.

Step 5

Open /lang/<yourlanguage>/admin.php
Add at the end, just before closing ?>:
1
2
3
4
5
6
7
8
9

/*-- Setting-Group XX --*/
$setting_group[XX]="Private Messaging";
$setting['pm'] = "Allow Private Messaging";
$setting['pm_html'] = "Allow using HTML in messages";
$setting['pm_bbcode'] = "Allow using BBCODE in messages";
$setting['pm_img'] = "Allow using [img] tags in messages";
$setting['pm_inbox'] = "Inbox MAX messages<span class=\"smalltext\"><br />set to <b>0</b> for unlimited</span>";
$setting['pm_sentbox'] = "Sentbox MAX messages<span class=\"smalltext\"><br />set to <b>0</b> for unlimited</span>";


Replace XX with the number from Step 4.


Step 6

Open /includes/functions.php
Find:
1
2

function format_text


just comment entire function by doing this:
Add before that line:

and at the end of the function find (in default 4images it would be):
1
2
3

  return replace_badwords($text);
}

add after that closing bracket } add this:


Step 6.2

If u installed "Smiles" mod, comment it out too (do same thing as above, use /* at beginning of comment block and */ at the end.
Then add at the end of the file, just before closing ?>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
//---Code added for PM MOD------
function strip_brackets($text){
  global $lang;
   $code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
   $code_entities_replace = array('&lt;', '&gt;', '&quot;', ':', '[', ']', '(', ')', '&#123;', '&#125;');
  return preg_replace($code_entities_match, $code_entities_replace, $text);
}
function thumb($id, $dim = 50, $align = "bottom") {
  global $site_db, $user_info, $site_sess;
  if (empty($dim)) $dim = 50;
  if (empty($align)) $align = "bottom";
  $text = "";
  $sql = "SELECT image_name, image_id, image_media_file, image_thumb_file, cat_id
          FROM ".IMAGES_TABLE."
          WHERE image_id = ".$id;
  if ($row = $site_db->query_firstrow($sql)) {
    if (!get_file_path($row['image_thumb_file'], "thumb", $row['cat_id'], 0, 0)) {
      $file_src = ICON_PATH."/".get_file_extension($row['image_media_file']).".gif";
    }else{
      $file_src = get_file_path($row['image_thumb_file'], "thumb", $row['cat_id'], 0, 1);
    }
    $image_info = @get_imagesize($file_src, $info);
    $width = $image_info[0];
    $height = $image_info[1];
    $wh = get_resize($image_info[0], $image_info[1], $dim, $dim);
    $text = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$row['image_id'])."\"><img width = \"".$wh[0]."\" height=\"".$wh[1]."\" src=\"".$file_src."\" alt=\"".str_replace("\"", "&quot;", $row['image_name'])."\" align=\"".$align."\" border=\"1\" /></a>";
  }
  return $text;
}
function bb_code($text){
  global $lang;
  $text = strip_brackets($text);
  $text = str_replace("  ", "&nbsp; ", $text);
   // now Replace 2 spaces with " &nbsp;" to catch odd #s of spaces.
   $text = str_replace("  ", " &nbsp;", $text);
   // Replace tabs with "&nbsp; &nbsp;" so tabbed code indents sorta right without making huge long lines.
   $text = str_replace("\t", "&nbsp; &nbsp;", $text);

  $text = "<div class=\"codehead\"><b>".$lang['code'].":</b><div class=\"codeblock\">".stripslashes($text)."</div></div>";
  return $text;
}



function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0, $smiles = 0, $brackets = 1) {
  global $site_template, $lang;

  $text = trim($text);
  $text = str_replace("\\", "\\\\", $text);

  if ($html == 0 || $html == 2) {
    $text = safe_htmlspecialchars($text);
  }
  // Replace { to prevent parsing in templates
  $text = preg_replace(
    '='.preg_quote($site_template->start).'([A-Z0-9_]+)'.preg_quote($site_template->end).'=Usi',
    '&#123;\1&#125;',
    $text
  );
  if ($html !== 2) {
    $text = nl2br(trim($text));
    $text = replace_url($text);
  }

//   $text = preg_replace("/(\[)(php)(])(\r\n)*(.*)(\[\/php\])/esiU", "phphighlite('\\5')", $text);
  $text = ($smiles) ? smiles($text) : $text;
  if ($bbcode == 1) {
     $text = preg_replace("/\[php\](.*?)\[\/php\]/esi", "phphighlite('\\1')", $text);
      $text = preg_replace("/\[code\](.*?)\[\/code\]/esi", "bb_code('\\1')", $text);
  }
  if ($brackets) {
     $entities_match = array('{', '}');
     $entities_replace = array('&#123;', '&#125;');
    $text = str_replace($entities_match, $entities_replace, $text);
  }

  if ($bbcode == 1) {
    $text = preg_replace("/\[thumb=([0-9]+)(,([0-9]+)?)?(,([a-zA-Z]+))?\]/esi","thumb('\\1','\\3','\\5')",$text);
    $search_array = array(
      "/\[b\](.*?)\[\/b\]/si",
      "/\[i\](.*?)\[\/i\]/si",
      "/\[u\](.*?)\[\/u\]/si",
      "/\[email\](.*?)\[\/email\]/si",
      "/\[email=(.*?)\](.*?)\[\/email\]/si",
      "/\[quote=(.*?)\](.*?)/si",
      "/\[quote\](.*?)/si",
      "/\[\/quote\]/si",
      "/\[url=(.*?)\](.*?)\[\/url\]/si",
      "/\[url\](.*?)\[\/url\]/si",
      "/\[urlb=(.*?)\](.*?)\[\/urlb\]/si",
      "/\[urlb\](.*?)\[\/urlb\]/si",
      "/\[sub\](.*?)\[\/sub\]/si",
      "/\[sup\](.*?)\[\/sup\]/si",
      "/\[color=(.*?)\](.*?)\[\/color\]/si",
      "/\[size=(.*?)\](.*?)\[\/size\]/si",
      "/\[tt\](.*?)\[\/tt\]/si",
      "/\[s\](.*?)\[\/s\]/si",
      "/\[move\](.*?)\[\/move\]/si",
  //        "/\[align=(.*?)\](.*?)\[\/align\]/si",
      "/\[align=(.*?)\](.*?)\[\/align\](.<br \/>)?/si",
      "/\[font=(.*?)\](.*?)\[\/font\]/si",
      "/\[shadow=(.*?)\,(.*?)\,(.*?)\](.*?)\[\/shadow\]/si",
      "/\[glow=(.*?)\,(.*?)\,(.*?)\](.*?)\[\/glow\]/si",
      "/\[quote2=(.*?)\,(.*?)(\(.*?\))?\](.*?)/si",
      "/\[\/quote2\]/si",
      "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
      "/(\[)(list)(])(.*)(\[\/list\])/siU",
      "/(\[\*\])/siU",
      "/javascript:/si",
      "/about:/si",
    );
    $replace_array = array(
      "<b>\\1</b>",
      "<i>\\1</i>",
      "<u>\\1</u>",
      "<a href=mailto:\\1>\\1</a>",
      "<a href=mailto:\\1>\\2</a>",
      "<div class=\"quotehead\"><b>\\1</b> ".$lang['wrote'].":<div class=\"quoteblock\">\\2",
      "<div class=\"quotehead\"><b>".$lang['quote'].":</b><div class=\"quoteblock\">\\1",
      "</div></div>",
      "<a href=\"\\1\" target=_blank>\\2</a>",
      "<a href=\\1 target=_blank>\\1</a>",
      "<b><a href=\"\\1\" target=_blank>\\2</a></b>",
      "<b><a href=\\1 target=_blank>\\1</a></b>",
      "<sub>\\1</sub>",
      "<sup>\\1</sup>",
      "<font color=\"\\1\">\\2</font>",
      "<font style=\"font-size: \\1px\">\\2</font>",
      "<tt>\\1</tt>",
      "<s>\\1</s>",
      "<marquee>\\1</marquee>",
      "<div align=\"\\1\">\\2</div>",
      "<font face=\"\\1\">\\2</font>",
      "<font style=\"Filter: Shadow(color=\\1, Direction=\\2); Width=\\3px;\">\\4</font>",
      "<font style=\"Filter: Glow(color=\\1, Strength=\\2); Width=\\3px;\">\\4</font>",
      "<div class=\"quotehead\">\\1<b>\\2</b>\\3:<div class=\"quoteblock\">\\4",
      "</div></div>",
      "<ol type=\"\\5\">\\7</ol>",
      "<ul>\\4</ul>",
      "<li>",
      "java script",
      "about :",
    );
    preg_match_all("/(\[quote=(.+?)\])|(\[quote\])/", $text, $regs);
    $quoteopen =  count($regs[0]);
    preg_match_all("/(\[\/quote\])/", $text, $regs);
    $quoteclose =  count($regs[0]);

    if($quoteopen > $quoteclose) {
      $toclose = $quoteopen - $quoteclose;
      for($i = 0 ; $i < $toclose ; $i++) {
         $text .= "[/quote]";
      }
    }elseif($quoteclose > $quoteopen) {
      $toopen = $quoteclose - $quoteopen;
      for($i = 0 ; $i < $toopen ; $i++) {
         $text = "[quote]$text";
      }
    }
    $text = preg_replace($search_array, $replace_array, $text);
    if (!$bbcode_img)  {
        $text = preg_replace("/\[img\](.*?)\[\/img\]/si", "<a href=\"\\1\" target=\"_blank\">\\1</a>", $text);
         $text = preg_replace("/\[img=(.*?)\,(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
         $text = preg_replace("/\[img height=(.*?)\ width=(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
         $text = preg_replace("/\[img width=(.*?)\ height=(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
         $text = preg_replace("/\[flash=(.*?)\,(.*?)\](.*?)\[\/flash\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
    }else{
        $text = preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\"\\1\" border=\"0\">", $text);
         $text = preg_replace("/\[img=(.*?)\,(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\2\" width=\"\\1\">",$text);
         $text = preg_replace("/\[img height=(.*?)\ width=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\1\" width=\"\\2\">",$text);
         $text = preg_replace("/\[img width=(.*?)\ height=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" width=\"\\1\" height=\"\\2\">",$text);
         $text = preg_replace("/\[flash=(.*?)\,(.*?)\](.*?)\[\/flash\]/si","<object classid=\"clsid: D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\\1 height=\\2><param name=movie value=\\3><param name=play value=true><param name=loop value=true><param name=quality value=high><embed src=\\3 width=\\1 height=\\2 play=true loop=true quality=high></embed></object>",$text);
    }
    $text = str_replace("[hr]", "<hr>", $text);
  }
  return replace_badwords(stripslashes($text));
}


function phphighlite($code) {
  //PHP 4 only

  if (floor(phpversion())<4) {
    $buffer=$code;
  } else {
//      $code = str_replace("<br>", "", $code);
//      $code = str_replace("<br />", "", $code);
      $code = str_replace("&gt;", ">", $code);
      $code = str_replace("&lt;", "<", $code);

      $code = str_replace("&amp;", "&", $code);
      $code = str_replace('$', '\$', $code);
      $code = str_replace('\n', '\\\\n', $code);
      $code = str_replace('\r', '\\\\r', $code);
      $code = str_replace('\t', '\\\\t', $code);

      $code = stripslashes($code);

      if (!strpos($code,"<?") and substr($code,0,2)!="<?") {
         $code="<?\n".trim($code)."\n?>";
         $addedtags=1;
      }
      ob_start();
      $oldlevel=error_reporting(0);
      highlight_string($code);
      error_reporting($oldlevel);
      $buffer = ob_get_contents();
      ob_end_clean();
      if ($addedtags) {
        $openingpos = strpos($buffer,'&lt;?');
        $closingpos = strrpos($buffer, '?');
        $buffer=substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5);
      }
//      $buffer = str_replace("&quot;", "\"", $buffer);
  }
  return "<div class=\"codehead\"><b>PHP:</b><div class=\"codeblock\">".preg_replace("/<code><font color=\"#000000\">\n<font color=\"(.*)\">\n/si", "<code><font color=\"#000000\"><font color=\"\\1\">", str_replace("\n</font>\n</code>", "</font></code>", $buffer))."</div></div>";
}
//--------------------------
//--------Smiles------------
//--------------------------
function smiles($text,$enablesmilies = 1) {
  global $smileyfromcache, $smileytocache;
  $imagesdir = TEMPLATE_PATH."/smiles";
  if(gettype($smileyfromcache) != "array") {
   $smilesfrom = get_smiles();
   foreach ($smilesfrom as $key => $val) {
           $smileyfromcache[] ='/(((>[^<]*)|(^[^<]*))([\s\n\r]|^|<br( \/)?[>]))('.str_replace('|','\|', quotemeta(str_replace("<", "&lt;", str_replace(">", "&gt;", str_replace("\/", "\\\/", $key))))).')/s';
           $smileytocache[] = "\\1<img src=\"$imagesdir/$val.gif\" alt=\"\" border=\"0\">";
   }
  }
  if ($enablesmilies) {
   $text = parsesmilies($text);
  }
  return $text;
}
function parsesmilies($text) {
  global $smileyfromcache, $smileytocache;
  $oldtext = "";
  while($oldtext != $text) {
   $oldtext = $text;
   $text = preg_replace($smileyfromcache, $smileytocache, $text);
  }
  return $text;
}
function get_smiles(){
  $smilesfrom = array(
      ":)" => "happy",
      "(:" => "happy",
      ":-))" => "very_happy",
      ":lol:" => "very_happy",
      ":D" => "big_smile",
      ":O" => "surprised",
      ":o" => "surprised",
      ";)" => "wink",
      ":wink:" => "wink",
      ":(" => "sad",
      ":*(" => "very_sad",
      ":cry:" => "very_sad",
      ":confused:" => "confused",
      ":shy:" => "embarrassed",
      ":vicious:" => "vicious",
      ":|" => "undecided",
      ":pig:" => "pig",
      ":P" => "tongue",
      ":p" => "tongue",
      "B)" => "cool",
      ":B" => "nerd",
      "X(" => "angry",
      ":X" => "in_love",
      "|)" => "asleep",
      "=;" => "talk_to_hand",
      "@};-" => "rose",
      "):)" => "cowboy",
      "8X" => "skull",
      "=:)" => "alien",
      "0:)" => "angel",
      ":devil:" => "devil",
      ":clown:" => "clown",
      "3:O" => "cow",
      "3:o" => "cow",
      ":monkey:" => "monkey",
      "(~~)" => "pumpkin",
      "[-(" => "huff",
      "*:)" => "bulb",
      ":$" => "shhh",
      ":chicken:" => "chicken",
      "~o)" => "cup",
      "%%-" => "clover",
      "b(" => "beat_up",
      ":E:" => "peace",
      ":&" => "sick",
      "=*" => "kiss",
      ";;)" => "flirt",
      ":?)" => "what",
      "(%)" => "ying",
      "o-+" => "april",
      ":billy:" => "billy",
      ":hiro:" => "hiro",
      ":mad:" => "mad",
      ":R:" => "praying",
      "[-x" => "nono",
      "[:D]" => "hugging",
      ":dance:" => "dancing",
      "=D" => "applause",
      "(?)" => "thinking",
      ":^o" => "liar",
      "@)" => "hypnotized",
      "8|" => "rolleyes",
      "8}" => "crazy",
      "?|" => "tired",
      "=p~" => "drooling",
      "$)" => "money",
      ":whistle:" => "whistling",
      "#o" => "doh",
      ":alien:" => "alien2",
      ":S" => "scared"
  );
   return $smilesfrom;
}
function get_smiles_text() {
  global $lang;
   $smilesfrom = get_smiles();
   $val_old = "";
   $i = 0;
   $val_old = array();
  foreach ($smilesfrom as $key => $val) {
    if (!in_array($val, $val_old)) {
      $smiles_text .= "<a href=\"javascript:emoticon('$key')\"><img src=\"".TEMPLATE_PATH."/smiles/$val.gif\" alt=\"$key\" border=\"0\"></a> ";
    }
    $val_old[] = $val;
    $i++;
    if ($i > 18) {
      $smiles_text .= "<a href=\"smiles.php\" onclick=\"window.open('smiles.php', '_4imagessmilies', 'HEIGHT=310,resizable=yes,scrollbars=yes,WIDTH=225');return false;\" target=\"_4imagessmilies\">&nbsp;&nbsp;&nbsp;".$lang['all']."</a>";
      return $smiles_text;
    }
  }
  return $smiles_text;
}
//------End Smiles-------

function get_resize($file = "", $dim, $width = 0, $height = 0, $scale = 0){
  if ($file) {
    if ($file = @getimagesize($file)) {
      $width = $file[0];
      $height = $file[1];
    }
  }
  if ($width && $height) {
    if ($width > $dim || $height > $dim || $scale) {
      @$ratio = $width / $height;
      if ($ratio > 1) {
        $new_width = $dim;
        $new_height = round(($dim/$width) * $height);
      }else {
        $new_width = round(($dim/$height) * $width);
        $new_height = $dim;
      }
    }
    else {
      $new_width = $width;
      $new_height = $height;
    }
  }else{
    $new_width = $dim;
    $new_height = $dim;
  }
  return array($new_width, $new_height, $file);
}
//----End of code added for PM mod-----


Step 7
 
Open /includes/page_header.php
Find:
1
2
3

$site_template->register_vars(array(
  "media_url" => MEDIA_PATH,

Replace with:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99

//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_head = "";
$pm = "";
if ($config['pm'] && $user_info['user_level'] >= USER) {
  $sql = "SELECT COUNT(pm_id) AS total
              FROM ".PM_TABLE."
              WHERE pm_to = ".$user_info['user_id']." AND (pm_type = ".PM_SENT." OR pm_type = ".PM_SDLT." OR pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.")";
  $result = $site_db->query_firstrow($sql);
  $pm_inbox = $result['total'];
  $sql = "SELECT COUNT(pm_id) AS total
              FROM ".PM_TABLE."
              WHERE pm_from = ".$user_info['user_id']." AND (pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.")";
  $result = $site_db->query_firstrow($sql);
  $pm_outbox = $result['total'];
  $sql = "SELECT COUNT(pm_id) AS total
              FROM ".PM_TABLE."
              WHERE pm_from = ".$user_info['user_id']." AND (pm_type = ".PM_SENT." OR pm_type = ".PM_RDLT.")";
  $result = $site_db->query_firstrow($sql);
  $pm_sentbox = $result['total'];
  $sql = "SELECT COUNT(pm_id) AS new
              FROM ".PM_TABLE."
              WHERE pm_to = ".$user_info['user_id']." AND (pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.")
              ORDER BY pm_date DESC";
  $result = $site_db->query_firstrow($sql);
  $pm_new_count = $result['new'];
  $sql = "SELECT pm_date
              FROM ".PM_TABLE."
              WHERE pm_to = ".$user_info['user_id']." AND (pm_type = ".PM_UNREAD." OR pm_type = ".PM_USDLT.")
              ORDER BY pm_date DESC";
  $result = $site_db->query_firstrow($sql);
  $pm_new = "<a href=\"".$site_sess->url(ROOT_PATH."pm.php")."\">".(($pm_new_count) ? "<blink>".$pm_new_count."</blink>" : 0)."</a>";
  $pm = preg_replace("/".$site_template->start."msg_new_count".$site_template->end."/siU", $pm_new, $lang['pm_link']);
  $pm = preg_replace("/".$site_template->start."inbox".$site_template->end."/siU", "<a href=\"".$site_sess->url(ROOT_PATH."pm.php")."\">".$lang['pm_inbox']."</a>", $pm);
  $blink = "<script language=\"JavaScript\">\n<!--\nvar flg=0;\nfunction blink(){\nvar myElement=document.getElementById('blnk');\nflg^=1;\nif(flg==1){\nmyElement.style.visibility='hidden';\n}\nelse{\nmyElement.style.visibility='visible';\n}\ntimerID = setTimeout( 'blink()' , 500 );\n}\n//-->\n</script>\n";
  $show_inbox = ($pm_new_count) ? $blink."<span id=\"blnk\">".$lang['pm_inbox']."</span><script language=\"JavaScript\">blink();</script>" : $lang['pm_inbox'];
  $inbox = "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=inbox")."\" title=\"".(($pm_new_count) ? $lang['pm_new_messages'].": ".$pm_new_count."\n" : "").$lang['pm_total'].": ".$pm_inbox."\">".$show_inbox."</a>";
  $sentbox = "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=sentbox")."\" title=\"".$lang['pm_total'].": ".$pm_sentbox."\">".$lang['pm_sentbox']."</a>";
  $outbox = "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=outbox")."\" title=\"".$lang['pm_total'].": ".$pm_outbox."\">".$lang['pm_outbox']."</a>";
  $newpm = "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=new")."\">".$lang['pm_new']."</a>";

  if ($result && $user_info['user_pm_popup']) {
     $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
     $cookie_pmnewpopup = isset($HTTP_COOKIE_VARS[$cookie_name.'pmnewpopup']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'pmnewpopup'])) : 0;
     if ($cookie_pmnewpopup < $result['pm_date']) {
      if (ereg("pm.php", $self_url) && $action == "inbox") {
          $cookie_expire = time() + 60 * 60 * 24 * 90;
          setcookie($cookie_name.'pmnewpopup', serialize($result['pm_date']), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
      }elseif (!ereg("pm.php", $self_url) || (ereg("pm.php", $self_url) && ($action == "sentbox" || $action == "outbox"))){
        $cookie_expire = gmdate('D, d M Y H:i:s \G\M\T', time() + 60 * 60 * 24 * 90);
        $pm_popup_script = " <script language=\"JavaScript\">
        <!--
        function SetCookie (name, value, expire, path, domain, secure) {
          document.cookie = name + '=' + escape(value) + ((expire)?(';expires=' + expire):'') + ((path)?';path=' + path:'') + ((domain)?';domain=' + domain:'') + ((secure && (secure == true))?'; secure':'');
        }
        function confirm_newpm() {
          input_box=confirm('".$lang['pm_popup_confirm']."');
          if (input_box==true) { // Output when OK is clicked
            second_box=confirm('".$lang['pm_popup_newwindow']."');
            if (second_box==true) {
              SetCookie('".$cookie_name."pmnewpopup','".serialize($result['pm_date'])."','".$cookie_expire."','".COOKIE_PATH."','".COOKIE_DOMAIN."','".COOKIE_SECURE."');
              window.open('".$site_sess->url(ROOT_PATH."pm.php")."','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50');
            } else {
              SetCookie('".$cookie_name."pmnewpopup','".serialize($result['pm_date'])."','".$cookie_expire."','".COOKIE_PATH."','".COOKIE_DOMAIN."','".COOKIE_SECURE."');
              window.location='".$site_sess->url(ROOT_PATH."pm.php")."';
            }
          } else {
            SetCookie('".$cookie_name."pmnewpopup','".serialize($result['pm_date'])."','".$cookie_expire."','".COOKIE_PATH."','".COOKIE_DOMAIN."','".COOKIE_SECURE."');
          }
        }
        // -->
      </script>";
        $pm_popup_header = " onload=\"Javascript:confirm_newpm()\"";
       }
    }
  }
}
$site_template->register_vars(array(
  "pm" => $pm,
  "pm_boxes" => ($inbox) ? $inbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$sentbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$outbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$newpm : "",
  "pm_inbox" => $inbox,
  "pm_sentbox" => $sentbox,
  "pm_outbox" => $outbox,
  "pm_newpm" => $newpm,
  "pm_popup_script" => $pm_popup_script,
  "pm_popup_header" => $pm_popup_header,
  "bbcode2" => (BBCODE == "bbcode") ? 0 : 1,
  "pm_inbox_total" => ($pm_inbox) ? $pm_inbox : 0,
  "pm_outbox_total" => ($pm_outbox) ? $pm_outbox : 0,
  "pm_sentbox_total" => ($pm_sentbox) ? $pm_sentbox : 0,
  "pm_new_total" => ($pm_new_count) ? $pm_new_count : 0,
  "media_url" => MEDIA_PATH,



Step 8
 
Open /includes/db_field_definitions.php
At the end of the file, just before closing ?> add:
1
2
3
4
5

$additional_user_fields['user_pm_inbox'] = array($lang['pm_user_inbox'], "text", 0);
$additional_user_fields['user_pm_sentbox'] = array($lang['pm_user_sentbox'], "text", 0);
$additional_user_fields['user_pm_email'] = array($lang['pm_email'], "radio", 0);
$additional_user_fields['user_pm_popup'] = array($lang['pm_popup'], "radio", 0);



Step 9
 
In your browser start pm_install.php
* in address bar type something like this: http://<YOURSITE>/4images/pm_install.php
Finish the installation.

After this step the main installation is complete. :wink: :D
U can check it by going to: http://<YOURSITE>/4images/pm.php


Step 10

Edit templates where u want to show links to the PM folders.

Use these tags:

{pm_boxes} - this will show folders: "Inbox | Sentbox | Outbox | New Message"
{pm} - this will show "You have XX new images in Inbox"
You also can use:
{pm_inbox} - link to inbox
{pm_sentbox} - link to sentbox
{pm_outbox} - link to outbox
{pm_newpm} - link to new message
{pm_inbox_total} - # of messages in inbox
{pm_outbox_total} - # of messages in outbox
{pm_sentbox_total} - # of messages in sentbox
{pm_new_total} - # of new messages


Step 11

Open /member.php
Find:
1
2
3
4

    $site_template->register_vars(array(
      "user_id" => $user_row['user_id'],
      "user_name" => (isset($user_row['user_name'])) ? htmlspecialchars($user_row['user_name']) : REPLACE_EMPTY,


Add after:
1
2

       "lang_pm" => ($user_info['user_id'] != $user_row['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=new&user_id=".$user_row['user_id'])."\">".$lang['pm_user_pm_alt']."</a>" : "",



Step 12
 
Open /details.php
Find:
1
 $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq")."

Replace with:
1
2
3
4
5
6
7
8
9
10
11

  $additional_sql = "";
  if (!empty($additional_user_fields)) {
    $table_fields = $site_db->get_table_fields(USERS_TABLE);
    foreach ($additional_user_fields as $key => $val) {
      if (isset($table_fields[$key])) {
        $additional_sql .= ", u.$key";
      }
    }
  }
  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").$additional_sql."



Step 12.2

Find:
1
2

        "comment_id" => $comment_row[$i]['comment_id'],

Add after:
1
2

        "comment_user_pm" => ($config['pm'] && $comment_row[$i]['user_id']  != GUEST && $user_info['user_level'] > GUEST && $user_info['user_id'] != $comment_row[$i]['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=quote&mode=comment&id=".$comment_row[$i]['comment_id']."&user_id=".$comment_row[$i]['user_id'])."\" /><img src=\"".get_gallery_image("pm.gif")."\" border=\"0\" alt=\"".$lang['pm_user_pm_alt']."\" /></a>" : "",



Step 13

In /templates/<yourtemplate>/member_profile.html use {lang_pm} tag
In /templates/<yourtemplate>/comment_bit.html use {comment_user_pm} tag to show link to PM the user


Step 14

Open /templates/<yourtemplate>/member_editprofile.html
Add this:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19

          <tr>
            <td class="row2"><b>{lang_user_pm_email}</b></td>
            <td class="row2">
              <input type="radio" name="user_pm_email" value="1"{user_pm_email_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_pm_email" value="0"{user_pm_email_no} />
              {lang_no}
            </td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_user_pm_popup}</b></td>
            <td class="row1">
              <input type="radio" name="user_pm_popup" value="1"{user_pm_popup_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_pm_popup" value="0"{user_pm_popup_no} />
              {lang_no}
            </td>
          </tr>



Step 15

Open /templates/<yourtemplate>/header.html

1. in between <head> and </head> add this:
{pm_popup_script}

2. inside <body> tag add {pm_popup_header}
Should looks like this: <body {pm_popup_header}


Step 16

In /templates/<yourtemplate>/style.css
Add those classes:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72

.msg0 {
background-color: #FFCECE;
color: #2F6B9D;
}
.msg1 {
background-color: #CEFFDD;
color: #2F6B9D;
}

.msg_good {
  background-color: #CEFFDD;
  font-weight: bold;
   border: 1px solid #5E6C80;
   padding: 3px 3px 3px 3px ;
   margin: 3px 0px 3px 0px ;
}

.msg_error {
  background-color: #FFCECE;
  font-weight: bold;
   border: 1px solid #5E6C80;
   padding: 3px 3px 3px 3px ;
   margin: 3px 0px 3px 0px ;
}

.msg_plain {
  background-color: transparent;
  font-weight: bold;
   border: 1px solid #5E6C80;
   padding: 3px 3px 3px 3px ;
   margin: 3px 0px 3px 0px ;
}
/*--BBCode--------------------------------------------------*/
input.bbcbutton {
   background-color : #EFEFEF;
   color : #000000;
   font-size: 11px; font-family: Verdana, Arial, Helvetica, sans-serif;
}
.helpline {
  width: 300px;
  height: 30px;
  overflow: hidden;
   background-color: transparent;
   border-style: none;
   font-family: Verdana,Tahoma,Arial,Helvetica,sans-serif;
   font-size : 10px;
   color: #666666;
}
div.quotehead {
   font-size: 11px;
   color: black;
   padding: 0px 24px 0px 24px ;
}
div.quoteblock {
   border: 1px solid #5E6C80;
   font-size: 10px;
   padding: 8px 8px 8px 8px ;
}
div.codehead {
   font-size: 11px;
   color: black;
   padding: 0px 24px 0px 24px ;
}
div.codeblock {
   border: 1px solid #5E6C80;
   font-family: Courier, 'Courier New', sans-serif;
   font-size: 10px;
   padding: 8px 8px 8px 8px ;
   background-color: #F5F5F5;
   white-space: pre;
}

Step 17 / 18
 
Continue on next reply below


:!: -----------| Note |-----------------------------

If u get an error message:
 
Quote  [Expand]
Fatal error: Cannot redeclare <name>

then search for the function <name> in the file where the error sais,
just comment that function, the same way as u did in Step 6.


For upgrade from PMS v1 read next reply below.[/quote][/quote]


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mark Gunter on March 18, 2005, 02:50:40 PM

Continue PM v2  

Step 17

If u wish use smiles in comments, in details.php find:
1
2
3

        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),

Replace with:
1
2
3

        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0, 1, 1),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1 , 1),



In case u want use smiles somewhere else, u'll need use format_text function, set 6th parameter to 1.
The parameters are:
format_text(param1 <text>, param2 <html> (0 or 1), param3 <words wrap> (number), param4 <bbcode> (0 or 1), param5 <bbcode-img> (0 or 1), param6 <smiles> (0 or 1), param7 <bracket> (0 or 1));
7th parameter (<bracket>) should be used if u need to use { and } bracket, otherwise 4images would treat it as a template tag and result could be unexpected.

Step 18

Open logout.php
Find:
1
2

if (!ereg("index.php", $url) && !ereg("lightbox.php", $url) && !ereg("login.php", $url) && !ereg("register.php", $url) && !ereg("member.php", $url)) {

Replace with:
1
2

if (!ereg("index.php", $url) && !ereg("lightbox.php", $url) && !ereg("login.php", $url) && !ereg("register.php", $url) && !ereg("member.php", $url) && !ereg("pm.php", $url)) {





Upgrade from PMS v1

I must warn u, the upgrade will be pretty much painfull because:
- all previous changes must be removed
- you will lose your templates
- after u uninstall the previous version u'll need do the installation above.

But there is good news, u will NOT loose your messages, the database update will be automatic and lossless.


Remmeber: ALWAYS DO BACKUPS WHEN U MODIFY ANYTHING!

Step 1
 
Delete thise files:
/pms.php
/pms_install.php
/templates/<yourtemplate>/pms.html
/templates/<yourtemplate>/pms_delete.html
/templates/<yourtemplate>/pms_folder.html
/templates/<yourtemplate>/pms_new.html
/templates/<yourtemplate>/pms_view.html
/templates/<yourtemplate>/pms_perpage_dropdown_form.html
/templates/<yourtemplate>/images/asc_order.png
/templates/<yourtemplate>/images/desc_order.png
/lang/<yourlanguage>/email/notify.html



Step 2
 
Remove from /includes/constants.php:
1
2
3
4
5
6
7

//PMS
define('PMS_TABLE', $table_prefix.'pms');
define('PMS_RDLT', 0); //Recipient deleted message (message only in: Sender's Setbox)
define('PMS_SDLT', 1); //Sender deleted message (message only in: Recipient's Inbox)
define('PMS_SENT', 2); //Recipient read message (message in: Sender's Sentbox and Recipient's Inbox)
define('PMS_UNREAD', 3); //Recipient not read message (message in: Sender's Outbox and Recipient's Inbox - New Message)




Step 3
Remove from /lang/<yourlanguage>/main.php:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56

//--- PMS ----
$lang['pms_inbox'] = "Inbox";
$lang['pms_outbox'] = "Outbox";
$lang['pms_sentbox'] = "Sentbox";
$lang['pms_link'] = "&nbsp;&nbsp;&nbsp;You have<br />&raquo&nbsp;<b>{msg_new_count}</b> new message(s)<br />&nbsp;&nbsp;&nbsp;in your <b>{inbox}</b>.";
$lang['pms'] = "Private Messaging";
$lang['pms_short'] = "PMS";
$lang['pms_error'] = "Error";
$lang['pms_error_to'] = "You must select a recipient.";
$lang['pms_error_subject'] = "You must enter a subject.";
$lang['pms_error_message'] = "You must enter a message.";
$lang['pms_error_folder'] = "No folder selected.";
$lang['pms_error_id'] = "Nothing to show.";
$lang['pms_error_delete'] = "Nothing to delete.";
$lang['pms_compose'] = "Compose";
$lang['pms_delete'] = "Delete";
$lang['pms_delete_selected'] = "Delete selected";
$lang['pms_delete_all'] = "Delete all";
$lang['pms_delete_success'] = "The messages where deleted successfuly";
$lang['pms_delete_confirm'] = "Are you sure you want to delete that message from <b>".$lang['pms_'.$mode]."</b>?";
$lang['pms_delete_confirm_select'] = "Are you sure you want to delete selected messages from <b>".$lang['pms_'.$mode]."</b>?";
$lang['pms_delete_confirm_all'] = "Are you sure you want to delete ALL messages from <b>".$lang['pms_'.$mode]."</b>?";
$lang['pms_new'] = "New message";
$lang['pms_select_user'] = "Select a user";
$lang['pms_sent_success'] = "The message was send successfully";
$lang['pms_redirect'] = "Please wait a moment";
$lang['pms_empty'] = "No messages in this folder";
$lang['pms_reply'] = "Reply";
$lang['pms_view'] = "View message";
$lang['pms_mark'] = "Mark";
$lang['pms_edit'] = "Edit";
$lang['pms_subject'] = "Subject";
$lang['pms_message'] = "Message";
$lang['pms_to'] = "Recipient";
$lang['pms_date'] = "Date";
$lang['pms_send'] = "Send";
$lang['pms_preview'] = "Preview";
$lang['pms_status'] = "Status";
$lang['pms_from'] = "Sender";
$lang['pms_html'] = "Anable HTML in this message";
$lang['pms_bbcode'] = "Anable BBCode in this message";
$lang['pms_perpage'] = "Messages per page";
$lang['pms_user_pm'] = "PM";
$lang['pms_user_pm_alt'] = "PM to this user";
$lang['pms_total'] = "Total messages";
$lang['pms_received'] = "Received";
$lang['pms_quote'] = "Quote";
$lang['pms_error_save'] = "Error saving message. (the message could has been received)";
$lang['pms_error_notfound'] = "Can't find message.";
$lang['pms_paging_stats'] = "You have {total_cat_images} message(s) {new} on {total_pages} page(s) in your {box}.<br />Displayed: massage {first_page} to {last_page}.";
$lang['pms_email'] = "Notify by email on new Private Message";
$lang['pms_popup'] = "Pop up window on new Private Message";
$lang['pms_popup_confirm'] = "You have a new private message. Click OK to view it, or cancel to hide this prompt.";
$lang['pms_popup_newwindow'] = "Open in new window?\\n\\n(Press cancel to open your Inbox in the current window.)";
$lang['pms_email_new'] = "New private message";




Step 4

Remove from /includes/page_header.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69

//-----------------------------------------------------
//--- PMS ---------------------------------------------
//-----------------------------------------------------
$sql = "SELECT COUNT(pms_id) AS total
            FROM ".PMS_TABLE."
            WHERE pms_to = ".$user_info['user_id']." AND (pms_type = ".PMS_SENT." OR pms_type = ".PMS_SDLT." OR pms_type = ".PMS_UNREAD.")";
$result = $site_db->query_firstrow($sql);
$pms_inbox = $result['total'];
$sql = "SELECT COUNT(pms_id) AS total
            FROM ".PMS_TABLE."
            WHERE pms_from = ".$user_info['user_id']." AND pms_type = ".PMS_UNREAD;
$result = $site_db->query_firstrow($sql);
$pms_outbox = $result['total'];
$sql = "SELECT COUNT(pms_id) AS total
            FROM ".PMS_TABLE."
            WHERE pms_from = ".$user_info['user_id']." AND (pms_type = ".PMS_SENT." OR pms_type = ".PMS_RDLT.")";
$result = $site_db->query_firstrow($sql);
$pms_sentbox = $result['total'];
$sql = "SELECT COUNT(pms_id) AS new
            FROM ".PMS_TABLE."
            WHERE pms_to = ".$user_info['user_id']." AND pms_type = ".PMS_UNREAD;
$result = $site_db->query_firstrow($sql);
$pms_new = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php")."\">".(($result['new']) ? "<blink>".$result['new']."</blink>" : 0)."</a>";
$pms = preg_replace("/".$site_template->start."msg_new_count".$site_template->end."/siU", $pms_new, $lang['pms_link']);
$pms = preg_replace("/".$site_template->start."inbox".$site_template->end."/siU", "<a href=\"".$site_sess->url(ROOT_PATH."pms.php")."\">".$lang['pms_inbox']."</a>", $pms);
// PMS Boxes
$blink = "<script language=\"JavaScript\">\n<!--\nvar flg=0;\nfunction blink(){\nvar myElement=document.getElementById('blnk');\nflg^=1;\nif(flg==1){\nmyElement.style.visibility='hidden';\n}\nelse{\nmyElement.style.visibility='visible';\n}\ntimerID = setTimeout( 'blink()' , 500 );\n}\n//-->\n</script>\n";
$show_inbox = ($result['new']) ? $blink."<span id=\"blnk\">".$lang['pms_inbox']."</span><script language=\"JavaScript\">blink();</script>" : $lang['pms_inbox'];
$inbox = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=inbox")."\" title=\"".$lang['pms_total']." (".$pms_inbox.")\">".$show_inbox."</a>";
$sentbox = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=sentbox")."\" title=\"".$lang['pms_total']." (".$pms_sentbox.")\">".$lang['pms_sentbox']."</a>";
$outbox = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=outbox")."\" title=\"".$lang['pms_total']." (".$pms_outbox.")\">".$lang['pms_outbox']."</a>";
$newpms = "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=new")."\">".$lang['pms_new']."</a>";

$sql = "SELECT pms_date
            FROM ".PMS_TABLE."
            WHERE pms_to = ".$user_info['user_id']." AND pms_type = ".PMS_UNREAD."
            ORDER BY pms_date DESC";
$result = $site_db->query_firstrow($sql);
$pms_popup_script = "";
$pms_popup_header = "";
if ($result && $user_info['user_pms_popup'] && !ereg("pms.php", $self_url)) {
   $cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
   $cookie_pmsnewpopup = isset($HTTP_COOKIE_VARS[$cookie_name.'pmsnewpopup']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'pmsnewpopup'])) : 0;
   $pmsnewpopup = (isset($session_info['pmsnewpopup'])) ? $session_info['pmsnewpopup'] : $cookie_pmsnewpopup;
   if ($pmsnewpopup < $result['pms_date']) {
      $cookie_expire = time() + 60 * 60 * 24 * 90;
      setcookie($cookie_name.'pmsnewpopup', serialize($result['pms_date']), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
      $site_sess->set_session_var("pmsnewpopup", $result['pms_date']);
      $pms_popup_script = "<script language=\"JavaScript\">
      <!--
      function confirm_newpm() {
         input_box=confirm('".$lang['pms_popup_confirm']."');
         if (input_box==true) { // Output when OK is clicked
            second_box=confirm('".$lang['pms_popup_newwindow']."');
            if (second_box==true) {
               window.open('".$site_sess->url(ROOT_PATH."pms.php")."','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50');
            } else {
               window.location='".$site_sess->url(ROOT_PATH."pms.php")."';
            }
         } else {
         // Output when Cancel is clicked
         }
      }
      // -->
      </script>";
      $pms_popup_header = "onload=\"Javascript:confirm_newpm()\"";
   }
}



Step 4.2
 
Remove:
1
2
3
4

   "pms_boxes" => ($user_info['user_level'] < USER) ? "" : $inbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$sentbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$outbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$newpms,
   "pms_popup_script" => $pms_popup_script,
   "pms_popup_header" => $pms_popup_header,



Step 4.3

Remove:
1
2

"pms" => $pms,



Step 5
 
Replace all {pms} and {pms_boxes} tags in your templates with {pm} and {pm_boxes}


Step 6
 
Remove from /member.php
1
2

       "lang_pm" => ($user_info['user_id'] != $user_row['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=reply&user_id=".$user_row['user_id'])."\" alt=\"".$lang['pms_user_pm_alt']."\">".$lang['pms_user_pm']."</a>" : "",



Step 7

Remove from /details.php
1
2

"lang_pm" => ($user_info['user_id'] != $comment_row[$i]['user_id'] && $user_info['user_level'] >= USER && $comment_row[$i]['user_id'] >= USER) ? "<a href=\"".$site_sess->url(ROOT_PATH."pms.php?action=reply&user_id=".$comment_row[$i]['user_id'])."\" alt=\"".$lang['pms_user_pm_alt']."\">".$lang['pms_user_pm']."</a>" : "",




Step 8
 
Remove from /includes/db_field_definitions.php
1
2
3

$additional_user_fields['user_pms_email'] = array($lang['pms_email'], "radio", 0);
$additional_user_fields['user_pms_popup'] = array($lang['pms_popup'], "radio", 0);



Step 9

In /templates/<yourtemplate>/member_editprofile.html and in /templates/<yourtemplate>/header.html replace all pms u can find, with pm (then u can skip Step 14 and Step 15 in installation)
Also, if u installed any addons to PMS v1 or changed any code from "official" code, then u'll need search for PMS and pms strings in ALL the files u possible could change anything in and replace them with PM and pm



Now u can do the installation above.
Good luck Smile


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mark Gunter on March 18, 2005, 02:53:47 PM
PLEASE if anyone has an answer to my problem - PREVIEW doesn't work on PMs, the preview button sends the message, just like the send button - I need help with this.

I know that V@no and others are very busy restoring mods, so if anyone else has had this problem and found a solution, please help . . .


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on March 29, 2005, 01:07:58 PM
I'm also trying to fix that problem with PMS v2.5.3 on my page - first I thought, I found a solution, but it worked only with IE all other browsers were sending the message instead of previewing it...

The strange thing is, that the form-data is absolutely similar to the form-data on other pages, where the preview-button works fine (e.g. V@no's gallery), so the problem must be somewhere in the php-code of my site.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on March 29, 2005, 08:44:18 PM
actualy the problem is in PHP itself...some PHP versions cant "see" value of the "submit" button - and that what preview button is based on...u'll have to use javascript in the preview button:
1
onClick="action.value='preview';"


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on March 30, 2005, 07:24:23 PM
I*T  W*O*R*K*S*!
I was searching me mad because of that "error" and @ the end the reason is, because my hoster changed the PHP version w/o telling me... and I thought I made a typo somewhere in the code, whilst playing around with it.  :D

Thank you V@no :)

BTW: In the original PMS2.5.3 package is the MOST IMPORTANT emoticon missing: (http://photo.overlord.cz/templates/blue_wonder/smiles/beer.gif)
 :wink:
have fun


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mark Gunter on March 31, 2005, 10:44:41 PM
FANTASTIC!  :lol:

Such a simple solution! Thanks, Vano!

Are you happy with the formatting of the PM tutorial above? I can send the formatted version in an email to you, or post it, as it is, in "Mods Publishing . . ." forum if you like. Also, can help to re-format some of the other "lost" mods if you like.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 12, 2005, 05:00:45 AM
OMG!!! what a great MOD!!! The best MOD ever!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 12, 2005, 04:42:01 PM
Hi everyone How can use the bbcode from the the mod PM v.2 in my commments? I have installed the Both MODS Smillies and PM


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 12, 2005, 04:49:35 PM
If you'd like to use the PMv2 BBCode, you'd have to implement the PMv2...  :wink:

And then I guess it could go by replacing

{bbcode}
with {bbcode2} in the comment_form.html template...  :?:

For smilies:
Quote  [Expand]
Step 6.2

If u installed "Smiles" mod, comment it out too (do same thing as above, use /* at beginning of comment block and */ at the end.
Then add at the end of the file, just before closing ?>...

and check step 17 here:
http://www.4homepages.de/forum/index.php?topic=6692.msg30080#msg30080

For PM version 1 uninstall:
Check the text after
Quote  [Expand]
Upgrade from PMS v1
here
http://www.4homepages.de/forum/index.php?topic=6692.msg30080#msg30080 (just a few posts above)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 12, 2005, 05:23:43 PM
I have implement PMv.2 that what I asked that ;) but my smilies don't work any more in comments, i don't know how to put the PMv.2 bbcode i try to change {bbcode} with {bbcode2} but it does not work

I also put this in details.php
1
2
        "comment_headline" => format_text($comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0, 1, 1),
        "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1 , 1),


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 12, 2005, 10:05:51 PM
 onClick="action.value='preview';" where I shoul put this?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 12, 2005, 11:25:59 PM
Well,

1) you should first completely remove the old PMS version 1.

2) Then remove (or comment out) the old smilie-mod.

3) Install the PM system v2.5.3

And after all these steps it should work just fine...

the onClick=blablabla has to be in the pm-template called pm_new.html as a new attribute of the preview button there...
But you need that only if the preview function does not work on your site...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 12, 2005, 11:33:33 PM
Thanks for your help!! :)
but I have never installed the old PMS version 1.
I installed  Install the PM system v2.5.3 last week :)
the preview function does not work on my site


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 12, 2005, 11:36:42 PM
But I still don't know where to put that

1
2
3
4
<tr>
<td width="50%" align="right"><input type="submit" name="preview" value=" {lang_preview} " class="button" /></td>
<td width="50%" align="left"><input type="submit" name="submit" value=" {lang_send} " class="button" /></td>
</tr>

Smes where in here? please tell me where


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 12, 2005, 11:48:46 PM
oops  :oops: Then I did not understand you correctly
I have installed the Both MODS Smillies and PM
I thought this means, you've already installed the previous version of PM.

Well. Then just follow all the steps reposted by Mark Gunter and it should work...
There's also a single step for using this BBCode in the comments...
If it doesn't work like you expect, try to re-check all the steps... I've also made a few typos in this mod when implementing it but after a while I found the problem...

instead of

1
<td width="50%" align="right"><input type="submit" name="preview" value=" {lang_preview} " class="button" /></td>

it should look like this

1
<td width="50%" align="right"><input type="submit" name="preview" value=" {lang_preview} " class="button" onClick="action.value='preview';" /></td>

(just an example...) ;)



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 13, 2005, 12:07:28 AM

Thank you Martrix :):):)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 13, 2005, 12:17:26 AM
I just added the JS fix into the package...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 13, 2005, 12:18:48 AM
You're welcome :)

I guess you'll have some problems with using the smilie-form in the comments (this does not work automatically)
I finally found out, how to do that, but after the board-hack it got lost, so I have to search for it in my very poor brains...  :wink:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 18, 2005, 03:55:40 PM
@ascanio
Hot site, that pleases! (Morena_007 is beautifully :oops:)
But my browser have error message of your site.

@martrix
How did you insert the calendar, it is a mod?

Gruß
michi-w.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 18, 2005, 04:40:52 PM
It is a little addition - just showing the actual month/day without any other functionality.
It was on the board before the hack...
If I find that on my HDD, I'll repost it ;)

have fun


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 18, 2005, 06:04:01 PM
If I find that on my HDD, I'll repost it ;
That would be nice.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 18, 2005, 07:07:00 PM
calendar mod by Cr@zy Sash:
http://www.4homepages.de/forum/index.php?topic=7485.0

have fun


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 18, 2005, 09:09:43 PM
Great, thank you!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 18, 2005, 11:57:35 PM
Does not go:
Quote  [Expand]
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
1
2
if(($heute==6) || ($heute==7))else
      }
:?:
Gruß
michi-w.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: police22 on April 19, 2005, 04:45:18 AM
Does not go:
Quote  [Expand]
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
1
2
if(($heute==6) || ($heute==7))else
      }
:?:
Gruß
michi-w.
Got the same problem. Didnt realize that this was here too.. the original post for the calendar can be found here. (http://www.4homepages.de/forum/index.php?topic=7485.msg33589#msg33589)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 19, 2005, 04:50:09 AM
Does not go:
Quote  [Expand]
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
1
2
if(($heute==6) || ($heute==7))else
      }
:?:
GruЯ
michi-w.
Got the same problem. Didnt realize that this was here too.. the original post for the calendar can be found here. (http://www.4homepages.de/forum/index.php?topic=7485.msg33589#msg33589)
that error has nothing to do with this mod, the mod u are refering to "calendar" is what causes it...no point trouble shooting the issue under this thread.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: police22 on April 19, 2005, 04:57:42 AM
Does not go:
Quote  [Expand]
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
1
2
if(($heute==6) || ($heute==7))else
      }
:?:
GruЯ
michi-w.
Got the same problem. Didnt realize that this was here too.. the original post for the calendar can be found here. (http://www.4homepages.de/forum/index.php?topic=7485.msg33589#msg33589)
that error has nothing to do with this mod, the mod u are refering to "calendar" is what causes it...no point trouble shooting the issue under this thread.
V@no.. i know that.. i was just telling him where the post for the calendar is for his reference...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 19, 2005, 05:02:33 AM
V@no.. i know that.. i was just telling him where the post for the calendar is for his reference...
ah, I see. Thank you ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 19, 2005, 07:09:08 AM
Hi, is there any way to put by default the popup message on? and then if the user want to chage it they can go to control panel.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 19, 2005, 05:11:26 PM
actualy the problem is in PHP itself...some PHP versions cant "see" value of the "submit" button - and that what preview button is based on...u'll have to use javascript in the preview button:
1
onClick="action.value='preview';"


What :?:

Where does that have purely, in the header HTML?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 19, 2005, 05:34:51 PM
Where does that have purely, in the header HTML?

No. In the pm_new.html as described >>here (http://www.4homepages.de/forum/index.php?topic=6692.msg32959#msg32959)<<

The easiest way for you is to re-download the PM2 package from V@no's page - he did include that into the package a few days ago...
and if you did download the PM2 package after the 13th April 2005, you don't have to change anything  :wink:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 19, 2005, 10:23:36 PM
My last download was 17.04.05, the mod is inserted, I am finished?

There is a German translation (main.php)?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on April 19, 2005, 10:47:44 PM
There is a German translation (main.php)?
Did you mean:
Is there a german translation of the main.php part?
?
 :wink:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
//--- PM (Private Messaging) ---
$lang['pm'] = "Private Messaging";
$lang['pm_inbox'] = "Inbox";
$lang['pm_outbox'] = "Outbox";
$lang['pm_sentbox'] = "Sentbox";
$lang['pm_link'] = "&nbsp;&nbsp;&nbsp;du hast<br />&raquo&nbsp;<b>{msg_new_count}</b> neue Nachricht(en)<br />&nbsp;&nbsp;&nbsp;in deiner <b>{inbox}</b>.";
$lang['pm_short'] = "PM";
$lang['pm_error'] = "Error";
$lang['pm_error_to'] = "Du musst einen Empfänger wählen.";
$lang['pm_error_to_notfound'] = "Empfänger nicht gefunden.";
$lang['pm_error_subject'] = "Du musst einen Betreff eingeben.";
$lang['pm_error_message'] = "Du musst eine Nachricht eingeben.";
$lang['pm_error_folder'] = "Kein Ordner ausgewählt.";
$lang['pm_error_id'] = "Nichts zu zeigen.";
$lang['pm_error_delete'] = "Nichts zu löschen.";
$lang['pm_compose'] = "Erstellen";
$lang['pm_delete'] = "Löschen";
$lang['pm_delete_selected'] = "Markierte löschen";
$lang['pm_delete_all'] = "Alle löschen";
$lang['pm_delete_success'] = "Die Nachrichten wurden erfolgreich gelöscht";
$lang['pm_delete_confirm'] = "Sind Sie sicher die Nachricht von <b>".$lang['pm_'.$mode]."</b> zu löschen?";
$lang['pm_delete_confirm_select'] = "Sind Sie sicher die markierten Nachrichten von <b>".$lang['pm_'.$mode]."</b> zu löschen?";
$lang['pm_delete_confirm_all'] = "Sind Sie sicher alle Nachrichten von <b>".$lang['pm_'.$mode]."</b>? zu löschen?";
$lang['pm_new'] = "Neue Nachricht";
$lang['pm_new_messages'] = "Neue Nachrichten";
$lang['pm_new_is_one'] = "Du hast <b>{count}</b> neue Nachrichten"; //You have xx new message(s)
$lang['pm_ppm'] = "<b>{count}</b> Neue";
$lang['pm_message_single'] = "Nachricht";
$lang['pm_message_plural'] = "Nachrichten";
$lang['pm_select_user'] = "Wähle einen Benutzer";
$lang['pm_sent_success'] = "Die Nachricht wurde erfolgreich gesendet.";
$lang['pm_save_success'] = "Die Nachricht wurde erfolgreich bearbeitet.";
$lang['pm_redirect'] = "Bitte warte einen Moment";
$lang['pm_empty'] = "Keine neuen Nachrichten in diesem Ordner.";
$lang['pm_reply'] = "Antworten";
$lang['pm_view'] = "Nachricht anzeigen";
$lang['pm_mark'] = "Markieren";
$lang['pm_edit'] = "Bearbeiten";
$lang['pm_subject'] = "Betreff";
$lang['pm_message'] = "Nachricht";
$lang['pm_to'] = "An";
$lang['pm_date'] = "Datum";
$lang['pm_send'] = "Senden";
$lang['pm_preview'] = "Vorschau";
$lang['pm_status'] = "Status";
$lang['pm_from'] = "Von";
$lang['pm_html'] = "Aktiviere HTML-Code in dieser Nachricht.";
$lang['pm_bbcode'] = "Aktiviere BB-Code in dieser Nachricht.";
$lang['pm_smiles'] = "Aktiviere Smilies in dieser Nachricht.";
$lang['pm_perpage'] = "Nachrichten pro Seite.";
$lang['pm_user_pm'] = "PM";
$lang['pm_user_pm_alt'] = "Sende eine Private Nachricht";
$lang['pm_total'] = "Insgesamte Nachrichten";
$lang['pm_received'] = "Erhalten";
$lang['pm_quote'] = "Zitat";
$lang['pm_error_save'] = "Fehler beim Nachricht speichern.";
$lang['pm_error_notfound'] = "Konnte Nachricht nicht finden";
$lang['pm_paging_stats'] = "Du hast {total_cat_images} Nachricht(en) {new} auf {total_pages} Seite(n) im Ordner {box}.<br />Angezeigt: Nachricht {first_page} bis {last_page}.";
$lang['pm_email'] = "Email-Benachrichtigung bei neuer Nachricht.";
$lang['pm_popup'] = "PopUp Fenster bei neuer Nachricht";
$lang['pm_popup_confirm'] = "Du hast eine neue Nachricht. Klicke auf OK, um sie dir anzuschauen.";
$lang['pm_popup_newwindow'] = "In neuem Fenster öffnen?\\n\\n(Abbrechen, um in diesem Fenster zu öffnen.)";
$lang['pm_email_new'] = "Neue private Nachricht.";
$lang['pm_comment_quote'] = "Kommentar bei";
$lang['pm_mark_read'] = "Alle Nachrichten als gelesen markieren.";
$lang['pm_storage'] = "Der Ordner {box} ist zu {size}% voll";
$lang['pm_storage_unlimited'] = "Der Ordner {box} hat keine Begrenzung";
$lang['pm_user_limit_reached'] = "Sorry, {user}'s Inbox ist voll";
$lang['pm_inbox_limit'] = "Inbox Nachrichten Limit";
$lang['pm_sentbox_limit'] = "Sentbox Nachrichten Limit";
$lang['pm_finduser'] = "Nach Usernamen suchen";
$lang['pm_finduser_notfound'] = "Kein Username gefunden.";
$lang['pm_finduser_wildcards'] = "Benutze * als Platzhalter im Usernamen.";
$lang['pm_select'] = "Auswählen";
$lang['pm_finduser_many'] = "Mehr als ein Benutzer gefunden. Bitte einen asuwählen.";
$lang['pm_user_id_priority'] = "Username <b>Auswahl</b> hat eine höhere Priorität als das Username <b>Feld</b>.";
$lang['pm_user_inbox'] = "Inbox limit<span class=\"smalltext\"><br />set to <font color=red><b>0</b></font> to use global settings<br>or <font color=red><b>-1</b></font> for unlimited</span>";
$lang['pm_user_sentbox'] = "Sentbox limit<span class=\"smalltext\"><br />set to <font color=red><b>0</b></font> to use global settings<br>or <font color=red><b>-1</b></font> for unlimited</span>";
$lang['pm_toosoon'] = "Sorry, du kannst nicht so viele Nachrichten hinter einander vershcicken.";
$lang['pm_toosoon_user'] = "Sorry, du kannst nicht so oft hinter einander einem anderen User eine Nachricht schicken.";
$lang['pm_next'] = "Weiter &raquo;";
$lang['pm_prev'] = "&laquo; Zurück";

but also a czech one if you're interested  8)

Well... I know you aren't, but that won't prevent me from posting it >>here (http://www.4homepages.de/forum/index.php?topic=6627.msg33680#msg33680)<<  :D



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: universal on April 20, 2005, 08:33:28 AM
Can I use "u.userpic" there?

$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, u.userpic, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").$additional_sql."


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 20, 2005, 08:43:47 AM
yes


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 21, 2005, 12:50:57 AM
lang\english\email\ pm_notify.html
1
{site_url}

In der Email wird nichts angezeigt.
In the email nothing is indicated.

Kann ich eine andere Email Adresse für das versenden der Benachrichtigung einstellen?
Beispiel
message@domain.de für PM und email@domain.de für alles andere.

Can I dispatch another email address for that the notification to adjust? 
Example
message@domain.de for PM and email@domain.de for everything else.

Gruß
michi-w.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 21, 2005, 01:07:13 AM
sorry, I didnt quet understand your question...
where do u want use another email? to be notifyed of new PMs?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 21, 2005, 01:15:56 AM
Oh, my English!

Email to receiver does not contains {site_url}, no text
and
the sender Email adress was my Administrator Email, I want a specially PM Email.



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 21, 2005, 01:45:50 AM
ah, ok, lets try this: in pm.php find:
1
            $site_email->set_to($user_row['user_email']);
insert below:
1
2
            $site_email->set_from("message@domain.de", "michi-w.");
            $site_url = ($site_url) ? $site_url : "http://<yoursite_url>";
replace <yoursite_url>


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 21, 2005, 02:19:54 AM
Thank you!

insert below or replace?
1
2
$site_email->set_from("message@domain.de", "michi-w.");
            $site_url = ($site_url) ? $site_url : "http://<yoursite_url>";


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 21, 2005, 02:23:39 AM
insert below:
1
2
$site_email->set_from("message@domain.de", "michi-w.");
 $site_url = ($site_url) ? $site_url : "http://<yoursite_url>";


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 21, 2005, 02:33:17 AM
Wow, fast answer,

again thank you and good night!
michi-w.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 22, 2005, 12:32:37 AM
{lang_pm}, {comment_user_pm} and {lang_show_user_images} does not work in detials.html, what can I do?

Please!

Gruß
michi-w.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: universal on April 22, 2005, 09:40:33 AM
1. Can`t post mesage if user name contains *, possible to fix it? If so, how?

2. In image details> comments, when guest posts a comment, his field contains PM image, and link to pm is with -1 id, how to hide it only in guests posts?

Too many questions from me I think... uch  :roll:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 22, 2005, 02:39:59 PM
1. Can`t post mesage if user name contains *, possible to fix it? If so, how?

I'll look into it.


2. In image details> comments, when guest posts a comment, his field contains PM image, and link to pm is with -1 id, how to hide it only in guests posts?

Fixed, please redo Step 12.2


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 22, 2005, 04:43:24 PM
@V@no
{lang_pm}, {comment_user_pm} and {lang_show_user_images} does not work in detials.html, what can I do?

Please!

Gruß
michi-w.

Please! (http://www.web104.server-drome.net/download/1.gif)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 23, 2005, 12:59:20 AM
{comment_user_pm} have nothing to do with details.html,  {lang_show_user_images} has nothing to do with this mod
as of {lang_pm} - what are you trying to do?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 23, 2005, 01:04:28 AM
Hi V@no! how do you put a welcome private mesaje when a new user register?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 23, 2005, 01:08:15 AM
that is planned for a new version. (no comments on release date ;))


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 23, 2005, 01:12:06 AM
hehehehe ok, :)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 23, 2005, 02:13:08 AM
Quote  [Expand]
what are you trying to do?
details.html

Now
(http://www.web-upload.de/data/media/49/Unbenannt-3.jpg)

I would like this
(http://www.web-upload.de/data/media/49/Unbenannt-2_2.jpg)
(Is not finished, is an example)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 23, 2005, 02:27:39 AM
I see now.
in includes/functions.php find:
1
    "user_name" => $user_name,
Insert below:
1
    "pm_url" => ($config['pm'] && $user_info['user_level'] > GUEST && $image_row['user_id'] != GUEST && $user_info['user_id'] != $image_row['user_id']) ? $site_sess->url(ROOT_PATH."pm.php?action=new&user_id=".$image_row['user_id']) : "",
then in details.html use:
1
2
3
{if pm_url}
<a href="{pm_url}"><img src="{template_url}/images/pm.gif"></a>
{endif pm_url}


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 23, 2005, 03:11:52 AM
Thats great, thank you, but was is with {lang_show_user_images}?

I know, nothing has with that mod ... but only a little thing ... please!

And bbcode2.js from your zip download, in the templates copy?
For the moment was the file in root and templates.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 23, 2005, 04:34:05 AM
belove the line u inserted in functions.php insert this:
1
2
      "url_show_user_images" => $site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_row['user_name'])),
      "lang_show_user_images" => preg_replace("/".$site_template->start."user_name".$site_template->end."/siU", $user_name, $lang['show_user_images']),
bbcode2.js must be in the root directory (I missed that file in the installation guide. Updated now)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 23, 2005, 12:38:34 PM
I have the linie insert the function.php,
after
1
2
$site_template->register_vars(array(
    "image_id" => $image_row['image_id']
but, I dosen`t work.

Here ist my function.php, without the linie:
http://www.web-upload.de/datei/functions.txt

Which is wrong?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 23, 2005, 04:15:48 PM
A friend was helping, this is the solution:
Link "Display all images added by xxx" in details.html.
Link "Alle Bilder von xxx anzeigen" in details.html.

includes/functions.php

find
1
2
$site_template->register_vars(array(
    "image_id" => $image_row['image_id'],
After
1
"lang_show_user_images" => "<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_name))."\">".preg_replace("/".$site_template->start."user_name".$site_template->end."/siU", $user_name, $lang['show_user_images'])."</a>",

templates/default/details.html
insert
1
{lang_show_user_images}

Done



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 23, 2005, 05:49:26 PM
doh!
instead of using {url_show_user_images} tag, u'd better change the code, eh?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on April 23, 2005, 08:52:40 PM
Quote  [Expand]
includes/functions.php

find
1
2
$site_template->register_vars(array(
    "image_id" => $image_row['image_id'],
After
1
"url_show_user_images" => $site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_row['user_name'])),
templates/default/details.html
insert
1
{url_show_user_images}


Result:
(http://www.web-upload.de/data/media/49/Unbenannt-4.jpg)

Quote  [Expand]
includes/functions.php

find
1
2
$site_template->register_vars(array(
    "image_id" => $image_row['image_id'],
After
1
"lang_show_user_images" => "<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_name))."\">".preg_replace("/".$site_template->start."user_name".$site_template->end."/siU", $user_name, $lang['show_user_images'])."</a>",

templates/default/details.html
insert
1
{lang_show_user_images}

Result:
(http://www.web-upload.de/data/media/49/Unbenannt-5.jpg)




Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 24, 2005, 11:57:09 PM
that is planned for a new version. (no comments on release date ;))
for the next version can u also put a option to send a message to all the users and also to see how many pm theyhave on their inboxes?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: universal on April 25, 2005, 07:49:27 AM
And one more problem...

Usernames: "new girl" and "new_girl" are the same in the pm system.
:idea: maybe we can remove checking from field "recipient"? This also solves problem with "nick*", "nick1", "nick..."


M?



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 30, 2005, 10:25:59 PM
Hi V@no I have a question about the style when i send a message and I see a message in a light blue background so i wonder if i can put that in others messega like in the lightbox when a user don't have pictures.

(http://members.cox.net/jaimeascanio/mes.jpg)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on May 01, 2005, 12:15:48 AM
well, u "can" but it will require some code modifications, with "rewriting" the way $msg variable being used...
if u compare pm.php with any other files, u'll find that in pm.php I used an arrays ($msg['good'], $msg['error'] and $msg['plain']) by using this way it allowed use different styles for "good" and "bad" messages.

I've already proposed such feature for the future version ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on May 01, 2005, 12:18:00 AM
ooh ok I thougth that it was a style.css modification


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: universal on May 01, 2005, 09:12:05 AM
I've already proposed such feature for the future version ;)

Future version :) sounds great!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ryoades on May 10, 2005, 04:55:06 AM
I have some problems with the installation of PMv.2.
I have installed the MOD by the Tutorial "PMv2 Tutorial Republished" step by step.
Privat-Message-Box works fine, but when i comment the function in functions.php
(Step 6) or add the Code from (Step 6.2) - the entire Site don't work anymore.

I search for the problem for 2 days...
who is the Problem?

http://www.art-atum.de/functions.zip

Link to my site (i have no changed the functions.php here and the Inbox works, but
not the link to send a new message)

http://www.art-atum.de/4images/pm.php

Log-In:    test
Pass:    test

... is the problem of all only the functions.php?

ryoades


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on May 10, 2005, 12:49:33 PM
Here is my functions, test it:
http://www.web-upload.de/datei/functions.zip


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ryoades on May 10, 2005, 06:23:13 PM
Wirklich vielen Dank!!!
Jetzt funktioniert alles ordnungsgemäß.
Hatte irgendwie durch einen anderen MOD eine total verstellte functions.php

Thanks!
It works now very nice....


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ryoades on May 10, 2005, 07:04:10 PM
...hmmm, nun funzt aber mein Kontrollzentrum nicht mehr.
member_editprofile.html wird nicht mehr aufgerufen (Bildschirm bleibt leer).
... habe die Mods für Gender, Country und Personal-Picture eingebaut gehabt.
kann es sein, das ich in der functions.php wieder etwas hinzufügen muß?
...

Trotzdem vielen Dank erstmal! ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on May 10, 2005, 07:30:33 PM
...hm also der einfachste Weg das herauszufinden, ist in den richtigen MODs nachzuschauen ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ryoades on May 10, 2005, 11:46:16 PM
... habe jetzt meine eigene functions.php Datei wieder und wieder gecheckt.
Sie funktioniert (bis auf das versenden von Priv.Nachrichten - Bildschirm leer)

http://www.art-atum.de/4images

Name:  test
Pass:    test

jedoch sobald ich die Veränderungen von Tutorial vornehme ( Step6. und 6.2),
 geht gar nichts mehr.
Habe mal ansatzweise die gezippte Datei von "michi_w." raufgespielt.
Das PrivatemessageSystem funzt dann, jedoch kein Kontrollzentrum und registrieren geht mehr.

Habe auch beide Dateien verglichen, jedoch sehe ich den Fehler nicht.
Wer kann mir helfen?

Hier anbei nochmals meine functions.php:
http://www.art-atum.de/functions.zip
(habe die Veränderungen von Step6. & 6.2. vorgenommen)
 


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on May 16, 2005, 11:46:16 PM
Kleiner Tipp:
zu Step 4

Seht einfach in der lang\xxxx\admin.php nach, wieviele Setting-Groups es gibt und zählt einen (+1) dazu.

Gruß
michi-w.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on May 17, 2005, 09:28:34 AM
genau, so einfach ist das ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ryoades on May 17, 2005, 10:03:41 PM
.. in der admin.php Setting-group ist alles korrekt eingestellt.
(habe ja schließlich auch andere Mod's installiert die Funktionieren)
Im übrigen funktioniert das Private-Message-System ja, wenn ich die veränderte functions.php
von Michi nehme, nur leider funzt dann nicht mehr das Kontrollzentrum und das Registrieren.
Habe auch Zeile für Zeile geschaut, welche Veränderungen an meiner eigenen function.php
(durch andere Mods) gegenüber der anderen sind. Habe versucht den veränderten Bereich zu
übernehmen, aber dann funktioniert einfach gar nix mehr.
Ich denke der Fehler muß irgendwo im Detail liegen, nur leider wo ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on May 18, 2005, 12:08:43 AM
First my thanks to v@no for this great MOD.
PM works since some time in the best way on my page ...  :D
But now I found that there is a problem with sending of php-code ...  :?
It is not possible to insert a curved clip ( { or } )  into a PM.
The curved clip ( and also the code between the clips ) disappears in the preview and then also in the sent PM.
This problem seems to arise not only on my page ...  8O
Tests your PM ... (v@no, martrix, ... )

Is there a solution for this problem ?

mawenzi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on June 07, 2005, 03:52:21 PM
Yes - this also occurs on my page...  :|

But there's one thing even more confusing:

if I use the tag [thumb=xxxx] it sometimes shows the thumbnail well, sometimes distorted absolutely and sometimes (if using more than one thumb)
it shows this - or simila - error

Quote  [Expand]
DB Error: Bad SQL Query: SELECT image_name, image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 2172]
You have an error in your SQL syntax near '] ' at line 3

 :?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on June 07, 2005, 05:57:41 PM
hi martrix,

the tag [thumb=xxxx] (in my BB-Tag-Editor you can use also a thumb-button ...  :wink:) works correct for me, also with more than one thumb.
test your thumb-tags with a space between the tags ...  :roll: ... that should help.

again to the curved clips (is that the correct word for -> { ... ? ... or better -> brackets)
I found this in funktions.php in function bb_code and I think here is the cause ... ?
1
2
3
4
5
if ($brackets) {
     $entities_match = array('{', '}');
     $entities_replace = array('{', '}');
    $text = str_replace($entities_match, $entities_replace, $text);
  }

I am right ...  :?:
mawenzi




Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on June 07, 2005, 07:14:52 PM
sure - a space between the tags is always needed... that's clear, but in some cases you can't even add one thumb-tag and you will get an error...
or in one Moment a simplee

1
[thumb=xxx]

works fine, but if I write more behind that like e.g.:

1
2
3
4
[thumb=xxx]
blablabla
[img]adress[/img]
blablabla

it gives me an error :(
it doesn't show any thumbnail at all and the img-tag gets messed up...

if I have a thumbnail of for example 128x96 px it will be shown as a square of 96x96 px - which looks quite strange in some cases...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on June 07, 2005, 07:36:48 PM
Quote  [Expand]
it gives me an error  :(

your "code" works correct in my PM ... it shows the thumbnail and the image ...  :roll:
there must be an error in your BB_code ...  :?

mawenzi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on June 07, 2005, 09:20:14 PM
the error
Quote  [Expand]
DB Error: Bad SQL Query: SELECT image_name, image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 2172]
You have an error in your SQL syntax near '] ' at line 3

DB Error: Bad SQL Query: SELECT image_name, image_id, image_media_file, image_thumb_file, cat_id FROM 4images_images WHERE image_id = 2172]
You have an error in your SQL syntax near '] ' at line 3
is not from my site and occured also only a thumbnail was shown...

if there's something wrong with "my" bbcode, than it is also wrong in all others bbcode - I just tried to replace "my" bbcode with the original code from this page and it still makes the same mess.

Would you please mind and post your function bb_code()?
Maybe the solution will be there...



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on June 08, 2005, 12:06:37 AM
I will send you a pm ...  :wink:

mawenzi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on June 08, 2005, 01:00:03 AM
ok, guys, I've updated step 6.2 which fixes the {} brackets and [thumb=] tag.

P.S. I dont recall when I ever mentioned the [thumb=] feature...how did u find it? :|


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on June 08, 2005, 09:50:15 AM
you did never mention it, but it is there :wink: right?

that's what made me curious about that, when changing smilies in the code (try :jedi: or :beer: on my page  :wink: ):
Quote  [Expand]
$text = preg_replace("/\[thumb=([0-9]+)(,([0-9]+)?)?(,([a-zA-Z]+))?\]/esi","thumb('\\1','\\3','\\5')",$text);
And second: I saw mawenzi using that feature a few times and thought first it is some of his own innovations  :D


thanks!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on June 08, 2005, 01:05:47 PM
hi martrix, hi v@no,

with the [FIX] brackets/thumb-tag is Private Messaging nearly perfect ...  :wink:
one thing still remains ...
if I want to send the following code with PM :
1
$entities_replace = array('&#123;', '&#125;');
it shows now the following code :
1
$entities_replace = array('{', '}');
is there still another FIX from the FIX ...  :wink: ... ?

Quote from: V@no    [Expand]
P.S. I dont recall when I ever mentioned the [thumb=] feature...how did u find it?  :|

V@no ... remember ... some time ago there was on gallery.vano.org a reference-/toolbox with some useful things and also the thumb-tag ...  :mrgreen: ... my only "innovation" is now a Thumb-Button in my BB-Tag-Editor ...  :wink:

thanks guys ... !
mawenzi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: drhtm on June 10, 2005, 07:58:53 PM
Hi,

I'm trying to create 'short urls' for this mod and I could use some help.

For the sessions.php, i got this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
      elseif (strstr($url, 'pm.php')) {
        if (strstr($url, 'page=')) {
          preg_match('#page=([0-9]+)&?#', $url, $matches);
          if (isset($matches[1])) {
            $split = explode('?', $url);
            $url = $split[0];
            $query = @$split[1];
            $url   = str_replace('pm.php', 'pm.'.$matches[1].'.html', $url);
            $query = str_replace('action='.$matches[1].'&', '', $query);
            $query = str_replace('&user_id='.$matches[1], '', $query);
            $query = str_replace('mode='.$matches[1], '', $query);
            $query = str_replace('id='.$matches[1], '', $query);
            if (!empty($query)) {
              $url .= '?' . $query;
            }
          }
        }

and for my htaccess i'm using this

1
2
3
4
RewriteRule ^pm\.html$ pm.php?%{QUERY_STRING}
RewriteRule ^pm-(.*)\.html$ pm.php?action=$1&%{QUERY_STRING}
RewriteRule ^pm-(.*)\.([0-9]+)\.html$ pm.php?action=$1&user_id=$2&%{QUERY_STRING}
RewriteRule ^pm-(.*)\.(.*)\.([0-9]+)\.html$ pm.php?action=$1&mode=$2&id=$3&%{QUERY_STRING}

But it's not working exactly.  can someone tell me if i'm doing it right?  I posted some help at the 'mod for shorturls' but no one is replying there.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on June 10, 2005, 10:14:22 PM
strange, but your update of step 6.2 caused just a white page showed after trying to preview/send the pm...

I found the reason here:

1
$image_info = @get_imagesize($file_src, $info);
should be
1
$image_info = @getimagesize($file_src, $info);


The change did also not fix my problem with the distorted thumbnails (the thumbs were always square)

well - so I changed the function Thumb from

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
function thumb($id, $dim = 50, $align = "bottom") {
  global $site_db, $user_info, $site_sess;
  if (empty($dim)) $dim = 50;
  if (empty($align)) $align = "bottom";
  $text = "";
  $sql = "SELECT image_name, image_id, image_media_file, image_thumb_file, cat_id
          FROM ".IMAGES_TABLE."
          WHERE image_id = ".$id;
  if ($row = $site_db->query_firstrow($sql)) {
    if (!get_file_path($row['image_thumb_file'], "thumb", $row['cat_id'], 0, 0)) {
      $file_src = ICON_PATH."/".get_file_extension($row['image_media_file']).".gif";
    }else{
      $file_src = get_file_path($row['image_thumb_file'], "thumb", $row['cat_id'], 0, 1);
    }
    $image_info = @getimagesize($file_src, $info);
    $width = $image_info[0];
    $height = $image_info[1];
    $wh = get_resize($image_info[0], $image_info[1], $dim, $dim);
    $text = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$row['image_id'])."\"><img width = \"".$wh[0]."\" height=\"".$wh[1]."\" src=\"".$file_src."\" alt=\"".str_replace("\"", "&quot;", $row['image_name'])."\" align=\"".$align."\" border=\"1\" /></a>";
  }
  return $text;
}

into

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
function thumb($id, $dim = 50, $align = "bottom") {
  global $site_db, $user_info, $site_sess;
  if (empty($align)) $align = "bottom";
  $text = "";
  $sql = "SELECT image_name, image_id, image_media_file, image_thumb_file, cat_id
          FROM ".IMAGES_TABLE."
          WHERE image_id = ".$id;
  if ($row = $site_db->query_firstrow($sql)) {
    if (!get_file_path($row['image_thumb_file'], "thumb", $row['cat_id'], 0, 0)) {
      $file_src = ICON_PATH."/".get_file_extension($row['image_media_file']).".gif";
    }else{
      $file_src = get_file_path($row['image_thumb_file'], "thumb", $row['cat_id'], 0, 1);
    }
    $image_info = @getimagesize($file_src);
    $width = $image_info[0];
    $height = $image_info[1];
$dimension = 50;
    $ratio = $width / $height;
      if ($ratio > 1) {
        $new_width = $dimension;
        $new_height = floor(($dimension/$width) * $height);
      }else {
        $new_width = floor(($dimension/$height) * $width);
        $new_height = $dimension;
      }
    $text = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$row['image_id'])."\"><img width = \"".$new_width."\" height=\"".$new_height."\" src=\"".$file_src."\" alt=\"".str_replace("\"", "&quot;", $row['image_name'])."\" align=\"".$align."\" border=\"1\" /></a>";
  }
  return $text;
}

and deleted the whole function get_resize()

I don't know if I messed something up with that, but it works fine now...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on June 11, 2005, 12:12:46 AM
oh, crap, by any chance, do u have unchanged code from step 6.2 ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on June 11, 2005, 12:37:38 AM
Yes, I'll find it and send it via PM


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: izzy on June 13, 2005, 08:42:52 AM
Just checked out the FAQ to fix a few bugs in 1.7.1 that showed up in this mod - conditional tags mainly.
Very nice mod - works just as intended now.
Thank you!  :D
Izzy


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: openhost.us on June 29, 2005, 12:23:19 AM
V@no you should change the link from the MOD download site (http://gallery.vano.org/en/files2) to this one because when I clicked on "Private Messages v2 More info here (http://4homepages.de/forum/viewtopic.php?t=12154)", the only thing I saw was "An Error Has Occurred!:The topic or board you are looking for appears to be either missing or off limits to you."  :wink:
It take me lots of time to find this topic...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on June 29, 2005, 12:52:59 AM
V@no you should change the link from the MOD download site (http://gallery.vano.org/en/files2) to this one because when I clicked on "Private Messages v2 More info here (http://4homepages.de/forum/viewtopic.php?t=12154)", the only thing I saw was "An Error Has Occurred!:The topic or board you are looking for appears to be either missing or off limits to you." :wink:
It take me lots of time to find this topic...
Roger that!
All links (but one, which is not published) are updated now :)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: maikew on July 06, 2005, 12:04:31 AM
in details.html or details php? this mod doesen't work :(  but private messaging works,why??
can anybody help?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 06, 2005, 01:28:32 AM
what?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: maikew on July 06, 2005, 01:39:24 AM
well,test it on my gallery.the mod doesen't work in detail.html to post komments with smilies,but the privat messaging funktion works :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 06, 2005, 01:55:39 AM
this mod has nothing to do with details.php...what are u talking about? :?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: maikew on July 06, 2005, 02:11:42 AM
the mod doesen't work in detail.html


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 06, 2005, 02:21:44 AM
are u talking about the "PM" icon under a comment?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: martrix on July 06, 2005, 11:13:24 AM
I guess maikew means, that the smilies and BBCode form the PM does not work for the images...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 06, 2005, 03:18:43 PM
I guess maikew means, that the smilies and BBCode form the PM does not work for the images...
if so, then the answer is: they are not supposed to work there...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: maikew on July 06, 2005, 08:18:23 PM
now,after reinstall it works.sorry it was my mistake  :mrgreen:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: flashguy on July 27, 2005, 06:24:09 PM
Hi everybody,
First my thanks to v@no for this great MOD.
I Installed it and almost everything worked out fine.

The only few problems I have are on the pm.php file.
There are a few if clauses, which are printed out.
E.g. on the inbox page I get:

{if lang_limit_prc} {endif lang_limit_prc}

right under Private Messaging header.

If I view a pm I get e.g. {if lang_to} {endif lang_to} {if lang_received} {endif lang_received}
and a few more.

Please tell me how I can fix this...

thanks in advance...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 28, 2005, 12:26:04 AM
bug fixes


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: flashguy on July 28, 2005, 11:20:32 AM
Thanks a lot.
Great Mod again...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: beseech on August 09, 2005, 06:53:09 PM
this work ???

cuz the old one, give me huge troubles... :S


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on August 24, 2005, 12:03:38 PM
Hi Guys, I have the same problem like ascanio #12

Quote  [Expand]
I have implement PMv.2 that what I asked that  but my smilies don't work any more in comments, i don't know how to put the PMv.2 bbcode i try to change {bbcode} with {bbcode2} but it does not work

Sorry, but I didn´t understand what I have to do. Should I change my {bbcode} tags to {bbcode2} and where must I do this?  :oops:

Mark Gunter (Step 17)
Quote  [Expand]
In case u want use smiles somewhere else, u'll need use format_text function, set 6th parameter to 1.

Where should I change the parameters for my comments?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: beseech on September 07, 2005, 07:19:02 PM
well i don't know if this is a right place for i post my doubt, but the PM [MOD] first version (topic is locked) so , maybe here someone can help, i (think) .

I've installed a personal member photo, so my question is : " how can i put this show on pm's ? "

Note : i'm using the old PM mod !!!



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on September 10, 2005, 03:12:29 PM
Hi everybody,
First my thanks to v@no for this great MOD.
I Installed it and almost everything worked out fine.

The only few problems I have are on the pm.php file.
There are a few if clauses, which are printed out.
E.g. on the inbox page I get:

{if lang_limit_prc} {endif lang_limit_prc}

right under Private Messaging header.

If I view a pm I get e.g. {if lang_to} {endif lang_to} {if lang_received} {endif lang_received}
and a few more.

Please tell me how I can fix this...

thanks in advance...

Have still the same Problem...

EDIT:
This is resolve the Problem:
http://www.4homepages.de/forum/index.php?topic=6806.0


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Lunique on September 17, 2005, 01:45:03 AM
Hi sorry if this is been asked before my english is not that good and I didn't find the answer till now

I have installed the mod as it was said (didn't had the old mod before) but if I try to send a private message I get this error:

Fatal error: Call to undefined function: get_smiles_text() in /srv/www/htdocs/web32/html/galerie/pm.php on line 427

What should I do? You can answer in english and german

thanks & hugs Lunique


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Egly on September 17, 2005, 09:44:35 AM
First of all thanx V@no for this great mod, i installed it, and it works great for me!!

I have one question:
Since i installed this MOD i can use the smilies in the comments too if i know what i have to type for each smilie.
How can i add a box like in the new pm box to the comment form?
I know that there are several MODs to add this but they all use different smilies than this mod.
It shouldn´t be that much work..
It would be great, if someone could give me a tip how to do this...

Thx
Greez Egly


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: bxbx on October 08, 2005, 12:58:30 AM
I just installed the PM version 2 mod and it works all except for one little part.  Step 13 says the following:

In /templates/<yourtemplate>/member_profile.html  use {lang_pm} tag
In /templates/<yourtemplate>/comment_bit.html use {comment_user_pm} tag to show link to PM the user

In comment_bit.html I have used this tag and nothing shows up.

I have also used the lang_pm tag in member_profile.html and that also shows nothing.  I have gone over the code a lot and I believe that I have installed it correctly.  What am I doing wrong?  What am I supposed to see?  Maybe I am just expecting something that is not supposed to happen with these.  Thanks.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on October 12, 2005, 01:01:24 PM
I have a few Problem with the if clauses... )o:

1
2
{if preview}<div class="msg_plain">{lang_preview}:</div>{endif preview}
{if nextprev}

In the Preview will printout only the ":"

1
2
3
4
5
6
{if lang_received}
<tr class="row2">
<td><b>{lang_received}</b></td>
<td width="100%" colspan="2">{received}</td>
</tr>
{endif lang_received}

Printout in "mode=inbox" without the {lang_received} and the same at

1
{if ip}<br />IP: {ip}{endif ip}

{ip} will not been showed but "IP:" will printout.

What can i do to resolve the Problem? )o:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Andreas1 on October 13, 2005, 08:17:17 PM
Hallo @all

gibt es eine Möglichkeit PMs nach einer bestimmten Zeit z.Bsp. 60 Tagen über das ACP zu löschen? Wie kann man diese löschen?

Danke Euch.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on October 13, 2005, 08:25:52 PM
/admin/plugin/pm_prude.php mit folgenden Inhalt erstellen

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?php // PLUGIN_TITLE: PM Prude

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

$root_path "./../../";
define('ROOT_PATH'$root_path);
require(
ROOT_PATH.'admin/admin_global.php');

// TEXT
define('PM_PRUDE_TITEL'"PM Prude");
define('PM_PRUDE_DAY'"Älter als XX Tage:");
define('PM_PRUDE_BUTTON_DEL'"Löschen");
//// TEXT


show_admin_header();

// PM PRUDE
show_form_header("pm_prude.php""pm_prude");
show_table_header(PM_PRUDE_TITEL2);
show_input_row(PM_PRUDE_DAY"pm_days"""45);
show_form_footer(PM_PRUDE_BUTTON_DEL""2);

$pm_days $HTTP_POST_VARS['pm_days'];

if (
$pm_days != ""){
$sql_prude "DELETE
       FROM "
.PM_TABLE."
      WHERE pm_date < "
.(time()-$pm_days*24*3600);
$result $site_db->query($sql_prude);
}
//// PM PRUDE


show_admin_footer();
?>


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Andreas1 on October 13, 2005, 09:06:57 PM
Danke für die schnelle Antwort Acidgod,

aber ein Problem habe ich noch, die Sentbox ist noch voll. Kan man dies ins Plugin aufnehmen?

Wäre echt  :D SUPER!?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on October 14, 2005, 09:53:58 AM
Wie bitte?

Also das Teil löscht alle PMs die älter sind und nimmt dabei null Rücksicht.
Wie soll da den was in der Sendbox bleiben?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Andreas1 on October 14, 2005, 11:41:45 AM
Ich hatte nicht auf die Uhrzeit geschaut und versuchte eine Nachricht zu löschen die das Ablaufdatum noch nicht erreicht hatte.

Funktioniert alles wunderbar.

Danke nochmals.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on October 14, 2005, 03:10:12 PM
@ Acidgod

PM Prude ... ein sehr nützliches PlugIn ... Danke ...  :D

[ PS. Das PlugIn ist absolut selbsterklärend ... doch was bedeutet eigentlich "Prude" ... ? ]

mawenzi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on October 14, 2005, 03:19:11 PM
sollte eigentlich prune heissen... Habe dann aber aus mir völlig unerklärlichen Gründen überall prude benutzt...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on October 14, 2005, 04:43:41 PM
prune ... alles klar ... hatte schon etwas gezweifelt ... an mir ...  :wink:

mawenzi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: beseech on October 14, 2005, 05:06:31 PM
a simple question :

This plugins are compatible with old PMS ? or it's just with this version ?

Cheers ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on October 14, 2005, 05:14:37 PM
i dont now...
show me the table from the old PMS and then i will make a Plugin for the old...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Andreas1 on October 14, 2005, 05:24:58 PM


1
{if ip}<br />IP: {ip}{endif ip}

{ip} will not been showed but "IP:" will printout.



Beim 'normalen' User wird die IP ja nicht angezeigt, wohl aber die Ausgabe IP:. Wie kann man diese Ausgabe dann ausblenden?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on October 14, 2005, 06:05:51 PM
Gute Frage, habe das Problem nicht nur mit der IP... )o:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on October 14, 2005, 11:15:11 PM
a simple question :

This plugins are compatible with old PMS ? or it's just with this version ?

Cheers ;)
no. that's why there is an instruction (second reply by Mark Gunter) on how to upgrade to the new version
But the good thing is that you will NOT loose the messages ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: beseech on October 18, 2005, 02:25:18 AM
i've installed smileys MOD, so my question is , how can i replace the old smileys for this new smiles + bbcode ?

using the same bbcode on comments (details.php) ??


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Nasser on October 18, 2005, 10:16:15 PM
hi all , I installed this great mod
but I had an error saying :

Fatal error: Call to undefined function: get_category_dropdown() in /home/emarati2/public_html/gallery/includes/page_header.php on line 251

in the page_header.php where the 251 line these are the lines:

//-----------------------------------------------------
//--- Category Dropdown -------------------------------
//-----------------------------------------------------
$category_dropdown_selfjump = get_category_dropdown($cat_id, 1);
$site_template->register_vars("category_dropdown_selfjump", $category_dropdown_selfjump);
$category_dropdown_form = $site_template->parse_template("category_dropdown_form");
$site_template->register_vars(array("category_dropdown_form" => $category_dropdown_form));
$site_template->un_register_vars("category_dropdown_selfjump");
unset($category_dropdown_selfjump);
unset($category_dropdown_form);


can you help me to fix this error please
I am not a php man


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 20, 2005, 01:15:03 AM
@bxbx

Quote  [Expand]
I just installed the PM version 2 mod and it works all except for one little part.  Step 13 says the following:

In /templates/<yourtemplate>/member_profile.html  use {lang_pm} tag
In /templates/<yourtemplate>/comment_bit.html use {comment_user_pm} tag to show link to PM the user

In comment_bit.html I have used this tag and nothing shows up.

I have also used the lang_pm tag in member_profile.html and that also shows nothing.  I have gone over the code a lot and I believe that I have installed it correctly.  What am I doing wrong?   :lol:What am I supposed to see?  Maybe I am just expecting something that is not supposed to happen with these.  Thanks.

 :idea: That´s clear - You did not see this tag, because you are not logged in with an other user account...
You´re only able to see this tag when you´re logged in with an other username


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 20, 2005, 03:39:42 PM
Hello again  :roll:

I know somebody is reading this and I don´t give up my hope :lol:

I still have a question some questions about this mod - when somebody´s boring I´ll be happy if I got an answer  :mrgreen:

In my In- and Outbox I didn´t see {lang_received}, but in my Sentbox it is printed on the screen  :!: - why :?: this box uses the same tags!??!?

and - when I have a message in my outbox, it shows me 01.01.1970 - that´s not true...

Edit:

One more problem: my sentbox counts the limit but my inbox doesn´t count it, what´s wrong?

PLZ help meeeeeeeeeeee


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on October 20, 2005, 11:40:16 PM
{lang_received} is valid only for sentbox, since that the only place where you can see when the message has been read.
as of limits problem, did u check your settings? did u check the limit with "regular" member not admin?
about the date, I'll have to look into it.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 21, 2005, 09:29:59 AM
Okay I understand. Yes, I logged in as regular member.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 23, 2005, 10:55:18 PM
I have done a little description for people who wants to use smileys in guestbook and image description after the PMv2 MOD
Click here to get there ->http://www.4homepages.de/forum/index.php?topic=10168.0

Cya by Flo2005


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 26, 2005, 09:41:18 AM
Sorry for my "spaming"  :roll:

I´m still testing this mod and I find (out) some problem´s like above. Perhaps it´s important for anybody else who has run this mod on his homepage.

Flo2005:
Quote  [Expand]
One more problem: my sentbox counts the limit but my inbox doesn´t count it, what´s wrong?
It´s quite simple... PM´s from admins are not added to the limit of your inbox :!:

When I view a message in my inbox/sentbox/outbox

1
2
3
4
5
6
{if lang_to}
<tr class="row2">
<td><b>{lang_to}</b></td>
<td width="100%" colspan="2">{to}</td>
</tr>
{endif lang_to}
is not printed on the screen - e.g. {from} & "IP:" is printed  :?

@Vano: Did you find out why in outbox 01.01.1970 01:00 is still printed?

Okay I´m not hopeless  :lol:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Buster on October 29, 2005, 09:46:05 AM
Hi, is it possible that PMv2 doesn't like PhP5?
I get lot's of errors like 'undefined index in...', 'undefined variable in...'
Regards,
Reiner


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on October 29, 2005, 10:07:14 AM
Hi, is it possible that PMv2 doesn't like PhP5?
I get lot's of errors like 'undefined index in...', 'undefined variable in...'
Regards,
Reiner
its not PHP5 itself, its how your server is set to show 'notice" messages.
In global.php add
1
error_reporting(E_ALL ^ E_NOTICE);
(you should find another instance of this line, make sure you add it as a replacement to the old one, or atleast below the old line.

@Flo2005:
No, I cant locate the reason why would it show you that, because I can not reproduce it...
date 01.01.1970 01:00 means that function date() received "0" (or empty string) as time stamp.
If I understood you correctly that date is showing in the messages list then this line is the one:
Quote  [Expand]
          <td>".$bstart.format_date($config['date_format']." ".$config['time_format'], $row['pm_date']).$bend."</td>
And the only explanation I have is that for some reason the date wasnt saved in the database (?) can you check with mysql manager? what about sentbox does it show you correct dates for received and sent date?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 29, 2005, 11:05:04 AM
Okay, I try to define my problems:

Inbox
It shows me 01.01.1970 when I open the new message first time. When I open this new message a second time it shows me the date correctly but without this tag {lang_to} but IP: is for regular members also printed on the screen

Sentbox
It shows me the date also correctly but IP is still printed on the screen for regular user (for admin it shows also the IP 192.168...that´s okay)

Outbox
It shows me 01.01.1970 before the user get this message, after the user opened this message, it shows me the date correctly in my sentbox

That makes me confused :?

Edit:

Whe a message is in my outbox, in MySql PM Table it shows pm_date_rcvd 0


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Buster on October 29, 2005, 07:49:26 PM
Hi, is it possible that PMv2 doesn't like PhP5?
I get lot's of errors like 'undefined index in...', 'undefined variable in...'
Regards,
Reiner
its not PHP5 itself, its how your server is set to show 'notice" messages.
In global.php add
1
error_reporting(E_ALL ^ E_NOTICE);
(you should find another instance of this line, make sure you add it as a replacement to the old one, or atleast below the old line.[..]

Hi, but during installation php doesn't seem to know ".$lang['pm_'.$mode]." from lang main.php. Admin doesn't even start after installatiion because of the three lines (I translated them):
------
$lang['pm_delete_confirm'] = "Willst Du die Nachricht im Ordner<b>".$lang['pm_'.$mode]." </b>wirklich löschen?";
$lang['pm_delete_confirm_select'] = "Willst Du die markierten Nachrichten im Ordner<b>".$lang['pm_'.$mode]."</b>wirklich löschen?";
$lang['pm_delete_confirm_all'] = "Willst Du alle Nachrichten im Ordner<b>".$lang['pm_'.$mode]."</b>wirklich löschen?";
------

Any idea?
Regards and thanks for your help,
Reiner


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on October 29, 2005, 08:44:40 PM
the line in global.php mentioned above should fix all these problems.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Buster on October 29, 2005, 10:18:03 PM
the line in global.php mentioned above should fix all these problems.
Hi, you're perfectly right - no errors any more, but I don't see nothing when I click on another online being user's profile - the tag lang_pm is not to be seen and thereby can't be clicked.
Am I still doing something wrong? I just inserted {lang_pm} in a table's cell.
Regards,
Reiner


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Buster on October 29, 2005, 10:36:00 PM
the line in global.php mentioned above should fix all these problems.
Hi, you're perfectly right - no errors any more, but I don't see nothing when I click on another online being user's profile - the tag lang_pm is not to be seen and thereby can't be clicked.
Am I still doing something wrong? I just inserted {lang_pm} in a table's cell.
Regards,
Reiner
Now I've tested pm.php and tried to send a message to anaother User. His name has been found, but the window with the mail looks like this:

Private Nachrichten
{if lang_to}
{endif lang_to}
{if lang_received}
{endif lang_received}
Postausgang   
An{if ip}
IP: 84.60.127.188{endif ip}   springi    
Von   Reiner Worm   
Datum   29.10.2005 22:31   
01.01.1970 01:00   
Betreff   Test   {if quote} |{endif quote}{if reply} |{endif reply}{if edit} [Bearbeiten] |{endif edit} [Löschen]    
Test

What is wrong??
Regards,
Reiner


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on October 29, 2005, 11:13:27 PM
maybe this bug fix?
http://www.4homepages.de/forum/index.php?topic=7493.0


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Buster on October 30, 2005, 12:24:46 AM
maybe this bug fix?
http://www.4homepages.de/forum/index.php?topic=7493.0
Hi V@no,
yes, the bugfix helped hiding the tags, pms are going out and can be answered.
Only this damn tag {lang_pm} isn't to be seen in the other user's profile.
I think, I did something wrong!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on October 30, 2005, 12:31:21 AM
Double check Step 11 perhaps you added the line in a wrong place ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Buster on October 30, 2005, 12:58:32 AM
Double check Step 11 perhaps you added the line in a wrong place ;)
Hi V@no, you got it, I'm an idiot and not able to copy and paste perfectly - I missed the , at the end :(
Regards and many thanks for your help!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Darkness2001 on November 03, 2005, 11:27:42 PM
Hallo,
ich habe alle Steps so wie beschrieben durchgeführt.
Doch wenn ich die pm_install.php aufrufe bekomme ich immer Fehlermeldung:
"SHOW TABLES LIKE 'test\_pm' "
und
Sorry, can not continue, you missed some steps of the installation..

Woran liegt es ? Kann mir jemand weiterhelfen?

Hello, I have carried out all tap dances as well as described. However, if I pm_install.php appeal I get always error message:
" SHOW TABLES LIKE 'test_pm' " a
nd
Sorry, can continue, you missed some steps of the installation.

What does it lie with? Can somebody help me?

Sorry for my bad englisch !!!

Greez webdesign


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Darkness2001 on November 05, 2005, 11:53:50 PM
Hello,

thanks for help  :roll:
I find the easy error...................

Thanks guys


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on November 09, 2005, 03:17:45 AM
I've discovered a security hole in the new BBCode parser, please redo Step 6.2


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on November 09, 2005, 09:57:58 AM
Parse error: parse error, expecting `')'' in /srv/www/htdocs/web9/html/includes/functions.php on line 1426

You forgotten a comma...
Quote  [Expand]
        "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
      "/(\[)(list)(])(.*)(\[\/list\])/siU",
      "/(\[\*\])/siU" <---
        "/javascript:/si",


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Zyga on November 13, 2005, 01:46:44 PM
could someone help mi with this

Quote  [Expand]
Parse error: parse error in details.php on line 319


1
2
3
4
5
6
7
8
        $additional_sql .= ", u.$key";
      }
    }
  }
----319---  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").$additional_sql.".", "user_icq")."

FROM ".COMMENTS_TABLE." c
          LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on November 13, 2005, 02:25:02 PM
please paste the complete code... (o:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Zyga on November 13, 2005, 03:35:13 PM
complete code ?

how many lines ?
parse error is only in one

I paste this line 2 posts ago and mark with ----319----[/li]

 :|

edit: sorry for my incompetence I setup this gallery yesterday and its magic for me (problem was between monitor and chair)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on November 13, 2005, 03:47:31 PM
is my request so hard to understand?  :roll:

then please redo step 12...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: master-crown on November 24, 2005, 01:36:17 PM
Hallo an alle,

habe ein Problem und zwar die smilies werden nicht angezeigt!!!!
da kommt wenn man einen neue nachricht schreiben will unten lauter :) ;( *pig* ...... mit einem Roten stern.
Geuploadet habe ich schon smiles in /default/smiles rechte auf cdmod 777.
Ich che´cke aber nicht den step 6.2 welche smiles muss ich den da uncomment(unkommentiert) machen habe einfach den quelltext der darunter steht in die funktion.php eingebaut vor dem ?>.

Woran kann das liegen ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on November 24, 2005, 01:41:21 PM
der hinweis mit dem auskommentieren gilt nur wenn du den simlies Mod installiert hast...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: master-crown on November 24, 2005, 02:03:15 PM
welchen den smilies mod ??? ne habe ich nicht. woher krieg ich den? brauch ich den?
was habe ich dann falsch wenn ich den mod nicht brauch. es funktioniert alles nur die smilies nicht. wohin muss ich die bbcode.js ?
hat die was mit den smilies zu tun ?

gruß
kalle


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on November 24, 2005, 02:11:15 PM
`nein aber das auskommentieren muss nur geacht werden wenn man den Smilies Mod eingebaut hat, das kannste also getrost wieder vergessen... (o:

Was jetzt genau flasch ist kann ich dir so nicht sagen, kann man dassich mal live anschauen?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: master-crown on November 24, 2005, 02:19:18 PM
schau deine PM


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 12:45:26 PM
Hi @ all

I just installed this MOD and earned a lot of errors.... I have no idea, what to do!  8O

The circumstances: I've installed the following MOD's (they all are working):
http://www.4homepages.de/forum/index.php?topic=5142.0    (News...)
http://www.4homepages.de/forum/index.php?topic=7409.0    (Guestbook...)
http://www.4homepages.de/forum/index.php?topic=7066.0    (Ban...)
http://www.4homepages.de/forum/index.php?topic=8987.0    (Contact...)

the First error is on my index.php:  http://web72.login-22.hoststar.ch/home/
the second error ist on my guestbook.php:  http://web72.login-22.hoststar.ch/home/guestbook.php
and last but not least the third error on my pm.php:  http://web72.login-22.hoststar.ch/home/pm.php             (Username: Test, PW: test; if i will write a new message....)

In addition to this I have a problem with the smilies ( I want to install the following MOD after the PM-MOD:  http://www.4homepages.de/forum/index.php?topic=10168.0), but frist of all, I want  the PM-MOD running....

Thanks guys for helping me....      so I can learn something  :D

PS: I haven't done step 6.2... and iI'm using v1.7.1!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 02:26:37 PM
The code of the index.php:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// This is the Paging stuff
 if ($newstype == "latestnewsall") {
     
   include(ROOT_PATH.'includes/paging.php');
   $perpage = $show_news_articles_archive;
   $link_arg = $site_sess->url(ROOT_PATH."index.php?newstype=latestnewsall");
   $getpaging = new Paging($page, $perpage, $num_rows, $link_arg);
   $offset = $getpaging->get_offset();

   $site_template->register_vars(array(
     "paging" => $getpaging->get_paging(),
     "paging_stats" => $getpaging->get_paging_stats()
   ));
   
   $sql = "SELECT c.comment_headline, c.comment_text, c.comment_date, c.image_id
           FROM ".COMMENTS_TABLE." c
           WHERE ".$additional_sql."
           ORDER BY c.comment_date DESC" .$additional_sql_2." 
           LIMIT $offset, $perpage";

         $result = $site_db->query($sql);
         $num_rows = $site_db->get_numrows($result);
         $news_comment_row = array();
         
     while ($row = $site_db->fetch_array($result)) {
           $news_comment_row[] = $row;
         }
 }

 if (!$num_rows) {
     $news_comments = "&nbsp;&nbsp;&nbsp;<b>No New News to report within the last ".$latest_news_days." days.</b>";
 }
 else {
     $news_comments = "";
     $bgcounter = 0;

   for ($i = 0; $i < $num_rows; $i++) {
       $row_bg_number = ($bgcounter++ % 2 == 0) ? 1 : 2;

       $site_template->register_vars(array(
           "news_comment_headline" => format_text($news_comment_row[$i]['comment_headline'], 0, $config['wordwrap_comments'], 0, 0),                             <--- this is line 261
           "news_comment_text" => format_text($news_comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
           "news_comment_date" => format_date($config['date_format']." ".$config['time_format'], $news_comment_row[$i]['comment_date']),
           "row_bg_number" => $row_bg_number));

       $news_comments .= $site_template->parse_template("news_comment_bit");
   }

 }
 $site_template->register_vars("news_comments", $news_comments);
 unset($news_comments);



An the code of the guestbook.php:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
            $admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>";
         } elseif ($comment_row[$i]['comment_ip'] == $session_info['session_ip']) { // if ip equals, permit to edit
            $admin_links .= ($config['user_edit_guestbook'] != 1) ? "" :
                          "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=editcomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['edit']."</a>&nbsp;";
            $admin_links .= ($config['user_delete_guestbook'] != 1) ? "" :
                          "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&amp;comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['delete']."</a>";
         }
         $site_template->register_vars(array(
            "comment_id" => $comment_row[$i]['comment_id'],
            "comment_user_name" => $comment_user_name,
            "comment_user_ip" => $comment_user_ip,
            "comment_site" => format_text($comment_row[$i]['comment_site'], 0, $config['wordwrap_comments'], 0, 0),             <-- this is line 331
            "comment_text" => format_text($comment_row[$i]['comment_text'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments']),
            "comment_date" => format_date($config['date_format']." ".$config['time_format'], $comment_row[$i]['comment_date']),
            "row_bg_number" => $row_bg_number,
            "admin_links" => $admin_links,
         ));
            $comments .= $site_template->parse_template("guestbook_comment_bit");
         
      } // end for
   } else {
      $comments = $lang['be_the_first'];
   }
   //---End Show Guestbook Comments----


And the code of the pm.php:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
$bbcode_form = "";
  if ($config['pm_bbcode']) {
    $bbc_help = "";
    foreach ($lang['bbc_help'] as $key => $val) {
      $bbc_help .= $key."_help = \"".$val."\";\n";
    }
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
      "lang_tag_prompt" => $lang['tag_prompt'],
      "lang_link_text_prompt" => $lang['link_text_prompt'],
      "lang_link_url_prompt" => $lang['link_url_prompt'],
      "lang_link_email_prompt" => $lang['link_email_prompt'],
      "lang_list_type_prompt" => $lang['list_type_prompt'],
      "lang_list_item_prompt" => $lang['list_item_prompt'],
      "lang_close_tags" => $lang['close_tags'],
      "lang_all" => $lang['all'],
      "smiles_text" => get_smiles_text(),                   <-- this is line 427
      "bbc_help" => $bbc_help
    ));
    $bbcode_form = $site_template->parse_template(BBCODE);
  }

  :(  Please help me guys.....


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 02:39:36 PM
Ok, the first 2 errors on index.php and on guestbook.php are, because the changes in the includes/function.php, but I don't know, what changes!??? I only recognize that the function.php is the problem. What can I do with that function.php, so that no more problems with my MODs wil arrive....???
The third error is, because the smiles-function. When I installed the guestbook, I had a similar error, but now I can't delete the line (...a lot more errors)...!???

 :?: :?: :?:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Toso on December 04, 2005, 06:41:04 PM
When i compose a new PM i get an error:

Warning: Invalid argument supplied for foreach() in /home/www/web46/html/album/pm.php on line 414


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 04, 2005, 06:44:20 PM
redo Step 3


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Toso on December 04, 2005, 06:51:31 PM
Thats it. 

THX :mrgreen:



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 06:57:05 PM
What can I do  :?: :?: :?:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 04, 2005, 07:06:26 PM
First quote the exact error messages instead of showing links to the pages with errors. Then we'll see what we can do about it ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 07:14:29 PM
Ok, thanks V@no

First error on my index.php:  Fatal error: Call to undefined function: format_text() in /home/www/web72/html/home/index.php on line 261
Second error on my guestbook.php: Fatal error: Call to undefined function: format_text() in /home/www/web72/html/home/guestbook.php on line 331
Third error on my pm.php, when I will write a new message: Fatal error: Call to undefined function: get_smiles_text() in /home/www/web72/html/home/pm.php on line 427

Is this OK?

Now, whats the problem...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 04, 2005, 07:50:31 PM
The problem is in Step 6.x
Restore you backup of includes/functions.php and try again ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 07:57:10 PM
Question: Why don't I have to change my functions.php?
What are the exact changes of the function.php for the PM-MOD?

Yes, your right, then there is only one error, especially the third one:  Call to undefined function: get_smiles_text() in /home/www/web72/html/home/pm.php on line 427     8O

Thanks V@no


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 04, 2005, 07:59:00 PM
Well, there are some funcitons in includes/functions.php that has to be changed and new functions has to be added in order to use new bbcode and smiles in this mod. The changes should not affect the rest of 4images code (if everything done properly) but will add new features to it.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 08:02:00 PM
Aha OK! And what should I do with the last error on my pm.php, if I will write a new message?

Call to undefined function: get_smiles_text() in /home/www/web72/html/home/pm.php on line 427

 :roll:


PS: What should I do, if I will use the new bbcode an the smilies....???


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 04, 2005, 08:27:51 PM
That error is still comming from Step 6.x


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 08:32:52 PM
But I haven't done a step 6.x !   I haven't installed the smilies mod.... or should I  :?:

(I've decided to install the following after the PM-MOD:  http://www.4homepages.de/forum/index.php?topic=10168.0  )  --> I wish I could use the new bbcode and smilies...

Sorry for my stupid questions, but I'm a man in a very dark room....   Can you help me step by step what I should do!

V@no thanks a lot your my last chance  :oops:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 04, 2005, 09:36:30 PM
There is not a word that says about doint do step 6.x if you installed/not installed smiles mod.
It sais, that if you installed the smiles mod, you must comment out or remove the changes in includes/functions.php made by that mod and then add the new code from Step 6.2


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 04, 2005, 10:33:24 PM
Thanks a lot man, I have understand.... no more error  :lol:



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Toso on December 05, 2005, 10:25:25 PM
Hello everyone,

i have a new problem. The popup doesnot work.

Is my header.html correct?

Quote  [Expand]
<html dir="{direction}">
<head>{pm_popup_script}
<title>{site_name}</title>
<meta http-equiv="content-type" content="text/html; charset={charset}" />
<link rel="stylesheet" href="{template_url}/style.css" />
<script language="javascript" type="text/javascript">
<!--
function opendetailwindow() {
window.open('','detailwindow','toolbar=no,scrollbars=yes,resizable=no,width=800,height=600');
}
// -->
</script>
</head> <body {pm_popup_header} bgcolor="#FFFFFF" text="#000080" link="#000080" vlink="#000080" alink="#000080">
<br />


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on December 06, 2005, 01:39:42 AM
how can i make this MOD , using the old smilies MOD (BBcode Smileys) and not with the V.2 of the same ??


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 06, 2005, 07:21:48 PM
Great MOD  :D

One thing: my scale doesn't show me the volume of my Inbox for example.... I've limited the inbox on 5 Messages! But there is no limitation and no error messages (in the inbox are 13 messages)  :?: :?: :?:

Hope that someone can help me  :(

PS: Yes I use for my users the global settings which are limited to 5 messages inbox...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 07, 2005, 12:24:29 AM
Make sure you test it with a normal user and not not normal - aka admin...:lol: j/k ;)
Seriously though, admin does not have any restrictions, only regular members do. so test it with a regular member account, it should work.

P.S. almost forgot, messages from administrators also not being counted, only members to members. try send messages to yourself ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 07, 2005, 08:43:45 AM
 :D  Thank you V@no! This was the thing I missed....    :mrgreen:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 17, 2005, 12:01:00 AM
Back again  :wink:

If I log in as Admin and click on the link to pm.php comes an error, which says that I'm not authorized to watch the site (as Admin  :?: :?: :?:)
If I test it as a User, evrything is ok....

Where is the failure???

Please help me....


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on December 17, 2005, 12:23:39 AM
hmmm..didnt it work before? if so, then I dont know what you've changed...try reupload pm.php file.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Olphi on December 17, 2005, 10:27:55 AM
Ok, I've done a reupload, but the problem is still there...

More details: when I click on the link I log automatically out and I have not enough rights to view that page and its also with other users know...

 :!: Hey I found the problem... It's only my computer, that means on other computers there's no problem  :twisted: 
 :!: Probably the cookies or something else... Try to fix it!!!

Thanks guys, espacially V@no  :wink:


---> the new firewall was the problem....


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Leppi on January 10, 2006, 09:55:38 PM
Warum kann man die file nich saugen?! Vano's gallerie is down. gibt's die file auch irgendwo anders?!
------------------------------------------------------------------------------------------------------------------------------------------
Why can't I download the file?! Vano's gallery is down. Is it possible to download the file somewhere else?!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on January 10, 2006, 10:09:58 PM
I have uploaded the PMv2 MOD on my server - for the downtime of v@no´s server

Download:
http://www.snuup.de/4img_mods/pm_v2.zip


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on January 10, 2006, 10:10:49 PM
@Leppi,
... dann warte mal einige Stunden ... und gallery.vano.org wird wieder online sein ...  :roll:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Leppi on January 10, 2006, 10:17:58 PM
k'sen werds später halt nochmal probieren!

cya & mfg Leppi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: pff on January 22, 2006, 05:54:07 PM
Hallo zusammen, gibt es das PMv2-System irgendwo schon vorinstalliert zum Download, so dass einfach nur gerade diese Mod und sonst nichts darin ist (also einfach alle Dateien, die angepasst werden mussten fix fertig..), denn die lange Installation ist mir ein wenig zuwider, ich möchte aber dennoch ein solches System einbauen.
Wenn möglich in Deutsch.
Vielen Dank schon mal..


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 08:20:31 PM
Help at me a problem at performance 6 items(points) on installations gives out:


Quote  [Expand]
Step 6

Open /includes/functions.php
Find:
Code:

Fatal error: Call to undefined function: format_text() in /home/f/fotocarnus/deusweb/public_html/includes/functions.php on line 189


My page before change that

Quote  [Expand]
REMOVED


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 22, 2006, 08:28:46 PM
Restore backups and try again.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 09:42:43 PM
At me a problem when I insert it  /*  and 
*/


Quote  [Expand]
Open /includes/functions.php
Find:
Code:

function format_text


just comment entire function by doing this:
Add before that line:
Code:

/*

and at the end of the function find (in default 4images it would be):
Code:

  return replace_badwords($text);
}

add after that closing bracket } add this:
Code:

*/



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: JensF on January 22, 2006, 09:58:16 PM
Quote  [Expand]
At me a problem when I insert it  /*  and 
*/

Do not insert this. This comments a code block out...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 10:07:28 PM
And as then it is necessary to execute 6 item(point) I shall not understand at me a smile only their code for example is not shown ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 22, 2006, 10:46:16 PM
Ok, here is an example:
in functions.php you have a block of code
1
2
3
4
function format_text($text)
{
...some more code here...
}
Now, you need to comment it out by inserting /* above the begining of code block (in php this represent beginning of comment) and */ below the code block (this represent end of comment)
So the end result should be:
Quote  [Expand]
/*
function format_text($text)
{
.... some more code here ....
}
*/

Hope this is more clear.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 11:10:15 PM

At me it turns out so!

Quote  [Expand]
\*
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {
 
$text = trim($text);
  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }

  if ($html == 0) {
    $text = str_replace("&lt;", "&amp;lt;", $text);
    $text = str_replace("&gt;", "&amp;gt;", $text);
    $text = str_replace("<", "&lt;", $text);
    $text = str_replace(">", "&gt;", $text);
  }
  $text = str_replace("\n", "<br />", $text);
  $text = replace_url($text);

  if ($bbcode == 1) {
    $search_array = array(
      "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
      "/(\[)(list)(])(.*)(\[\/list\])/siU",
      "/(\[\*\])/siU",
      "/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU",
      "/(\[)(url)(])([^\"]*)(\[\/url\])/siU",
      "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU",
      "/javascript:/si",
      "/about:/si"
    );
    $replace_array = array(
      "<ol type=\"\\5\">\\7</ol>",
      "<ul>\\4</ul>",
      "<li>",
      "<a href=\"http://www.\\6\" target=\"_blank\">\\8</a>",
      "<a href=\"\\5\" target=\"_blank\">\\7</a>",
      "<a href=\"http://www.\\5\" target=\"_blank\">www.\\5</a>",
      "<a href=\"\\4\" target=\"_blank\">\\4</a>",
      "<pre>Code:<hr size=1>\\5<hr size=1></pre>",
      "java script:",
      "about :"
    );
    $text = preg_replace($search_array, $replace_array, $text);
    if (!$bbcode_img)  {
      $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>", $text);
    }
    else  {
      $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<img src=\"\\5\">", $text);
    }
    $text = preg_replace("/(\[)(b)(])(\r\n)*([^\"]*)(\[\/b\])/siU", "<b>\\5</b>", $text);
    $text = preg_replace("/(\[)(i)(])(\r\n)*([^\"]*)(\[\/i\])/siU", "<i>\\5</i>", $text);
    $text = preg_replace("/(\[)(u)(])(\r\n)*([^\"]*)(\[\/u\])/siU", "<u>\\5</u>", $text);
  }
  $text = str_replace("\\'", "'", $text);
  return replace_badwords($text);
}
*/


But if I so do(make) that at me and получаеться a mistake that!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 22, 2006, 11:19:31 PM
First of all, can you see the difference between: \* and /* ?
Second, можно и по-русски ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 11:20:52 PM
Да не это я просто тут опечатался!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 11:26:21 PM
ну а  пункт Step 6.2  как я понял просто тупо в конце перед ? >  вставить  или там тоже эти штуки нужны /*   */


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 22, 2006, 11:35:52 PM
Да, просто нужно вставить перед ?> и ничего больше. Если установлен "Smiles" MOD, то изменения в functions.php сделанные тем модом, тоже нужно исправить на коментарий.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 11:38:59 PM
я не могу в рубиться что за комментарий эти звездачки чтоли если да то при добовлении их  у меня ошибка (((


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 22, 2006, 11:41:25 PM
В принцапе у меня все и без этого работает единственное то что при вставки смайла в письмо или комментарий он просто отображается как значек а не как картинка!!!! при отправки само сабой или при предварительном  просмотре !

вот собственно сам файл


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 23, 2006, 12:59:49 AM
Добавленный код в файле не соответствует опубликованому коду (не одинаков).


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: deusxx on January 23, 2006, 06:01:19 AM
Все теперь все работает ! )))  спасибо!  Странно как я мог не правельно кода вставить!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: impss on January 23, 2006, 03:47:25 PM
Just checking

If I wanted to install this mod, so that by default everyones settings would be to have Pop up messages Turned on.

In Pm_install.php I would change
1
"ALTER TABLE `".USERS_TABLE."` CHANGE `user_pms_popup` `user_pm_popup` tinyint(1) NOT NULL default '0'",

to

1
"ALTER TABLE `".USERS_TABLE."` CHANGE `user_pms_popup` `user_pm_popup` tinyint(1) NOT NULL default '1'",

Am I Correct ?



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 24, 2006, 12:39:59 AM
Correct


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: impss on January 24, 2006, 01:46:46 AM

V@no or anybody,

i made this change , and the installation went fine, But......

everyone is still set as no pop ups buy default , is there anything i can do at this point, instead of manually changing 1400 users?
also, i dont hav access to a phpmyadmin or anything

please help if you can


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 24, 2006, 01:58:35 AM
In the installer below
1
$sql_data = array(
insert this:
1
            "UPDATE `".USERS_TABLE."` SET `user_pm_popup` = 1",
and run the installer again. (you'll see bunch of error messages, just ignore them).


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: impss on January 24, 2006, 02:59:23 AM
In the installer below
1
$sql_data = array(
insert this:
1
            "UPDATE `".USERS_TABLE."` SET `user_pm_popup` = 1",
and run the installer again. (you'll see bunch of error messages, just ignore them).

I get  "Sorry, can not continue, PM table is present."
when i make the change and try running again


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on January 24, 2006, 03:10:26 AM
Oh, I forgot I've added that check :)
just comment out or remove this line:
1
$result = $site_db->query_firstrow("SHOW TABLES LIKE '".str_replace("_", "\_", $table_prefix)."pm'");


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: impss on January 24, 2006, 03:15:34 AM
Thanks V@no,

You Rock!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: MEXX on January 27, 2006, 04:35:21 PM
Добрый день. Надеюсь в этот раз я попал "в тему" :) Все дело в том, что при устанолвке мода смайликов в коментариях, у меня при посте коментария отображается все как надо. Но на главной странице в последних коментариях некоторые смайлы отображаются как в приватных сообщениях. Что именно делать с функцией format text() я не понял.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: pff on January 27, 2006, 06:20:13 PM
well, I now try it in english.. :):
hello again, I have stil hope to find somebody who could give me all the changed files..that means, I only want to use 4images gallery with this pm-modification. i tried to install it myself, but it didn't work and i don't want to make this long installation one more time.
so, is there anyone who has got all the files, which have to be changed, ready for download?

thank you very much.
pff


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on February 15, 2006, 03:27:42 PM
Is thee any way to include the userpicture? That would make the MOD almost perfect


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: TheOracle on February 15, 2006, 09:24:35 PM
The way to include the userpic MOD should be the same way as it was included in the previous version of the PM MOD.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on February 15, 2006, 09:43:13 PM
hm, i searched the whole forum, and the old PMS thread, but find only that one:
http://www.4homepages.de/forum/index.php?topic=9535.15

So there is no such mod/addon existing?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: TheOracle on February 15, 2006, 09:47:38 PM
Quote  [Expand]

but find only that one


It's more like this one :

http://www.4homepages.de/forum/index.php?topic=6797.msg60454#msg60454

which means you didn't quite look in the appropriate topic since this is relative to the userpic MOD. :roll:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on February 15, 2006, 09:51:16 PM
oh, thanks - iam sorry, just to tired  :|


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on February 16, 2006, 09:55:30 AM
thats not exactly what i'am looking for. You mod shows YOUR image on every message, but what i want is to show the picture from the user i get the message from, e.g.:

For example the inbox is now:
(the last two messages i recieved)

Status     Topic             From              Date     
          Party Pics ...      z0r0    16.02.2006 02:44    
           "p0365"          admin          16.02.2006 02:23

So what i am talking about is this:

Status     Topic             From              Userpic         Date     
          Party Pics ...      z0r0    userpic z0r0      16.02.2006 02:44    
           "p0365"          admin         userpic admin    16.02.2006 02:23

possible ? :)



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: TheOracle on February 16, 2006, 04:50:26 PM
The way you posted it (all chunky), how am I supposed to understand this ?

If you wish to present something clear, please - either - post it on an HTML table "or" screenshot for a better understanding.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: IcEcReaM on February 16, 2006, 05:34:41 PM
he only wanna add an extra row where the userpics are showed from sender and recipent.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: TheOracle on February 16, 2006, 05:40:08 PM
Already did. I tested this on a test server site from another user as he reported complete success already.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: zaisk on February 20, 2006, 04:18:03 PM
I have installed this mod step by step as it is given in the first post in this topic and everything is working just few problems.

Why I am seeing these tags (here is the screenshots):

(http://img455.imageshack.us/img455/1815/13ay1.jpg) (http://imageshack.us)

and

(http://img68.imageshack.us/img68/4106/22dr.jpg) (http://imageshack.us)

Maybe in some other pages there are the same problem. I made just 2 screenshots

Please help me :/


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on February 20, 2006, 05:16:53 PM
So, i just dont understand, is tyhere a MOD for the userpic in the PMS, if yes, where is it, if no, is it hard to code it ? It would be a very nice feature.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: zaisk on February 20, 2006, 08:41:29 PM
I have installed this mod step by step as it is given in the first post in this topic and everything is working just few problems.

Why I am seeing these tags (here is the screenshots):

(http://img455.imageshack.us/img455/1815/13ay1.jpg) (http://imageshack.us)

and

(http://img68.imageshack.us/img68/4106/22dr.jpg) (http://imageshack.us)

Maybe in some other pages there are the same problem. I made just 2 screenshots

Please help me :/


Sorry, I have found the solution.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: glitzer on February 21, 2006, 03:23:20 PM
Hallo!

It works great with the first time!
Es hat eigentlich alles auf Anhieb funkioniert...jedoch 1 Problem und 1 Frage habe ich:

Wie kann ich die {pm_boxes} untereinader statt nebeneinander machen?
How can i make the {pm_boxes} not next to..i like it among each other?

Mein Problem das ich habe ist..wenn jemand nicht eingeloggt ist und im Profil eines Members klickt "Private Nachricht schicken" klickt..dann kommt die Meldung das er nicht eingeloggt ist.
Loggt er sich ein..springt es auf das "Login.php" und die Seite kann nicht angezeigt werden..es geht erst wieder wenn man die Seite komplett zumacht und die Seite wieder aufruft dann ist mein eingeloggt drinnen.


My Problem is..when i am not logged in..and click in a member page .."send a privat message"...then iam get the info..i must logged in..then i logged it..and i get an error..it jumps to the "login.php" an
i geht a white site with "the site cannot to show me"..i must to close the site completely..when i visit the site once again iam directly logged in without problems.

Where is my problem????

Thanx a lot for help.

Greez Alexx


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: IcEcReaM on February 21, 2006, 08:31:42 PM
In der page_header.php
Das hier
1
  "pm_boxes" => ($inbox) ? $inbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$sentbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$outbox."&nbsp;&nbsp;|&nbsp;&nbsp;".$newpm : "",
ersetzen durch das:
1
  "pm_boxes" => ($inbox) ? $inbox."<br />&nbsp;|&nbsp;&nbsp;".$sentbox."<br />&nbsp;&nbsp;|&nbsp;&nbsp;".$outbox."<br />&nbsp;&nbsp;|&nbsp;&nbsp;".$newpm : "",

oder was besser wäre,
anstatt {pm_boxes} benutzt du direkt im Template das Design das du haben willst,
und rufst die einzelen Boxen so auf:
{pm_inbox} - link to inbox
{pm_sentbox} - link to sentbox
{pm_outbox} - link to outbox
{pm_newpm} - link to new message


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: glitzer on February 21, 2006, 08:53:12 PM
Danke Icecream!Es hat super funktioniert.
nur mein Problem mit dem Einloggen ist leider nach wie vor da :(
Keine ahnung woran das liegt.
ich habs jetzt einfach so geändert, dass man als "uneingeloggter" garnicht den link anklicken kann "privat nachricht schreiben"

Danke vielmals!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: IcEcReaM on February 21, 2006, 09:14:03 PM
So, i just dont understand, is tyhere a MOD for the userpic in the PMS, if yes, where is it, if no, is it hard to code it ? It would be a very nice feature.

To get userpic next to Name Modifiaction

In pm.php

Search for
1
<td>".$bstart."<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['user_id'])."\">".$row['user_name']."</a>".$bend."</td>
and replace with
1
2
<td>".$bstart."<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['user_id'])."\">".$row['user_name']."</a>".$bend." ".$userpic_img."</td>
         

Search for
1
$msg_list .= "<tr class=\"row".(($bgcounter++ % 2 == 0) ? 1 : 2)."\" align=\"center\">

and insert above
1
      $userpic_img = ($config['userpic'] && $row['userpic']) ? "<img src=\"./data/userpic/".$row['userpic']."\">" : "";

@glitzer: Das mit der Weiterleitung hab ich mir noch nicht genauer angeschaut,
aber da scheint sowieso noch nen anderer Fehler drin zu sein.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: glitzer on February 21, 2006, 09:19:05 PM
@glitzer: Das mit der Weiterleitung hab ich mir noch nicht genauer angeschaut,
aber da scheint sowieso noch nen anderer Fehler drin zu sein.

Auweia sowas les ich nicht gern :-(
Es funzt aber sonst alles bei mir einwandfrei..bin sonst noch auf keinen Fehler draufgekommen ausser das mit dem Problem als uneinloggter "Private Nachricht senden" ding..



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on February 21, 2006, 11:03:04 PM
THANKS IcEcReaM, that works just fine. Just a little addition (yes, you coded that too ;) ) :

For showing userpics with fixed widht, and a picture for users without userpic called "nouserpic.jpg" change

1
<td>".$bstart."<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$row['user_id'])."\">".$row['user_name']."</a>".$bend." ".$userpic_img."</td>

with

1
$userpic_img = ($config['userpic'] && (@file_exists(ROOT_PATH."data/userpic/".$row['userpic'])) && $row['userpic']) ? "<img src=\"".ROOT_PATH."data/userpic/".$row['userpic']."\" width=\"100".$userpic_width."\">" : "<img src=\"".get_gallery_image("nouserpic.jpg")."\" width=\"100".$userpic_width."\">";

and add a picture named "nouserpic.jpg" into your default images folder. Change the width in the line for your design. Line originally coded buy IcEcReaM too ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: IcEcReaM on February 21, 2006, 11:10:59 PM
@glitzer:

Jop, das meine ich ja, das mit der Weiterleitung.

Meinte nur, dass sich der Fehler noch auf andere Weise reprouzieren lässt,
aber auf der gleichen Ursache beruht.



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: glitzer on February 22, 2006, 11:03:51 AM
der fehler ist aber erst durch das PM aufgefallen sonst noch nie!

NOch eine Frage, kann man das irgendwie machen,d ass man statt einen Newsletter per mail eine PM an alle mitglieder schickt?

Liebe Grüße
Alexx


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Loda on February 22, 2006, 11:16:46 AM
ja!
schau mal hier:
http://www.4homepages.de/forum/index.php?topic=6732.0
vielleicht findest du da die lösung


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: glitzer on February 22, 2006, 03:38:40 PM
Funktioniert super! Danke Loda!
Dachte das ist nur für das alte PM System, aber fürs neue funzt es auch einwandfrei!

Danke + Liebe Grüße,
Alexxandra


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on March 12, 2006, 04:18:09 PM
what have i to change, to show ALL the smileys directly above the bbcode2 tags (i dont want to use the open-window function)\

i tried to include the smeles.php via "iframe", but it dont "put" the smileys in the textbox, even if i point the iframe to "_4imagessmiles" as a target  :|

edit: I hope someone call tell me what i have to change, to make it look that way:


comments:
(http://www.zapomnime.com/misc/smile1.JPG)


PM:
(http://www.zapomnime.com/misc/smile2.JPG)



please advise

thanks

georgi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on March 12, 2006, 09:24:33 PM
Simply move the {smiles_text} in the same column where {lang_comment} and {lang_message} is.
There are two things also will needed:
1) that column must have static width set ( width="90" )
2) also must have rowspan="3"

this is the column from my pm_new.html template:
1
2
3
4
5
                  <td width="90" valign="top" rowspan="2"><b>{lang_message}</b>{if bbcode}<br /><br />
                    <span onMouseOver="helpline('sm')">
                      {smiles_text}&nbsp;<a href="smiles.php" onclick="window.open('smiles.php', '_4imagessmilies', 'resizable=yes,scrollbars=yes,WIDTH=325, HEIGHT=410');return false;" target="_4imagessmilies">{lang_all}</a>
                    </span>{endif bbcode}
                  </td>


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on March 12, 2006, 10:40:33 PM
just something ... i dont have the "{smiles_text}" anywhere, and i dont changed the original files ?!?
PS: The second question is, what i have to do to show ALL emocions on the left side?

thanks for your support, here my comment_form and my new_pm:


comment_form:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
<table width="100%" border="0" cellspacing="0" cellpadding="1" align="center">
  <tr>
    <td valign="top" class="cl_none">
      <table width="100%" border="0" cellpadding="3" cellspacing="0">
        <tr>
          <td height="20" valign="middle" class="com1">{lang_post_comment}</td>
        </tr>
        <tr>
          <td valign="top" class="head2clubsmain2">
            <form name="commentform" action="{self}" method="post" onsubmit="postbutton.disabled=true;">
              <table cellpadding="4" cellspacing="0" border="0">
                <tr>
                  <td width="90"><b>{lang_name}</b></td>
                  <td><input type="text" name="user_name" size="30" value="{user_name}" class="commentinput" /></td>
                </tr>
                <tr>
                  <td width="90"><b>{lang_headline}</b></td>
                  <td><input type="text" name="comment_headline" size="30" value="{comment_headline}" class="commentinput" /></td>
                </tr>
                <tr>
                  <td width="140" valign="top"><b>{lang_comment}</b>






</td>
                  <td><textarea name="comment_text" cols="35" rows="10" class="commenttextarea">{comment_text}</textarea></td>
                </tr>
                <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>{bbcode}</td>
                </tr>
                <tr>
                  <td width="90" valign="top">&nbsp;</td>
                  <td>
                    <input type="hidden" name="action" value="postcomment" />
                    <input type="hidden" name="id" value="{image_id}" />
                    <input type="submit" name="postbutton" value="{lang_post_comment}" class="button" />
                  </td>
                </tr>
              </table>
            </form>
          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>

new_pm:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
{preview}
<table border="0" cellspacing="0" cellpadding="0" class="bordercolor" align="center">
  <form name="postform" method="post" action="{self}" onSubmit="submit.disabled=true; preview.disabled=true; return checkForm(this);" />
    <tr>
      <td valign="top">
        <table width="100%" border="0" cellpadding="0" cellspacing="1">
          <tr>
            <td class="row1">
  <table width="100%" border="0" cellpadding="3" cellspacing="0">
<tr>
<td width="90">{lang_to}</td>
<td>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
          <tr>
            <td align="left">
          <input type="text" class="finduser" name="username" maxlength="25" size="10" value="{username}" />&nbsp;
        </td>
        <td align="left">
          <input type="submit" name="finduser" value="{lang_finduser}" class="button" onClick="window.open('{url_finduser}&username='+username.value, '_pmfinduser', 'HEIGHT=170,resizable=yes,WIDTH=320');return false;" />
        </td>
      </tr>
{if username_list}
                      <tr>
                        <td colspan="2">
                  <select name="user_id" class="select" onChange="if (this.options[this.selectedIndex].value != 0){ username.value=this.options[this.selectedIndex].text; }">
                  {username_list}
                  </select>&nbsp;*
                    </td>
                  </tr>
{endif username_list}
    </table>
</td>
</tr>
<tr>
<td>{lang_subject}</td>
<td><input type="text" name="subject" value="{subject}" size="40" class="commentinput" /></td>
</tr>
<tr>
<td valign="top">{lang_message}</td>
<td>
                    <textarea name="message" cols="35" rows="10" class="commenttextarea" wrap="virtual" {if bbcode2}onSelect="storeCaret(this);" onClick="storeCaret(this);" onKeyUp="storeCaret(this);"{endif bbcode2} />{message}</textarea>
</td>
</tr>
                <tr>
                  <td>&nbsp;</td>
                  <td>{bbcode}</td>
                </tr>
<tr>
<td>&nbsp;</td>
<td>
                    {if lang_html}<input type="checkbox" name="html" value="1"{html_select}>&nbsp;{lang_html}<br />{endif lang_html}
                    {if lang_bbcode}<input type="checkbox" name="bbcode" value="1"{bbcode_select}>&nbsp;{lang_bbcode}<br />{endif lang_bbcode}
                    <input type="checkbox" name="smiles" value="1"{smiles_select}>&nbsp;{lang_smiles}<br />
</td>
</tr>
<input type="hidden" name="action" value="send" />
<input type="hidden" name="reply" value="{reply}" />
<input type="hidden" name="edit" value="{edit}" />
<input type="hidden" name="id" value="{id}" />
<tr>
<td width="100%" colspan="2" align="center">
<table>
<tr>
<td width="50%" align="right"><input type="submit" name="preview" value=" {lang_preview} " onClick="action.value='preview';" class="button" /></td>
<td width="50%" align="left"><input type="submit" name="submit" value=" {lang_send} " class="button" /></td>
</tr>
</table>
</td>
</tr>
{if username_list}
<tr>
  <td colspan="2">&nbsp;* {lang_user_id_priority}</td>
</tr>
{endif username_list}
  </table>
  </td>
          </tr>
        </table>
      </td>
    </tr>
  </form>
</table>


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on March 12, 2006, 11:11:39 PM
Its in bbcode.html template


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on March 13, 2006, 12:08:50 AM
it works now - but i still didnt know how to show all smileys, instead of open a new window


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on March 13, 2006, 12:32:33 AM
change the number in includes/functions.php[qcode]            if ($i > 18) {[/qcode]


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: trez on March 13, 2006, 12:43:25 AM
yes, works perfectly now, thanks.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: PartyPix on March 30, 2006, 02:54:46 PM
Hallo
kann leider nicht so gut Englisch deshalb hoffe ich das auch Deutsch geht.
Ich habe ein Problem. Habe mir das PMS Sytsem installiert und es läuft auch ganz gut soweit.
Habe dann aber im Kontrollzenter bzw. in der member_editprofile.html einen Fehler feststellen müssen.
Wenn ich auf die Seite gehe sprich ins Kontrollzentrum, steht bei E-Mail folgendes: <a href=
Also das steht im input Feld. Den normalen von mir definierten Style wird auch nicht richtig angezeigt für dieses Input. Desweiteren steht hinter dem Input dieses hier: admin@yourdomain.com" class="input">
Das gleiche ist auch bei der Wiederholung der Emailadresse, sowie wenn ich im Homepage Feld eine Homepage eingebe und dann auf speichern drücke. Dann wird dieses so ähnlich angezeigt.
Der HTML Code ist meiner Meinung nach aber in Ordnung, habe ihn aber hier nochmal mit angehangen. Ich vermute das ein Fehler in meiner member.php sein muss. Genau wissen tue ich dies natürlich nicht. Ich hoffe jemand kennt dieses Problem oder weiß an was das liegen könnte.

EDIT: Ich habe festgestellt das es auch in mehreren Dateien so ist, also wird es vielleicht doch nicht an der member.php liegen. BITTE helft mir !!!

I try it in english.
I have a problem. I have installed PMS System and since when my member_editprofile is ceriously changed. In the input field email is an entry like this: <a href=
After the input field stand this: admin@yourdomain.com" class="input">
The same is by email2, too. And after i give a Homepage URL in the homepage field, it show the same how by email and email2. Where is the mistake ?? PLEASE HELP ME. I have the member_editprofile.html at this post. But i think the problem is in the member.php. Is here anyone who has an idea for this mistake ??? AND SORRY for my miserable english. ;)

EDIT: I have seen that the mistake is in other templates from me,too. So i think the mistake can't in the member.php but i don't know. PLEASE HELP ME BY THIS PROBLEM !!!

member.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
<IMG SRC="templates/default/navi/content_16.jpg" WIDTH="334" HEIGHT="20" BORDER="0" ALT=""><br><br>

<form method="post" action="{url_member}" enctype="multipart/form-data">
  <table width="350" border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td valign="top" class="head1">
        <table width="350" border="0" cellpadding="4" cellspacing="0">
          <tr>
            <td colspan="2" valign="top" class="head1">{lang_profile_of} {user_name}</td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_email}</b></td>
            <td class="row1"><input type="text" name="user_email"  size="30" value="{user_email}" class="input"></td>
          </tr>
          <tr>
            <td class="row2"><b>{lang_email_confirm}</b></td>
            <td class="row2"><input type="text" name="user_email2"  size="30" value="{user_email2}" class="input" /></td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_show_email}</b></td>
            <td class="row1">
              <input type="radio" name="user_showemail" value="1"{user_showemail_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_showemail" value="0"{user_showemail_no} />
              {lang_no}</td>
          </tr>
  <tr>
            <td class="row2"><b>{lang_allow_emails}</b></td>
            <td class="row2">
              <input type="radio" name="user_allowemails" value="1"{user_allowemails_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_allowemails" value="0"{user_allowemails_no} />
              {lang_no}
</td>
          </tr>
  <tr>
            <td class="row2"><b>{lang_user_pm_email}</b></td>
            <td class="row2">
              <input type="radio" name="user_pm_email" value="1"{user_pm_email_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_pm_email" value="0"{user_pm_email_no} />
              {lang_no}
            </td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_user_pm_popup}</b></td>
            <td class="row1">
              <input type="radio" name="user_pm_popup" value="1"{user_pm_popup_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_pm_popup" value="0"{user_pm_popup_no} />
              {lang_no}
            </td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_invisible}</b></td>
            <td class="row1">
              <input type="radio" name="user_invisible" value="1"{user_invisible_yes} />
              {lang_yes}&nbsp;&nbsp;&nbsp;
              <input type="radio" name="user_invisible" value="0"{user_invisible_no} />
              {lang_no}
</td>
          </tr>
          <tr>
            <td colspan="2" class="head1">{lang_optional_infos}</td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_homepage}</b></td>
            <td class="row1"><input type="text" name="user_homepage"  size="30" value="{user_homepage}" class="input" /></td>
          </tr><tr>
            <td class="row2"><b>{lang_icq}</b></td>
            <td class="row2"><input type="text" name="user_icq"  size="30" value="{user_icq}" class="input" /></td>
          </tr>
  {if userpic_allowed}
          <tr>
            <td class="row1" valign="top"><b>{lang_userpic}</b>
              <SPAN class="smalltext">
                <br /> <br /><br />
                <B>{lang_userpic_upload}</B>
              </SPAN>
            </td>
            <td class="row1">
              <INPUT type="file" name="userpic_file"  size="30" class="input" /><br /><br />
              {if userpic_img}<img src="{userpic_img}"><br /><input type="checkbox" name="userpic_del" value="1">&nbsp;{lang_userpic_del}{endif userpic_img}
            </TD>
          </TR>
{endif userpic_allowed}
         
        </table>
      </td>
    </tr>
  </table>
  <input type="hidden" name="action" value="updateprofile" />
  <p align="center">
    <input type="submit" value="{lang_save}" class="button" />
    <input type="reset" value="{lang_reset}" class="button" />
  </p>
</form>
<br />
<form method="post" action="{url_member}">
  <table width="350" border="0" cellspacing="0" cellpadding="1">
    <tr>
      <td valign="top" class="head1">
        <table width="350" border="0" cellpadding="4" cellspacing="0">
          <tr>
            <td colspan="2" valign="top" class="head1">{lang_change_password}</td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_old_password}</b></td>
            <td class="row1"><input type="password" name="current_user_password" size="30" class="input" /></td>
          </tr>
          <tr>
            <td class="row2"><b>{lang_new_password}</b></td>
            <td class="row2"><input type="password" name="user_password" size="30" class="input" /></td>
          </tr>
          <tr>
            <td class="row1"><b>{lang_new_password_confirm}</b></td>
            <td class="row1"><input type="password" name="user_password2" size="30" class="input" /></td>
          </tr>
        </table>
      </td>
    </tr>
  </table>
  <input type="hidden" name="action" value="updatepassword" />
  <p align="center">
    <input type="submit" value="{lang_change_password}" class="button" />
    <input type="reset" value="{lang_reset}" class="button" />
  </p>
</form>


Hier ist noch ein Screenshot wie das ganze aussieht.
Here is a screenshot,too how it show on my page.

(http://funchecks.fu.funpic.de/problem2.JPG)


(http://funchecks.fu.funpic.de/problem.JPG)

MFG Marcel


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: roger13 on April 02, 2006, 02:11:08 PM
Hallo PartyPix,


Habe dann aber im Kontrollzenter bzw. in der member_editprofile.html einen Fehler feststellen müssen.
Wenn ich auf die Seite gehe sprich ins Kontrollzentrum, steht bei E-Mail folgendes: <a href=
Also das steht im input Feld. Den normalen von mir definierten Style wird auch nicht richtig angezeigt für dieses Input. Desweiteren steht hinter dem Input dieses hier: admin@yourdomain.com" class="input">
Das gleiche ist auch bei der Wiederholung der Emailadresse, sowie wenn ich im Homepage Feld eine Homepage eingebe und dann auf speichern drücke. Dann wird dieses so ähnlich angezeigt...

...I have a problem. I have installed PMS System and since when my member_editprofile is ceriously changed. In the input field email is an entry like this: <a href=
After the input field stand this: admin@yourdomain.com" class="input">
The same is by email2, too. And after i give a Homepage URL in the homepage field, it show the same how by email and email2. Where is the mistake ?? PLEASE HELP ME.


Du verwendest die Version 1.7.2 und nun tritt ein Kompatibilitätsproblem zu diesem [MOD] PMv2 auf.

You use Version 1.7.2 and got a compatibility problem with this [MOD] PMv2.

Um das Problem zu lösen / To fix this problem:


1. Öffne die Datei / open file->  \includes\functions.php

2. Finde Code / find code:
1
$text = replace_url($text);

3. Ersetze mit / remove with:
1
2
3
4
if ($html !== 2) {
      $text = nl2br(trim($text));
      $text = replace_url($text);
}

Nun sollten die Links in den Eingabefeldern korrekt angezeigt werden / Now the input fields show the correct text.




Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on April 02, 2006, 08:18:09 PM
Hi i wonder if i could send a private message to all my users using phpmyadmin or making a modification in the mod so alow me to send pm to my users
thanks


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: PartyPix on April 16, 2006, 05:58:43 PM
Hi

@roger

Quote  [Expand]
Du verwendest die Version 1.7.2 und nun tritt ein Kompatibilitätsproblem zu diesem [MOD] PMv2 auf.

You use Version 1.7.2 and got a compatibility problem with this [MOD] PMv2.

Um das Problem zu lösen / To fix this problem:


1. Öffne die Datei / open file->  \includes\functions.php

2. Finde Code / find code:

Code:
$text = replace_url($text);
3. Ersetze mit / remove with:

Code:
if ($html !== 2) {
      $text = nl2br(trim($text));
      $text = replace_url($text);
}
Nun sollten die Links in den Eingabefeldern korrekt angezeigt werden / Now the input fields show the correct text.

Thanks a lot. It help me  afew. But i have seen that in the register_form.html is the same problem. When i give no or a bad amailadress in the input it will be the same in the input. How can i fix that ?

(http://funchecks.fu.funpic.de/email.JPG)

// EDIT
That Problem i could fixed but the following problem i have every time,too ...
Also das obige Problem hat sich nun gelöst. Bleibt aber immer noch dieses hier ...

@ all

Can anyone translate me the Links into german?
I mean this links:

Inbox  |  Sentbox  |  Outbox  |  New message

Specific the Links Sentbox and Outbox ? Isnt that the same ?

Sorry for my bad english ;)

Kann irgendjemand mir die Links übersetzen in ein gutes noirmales Deutsch ?
Diese Links:

Inbox  |  Sentbox  |  Outbox  |  New message

Speziell die Links Sentbox und Outbox, weil ist das nicht das selbe ?


MFG

PartyPix


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: iraklis on April 20, 2006, 01:54:14 PM
Hello

First of all, great MOD. It works, not everything like it should, but it's ok.

One thing that's really boring, my ACP. After the configuration of this MOD PM, some of my other MODs in the ACP doesn't work anymore. In the menu (left side) are free spaces and if I click on them I get a page, but not like it was before.

I tried to change files, without result. I don't know what the problem could be. I've attached two printscreens, so you can see how it looks like.

Any ideas, can someone help.

Thank you for your support.

greez


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 20, 2006, 02:21:03 PM
probably made a misstake in step 4 or 5


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: PartyPix on April 21, 2006, 01:08:51 PM
Hi
what must i change to display the folder in this way.

Checkbox    From    Date   Subject


????
(no Status)
I have try it and it go in the inbox good but when i have seen that in the other boxes is chaos and i have change it back. Do you have a idea ?

Please Help


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: his-luke on April 21, 2006, 08:31:12 PM
Hi,
I have a problem i can't solve. If i make Step 6 i get a parse Error. If i ignore Step 6 i don't get it. So i went on without Step 6 but then when i want to send a new message i get this Parse Error:

Fatal error: Call to undefined function get_smiles_text() in /www/01247/htdocs/4images/pm.php on line 427

I don't have this Smiley MOD.
Use 4images  1.7.2.

Who can help me?
If u need something like whole codes or the Parse Error if i make Step 6 please ask.

TY luke


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 21, 2006, 11:49:57 PM
If i make Step 6 i get a parse Error.
then obviously you do it wrong. There is nothing much could be said on how to do that step, so try again.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: iraklis on April 24, 2006, 02:09:39 PM
Hello

First of all, great MOD. It works, not everything like it should, but it's ok.

One thing that's really boring, my ACP. After the configuration of this MOD PM, some of my other MODs in the ACP doesn't work anymore. In the menu (left side) are free spaces and if I click on them I get a page, but not like it was before.

I tried to change files, without result. I don't know what the problem could be. I've attached two printscreens, so you can see how it looks like.

Any ideas, can someone help.

Thank you for your support.

greez


ok, I could solve this problem, but now I've an other.

When I create a new message and I click "Preview" the message is ok. But the receiver, receives the message like this:
Quote  [Expand]
"Subject     selftest       | [Reply] | [Delete]
selftest
<br />ddfdfdfdf

so is anything not ok with the message settings for html messages?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: his-luke on April 24, 2006, 04:20:22 PM
then obviously you do it wrong. There is nothing much could be said on how to do that step, so try again.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
/*
function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {
  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }

  if ($html == 0 || $html == 2) {
        $text = safe_htmlspecialchars($text);
  }

  if ($bbcode == 1) {
    $search_array = array(
      "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
      "/(\[)(list)(])(.*)(\[\/list\])/siU",
      "/(\[\*\])/siU",
      "/(\[\/\*\])/siU",
      "/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU",
      "/(\[)(url)(])([^\"]*)(\[\/url\])/siU",
      "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU",
      "/javascript:/si",
      "/about:/si"
    );
    $replace_array = array(
      "<ol type=\"\\5\">\\7</ol>",
      "<ul>\\4</ul>",
      "<li>",
      "</li>",
      "<a href=\"http://www.\\6\" target=\"_blank\">\\8</a>",
      "<a href=\"\\5\" target=\"_blank\">\\7</a>",
      "<a href=\"http://www.\\5\" target=\"_blank\">www.\\5</a>",
      "<a href=\"\\4\" target=\"_blank\">\\4</a>",
      "<pre>Code:<hr size=1>\\5<hr size=1></pre>",
      "java script:",
      "about :"
    );
    $text = preg_replace($search_array, $replace_array, $text);
    if (!$bbcode_img)  {
      $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<a href=\"\\5\" target=\"_blank\">\\5</a>", $text);
    }
    else  {
      $text = preg_replace("/(\[)(img)(])(\r\n)*([^\"]*)(\[\/img\])/siU", "<img src=\"\\5\">", $text);
    }
    $text = preg_replace("/(\[)(b)(])(\r\n)*([^\"]*)(\[\/b\])/siU", "<b>\\5</b>", $text);
    $text = preg_replace("/(\[)(i)(])(\r\n)*([^\"]*)(\[\/i\])/siU", "<i>\\5</i>", $text);
    $text = preg_replace("/(\[)(u)(])(\r\n)*([^\"]*)(\[\/u\])/siU", "<u>\\5</u>", $text);

    $text = replace_badwords($text);
  }
*/

Parse error: parse error, unexpected '}' in /www/01247/htdocs/4images/includes/functions.php on line 718
( line 718 is a closing bracket of this function:

1
2
3
4
5
6
7
8
9
if ($html !== 2) {
    $text = nl2br(trim($text));
    $text = replace_url($text);
  }

  $text = str_replace("\\'", "'", $text);

  return $text;
}

Could u please tell me how i should do step 6? TY


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on April 25, 2006, 02:09:56 AM
I already see that you missed closing curly bracket at the end.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: his-luke on April 26, 2006, 05:54:02 PM
sry my english is bad... can't understand what u want me to say. What should i change in code?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: himu on April 28, 2006, 08:36:31 PM
hey v@no,

somehow ... the style.css is not working with my pm.php  :(
What's wrong? format is all messed up.  :cry:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: PartyPix on May 02, 2006, 03:57:42 PM
Hi
what must i change to make this: the subject field in new pm should be a defined max length ( max 20 letters ) ??

///

Hi
was muss ich im quellcodeändern damit das Feld "Betreff" in new PM eine maximale anzahl nur von Buchstaben haben darf (zB. maximal 20 Buchstaben) ???

MFG

PartyPix


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on May 02, 2006, 04:45:25 PM
in pm_new.html finde ...
1
<td><input type="text" name="subject" value="{subject}" size="20" class="commentinput" /></td>

und ersetze es durch ...
1
<td><input type="text" name="subject" maxlength="20" value="{subject}" size="20" class="commentinput" /></td>

die size="20" für das Input-Feld ist individuell zu prüfen entsprechend deinem Template ...  :wink:

mawenzi


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: his-luke on May 02, 2006, 06:02:48 PM
I still doesn't know what i did wrong could somebody please help me. ( Site 17 )


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Zyga on May 03, 2006, 01:48:24 PM
one of my user told me today:
he receive notification about PM on mail there is no url ....
and its true there is only empty space on {site_url} and only second part of {url}
1
/pm.php?action=view&mode=inbox&id=xxx.
Script just wont show my {site_url} tag
I dont know when it stops working :cry:
pease help


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on May 04, 2006, 12:24:16 AM
1) did you defined in includes/contants.php SCRIPT_URL constant?
2) in global.php check that this block of code present and is identical:
1
2
3
4
5
6
7
8
9
10
if (defined("SCRIPT_URL") && SCRIPT_URL != "") {
  $script_url = SCRIPT_URL;
}
else {
  $port = (!preg_match("/^(80|443)$/", getenv("SERVER_PORT"), $port_match)) ? ":".getenv("SERVER_PORT") : "";
  $script_url  = ($port_match[1] == 443) ? "https://" : "http://";
  $script_url .= (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : getenv("SERVER_NAME");
  $script_url .= $port;
  $script_url .= (dirname($PHP_SELF) != "/") ? dirname($PHP_SELF) : "";
}


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Zyga on May 04, 2006, 05:17:29 PM
Thanks  :!: U are my hero  :D

it was my fault - little error - there was't script_url line in constant :oops:

now it works again :)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: his-luke on May 06, 2006, 10:16:32 PM
Why does nobody answer my Question? Iam a bit frustrated.
Please answer my Question on page 17


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Rom4ik on May 18, 2006, 08:08:21 PM
Hat jemand eine Deutsche Version des Scripts?
Ó êîãî íèáóäü åñòü ðóññêàÿ âåðñèÿ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Zyga on May 19, 2006, 10:18:54 PM
when user add some smilies in commments without spaces between them they want show
how can i fix it ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: b.o.fan on May 28, 2006, 03:09:38 PM
If you'd like to use the PMv2 BBCode, you'd have to implement the PMv2...  :wink:

also ich habe 1.72 installiert. und den mod! nur bbcode2 funtzt in der comment_form.html nicht :(

warum?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on May 28, 2006, 09:21:41 PM
Please help   Script version 1.7.2
Analog problem on http://funchecks.fu.funpic.de/problem.JPG i fix this code

Quote  [Expand]
1. Öffne die Datei / open file->  \includes\functions.php

2. Finde Code / find code:

Code:
$text = replace_url($text);
3. Ersetze mit / remove with:

Code:
if ($html !== 2) {
      $text = nl2br(trim($text));
      $text = replace_url($text);
}

But in control panel admin / settings - Bad words list.  Asteriks replaced my swear words in cirillic codepage 
 if i use backup file  /includes/functions.php  then all ok :(  How fix?  Thanks


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: aletapety on May 29, 2006, 10:04:29 PM
Great Mod  :D

I have one question is dificult to add automatic messeage to people who register ?.

example:

Hello {lang_user_name},

thank for register ,now you have
add photo
send e-carts

bla bla

 :P


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: aletapety on June 01, 2006, 01:55:06 PM
Any solution ?  :P


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: b.o.fan on June 01, 2006, 02:29:40 PM
hello!

when i open the pm.php i hav egot this error:

Warning: Invalid argument supplied for foreach() in d:\webserver\www\warten2\4images\pm.php on line 414

this is the code of line 411 to 416

1
2
3
4
5
6
  $bbcode_form = "";
  if ($config['pm_bbcode']) {
    $bbc_help = "";
    foreach ($lang['bbc_help'] as $key => $val) {
      $bbc_help .= $key."_help = \"".$val."\";\n";
    }

any ideas?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: aletapety on June 01, 2006, 02:45:06 PM
hello!

when i open the pm.php i hav egot this error:

Warning: Invalid argument supplied for foreach() in d:\webserver\www\warten2\4images\pm.php on line 414

this is the code of line 411 to 416

1
2
3
4
5
6
  $bbcode_form = "";
  if ($config['pm_bbcode']) {
    $bbc_help = "";
    foreach ($lang['bbc_help'] as $key => $val) {
      $bbc_help .= $key."_help = \"".$val."\";\n";
    }

any ideas?

maybe check lang/main ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ascanio on June 02, 2006, 02:13:16 AM
Hi everyone how could i send a private message to all my users using phpmyadmin or making a modification in the mod
any ideas of how the queri would be?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on June 02, 2006, 02:30:15 AM
Hi ascanio,

without using phpmyadmin ... but a nice Plugin in ACP ...

[Plugin] Pm to Members http://www.4homepages.de/forum/index.php?topic=6732.0


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on June 02, 2006, 11:10:40 PM
Greetings, how make this mod work with default smileys (bbcode smileys MOD) and not with this new pm2 smileys ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: b.o.fan on June 04, 2006, 12:45:30 AM
Hello @ all.

i've found out to create a WELCOME PM to a new user...!

on this request http://www.4homepages.de/forum/index.php?topic=8409.msg46069#msg46069

i test this on 1.72!


open register.php

find there:
1
2
3
4
5
    $sql = "INSERT INTO ".USERS_TABLE."
            (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").$additional_field_sql.")
            VALUES
            ($user_id, $user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail, $user_allowemails, $user_invisible, $current_time, '$activationkey', $current_time, $current_time, 0, '$user_homepage', '$user_icq'".$additional_value_sql.")";
    $result = $site_db->query($sql);

add after this
1
2
3
4
5
    $sql = "INSERT INTO ".PM_TABLE."
                        (pm_date, pm_to, pm_from, pm_subject, pm_type, pm_text, pm_bbcode, pm_html, pm_ip, pm_smiles)
                  VALUES
                        (".time().", ".$user_id.", '1', '".$lang['welcome_subject']."', ".PM_UNREAD.", '".addslashes($lang['welcome_text'])."', '1', '1', '".$session_info['session_ip']."', '1')";
    $result = $site_db->query($sql);

in these example the user with the ID 1 send the PM! you can change this here:
1
(".time().", ".$user_id.", '1',
set there your ID!

then open lang/<your lang>/main.php

add before

Your Mail. something like this!

1
2
$lang['welcome_subject'] = "Hello and welcome on {site_name}";
$lang['welcome_text'] = "Thanks that you registered on {site_name}<br>blabla<br>Your Admin";

You can use Smilies and html.

When The new User logged in, he will get the PM!

b.o.fan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: aletapety on June 04, 2006, 03:31:08 PM
Hello @ all.

i've found out to create a WELCOME PM to a new user...!

on this request http://www.4homepages.de/forum/index.php?topic=8409.msg46069#msg46069

i test this on 1.72!


open register.php

find there:
1
2
3
4
5
    $sql = "INSERT INTO ".USERS_TABLE."
            (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").$additional_field_sql.")
            VALUES
            ($user_id, $user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail, $user_allowemails, $user_invisible, $current_time, '$activationkey', $current_time, $current_time, 0, '$user_homepage', '$user_icq'".$additional_value_sql.")";
    $result = $site_db->query($sql);

add after this
1
2
3
4
5
    $sql = "INSERT INTO ".PM_TABLE."
                        (pm_date, pm_to, pm_from, pm_subject, pm_type, pm_text, pm_bbcode, pm_html, pm_ip, pm_smiles)
                  VALUES
                        (".time().", ".$user_id.", '1', '".$lang['welcome_subject']."', ".PM_UNREAD.", '".addslashes($lang['welcome_text'])."', '1', '1', '".$session_info['session_ip']."', '1')";
    $result = $site_db->query($sql);

in these example the user with the ID 1 send the PM! you can change this here:
1
(".time().", ".$user_id.", '1',
set there your ID!

then open lang/<your lang>/main.php

add before

Your Mail. something like this!

1
2
$lang['welcome_subject'] = "Hello and welcome on {site_name}";
$lang['welcome_text'] = "Thanks that you registered on {site_name}<br>blabla<br>Your Admin";

You can use Smilies and html.

When The new User logged in, he will get the PM!

b.o.fan


Work  8O thanks b.o.fan  :P


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: b.o.fan on June 04, 2006, 03:38:06 PM
ok. please :D


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Sir Sky-Walker on June 05, 2006, 12:21:18 AM
Hallo
kann leider nicht so gut Englisch deshalb hoffe ich das auch Deutsch geht.
Ich habe ein Problem. Habe mir das PMS Sytsem installiert und es läuft auch ganz gut soweit.
Habe dann aber im Kontrollzenter bzw. in der member_editprofile.html einen Fehler feststellen müssen.
Wenn ich auf die Seite gehe sprich ins Kontrollzentrum, steht bei E-Mail folgendes: <a href=
Also das steht im input Feld. Den normalen von mir definierten Style wird auch nicht richtig angezeigt für dieses Input. Desweiteren steht hinter dem Input dieses hier: admin@yourdomain.com" class="input">
Das gleiche ist auch bei der Wiederholung der Emailadresse, sowie wenn ich im Homepage Feld eine Homepage eingebe und dann auf speichern drücke. Dann wird dieses so ähnlich angezeigt.
Der HTML Code ist meiner Meinung nach aber in Ordnung, habe ihn aber hier nochmal mit angehangen. Ich vermute das ein Fehler in meiner member.php sein muss. Genau wissen tue ich dies natürlich nicht. Ich hoffe jemand kennt dieses Problem oder weiß an was das liegen könnte.

EDIT: Ich habe festgestellt das es auch in mehreren Dateien so ist, also wird es vielleicht doch nicht an der member.php liegen. BITTE helft mir !!!

I try it in english.
I have a problem. I have installed PMS System and since when my member_editprofile is ceriously changed. In the input field email is an entry like this: <a href=
After the input field stand this: admin@yourdomain.com" class="input">
The same is by email2, too. And after i give a Homepage URL in the homepage field, it show the same how by email and email2. Where is the mistake ?? PLEASE HELP ME. I have the member_editprofile.html at this post. But i think the problem is in the member.php. Is here anyone who has an idea for this mistake ??? AND SORRY for my miserable english. ;)

EDIT: I have seen that the mistake is in other templates from me,too. So i think the mistake can't in the member.php but i don't know. PLEASE HELP ME BY THIS PROBLEM !!!


Hier ist noch ein Screenshot wie das ganze aussieht.
Here is a screenshot,too how it show on my page.

(http://funchecks.fu.funpic.de/problem2.JPG)


(http://funchecks.fu.funpic.de/problem.JPG)

MFG Marcel


I have the same probleme. And the help din't work:

Quote  [Expand]
1. Öffne die Datei / open file->  \includes\functions.php

2. Finde Code / find code:

Code:
$text = replace_url($text);
3. Ersetze mit / remove with:

Code:
if ($html !== 2) {
      $text = nl2br(trim($text));
      $text = replace_url($text);
}


I don't no, what is wrong, can please anybody help me?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Sir Sky-Walker on June 05, 2006, 02:10:06 AM
Thats my functions.php after i install this mod an it will be the error! With the backup-functions before i install this mod i haven't the error i post above!



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: live@ct on June 05, 2006, 06:19:52 AM
I installed this mode when this come out, but now i disable and I like to disable to send the welcome PM for the users


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Sir Sky-Walker on June 05, 2006, 04:28:05 PM
Hat keiner eine Idee warum bei mir die Emailadressen im Profil und Adminmenü nicht richtig angezeigt werden ?

---------------------

Have anybody an idea, because of the error?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Thana on June 06, 2006, 12:06:50 AM
Hab die Korrektur grade ausprobiert... funktioniert.. keine komischen Zeichen mehr in den email-Feldern, Formatierung auch wieder okay. Thanks

Just uploaded the fix...now it works properly again. thanks


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: jotabonfim on June 09, 2006, 03:18:57 AM
http://www.4homepages.de/forum/index.php?topic=6692.msg71064#msg71064

Hi boys, I am with the same problem talked above.
I installed MOD PM and this presenting this mistake.
Version of the 4images: 1.7.2

I thank can help :cry: :cry:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: aletapety on June 09, 2006, 09:35:54 AM
http://www.4homepages.de/forum/index.php?topic=6692.msg71064#msg71064

Hi boys, I am with the same problem talked above.
I installed MOD PM and this presenting this mistake.
Version of the 4images: 1.7.2

I thank can help :cry: :cry:
\

i'm have many mod's and 1.7.2 and work good uinstall and install again 


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: jotabonfim on June 09, 2006, 01:16:01 PM
I only have been installing MOD PM. :cry:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on June 12, 2006, 02:13:17 PM
deutsch
hallo,
ich habe probleme mit der details.php und

1
2
3
4
5
6
7
8
9
10
$additional_sql = "";
  if (!empty($additional_user_fields)) {
    $table_fields = $site_db->get_table_fields(USERS_TABLE);
    foreach ($additional_user_fields as $key => $val) {
      if (isset($table_fields[$key])) {
        $additional_sql .= ", u.$key";
      }
    }
  }
  $sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_id").$additional_sql."
1
"comment_user_pm" => ($config['pm'] && $comment_row[$i]['user_id']  != GUEST && $user_info['user_level'] > GUEST && $user_info['user_id'] != $comment_row[$i]['user_id']) ? "<a href=\"".$site_sess->url(ROOT_PATH."pm.php?action=quote&mode=comment&id=".$comment_row[$i]['comment_id']."&user_id=".$comment_row[$i]['user_id'])."\" /><img src=\"".get_gallery_image("pm.gif")."\" border=\"0\" alt=\"".$lang['pm_user_pm_alt']."\" /></a>" : "",


der comment_user_pm tag wird nicht in die den kommentaren angezeigt.

was ist falsch??

english
hello,
i have a problem with tag comment_user_pm in details.php

this is not indicated in the comments

what it wrong??

greets ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on June 12, 2006, 02:42:17 PM
1) the person who commented must NOT be a guest
2) the person who is trying to PM must NOT be a guest and must NOT be the same person who commented


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on June 12, 2006, 02:57:39 PM
 :oops: thank you
functioned perfectly

ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on June 13, 2006, 03:00:58 PM
hello, i have a problem with java script popup. i becomes no error,
separate e error message left above


onload="Javascript:confirm_newpm()"

> see image

how can I change that??
ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: b.o.fan on June 13, 2006, 03:21:08 PM
i ve got a problem with my controlpanel.

i think it was after this mod.

look at the attechment!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: jotabonfim on June 13, 2006, 05:54:15 PM
http://www.4homepages.de/forum/index.php?topic=6692.msg71064#msg71064

Hi boys, I am with the same problem talked above.
I installed MOD PM and this presenting this mistake.
Version of the 4images: 1.7.2

I thank can help 


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: b.o.fan on June 13, 2006, 08:20:32 PM
http://www.4homepages.de/forum/index.php?topic=6692.msg71064#msg71064

Hi boys, I am with the same problem talked above.
I installed MOD PM and this presenting this mistake.
Version of the 4images: 1.7.2

I thank can help 

this problem i had too. and i fixed this with the post you gave me.. but the other bug is allready in my admin panel! :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on June 13, 2006, 11:21:26 PM
hello, i have a problem with java script popup. i becomes no error,

... Step 15 ... in header.html
ich habe auf deiner Seite keinen in sich geschlossenen <body> tag gefunden ... von daher kommt es dann event. zu dieser Anzeige ...
nach dem Abschluß des header- muss der body-tag folgen ... etwa so ...
1
2
3
4
...
</head>
<body {pm_popup_header}>
...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on June 14, 2006, 07:20:36 AM
danke für die schnelle antwort, ich habe auf meiner seite die header noch nicht modifiziert
aber genau so wars

ich habe <body>script</body> genommen und das hat nicht funktioniert.

merci

gruss ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on June 14, 2006, 09:32:41 AM

ist so nicht richtig ... siehe oben !


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on June 15, 2006, 11:56:33 PM
hello, i have a problem...

englisch:
if I extinguish user, it is not emptied data pm table.
if announces itself now user with same name, are still
direct in inbox. like can I give in admin/users config?

deutsch:
ich habe ein problem und zwar werden mir die pm table nicht gelöscht.
wenn ich ein user manuel über acp lösche, anschliessend mit dem gleichen
namen nochmals ein account erröffne, sind noch nachrichten in der inbox.
wie kann ich die admin/users so konfigurieren, dass sämtliche daten gelöscht
werden.

greets ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on June 16, 2006, 01:31:22 AM
Didnt understand the english variant...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on June 16, 2006, 07:14:50 AM
hello vano

-i have a user "test"
-then I delete the member in acp
-the registred the sam user "test"

message from old user test still are in the database
table pm by the user one does not delete 

we can i the admin/users config that with delete from the member
from acp > clearing the pm_table and update

greets


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Beautiful Body Castings on June 26, 2006, 12:41:08 AM
need help

i went as far as step 9 to check the pm.php page and i noticed that the header and footer info from my template is not being shown

not sure why

if it helps i also noticed i have this same problem with the report a pic mod aswell when i go to the report a pic page it doesnt display the header and footer info either

does anyone know if its something to do with this mod something i have done wrong or something somewhere else and how i can fix it

Mikey


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Fragezeichen on July 03, 2006, 11:06:13 PM
hi guys,
anybody test that mod with 1.7.2?
my experience there is missing a template  by sending a new message :?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on July 04, 2006, 09:36:01 PM
i've 2 questions :

1 ) why the shadow/glow , show 1 word per line (how fix it ) ??

i.e word 1
    word 2

2) i want use the default bbcode smilies and not the smilies used by this mod, how can i do it ?

Cheers


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on July 06, 2006, 05:13:53 AM
Hallo
kann leider nicht so gut Englisch deshalb hoffe ich das auch Deutsch geht.
Ich habe ein Problem. Habe mir das PMS Sytsem installiert und es läuft auch ganz gut soweit.
Habe dann aber im Kontrollzenter bzw. in der member_editprofile.html einen Fehler feststellen müssen.
Wenn ich auf die Seite gehe sprich ins Kontrollzentrum, steht bei E-Mail folgendes: <a href=
Also das steht im input Feld. Den normalen von mir definierten Style wird auch nicht richtig angezeigt für dieses Input. Desweiteren steht hinter dem Input dieses hier: admin@yourdomain.com" class="input">
Das gleiche ist auch bei der Wiederholung der Emailadresse, sowie wenn ich im Homepage Feld eine Homepage eingebe und dann auf speichern drücke. Dann wird dieses so ähnlich angezeigt.
Der HTML Code ist meiner Meinung nach aber in Ordnung, habe ihn aber hier nochmal mit angehangen. Ich vermute das ein Fehler in meiner member.php sein muss. Genau wissen tue ich dies natürlich nicht. Ich hoffe jemand kennt dieses Problem oder weiß an was das liegen könnte.

EDIT: Ich habe festgestellt das es auch in mehreren Dateien so ist, also wird es vielleicht doch nicht an der member.php liegen. BITTE helft mir !!!

I try it in english.
I have a problem. I have installed PMS System and since when my member_editprofile is ceriously changed. In the input field email is an entry like this: <a href=
After the input field stand this: admin@yourdomain.com" class="input">
The same is by email2, too. And after i give a Homepage URL in the homepage field, it show the same how by email and email2. Where is the mistake ?? PLEASE HELP ME. I have the member_editprofile.html at this post. But i think the problem is in the member.php. Is here anyone who has an idea for this mistake ??? AND SORRY for my miserable english. ;)

EDIT: I have seen that the mistake is in other templates from me,too. So i think the mistake can't in the member.php but i don't know. PLEASE HELP ME BY THIS PROBLEM !!!


Hier ist noch ein Screenshot wie das ganze aussieht.
Here is a screenshot,too how it show on my page.

(http://funchecks.fu.funpic.de/problem2.JPG)


(http://funchecks.fu.funpic.de/problem.JPG)

MFG Marcel


I have the same probleme. And the help din't work:

Quote  [Expand]
1. Öffne die Datei / open file->  \includes\functions.php

2. Finde Code / find code:

Code:
$text = replace_url($text);
3. Ersetze mit / remove with:

Code:
if ($html !== 2) {
      $text = nl2br(trim($text));
      $text = replace_url($text);
}


I don't no, what is wrong, can please anybody help me?

I got the same problem  8O


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on July 09, 2006, 09:19:49 PM
Hello @ all.

i've found out to create a WELCOME PM to a new user...!

on this request http://www.4homepages.de/forum/index.php?topic=8409.msg46069#msg46069

i test this on 1.72!


open register.php

find there:
1
2
3
4
5
    $sql = "INSERT INTO ".USERS_TABLE."
            (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").$additional_field_sql.")
            VALUES
            ($user_id, $user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail, $user_allowemails, $user_invisible, $current_time, '$activationkey', $current_time, $current_time, 0, '$user_homepage', '$user_icq'".$additional_value_sql.")";
    $result = $site_db->query($sql);

add after this
1
2
3
4
5
    $sql = "INSERT INTO ".PM_TABLE."
                        (pm_date, pm_to, pm_from, pm_subject, pm_type, pm_text, pm_bbcode, pm_html, pm_ip, pm_smiles)
                  VALUES
                        (".time().", ".$user_id.", '1', '".$lang['welcome_subject']."', ".PM_UNREAD.", '".addslashes($lang['welcome_text'])."', '1', '1', '".$session_info['session_ip']."', '1')";
    $result = $site_db->query($sql);

in these example the user with the ID 1 send the PM! you can change this here:
1
(".time().", ".$user_id.", '1',
set there your ID!

then open lang/<your lang>/main.php

add before

Your Mail. something like this!

1
2
$lang['welcome_subject'] = "Hello and welcome on {site_name}";
$lang['welcome_text'] = "Thanks that you registered on {site_name}<br>blabla<br>Your Admin";

You can use Smilies and html.

When The new User logged in, he will get the PM!

b.o.fan


Work  8O thanks b.o.fan  :P

can this be used for the old PMS ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: b.o.fan on July 09, 2006, 11:10:27 PM
Hello @ all.

i've found out to create a WELCOME PM to a new user...!

on this request http://www.4homepages.de/forum/index.php?topic=8409.msg46069#msg46069

i test this on 1.72!


open register.php

find there:
1
2
3
4
5
    $sql = "INSERT INTO ".USERS_TABLE."
            (".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name").get_user_table_field(", ", "user_password").get_user_table_field(", ", "user_email").get_user_table_field(", ", "user_showemail").get_user_table_field(", ", "user_allowemails").get_user_table_field(", ", "user_invisible").get_user_table_field(", ", "user_joindate").get_user_table_field(", ", "user_activationkey").get_user_table_field(", ", "user_lastaction").get_user_table_field(", ", "user_lastvisit").get_user_table_field(", ", "user_comments").get_user_table_field(", ", "user_homepage").get_user_table_field(", ", "user_icq").$additional_field_sql.")
            VALUES
            ($user_id, $user_level, '$user_name', '".md5($user_password)."', '$user_email', $user_showemail, $user_allowemails, $user_invisible, $current_time, '$activationkey', $current_time, $current_time, 0, '$user_homepage', '$user_icq'".$additional_value_sql.")";
    $result = $site_db->query($sql);

add after this
1
2
3
4
5
    $sql = "INSERT INTO ".PM_TABLE."
                        (pm_date, pm_to, pm_from, pm_subject, pm_type, pm_text, pm_bbcode, pm_html, pm_ip, pm_smiles)
                  VALUES
                        (".time().", ".$user_id.", '1', '".$lang['welcome_subject']."', ".PM_UNREAD.", '".addslashes($lang['welcome_text'])."', '1', '1', '".$session_info['session_ip']."', '1')";
    $result = $site_db->query($sql);

in these example the user with the ID 1 send the PM! you can change this here:
1
(".time().", ".$user_id.", '1',
set there your ID!

then open lang/<your lang>/main.php

add before

Your Mail. something like this!

1
2
$lang['welcome_subject'] = "Hello and welcome on {site_name}";
$lang['welcome_text'] = "Thanks that you registered on {site_name}<br>blabla<br>Your Admin";

You can use Smilies and html.

When The new User logged in, he will get the PM!

b.o.fan


Work  8O thanks b.o.fan  :P

can this be used for the old PMS ?

i think, NO. look @ the code of the old pms... and change it...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on July 10, 2006, 04:43:09 AM
the problem...is ... i'm not php coder...so isn't  easy for me !! :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: myr2904 on July 15, 2006, 12:13:32 AM
(http://img235.imageshack.us/img235/9872/text4nt.jpg)

Who can help me to do this...I have instal this mod...but i don't konw how to to this.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 15, 2006, 12:57:38 AM
The template bbcode2.html already has this, so look in there ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: myr2904 on July 15, 2006, 10:58:11 AM
The template bbcode2.html already has this, so look in there ;)

Replace bbcode.html with bbcode2.html ???


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 15, 2006, 11:07:44 AM
I dont understand your question...if you installed this mod correctly, you should see the help line without any additional modifications to the templates...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: myr2904 on July 15, 2006, 11:15:09 AM
I have to replace bbcode.html with bbcode2.html ??

I installed this mod correctly... but i can see the help line

Version 1.7.2


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on July 15, 2006, 11:15:51 AM
no, you dont need to replace anything.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: myr2904 on July 15, 2006, 11:33:21 AM
In pm apear the help line:

(http://img87.imageshack.us/img87/2882/pmdv1.jpg)

But in details doesn't apear:

(http://img157.imageshack.us/img157/2566/detailbt1.jpg)

Pls if you can help me with this...to apear also in details


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: myr2904 on July 20, 2006, 06:46:59 PM
Hy,
After i instaled this mod ...in admin panel appear this..

(http://img72.imageshack.us/img72/3042/adminxn1.jpg)

What is the problem?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on July 22, 2006, 03:01:20 AM
i've 2 questions :

1 ) why the shadow/glow , show 1 word per line (how fix it ) ??

i.e word 1
    word 2

2) i want use the default bbcode smilies and not the smilies used by this mod, how can i do it ?

Cheers

none can help me ?  :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on July 28, 2006, 10:47:12 AM
hello,

1. englisch
we can i the message (see image > green field and black message)
change of two line to one line (two message i a green field)

deutsch
wie kriege ich so hin, dass die beide nachrichten im grünen feld sowie
die schwarz gekennzeichnete nachricht ausgeführt werden?

2. englisch
when i scribe a new message, then I regard the preview,
work on again the message, those smilie always inserted
at the end of message and not at the desired place

deutsch
ich habe das problem, dass wenn ich eine neue nachricht erstelle,
dann auf vorschau gehe, dann wieder zurück und ein smilie einfüge,
wird dies immer am ende angefügt und nicht an der gewünschten
stelle.

greets ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on July 28, 2006, 12:13:56 PM
Hallo Ivan,

zu1.
... eine schnelle Lösung nur durch Änderung in der main.php ...
... finde ...
1
2
$lang['pm_sent_success'] = "Die Nachricht wurde erfolgreich gesendet.";
$lang['pm_redirect'] = "Bitte warte einen Moment ... ";
... und ändere in ...
1
2
$lang['pm_sent_success'] = "Die Nachricht wurde erfolgreich gesendet. Bitte warte einen Moment ... ";
$lang['pm_redirect'] = "";

... um nicht alle {pm_redirect} zu verlieren, die sonst noch durch den Code aufgerufen werden ...
... solltest du alle betreffenden Meldungen wie oben ändern ...

2.
... das läuft bei mir analog ...  :wink:
... ich verschiebe den Smilie dann einfach per drag / drop ...
... von daher stellt sich das für mich nicht als Problem dar ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: tdkpaul on August 02, 2006, 07:38:18 PM
warning
this mod is not working with 1.7.2 at all
i have just tested it



i just wondering why here are some posts of users, who uses 1.7.2

if anybody uses 1.7.2 with PM2 MOD, so please let us know and post your URL

i impossibly cant get it work

i  have tried for 2 hours


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on August 02, 2006, 10:46:01 PM
1) did you test it on fresh, not modifyed v1.7.2?
2) what doesnt work?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: tdkpaul on August 03, 2006, 01:53:25 AM
the email links in acp and editprofil

there are errors
i dont knwo how to explain

i testet local on fresh 4images

i just want to have a URL of somebody, who uses the pmv2 mod and 4images 1.7.2



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: yellows on August 06, 2006, 11:14:20 PM
im getting when trying to create new message

Quote  [Expand]
Fatal error: Call to undefined function: strip_brackets() in /home/sexymal/public_html/Galeries/pm.php on line 531


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on August 06, 2006, 11:20:06 PM
Failed in step 6.2


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: tdkpaul on August 06, 2006, 11:52:45 PM
im getting when trying to create new message

Quote  [Expand]
Fatal error: Call to undefined function: strip_brackets() in /home/sexymal/public_html/Galeries/pm.php on line 531

please can you say me what 4images version do you use?
Or are you a shy guy?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: yellows on August 07, 2006, 03:39:47 PM
cheers vano sorted that,

but now getting all sorts of if qoutes (see image below)

(http://www.sexymalecelebs.co.uk/show.JPG)

Cheers

James


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: tdkpaul on August 07, 2006, 09:34:26 PM
sexy male celebs


noice  :lol:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on August 07, 2006, 10:21:58 PM
http://www.4homepages.de/forum/index.php?topic=7493.0


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Jan-Lukas on September 03, 2006, 12:32:36 AM
Habe mir PMv2 installiert
Wenn ich jetzt eine Mitteilung schreiben möchte, steht dort schon ein Text aus der Shoutbox ;)
Woran könnte das liegen ?

gruss Harald


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Jan-Lukas on September 08, 2006, 01:36:29 AM
keiner eine Vermutung ?
Wie gesagt, wenn jemand eine Mitteilung versenden möchte steht im Textfeld schon ein Text aus der Shoutbox.
Wo holt sich das Feld diese Information her?

gruss Harald


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on September 08, 2006, 02:41:15 AM
lang/your_language/main.php
 :?:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Jan-Lukas on September 08, 2006, 04:27:30 PM
Hmm, glaube ich nicht, ist ja ein ganz anderer Code
in der Shoutbox wird mit "$lang['sh_"  gearbeitet, und PM arbeitet mit "$lang['pm_"
Und da der Code unverändert eingefügt wurde, müsste es auch bei anderen sein die beide Mods drauf haben.

gruss Harald


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: michi-w. on September 08, 2006, 05:44:55 PM
Was steht denn da für ein Text?
Immer der gleiche oder sind das die Einträge aus der Shoutbox?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Jan-Lukas on September 08, 2006, 07:02:16 PM
Texte aus der Shoutbox
und eigenartiger weise immer der letzte der in der Shoutbox angezeigt wird (steht auf 20)
Quote  [Expand]
Anzahl der Nachrichten, die im Template angezeigt werden sollen.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ThanhPhuoc on September 12, 2006, 04:43:46 AM
If you don't want to see second popup when you have a new message (First popup: Click OK to go to Inbox and Cancel to hide popup), simple to remove this code in includes/page_header.php
1
2
3
4
            second_box=confirm('".$lang['pms_popup_newwindow']."');
            if (second_box==true) {
               window.open('".$site_sess->url(ROOT_PATH."pms.php")."','pmnew','width=600,height=500,menubar=yes,scrollbars=yes,toolbar=yes,location=yes,directories=yes,resizable=yes,top=50,left=50');
            } else {


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Thochard on September 14, 2006, 02:32:24 AM
Hallo PartyPix,

Du verwendest die Version 1.7.2 und nun tritt ein Kompatibilitätsproblem zu diesem [MOD] PMv2 auf.

You use Version 1.7.2 and got a compatibility problem with this [MOD] PMv2.

Um das Problem zu lösen / To fix this problem:


1. Öffne die Datei / open file->  \includes\functions.php

2. Finde Code / find code:
1
$text = replace_url($text);

3. Ersetze mit / remove with:
1
2
3
4
if ($html !== 2) {
      $text = nl2br(trim($text));
      $text = replace_url($text);
}

Nun sollten die Links in den Eingabefeldern korrekt angezeigt werden / Now the input fields show the correct text.




habe das gleiche Problem jedoch version 1.7.3
habe bereits versucht wie oben beschrieben functions.php zu ändern.
Hat leider nicht funktioniert.

same problem but version 1.7.3
allready tried solving my problem by edit functions.php with upper fix.
unfortunately without success


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Benny on September 19, 2006, 12:08:14 PM
Texte aus der Shoutbox
und eigenartiger weise immer der letzte der in der Shoutbox angezeigt wird (steht auf 20)
Quote  [Expand]
Anzahl der Nachrichten, die im Template angezeigt werden sollen.

wirst es kaum glauben, aber ich hab genau das gleiche Problem.
die letzte Nachricht aus der Shoutbox steht immer am anfang im Textfeld, wenn man eine neue PM schreibt.


ahh, ich hab die Lösung hier gefunden  :D

Ok, i think this should fix that:

Open /includes/shout.php

Find:
1
  $shoutings .= $site_template->parse_template("shout_bit");

Add Before:
1
  $message = "";


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Fragezeichen on September 19, 2006, 11:54:28 PM
Vanos Page is down for long time,possible someone can give me a lost file please or send a link for that mod?
i need verry important the "pm_notify.php" file.
Please.

Die Seite von Vano ist schon lange vom Netz,vielleicht hat noch jemand einen Link wo man das Mod bekommt?
Ich habe leider vergessen das "pm_notify.php" hochzuladen,kann es mir netterweise überlassen?
besten dank


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on September 20, 2006, 12:48:44 AM
I've attached the file to the original tutorial post.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Fragezeichen on September 20, 2006, 04:35:33 PM
sorry,but cant find any link,also your tutorial is lost.
how to find your attachment?
thanks.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on September 20, 2006, 07:06:10 PM
@FOTZENCLUB
http://www.4homepages.de/forum/index.php?topic=6692.msg30080#msg30080


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Fragezeichen on September 20, 2006, 09:28:48 PM
 :wink:
thats it,thanks!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 01, 2006, 01:27:12 PM
Hi, what changes I have to do when I use MySQL 5

Error-message: Table 'db_user.pm_table' doesn't exist

Edit: Sorry I´ve forgotten to save includes/db_field_definitions.php!

Now it seems to work with the following System:

4images vers. 1.7.3
MySql vers. 5.0.24a
PHP vers. 5.1.6

Greetz by Flo


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 02, 2006, 07:31:05 PM
Shit, I have the same problem like some guys before  :?

That´s my badword list:
(http://www.snuup.de/4img_gfx/badword_list.jpg)

Somebody find out...?

THX Flo


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: NTH on October 05, 2006, 02:48:02 PM
Hi!
I would like download to this Post http://www.4homepages.de/forum/index.php?topic=6692.0 to the  "PM v2" package.
but the server doesn't work.
Plz upload other server this pack.
Thank you!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on October 05, 2006, 02:55:56 PM
hello,
see on site 1
go to the head topic marc gunter and find "For upgrade from PMS v1 read next reply below".
you find below the pms file

greets ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: V@no on October 05, 2006, 03:01:06 PM
The file is attached to the post...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ccsakuweb on October 13, 2006, 03:45:50 AM
Great Mod!!!  :lol: Thanks a lot!

Although I have the next problems:

I can't see the table with smiles in comment_form. why? is another tag that {bbcode}?
And I have the next problem:
Shit, I have the same problem like some guys before  :?

That´s my badword list:
(http://www.snuup.de/4img_gfx/badword_list.jpg)

Somebody find out...?

THX Flo

My version is 1.7.3


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 13, 2006, 06:57:46 AM
In functions.php

theres:

1
2
3
4
5
if ($html == 0) {
    $text = str_replace("&lt;", "&amp;lt;", $text);
    $text = str_replace("&gt;", "&amp;gt;", $text);
    $text = str_replace("<", "&lt;", $text);
    $text = str_replace(">", "&gt;", $text);

Maybe this is cause that I´ve got in my comments some smiles looks like this:

1
2
<img src=\"./templates/default/smiles/surprised.gif\"
alt=\"\" border=\"0\">

In my quellcode it looks like:

1
&lt;img src="./templates/default/smiles/surprised.gif" alt="" border="0"&gt;

PLZ Help


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on October 13, 2006, 10:09:35 AM
@ Flo2005,

wenn du "html" in deinen Privaten Nachrichten zulassen willst, so solltest du das unter ACP -> Allgemein -> Einstellungen -> Private Messaging auch so einstellen ...
denn ...
1
if ($html == 0)
bedeutet ja ... wenn "html" nicht zugelassen ist, dann werden die entsprechenden Tags umgewandelt !
Ich würde jedoch die Einstellung so belassen und smiles nur über BB-Code in die PM einfügen lassen. Aber das ist dann deine Entscheidung.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Flo2005 on October 13, 2006, 02:44:49 PM
Achso, dies ist für html im PM´s, mein Fehler ist aber, dass die Smilies nicht in den abgegebenen Kommentaren dargestellt werden, sondern ein Stück quelltext erscheint. Manchmal klappt es auch und ein Smily wird angezeigt. Ich verstehg aber nicht, wo sich dieser Fehler verstecken könnte.

Wäre nett wenn man mir weiterhelfen könnte. Vielleicht liegt es auch an dem Browser von dem jew. User?

So sieht das Kommentar aus:

Quote  [Expand]
<img src=\"./templates/default/smiles/very_sad.gif\" alt=\"\"
border=\"0\">


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: chull on October 17, 2006, 05:36:59 PM
Hello,

how can I send a pm to all users?

Thanks and Greetz

Chull


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on October 17, 2006, 06:12:20 PM
@ chull
... there is a [Plugin] Pm to Members ...
http://www.4homepages.de/forum/index.php?topic=6732.0


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on October 24, 2006, 11:03:01 PM
english:

this is a modify vers. for 1.7.2 / 1.7.3 / 1.7.4

with follow problem
-spam words not with name separate **** in acp
-view not correct <a href=

find / suche in includes/functions.php
1
2
3
4
5
6
7
8
9
10
11
12
    }
     $text = str_replace("[hr]", "<hr>", $text);
  }
  $text = replace_url($text);
  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }
  $text = str_replace("\n", "<br />", $text);
  $text = str_replace("\\'", "'", $text);
  $text = str_replace("\\\"", "&quot;", $text);
  return replace_badwords(stripslashes($text));
}

replace / ersetzen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
    }
    $text = str_replace("[hr]", "<hr>", $text);
}
  if ($html !== 2) {
      $text = nl2br(trim($text));
      $text = replace_url($text);
}
  if ($word_wrap && $text != "") {
      $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
      $text = replace_badwords($text); 
}
  $text = str_replace("\n", "<br />", $text);
  $text = str_replace("\\'", "'", $text);
  $text = str_replace("\\\"", "&quot;", $text);

  return $text;
}


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: NTH on October 28, 2006, 08:48:06 PM
Hi!
I installed this mod, but when I clikk the New message icon the PM system doesen't work.
The pm.php?action=new nothing loaded this link.
What's the problem?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on November 01, 2006, 03:34:20 PM
hallo liebe 4images freunde
ich denke diesen mod haben sehr sehr viele installiert. ich versuche schon seit einigen tagen
diesen mod in die 1.7.4 einzubinden.

ich habe zwei zeilen weiter oben eine kleine anleitung geschrieben wie dies behoben werden kann
-spam words not with name separate **** in acp
-view not correct <a href=

jetzt sehe ich in den kommentaren zuviele zeilenabstände die vorher nicht waren.
wer nimmt sich diesem problem mal ernsthaft an :?: ich komme und andere auch nicht
in diesem teil weiter.

es wäre toll, wenn diese kleinen sachen
-<a href=
-sowie die spam schlüsselwörter

korrekt angezeigt werden.
vielen dank

ich denke der fehlerhaft teil liegt hier

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
    $text = preg_replace($search_array, $replace_array, $text);
    if (!$bbcode_img)  {
        $text = preg_replace("/\[img\](.*?)\[\/img\]/si", "<a href=\"\\1\" target=\"_blank\">\\1</a>", $text);
         $text = preg_replace("/\[img=(.*?)\,(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
         $text = preg_replace("/\[img height=(.*?)\ width=(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
         $text = preg_replace("/\[img width=(.*?)\ height=(.*?)\](.*?)\[\/img\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
         $text = preg_replace("/\[flash=(.*?)\,(.*?)\](.*?)\[\/flash\]/si","<a href=\"\\3\" target=\"_blank\">\\3</a>",$text);
    }else{
        $text = preg_replace("/\[img\](.*?)\[\/img\]/si", "<img src=\"\\1\" border=\"0\">", $text);
         $text = preg_replace("/\[img=(.*?)\,(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\2\" width=\"\\1\">",$text);
         $text = preg_replace("/\[img height=(.*?)\ width=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" height=\"\\1\" width=\"\\2\">",$text);
         $text = preg_replace("/\[img width=(.*?)\ height=(.*?)\](.*?)\[\/img\]/si","<img src=\"\\3\" width=\"\\1\" height=\"\\2\">",$text);
         $text = preg_replace("/\[flash=(.*?)\,(.*?)\](.*?)\[\/flash\]/si","<object classid=\"clsid: D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\\1 height=\\2><param name=movie value=\\3><param name=play value=true><param name=loop value=true><param name=quality value=high><embed src=\\3 width=\\1 height=\\2 play=true loop=true quality=high></embed></object>",$text);
    }
     $text = str_replace("[hr]", "<hr>", $text);
  }
  $text = replace_url($text);
  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }
  $text = str_replace("\n", "<br />", $text);
  $text = str_replace("\\'", "'", $text);
  $text = str_replace("\\\"", "&quot;", $text);
  return replace_badwords(stripslashes($text));
}

siehe beispiel (die alte version löscht vermutlich alle nicht gebrauchten zeilenabstände)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on November 04, 2006, 01:11:57 AM
hello vano and peoples, i have a problem with this mod in 1.7.4
you can please modify the functions.php for follow error

view in acp <a href=
spam keywords views not korrekt now: ****  better: test

the error is in above script

thank you
ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Thochard on November 06, 2006, 10:15:15 PM
danke ivan

hab 1.7.3 und bei mir wird jetz das
<a href=...

nicht mehr angezeigt


vielen vielen dank


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on November 09, 2006, 12:18:59 PM
hallo zusammen, konnte hier noch niemand den zeilenabstand fehler finden??
gruss ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: dosensteck on November 16, 2006, 10:14:25 PM
wie kann ich den [thumb=xxxx] tag auch in der Bildbeschreibung nutzen? In den Bildkommentaren funktioniert er einwandfrei.

Habs mir zwar angesehen, richitg schlau bin ich aber nicht daraus geworden :/

1
$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], $config['html_comments'], $config['wordwrap_comments'], $config['bb_comments'], $config['bb_img_comments'], 1 , 1) REPLACE_EMPTY;

mag zb. überhaupt nicht :D


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Entropyx on November 25, 2006, 08:51:40 AM
great mod!

when you put something in the homepage box in edit profile, it shows as <a href and outside the box it says the url and class="input" />

i get this error
Quote  [Expand]
Notice: Undefined variable: pm_popup_header in /home/myke/public_html/includes/page_header.php on line 177

Notice: Undefined variable: pm_inbox in /home/myke/public_html/includes/page_header.php on line 179

Notice: Undefined variable: pm_outbox in /home/myke/public_html/includes/page_header.php on line 180

Notice: Undefined variable: pm_sentbox in /home/myke/public_html/includes/page_header.php on line 181

Notice: Undefined variable: pm_new_count in /home/myke/public_html/includes/page_header.php on line 182

but only when you're on the search page and logged out
and only says
Quote  [Expand]
Notice: Undefined variable: pm_popup_header in /home/myke/public_html/includes/page_header.php on line 177

when logged in and on search page


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Entropyx on November 26, 2006, 06:59:04 PM
anyone know how to fix this?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: dosensteck on November 26, 2006, 07:14:45 PM
wie kann ich den [thumb=xxxx] tag auch in der Bildbeschreibung nutzen? In den Bildkommentaren funktioniert er einwandfrei.

Habs mir zwar angesehen, richitg schlau bin ich aber nicht daraus geworden :/

wenn es jemanden interessiert:

ersetze in der functions.php
1
format_text($image_row['image_description'], 0)

durch
1
format_text($image_row['image_description'], 1,0,1)

eigentlich recht simpel, man muss sich nur die funktionen mal richtig durchsehen :D


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Entropyx on November 29, 2006, 12:20:26 AM
great support here


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: SagaatHome on November 29, 2006, 09:52:21 AM
Habe das selbe problem mit dem searchform....
Bei mir kommt aber nur die Nachricht im header:
Notice: Undefined variable: pm_popup_header in /is/htdocs/wpxxxxxxxx_DLXEJXBKUKLH/www/clean4i/includes/page_header.php on line 210 welcher in der functions/page_header.php so aussieht:

"pm_popup_header" => $pm_popup_header,

hoffe irgendwer weiß, was da los is...sonst muss ich den mod wieder raus nehmen


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais on January 07, 2007, 10:58:25 PM
Hello!!
I getting error when installing
I get this message

Quote  [Expand]
SHOW TABLES LIKE '4images\_pm'

MOD Private Messaging v2    (by V@no)
 
 
Sorry, can not continue, you missed some steps of the installation..
 


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais on January 08, 2007, 03:17:00 PM
Hello!!
I getting error when installing
I get this message


Quote  [Expand]
SHOW TABLES LIKE '4images\_pm'

MOD Private Messaging v2    (by V@no)
 
 
Sorry, can not continue, you missed some steps of the installation..


Please Help!!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on January 09, 2007, 12:41:31 AM
in /includes/page_header.php

1
2
3
4
5
6
7
8
9
10
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_head = "";
$pm = "";

maybe correct 
1
$pm_popup_header = "";   
   :?:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on January 09, 2007, 08:24:16 AM
if you have error in 1.7.4 Undefined variable: pm_xxxx

Quote  [Expand]
Notice: Undefined variable: pm_popup_header in /home/myke/public_html/includes/page_header.php on line 177

Notice: Undefined variable: pm_inbox in /home/myke/public_html/includes/page_header.php on line 179

Notice: Undefined variable: pm_outbox in /home/myke/public_html/includes/page_header.php on line 180

Notice: Undefined variable: pm_sentbox in /home/myke/public_html/includes/page_header.php on line 181

Notice: Undefined variable: pm_new_count in /home/myke/public_html/includes/page_header.php on line 182

Edit file includes/page_header.php
find:
1
2
3
4
5
6
7
8
9
10
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_head = "";
$pm = "";

and replace this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_header = "";
$pm = "";
$pm_inbox = "";
$pm_outbox = "";
$pm_sentbox = "";
$pm_new_count = "";


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais on January 09, 2007, 11:30:24 PM
if you have error in 1.7.4 Undefined variable: pm_xxxx

Quote  [Expand]
Notice: Undefined variable: pm_popup_header in /home/myke/public_html/includes/page_header.php on line 177

Notice: Undefined variable: pm_inbox in /home/myke/public_html/includes/page_header.php on line 179

Notice: Undefined variable: pm_outbox in /home/myke/public_html/includes/page_header.php on line 180

Notice: Undefined variable: pm_sentbox in /home/myke/public_html/includes/page_header.php on line 181

Notice: Undefined variable: pm_new_count in /home/myke/public_html/includes/page_header.php on line 182

Edit file includes/page_header.php
find:
1
2
3
4
5
6
7
8
9
10
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_head = "";
$pm = "";

and replace this
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_header = "";
$pm = "";
$pm_inbox = "";
$pm_outbox = "";
$pm_sentbox = "";
$pm_new_count = "";

This did not help.
Please help me guys!!

See the error in attachment file


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on January 10, 2007, 10:34:22 PM
so... your version php and mysql?

i use this installer on php5 and mysql 4.1.x
all works fine...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais on January 11, 2007, 12:28:27 AM
so... your version php and mysql?

i use this installer on php5 and mysql 4.1.x
all works fine...

Thanks for reply!!
I use
PHP Version 4.4.2
MySQL Databases v5

what you think where the problem could be?

Please Help me

thanks


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on January 11, 2007, 12:35:52 AM
Your problem in installer. Need good programmer for rewrite code installer compatible with mysql 5.x
Maybe....

But likely use mysql 4.x and no problem..
sorry i cant help you


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on January 11, 2007, 01:10:22 AM
or use PhpMyAdmin and create this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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"

add in USERS_TABLE
user_pm_inbox int(11) NOT NULL default '0'
user_pm_sentbox int(11) NOT NULL default '0'
user_pm_email tinyint(1) NOT NULL default '1'
user_pm_popup tinyint(1) NOT NULL default '0'

insert in SETTINGS_TABLE
setting_name      setting_value
pm                           1
pm_inbox                 30
pm_sentbox             10
pm_html                   0
pm_bbcode               1
pm_img                     1

all simple...  use phpmyadmin


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais on January 14, 2007, 08:53:41 PM
Thanks alot Aleksey!!!
It helped, Pm has still some error, but I install this mod for BBCODE 2.
BBCODE works fine, and I have swtiched OFF Pm at ACP.

BUT  now page crashes alot.

So may be anyone could say what is the problem, that i get the error ( See attachent file=

Please Help someone


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Foto-Portal on January 15, 2007, 11:28:19 AM
Hello,

i need the file pm_install.php

!!!

--------------------------------------

Hallo,

ich brauche die Datei pm_install.php



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Foto-Portal on January 15, 2007, 11:34:47 AM
or use PhpMyAdmin and create this:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
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"

add in USERS_TABLE
user_pm_inbox int(11) NOT NULL default '0'
user_pm_sentbox int(11) NOT NULL default '0'
user_pm_email tinyint(1) NOT NULL default '1'
user_pm_popup tinyint(1) NOT NULL default '0'

insert in SETTINGS_TABLE
setting_name      setting_value
pm                           1
pm_inbox                 30
pm_sentbox             10
pm_html                   0
pm_bbcode               1
pm_img                     1

all simple...  use phpmyadmin

i have',t the installer file, so i tryed with myspl and wanted to create the tables
so i become the error:

Es scheint einen Fehler in Ihrer MySQL-Abfrage zu geben. Die MySQL-Fehlerausgabe, falls vorhanden, kann Ihnen auch bei der Fehleranalyse helfen.

ERROR: Nicht geschlossene Anführungszeichen @ 551
STR: "
SQL: 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"

add in USERS_TABLE
user_pm_inbox int(11) NOT NULL default '0'
user_pm_sentbox int(11) NOT NULL default '0'
user_pm_email tinyint(1) NOT NULL default '1'
user_pm_popup tinyint(1) NOT NULL default '0'

insert in SETTINGS_TABLE
setting_name      setting_value
pm                           1
pm_inbox                 30
pm_sentbox             10
pm_html                   0
pm_bbcode               1
pm_img                     1

.
.
.
.
.
 
 MySQL meldet: Dokumentation
#1064 - You have an error in your SQL syntax.  Check the manual that corresponds to your MySQL server version for the right syntax to use near '- PM_TABLE
pm_id mediumint(10) unsigned NOT NULL auto_incremen


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on January 15, 2007, 12:21:36 PM
hier ist die original pm_install

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?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>


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Foto-Portal on January 15, 2007, 12:32:51 PM
hier ist die original pm_install

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
<?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..


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi 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 ... ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Foto-Portal 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! :((((((((((((((


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi 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 ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais 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


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on January 16, 2007, 11:53:48 AM
ok...  use phpMyadmin and this sql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- 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 ;
       


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Foto-Portal on January 16, 2007, 12:28:46 PM
ok...  use phpMyadmin and this sql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- 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!




Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais on January 16, 2007, 06:36:55 PM
ok...  use phpMyadmin and this sql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- 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.
 :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey 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!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mirwais 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  [Expand]
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'

 :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Maeva55 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.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Aleksey on January 18, 2007, 12:08:19 PM
Congraculations!  :)
I modify this installer for 1.7.4 version...  Use it..
Need fresh 4images database!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Maeva55 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


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Foto-Portal 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.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: jotabonfim on January 25, 2007, 03:13:28 AM
???????????????????????????????????????????????????????????????????

Hi,

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


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on January 25, 2007, 09:42:53 AM
... try this ...
... http://www.4homepages.de/forum/index.php?topic=6692.msg86674#msg86674 ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: jotabonfim on January 25, 2007, 02:38:21 PM
Where 's
Step 1, 2 and 3?


Help me please


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on January 25, 2007, 02:39:40 PM

1) The structure is 90% different then in v1
2) Everything renamed to "pm" instead of "pms" (had to do that, because I was using "pm" from the beginning and every time I do some changes on my site, I'd have to do it twice to post it here...)
3) Admin can:
-turn on/off PM feature
-set limit of messages stored in inbox and sentbox, globaly or per user.
-alow/disalow use HTML, BBCode or [img] tags in messages.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: jotabonfim on January 25, 2007, 02:44:52 PM
Excuse I did not understand?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: jotabonfim on January 25, 2007, 04:27:39 PM
Please could you help me.....

DB Error: Bad SQL Query: SELECT COUNT(pm_id) AS total FROM 4images_pm WHERE pm_to = 1 AND (pm_type = 2 OR pm_type = 1 OR pm_type = 3 OR pm_type = PM_USDLT)
Unknown column 'PM_USDLT' in 'where clause'

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

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

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

DB Error: Bad SQL Query: SELECT COUNT(pm_id) AS new FROM 4images_pm WHERE pm_to = 1 AND (pm_type = 3 OR pm_type = PM_USDLT)
Unknown column 'PM_USDLT' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(p.pm_id) AS messages FROM 4images_pm p WHERE p.pm_to = 1 AND (p.pm_type = 1 OR p.pm_type = 2 OR p.pm_type = PM_USDLT OR p.pm_type = 3)
Unknown column 'PM_USDLT' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(p.pm_id) AS messages FROM 4images_pm p LEFT JOIN 4images_users u ON (u.user_id = p.pm_from) WHERE p.pm_to = 1 AND (p.pm_type = 1 OR p.pm_type = 2 OR p.pm_type = PM_USDLT OR p.pm_type = 3) AND u.user_level <> 9
Unknown column 'PM_USDLT' in 'where clause'


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: topdolla on February 18, 2007, 01:00:28 AM
Hi, I got an error during pm_install.php and the error was "Sorry, can not continue, you missed some steps of the installation.." 

Im sure this is a wonderful mod and I have been trying to get it working for the past two weeks. I have installed a fresh 4images on my server numerious times, and repeated the same step, still I get the same error. 

In Step 6, Mark says to comment out that functoin but I can't seem to find return replace_badwords($text); . I am using the default 4images and and the closest thing to that is $text = replace_badwords($text);    . Im sure theres a major difference between the both and I think this is where my installation went wrong. A little help please :D         


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: yoda on February 20, 2007, 01:21:08 PM
ok...  use phpMyadmin and this sql

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
-- 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 ;
       


Hi - I'm using 4images 1.7.4 and trying to implement this great MOD.

The script pm_install.php isn't working and so I used your script above.

I have now the table 4images_pm in my database

But now I have the following error

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)
Table 'yoda_db.PM_TABLE' doesn't exist

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)
Table 'yoda_db.PM_TABLE' doesn't exist

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)
Table 'yoda_db.PM_TABLE' doesn't exist

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
Table 'yoda_db.PM_TABLE' doesn't exist

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
Table 'yoda_db.PM_TABLE' doesn't exist



I'm a little bit helpness now - it seems that there's an issue in the code for page_header.php

please help - many many thanks!







Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Acidgod on February 20, 2007, 07:04:22 PM
are you sure that you use the right prefix?
CREATE TABLE `4images_pm` (


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: yoda on February 21, 2007, 09:44:40 AM
are you sure that you use the right prefix?
CREATE TABLE `4images_pm` (

Yes - I checked it again.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: yoda on February 21, 2007, 01:27:23 PM
I started another try today and made a fresh 4images 1.7.4 installation.

After this I started with the PM (2.5.4) implementation.

Step9 - the pm_install.php isn't running and so I use your sql again
for creating the table. There is now a table "4images_pm" in the database.

The user and the setting table I changed/added with PHPmyadmin.

When making the check in step 9 with 4images/pm.php , I got the same error again that the
table xxxxxx.PM_TABLE is missing, see my post 395

I think there's an error in the page_header/function code or creating the pm_table, hope that anybody can help.

thanks in advance!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: myr2904 on February 23, 2007, 06:06:02 PM
Not working with version 1.7.4



When making the check in step 9 with 4images/pm.php


>>>>

Registered users
Logged in as: admin

» Lightbox
» Control Panel
» Log Out
         
Error

You are not logged in or do not have permissions to enter this site!


Why?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Joss on February 25, 2007, 04:41:39 PM
I've both problems in 1.7.4:

1. "Sorry, can not continue, you missed some steps of the installation..", after running pm_install.php
2. "You are not logged in or do not have permissions to enter this site!", after manual db update on 4images/pm.php page.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: yoda on March 06, 2007, 11:08:25 AM
still waiting for a sign here :) 

This gret mod isn't working with the 1.7.4 version - a lot of people need help for this.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fotoblitz on March 23, 2007, 12:55:14 PM
Wäre cool wenn jemand weiterhelfen könnte wie man diesen mod für die Version 1.7.4 benützen kann!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Heinrich-Uwe on April 01, 2007, 02:07:29 PM
Also Fehler Fehler Fehler
Nach 16 Stunden habe ich es nun aufgegeben.
das Forum durch gefrostet aber kein Ergebnis bekommen....

Kann nicht einer mal möglichst in DEUTSCH mal einen Leihen erklären wie man das Mod zum laufen bekommt ohne das man das ganze Skript zerstört ??
also mal am Beispiel an der Version 1.7.4  und das dann mal als Anleitung hier hinterlegt wird....

Nicht nur ich wer da Dank paar...

Danke Uwe
   


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: hoho on April 08, 2007, 04:36:05 PM
I have istalled the Private Massage MOD and it works fine.

And now i have aded this in the user_logininfo.html

------------------------------------------------------------------------------------------------------------------------------------------------------------------
Private Nachrichten :{msg_new_count}
------------------------------------------------------------------------------------------------------------------------------------------------------------------

But the code {msg_new_count} dont show the numbers of new masseges !!!!!!!

Haw can i make this?

Thanks
Thanks!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Shozen on April 17, 2007, 08:32:09 PM
Ist bestimmt ein schöner MOD... leider habe ich es nicht geschaft ihn für die Version 1.7.4 einzurichten.

Bin die ganzen 25 Seiten bestimmt 50mal durchgegangen... habe sogar zusätzlich einmal 4images komplett neu Aufgesetzt... leider ohne Erfolg...

Das erste Problem besteht darin folgendes zu finden:

1
2
return replace_badwords($text);
}

Wenn ich die pm_install.php ausführe bekomme ich immer folgendes:
Quote  [Expand]
SHOW TABLES LIKE

Sorry, can not continue, you missed some steps of the installation...

Ok... "SHOW TABLES LIKE"... fehler bekomme ich weg... aber leider bleibt das... Sorry, can not continue, you missed some steps of the installation...

Weiß jemand was ich falsch mache... andernfalls werde ich wohl auf den MOD verzichten müssen.

Gruß,
Robert


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Shozen on May 15, 2007, 10:32:57 PM
Schade... wirklich keiner der helfen kann....  :cry:

Mach ich nur was falsch... oder ist der Mod definitiv so nicht kompatibel für 4images 1.7.4... ???


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: anja1981 on May 22, 2007, 10:18:59 PM
ich brauche auch ganz dringend hilfe....finde auch keine lösung für die fehlermeldungen


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Frank Götze on June 07, 2007, 05:26:44 PM
Schade... wirklich keiner der helfen kann....  :cry:

Mach ich nur was falsch... oder ist der Mod definitiv so nicht kompatibel für 4images 1.7.4... ???

...damit teilen wir das selbe Leid. Bekomme den MOD auch nicht zum Laufen und erhalte auch deine Fehlermeldung. :cry:

VG Frank.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on June 08, 2007, 10:53:49 AM
hallo zusammen, ich habe den mod in 1.7.4 eingebaut
es läuft nicht so wie es sein sollte aber es läuft  :roll:

sie hier
http://www.4homepages.de/forum/index.php?topic=6692.msg82165#msg82165

wieso probiert ihr nicht die tabellen manuell anzulegen?

dann sollte es sicher gehen

@frank, sorry für die späte antwort!
gruss ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on July 09, 2007, 04:22:04 PM
Quote  [Expand]
Sorry, can not continue, you missed some steps of the installation..

on 4images 1.7.4


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on July 31, 2007, 08:01:00 PM
Wow ... this seem long discuss. Resolve now ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on July 31, 2007, 09:56:59 PM
no, this is not resolve...
http://www.4homepages.de/forum/index.php?topic=6692.msg80002#msg80002

and this here
http://www.4homepages.de/forum/index.php?topic=6692.msg89351#msg89351


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on July 31, 2007, 10:15:26 PM
This mean new version to build ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on July 31, 2007, 10:37:49 PM
yes, this version of pm is write for 1.7-1.7.2

follow problems
1)
-if I delete a member, its are not deleted to realign  (inbox,outbox folder etc.)
-if I registers a same member, then come realign (preceding)

2)
problem with input field stand this: admin@yourdomain.com" class="input">
> failure in acp
http://www.4homepages.de/forum/index.php?topic=6692.msg73146#msg73146

3)
problem with bad word list
http://www.4homepages.de/forum/index.php?topic=6692.msg80002#msg80002

4)
i send a new message with follow words "test"
after send is the word so \\"test\\"

    
probably the error lies in function.php in step 6.2


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on July 31, 2007, 11:37:51 PM
Quote  [Expand]
-if I delete a member, its are not deleted to realign  (inbox,outbox folder etc.)
-if I registers a same member, then come realign (preceding)

No user has spec SQL table (all in one as now - not good thing).

Quote  [Expand]
problem with input field stand this: admin@yourdomain.com" class="input">
> failure in acp

Settings not save correctly when execute a spec function.

Quote  [Expand]
problem with bad word list

Rational chars no detect correct.

Quote  [Expand]
i send a new message with follow words "test"
after send is the word so \\"test\\"

Stripslashes miss (easy one). ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on August 01, 2007, 09:27:56 AM
okay, can you help my or us ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 01, 2007, 01:40:12 PM
Would be great project to do in request for paid. :)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on August 02, 2007, 10:03:19 PM
hi thunderstrike,
how much you would like overall for the errors recovery

-I supply with to you a complete zip file of my data include pm2 mod

greets ivan


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 02, 2007, 10:06:38 PM
I re-write full. No by other for codings (acxept functions if can still use). Load coding so take time.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: ivan on August 02, 2007, 10:11:06 PM
unfortunately I already installed these mod. this would not mean a complete new installation… and that would like I


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 02, 2007, 10:16:29 PM
Installed MOD build 4images < v1.7.4 (< = old). Make prob if no make for it (v1.7.4+).


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 04, 2007, 10:24:51 PM
Quote  [Expand]
Sorry, can not continue, you missed some steps of the installation..

on 4images 1.7.4

can anyone give me the PM tables SQL file or how can i add tables manualy????????????!!!!!!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 04, 2007, 10:42:22 PM
Not sure of prob ... SQL query in pm_install.php file ...

Quote  [Expand]
"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')"

Note: 8) = 8 ) (no space)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on August 04, 2007, 10:54:08 PM
i'm installing this version on fresh 4images gallery and i can't install ...

Sorry, can not continue, you missed some steps of the installation..

 8O


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 04, 2007, 10:58:45 PM
May be time to rewrite. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 04, 2007, 11:13:06 PM
Not sure of prob ... SQL query in pm_install.php file ...

Quote  [Expand]
"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')"

Note: 8) = 8 ) (no space)

can you save it from PHPMYADMIN as SQL file please, theres some errors here  :oops:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 04, 2007, 11:23:33 PM
Quote  [Expand]
".PM_TABLE."

On paragraf, change this to real table PMS name. Next, execute same paragraf in phpmyadmin (PHP execute). ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 04, 2007, 11:30:04 PM
Quote  [Expand]
".PM_TABLE."

On paragraf, change this to real table PMS name. Next, execute same paragraf in phpmyadmin (PHP execute). ;)


Really i didnt uderstand u, did you mean i have to change to PMS but is a old verion!!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 04, 2007, 11:32:39 PM
Quote  [Expand]
Really i didnt uderstand u, did you mean i have to change to PMS but is a old verion!!!

Sorry for bad english ... I mean replace PMS_TABLE with REAL table prefix with table name in paragraf ... next - use PHPMyAdmin + select PHP query and use paragraf. :)

Examp for prefix:

Quote  [Expand]
4images_pms

(4images_) - one that you use (examp). If not use, change to real one you use.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 04, 2007, 11:42:07 PM
SQL-query : 

"CREATE TABLE `".4IMAGES_PM."` ( `pm_id` mediumint(10) unsigned NOT NULL auto_increment, `pm_type` tinyint(2) NOT NULL default '0', `pm_to` mediumint( NOT NULL default '0', `pm_from` mediumint( 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')"

MySQL said:


You have an error in your SQL syntax near '"CREATE TABLE `".4IMAGES_PM."` ( `pm_id` mediumint(10) unsigned NOT NULL auto_in' at line 1



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 04, 2007, 11:44:27 PM
Like this:

Quote  [Expand]
'4images_pm`

no ".4IMAGES_PM." ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on August 05, 2007, 12:22:36 AM
the install problem its solved ;)

upload and execute this install (attached here)  :mrgreen:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on August 05, 2007, 12:39:33 AM
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'

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)
Unknown column 'PM_UNREAD' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(p.pm_id) AS messages FROM PM_TABLE p WHERE p.pm_to = 1 AND (p.pm_type = PM_SDLT OR p.pm_type = PM_SENT OR p.pm_type = PM_USDLT OR p.pm_type = PM_UNREAD)
Unknown column 'PM_SDLT' in 'where clause'

DB Error: Bad SQL Query: SELECT COUNT(p.pm_id) AS messages FROM PM_TABLE p LEFT JOIN 4images_users u ON (u.user_id = p.pm_from) WHERE p.pm_to = 1 AND (p.pm_type = PM_SDLT OR p.pm_type = PM_SENT OR p.pm_type = PM_USDLT OR p.pm_type = PM_UNREAD) AND u.user_level <> 9
Unknown column 'PM_SDLT' in 'where clause'

Warning: Cannot modify header information - headers already sent by (output started at /home/ragnarok/public_html/includes/db_mysql.php:190) in /home/*****/public_html/pm.php on line 958

 :?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 05, 2007, 05:51:19 AM
Look that need rewrite ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 05, 2007, 07:51:13 AM
the install problem its solved ;)

upload and execute this install (attached here)  :mrgreen:


Parse error: parse error, expecting `')'' in c:\apache\htdocs\gallery\install.php on line 10




Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 05, 2007, 02:15:50 PM
Topic too large. Think of new system: http://www.4homepages.de/forum/index.php?topic=18268.msg97389#new - lets change. :)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on August 05, 2007, 04:43:25 PM
yea damn ... still something wrong :(

somebody had the install of the old pms ??? :|


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 05, 2007, 09:45:10 PM
any idea for sql?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on August 05, 2007, 10:12:35 PM
installer isn't working, give alot of errors this last version, who had old pm(s) versions can attach here? site V@no gallery is down ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 06, 2007, 12:22:12 PM
i think the installer in PM V2 in just for those who have installed the old PMS verion! its mean that we have to the old installer then upgrade it with new PM V2 installer isn't it?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 06, 2007, 02:39:23 PM
Correct. 1st time, PM V2 publish for upgrade. No core install but SQL error nothing do with upgrade.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on August 06, 2007, 04:46:27 PM
so who have the old pms installer ?? can attach here please  :|


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 06, 2007, 05:49:33 PM
@Stoleti:

Reason error:

Quote  [Expand]
"CREATE TABLE `".4images_pm."`

No do. It:

Quote  [Expand]
"CREATE TABLE " . PMS_TABLE . "

Must add in constant.php file:

Quote  [Expand]
define('PMS_TABLE', $table_prefix . "pms");

This all.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Stoleti on August 06, 2007, 07:04:22 PM
yes i got that, but i still looking for the old pms installer  :roll: please !!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 06, 2007, 09:46:51 PM
k sajalelenyu ya do six por PMS ne nashel kto-to smojit nam naidet pojalyusta!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 09, 2007, 07:14:59 PM
Hi all,

Struggling a little with the install.

I get this error

Quote  [Expand]
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)
Table 'wa4398_db1.PM_TABLE' doesn't exist

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)
Table 'wa4398_db1.PM_TABLE' doesn't exist

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)
Table 'wa4398_db1.PM_TABLE' doesn't exist

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
Table 'wa4398_db1.PM_TABLE' doesn't exist

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
Table 'wa4398_db1.PM_TABLE' doesn't exist

My database looks like this:

(http://www.lifeofamodel.com/Image1.jpg)

I have read through all the pages on this post and it seems other people had similar issues.  Do you know the solution??



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 09, 2007, 08:07:57 PM
No do constants.php file. Add PM_TABLE in file.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 09, 2007, 09:43:13 PM
same problem above with me ! :S

agree might be in the lang main !!

ganna check it :P


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 09, 2007, 09:48:10 PM
how ?? i mean what do u mean by adding pm_table in the constains !!?


i saw a code u have added in privous post !! do u mean to add that code ! there !! check my error plz !

1
2
3
Warning: Invalid argument supplied for foreach() in /home/alwasmy/public_html/pic/pm.php on line 414

Template Error: Couldn't open Template ./templates/infoqatar/BBCODE.html

and this is the foreach code :

1
2
3
foreach ($lang['bbc_help'] as $key => $val) {
      $bbc_help .= $key."_help = \"".$val."\";\n";
    }


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 09, 2007, 09:56:39 PM
Quote  [Expand]
same problem above with me ! :S

Add constant name is constants.php file.

Quote  [Expand]
Template Error: Couldn't open Template ./templates/infoqatar/BBCODE.html

Upload BBCODE.html (case sensitive) in templates/infoqatar folder.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 09, 2007, 10:04:54 PM
thaaaaaaaaaaaaaaaaaaaanks ^_^

just solved the first one ! :)

still im getting this !

1
Warning: Invalid argument supplied for foreach() in /home/xxxxx/public_html/pic/pm.php on line 414

any idea !!

well, with localhost working fine !

just tried to check if missed somethin' but seems everything ok !

and thanks again 4 helping me all the time


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 09, 2007, 10:06:10 PM
Post from 410 to 420 from pm.php file.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 09, 2007, 10:08:53 PM
Sorry my bad :(

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$txt_clickstream = ($edit) ? $lang['pm_edit'] : $lang['pm_compose'];
  $title .= ($edit) ? $lang['pm_edit'] : $lang['pm_compose'];
  $bbcode_form = "";
  if ($config['pm_bbcode']) {
    $bbc_help = "";
    foreach ($lang['bbc_help'] as $key => $val) {
      $bbc_help .= $key."_help = \"".$val."\";\n";
    }
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
      "lang_tag_prompt" => $lang['tag_prompt'],
      "lang_link_text_prompt" => $lang['link_text_prompt'],
      "lang_link_url_prompt" => $lang['link_url_prompt'],
      "lang_link_email_prompt" => $lang['link_email_prompt'],
      "lang_list_type_prompt" => $lang['list_type_prompt'],
      "lang_list_item_prompt" => $lang['list_item_prompt'],
      "lang_close_tags" => $lang['close_tags'],
      "lang_all" => $lang['all'],
      "smiles_text" => get_smiles_text(),
      "bbc_help" => $bbc_help
    ));
    $bbcode_form = $site_template->parse_template(BBCODE);
  }

from 409 to 431



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 09, 2007, 10:10:34 PM
Quote  [Expand]
$lang['bbc_help']

This no go ... from lang/your_language/main.php - what say (full line) ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 09, 2007, 10:15:50 PM
well, im little bet shocked :P !!

i didnt find that lang in my lang- main

i found this under pm codes in my lang main:
1
$lang['pm_bbcode'] = "Aktiviere BB-Code in dieser Nachricht.";

:P i didnt transelate it yet :P

so do i have to add $lang['bbc_help'] <== wondering if yes what should i write



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 09, 2007, 10:18:15 PM
Quote  [Expand]
"Aktiviere BB-Code in dieser Nachricht.";

If see, this lang - no array (or object). Is use of $lang for array but no string array. Reason why no go.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 09, 2007, 10:21:43 PM
well, thanks for trying to make it more easy ^_^

i tried to get ur point ! but seems im little bet lost and *confused*

also, the site work perfect untill now ! only this msg appears on the top of my page :(

so what shall i do  !!

i tried alot to solve the sql problem and finally i did ! but now im getting this :S

sorry for my bad programming in php im really big newbie here !


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 09, 2007, 10:22:51 PM
Ask MOD author. No point of foreach for $lang.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 09, 2007, 10:29:26 PM
thanks alot ^_^

i will try to ask him :)

also b4 i do that ! let me insure that i did all steps correct  :)

thanks 4 helping me thunder ^^


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 10, 2007, 01:11:03 AM
can anyone post the lang --> main.php ( for the english version )

its not in the attached file

also i found one in the posts and it was in german

almost did half of it but found that most of them cannot be transelated ! :S ( GOD )


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 10, 2007, 03:31:57 PM
Hi Thunderstrike,

I am still getting the same error.  I have only followed the instructions up to Step 9 so far.

I  have

1
define('PM_TABLE', $table_prefix.'pm');

in my constants.php .

Vielleicht könntest Du auf Deutsch erklären was Du meinst, und ich übersetzte es gerne für alle anderen.

Thanks a lot for your help!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 10, 2007, 03:52:33 PM
Table not create in DB (or empty). No error come if 2 of them there ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 10, 2007, 04:08:40 PM
Thanks for your quick reply!

Okay.  So I need .PM_SENT and .PM_UNREAD (any more?) that are called in pm.php!?  8O

This is not created by the pm_install.php or install.php .  Is there a step I missed somewhere?  I would be really grateful if you could point it out so that I can add the right table columns.
...

I have now added:
 pm_sent      int(11)                 No      0             
    pm_unread     int(11)              No     0          
    PM_SDLT     int(11)              No     0          
    PM_USDLT     int(11)              No     0          
    PM_RDLT     int(11)              No     0          

That appears to solve the problem


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 10, 2007, 05:38:21 PM
Hi all,

Still not having much luck here.  Now that I have no more error messages, I ran /pm.php and I get a blank page:

(http://www.lifeofamodel.com/image2.jpg)

Does anyone know what that means?  Any problem solving suggestions?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 10, 2007, 06:43:48 PM
If you'd like to use the PMv2 BBCode, you'd have to implement the PMv2...  :wink:

also ich habe 1.72 installiert. und den mod! nur bbcode2 funtzt in der comment_form.html nicht :(

warum?

I now have the same problem.  If the bbcode.html is in small letters, the comment form works but PMv2 does not.  If I rename it as BBCODE.html, PMv2 works but not comment form. 

Do you know where this can be changed?   :roll:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 10, 2007, 10:42:26 PM
well, i spent my weekend just tryin to fix the pm v2 code :p !!

yup, you have to add the 4 or 5 fields in the pm_table

and if you add the prefix you might get 4images_pm error !! 

blank page !! ( well, did u add the main.php ??? ) i got the same error coz of that

btw, is seach working well with ya  !! hope so !! coz i got error if member run any kind of seach in my site !



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 11, 2007, 12:29:18 AM
Question ... which PHP version 2 of you use ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 11, 2007, 04:23:19 AM
@MrLovaLova,  it's nice to hear I am not the only one...  8O

I seem to have solved all of my problems, but for the BBCODE.html issue.

I use PHP4.

@Thunderstrike, is it possible to turn of the case sensitiveness?

Thanks for you help!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 11, 2007, 06:40:10 AM
Quote  [Expand]
I use PHP4.

Precise ? ACP - > phpinfo().

Quote  [Expand]
@Thunderstrike, is it possible to turn of the case sensitiveness?

Where ? Which file ? Which action of file ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 11, 2007, 12:20:52 PM
Quote  [Expand]
I use PHP4.

Precise ? ACP - > phpinfo().

Quote  [Expand]
@Thunderstrike, is it possible to turn of the case sensitiveness?

Where ? Which file ? Which action of file ?


Thanks for your prompt reply.

I use: Apache/1.3.33 (Debian GNU/Linux) PHP/5.2.0

My problem is:

Quote  [Expand]
Warning: Invalid argument supplied for foreach() in /home/www/4images/pm.php on line 414

Template Error: Couldn't open Template ./templates/default/BBCODE.html

If the bbcode.html is in small letters, the comment form works but PMv2 does not.  If I rename it to CAPTIAL LETTERS as BBCODE.html, PMv2 works but not the comment form.

How can I turn this off? Do you know?




Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 11, 2007, 01:44:09 PM
Quote  [Expand]
If the bbcode.html is in small letters, the comment form works but PMv2 does not.

In 2 the files (PM + 2nd file),

find:

Quote  [Expand]
$site_template->parse_template("bbcode");

2 - replace low case. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fast on August 11, 2007, 10:25:39 PM
problem:

what does step 6.2 mean: If u installed "Smiles" mod, comment it out too (do same thing as above, use /* at beginning of comment block and */ at the end.

what do i have to do here?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nfprehn on August 12, 2007, 09:24:40 AM
Thank you Thunderstrike! 

It all works very well.  What a great MOD.  :lol:

Just one last question (promise):

(http://www.lifeofamodel.com/image5.jpg)

I had the same issue with the smilies being on buttons when I installed the comment MOD ages ago.  I cannot find how to fix it now.  Please let me know if you know how to fix this!  :D


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fast on August 12, 2007, 05:26:33 PM
problem:

what does step 6.2 mean: If u installed "Smiles" mod, comment it out too (do same thing as above, use /* at beginning of comment block and */ at the end.

what do i have to do here?

hey guys...

please help. when i start /pm_install.php it says that i did not finish all necessary steps. i did everything except 6.2. what do i have to do at 6.2? what means "comment it out too"?

cheerz


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 12, 2007, 09:10:29 PM
Quote  [Expand]
hey guys...

please help. when i start /pm_install.php it says that i did not finish all necessary steps. i did everything except 6.2. what do i have to do at 6.2? what means "comment it out too"?

cheerz
try this but if you find a clean code for 1.7.4 please give us (^_^)

Dont forget BackUP ;-)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fast on August 13, 2007, 12:00:31 AM
i am using 1.71

the problem is that i dont know what to do at step 6.2.

what does step 6.2 mean: "If u installed "Smiles" mod, comment it out too (do same thing as above, use /* at beginning of comment block and */ at the end."


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 13, 2007, 09:44:25 AM
i am using 1.71

the problem is that i dont know what to do at step 6.2.

what does step 6.2 mean: "If u installed "Smiles" mod, comment it out too (do same thing as above, use /* at beginning of comment block and */ at the end."

see this i think it will help you :

Smileys/Smilies/Smiles after PMv2 installation in guestbook & image discription  (http://www.4homepages.de/forum/index.php?topic=10168.0)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: cam101 on August 14, 2007, 08:16:02 PM
Ok, here is the crack! I have spent the last 2 days installing this mod, hard work is all i can say considering how easy some of the other mods are to install. I have had problem after problem but after fishing through the 32 pages of this topic i have solved all but one.

Here it is.

I am getting a error
1
Warning: invalid argument supplied foreach() in/.../.../.../.../pm.php line 414

I have seen this error on pages in this topic and V@NO suggested redo step 3, only problem is this mod only starts at step 4.

I also noticed that there is no mention of main.php. when i first installed this mod i had no visible text anywhere, i found a German post for the main.php file quite a way into this topic so i tried to apply that and it worked, spent over an hour translating it into English too.

Any help you can offer me to solve the 414 problem which is quite anoying would be apreciated.

Thanks!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 19, 2007, 11:22:52 PM
- Vote expire in chit / chat. Have answer for recoding PM MOD.  -


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 20, 2007, 09:13:12 AM
- Vote expire in chit / chat. Have answer for recoding PM MOD.  -

Can you post a new topic to show us PM V3 Features, maybe there will be many idea's from members here :wink:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 20, 2007, 01:53:31 PM
Quote  [Expand]
maybe there will be many idea's from members here

Feature from members ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: The Sailor on August 20, 2007, 02:19:06 PM
Quote  [Expand]
maybe there will be many idea's from members here

Feature from members ...

i mean they will say's there idea's  :)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on August 20, 2007, 02:51:35 PM
Exact.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: cam101 on August 21, 2007, 05:00:02 AM
is there any possibility that someone could post steps 1 -3 please as i am missing valuable parts of this mod and as its throwing up error codes i suppose the whole mod is useless without them!!!



Please! Please! Please! Please!

Thanks!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 22, 2007, 04:23:54 PM
1-
2-
3- ALREADY THERE ^_*

it was only description on the mod and how some commands work ! :S

the code start from 4 and so on


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: cam101 on August 22, 2007, 06:12:11 PM
well if that is the case then where is the main.php inclusion mentioned? without it there is no text so something is missing plus if v@no says redo step 3 to someone else in this topic then step 3 must be missing!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Mr_LovaLove on August 25, 2007, 03:16:09 PM
yes, i do agree that main.php is not in th attached file !

but i already read the 33 pages many times ! and somewhere i found the main.php in german 
i used an online transelator to make it in english !

but the end was << it works with errors !

for that i deleted !

wating with wishes nd hopes to see v3 ! Seems we have t pay for it ! :P

just to remind u !

there is some missing field in the sql !

so u have to work alot ( as if u r using 1.7.4 )

this mod not supported


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 24, 2007, 10:02:32 AM
Problems!!!


define('PM_TABLE', $table_prefix.'pm');
define('PM_RDLT', 0);
define('PM_SDLT', 1);
define('PM_SENT', 2);
define('PM_UNREAD', 3);
define('PM_USDLT',     );
?????????????????


Step 4.

?







Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 24, 2007, 11:01:27 AM
I've installed the module, but have a problem with links (inbox, outbox,...) - they didn't appears at all. May be the problem is in Step 6 where if I comment the function an error appears.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 24, 2007, 12:48:30 PM
Quote  [Expand]
Problems!!!


define('PM_TABLE', $table_prefix.'pm');
define('PM_RDLT', 0);
define('PM_SDLT', 1);
define('PM_SENT', 2);
define('PM_UNREAD', 3);
define('PM_USDLT',     );
?????????????????


Step 4.

?

Count with finger - the 5 steps - 0-1-2-3-4.  :mrgreen: :mrgreen:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 24, 2007, 01:30:29 PM
I've installed the module, but have a problem with links (inbox, outbox,...) - they didn't appears at all. May be the problem is in Step 6 where if I comment the function an error appears.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 24, 2007, 01:57:19 PM
Please no post 2 time - yes - I see it and your problem is no detail - too small. Please read step 6 of my signature.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 09:26:23 PM
An error has occured after instalation PMv2 in       //................./pm.php?action=new


Warning: Invalid argument supplied for foreach() in /home/xxxxxxx/public_html/pm.php on line 414

Fatal error: Call to undefined function get_smiles_text() in /home/xxxxxxx/public_html/pm.php on line 427


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 09:29:47 PM
Please post from line 410 to line 430 of pm.php (by read step 5 of my signature).


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 09:47:21 PM
I don't understand what you mean?


  $title .= ($edit) ? $lang['pm_edit'] : $lang['pm_compose'];
  $bbcode_form = "";
  if ($config['pm_bbcode']) {
    $bbc_help = "";
    foreach ($lang['bbc_help'] as $key => $val) {
      $bbc_help .= $key."_help = \"".$val."\";\n";
    }
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
      "lang_tag_prompt" => $lang['tag_prompt'],
      "lang_link_text_prompt" => $lang['link_text_prompt'],
      "lang_link_url_prompt" => $lang['link_url_prompt'],
      "lang_link_email_prompt" => $lang['link_email_prompt'],
      "lang_list_type_prompt" => $lang['list_type_prompt'],
      "lang_list_item_prompt" => $lang['list_item_prompt'],
      "lang_close_tags" => $lang['close_tags'],
      "lang_all" => $lang['all'],
      "smiles_text" => get_smiles_text(),
      "bbc_help" => $bbc_help
    ));
    $bbcode_form = $site_template->parse_template(BBCODE);
  }


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 09:48:24 PM
Post 410 to 430 of pm.php file (with bbcode) and I check.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:09:03 PM
  410.......   $title .= ($edit) ? $lang['pm_edit'] : $lang['pm_compose'];
  $bbcode_form = "";
  if ($config['pm_bbcode']) {
    $bbc_help = "";
    foreach ($lang['bbc_help'] as $key => $val) {
      $bbc_help .= $key."_help = \"".$val."\";\n";
    }
    $site_template->register_vars(array(
      "lang_bbcode" => $lang['bbcode'],
      "lang_tag_prompt" => $lang['tag_prompt'],
      "lang_link_text_prompt" => $lang['link_text_prompt'],
      "lang_link_url_prompt" => $lang['link_url_prompt'],
      "lang_link_email_prompt" => $lang['link_email_prompt'],
      "lang_list_type_prompt" => $lang['list_type_prompt'],
      "lang_list_item_prompt" => $lang['list_item_prompt'],
      "lang_close_tags" => $lang['close_tags'],
      "lang_all" => $lang['all'],
      "smiles_text" => get_smiles_text(),
      "bbc_help" => $bbc_help
    ));
    $bbcode_form = $site_template->parse_template(BBCODE);
  431...........}


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 10:10:34 PM
So much for bbcode.  :roll:

Now, what is in lang/english/main.php file for $lang['bbc_help'] ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:12:24 PM
My code in lang/bulgarian/main.php


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 10:12:46 PM
No matter - what is say for : $lang['bbc_help'] ?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:18:49 PM
$lang['pm_bbcode'] = "Anable BBCode in this message";


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 10:19:59 PM
I say: $lang['bbc_help'] - no $lang['pm_bbcode'].  :?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:22:59 PM
ops....It is not there...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 10:25:05 PM
And is why is no work ... you miss a step ... is must include in main.php file.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:26:21 PM
how.... :?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:28:33 PM
I look from here....  http://www.4homepages.de/forum/index.php?topic=5374.0   for main.php


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 10:30:32 PM
Like this:

http://www.4homepages.de/forum/index.php?topic=6627.msg33687#msg33687

(line 9 in code instruction (array line))


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:38:37 PM
Ok!

Naw....

in pm.php?action=new:

Fatal error: Call to undefined function get_smiles_text() in /home/angel/public_html/pm.php on line 427


 :( :( :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 10:45:51 PM
Use this:

http://www.4homepages.de/forum/index.php?topic=4745.msg68102#msg68102

Check for: get_smilies_text block function in code.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 10:53:49 PM
This code insert where.....?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 11:20:59 PM
my smiles.php is....


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 27, 2007, 11:23:33 PM
Add get_smilies_text function block in includes/functions.php (top of ?>).


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 27, 2007, 11:33:07 PM
 :cry:

Template Error: Couldn't open Template ./templates/default/BBCODE.html


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on September 28, 2007, 12:13:18 AM
Sigh - your bbcode.html file is miss from templates/default folder ... upload file again to this folder for remove error.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on September 28, 2007, 09:56:14 AM
 :D

Everything is ok.Thank you!!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on October 02, 2007, 09:53:22 AM
{lang_limit_prc} , <img src="{template_image_url}/scale.gif">,<img src="{template_image_url}/scale-end.gif"><img src="{template_image_url}/scale-bar.gif" width="{limit_img}" height="7"><img src="{template_image_url}/scale-end.gif">

in pm_folder.html not desplay.....


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on October 02, 2007, 01:11:27 PM
Quote  [Expand]
lang_limit_prc

Check in PHP source file and check in lang file if lang definition exist.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: barabangel on October 02, 2007, 01:47:10 PM
nothing came of it     :(


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on October 02, 2007, 11:52:33 PM
Quote  [Expand]
nothing came of it

I no have this debugger for precise text for this. Can you send to me if exists for say: nothing came of it ? Is so human understand text ... anyone can understand this easy.

Now, please post all steps you do for say there is nothing.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fast on October 12, 2007, 06:50:39 PM
hallo leute...

gibt es eine möglichkeit hinter "private nachrichten" in der navigation einen hinweis einzubauen (bspw. "neu"), wenn eine neue nachricht eingegangen ist? oder ist das bereits im mod integriert und ich habe nur nicht alles installiert?

danke für eure hilfe...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: UFOSWORLD on October 18, 2007, 07:04:58 PM
Kann mir jemand mal Schritt 6.2 genau erlären??  ich finde in der functions.php das
1
return replace_badwords($text);
  nicht

Habe den Smilie Mod installiert...

der ensprechende Abschnitt in meiner File sieht so aus

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
function replace_badwords($text) {
  global $config, $split_badwords;
  if ($config['badword_list'] != "") {
    if (!isset($split_badwords)) {
      $badwords = trim($config['badword_list']);
      $badwords = preg_replace("/[\n\r]/is", " ", $badwords);
      $badwords = str_replace(","," ",$badwords);
      $badwords = preg_quote($badwords);
      $badwords = str_replace('/', '\\/', $badwords);
      $split_badwords = preg_split("/\s+/", $badwords);
    }

    foreach ($split_badwords as $key => $val) {
      if ($val != "") {
        if (substr($val, 0, 2) == "\\{") {
          $val = substr($val, 2, -2);
          $text = trim(preg_replace("/([^A-Za-z])".$val."(?=[^A-Za-z])/si", "\\1".str_repeat($config['badword_replace_char'], strlen($val)), " $text "));
        }
        else {
          $text = trim(preg_replace("/$val/si", str_repeat($config['badword_replace_char'], strlen($val)), " $text "));
        }
      }
    }
  }
  return $text;
}

function format_text($text, $html = 0, $word_wrap = 0, $bbcode = 0, $bbcode_img = 0) {
  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }

  if ($html == 0 || $html == 2) {
        $text = safe_htmlspecialchars($text);
  }

  if ($bbcode == 1) {
    $search_array = array(
      "/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
      "/(\[)(list)(])(.*)(\[\/list\])/siU",
      "/(\[\*\])/siU",
      "/(\[\/\*\])/siU",
      "/(\[)(url)(=)(['\"]?)(www\.)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/url\])/siU",
      "/(\[)(url)(])(www\.)([^\"]*)(\[\/url\])/siU",
      "/(\[)(url)(])([^\"]*)(\[\/url\])/siU",
      "/(\[)(code)(])(\r\n)*(.*)(\[\/code\])/siU",
      "/javascript:/si",
      "/about:/si"
    );
    $replace_array = array(
     

habe ausserdem 1.7.2 installiert...

wer kann mir weiterhelfen?  ich will den Mod unbedingt auf meiner Seite zur Verfügung stellen

merci UFO


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: UFOSWORLD on October 30, 2007, 12:52:23 AM
Kann mir jemand sagen ob der Mod auf einem absolut unangetasteten 1.7.4 System fehlerfrei läuft?

Tutto kompletto frisch installiertes System..

thx UFO


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: dlmlmd on November 06, 2007, 06:06:39 AM
function "format_text" when edit userCP at email

Email: <input ... vlue="<a href=">admin@yourdomain.com" class="input" />
email : <input ... vlue="<a href=">admin@yourdomain.com" class="input" />
please help me!!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on November 06, 2007, 01:52:09 PM
function "format_text" when edit userCP at email

Email: <input ... vlue="<a href=">admin@yourdomain.com" class="input" />
email : <input ... vlue="<a href=">admin@yourdomain.com" class="input" />
please help me!!!


Sorry ... I no get question ...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: dlmlmd on November 06, 2007, 04:28:27 PM

sorry!
I repaid "format_text" function for PM v2 but when i go to userCP to edit profile -> textbox email error!
in old code have set html==2, in new code html==0 only!
with old code "format_text" of 4images is ok.
i want use it for bbcode2  but function error.
i set "//" for some line have "<a href" in infunction but not ok.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on November 06, 2007, 04:37:31 PM
Hum ... is possible conflict with fix:

http://www.4homepages.de/forum/index.php?topic=18256.0

if so, you no need format_text replace. Tabulator fix is good. ;)

Thing bad is no replace chars for bbcode if no use edit format_text.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on November 07, 2007, 12:47:33 AM
Wait - I find here:

http://www.4homepages.de/forum/index.php?topic=4745.msg20105#msg20105

Is correct patch. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: dlmlmd on November 07, 2007, 04:03:52 AM
Wait - I find here:

http://www.4homepages.de/forum/index.php?topic=4745.msg20105#msg20105

Is correct patch. ;)

first: Thank you very much!!!
sorry about my question.
in 4images old code is  set html=2.
when view sourcecode with brown is:
<tr>
            <td class="row1"><b>&#272&#7883a ch&#7881 Email:</b></td>
            <td class="row1"><input type="text" name="user_email"  size="30" value="<a href="mailto:admin@yourdomain.com">admin@yourdomain.com</a>" class="input" /></td>
          </tr>
          <tr>
            <td class="row2"><b>&#272&#7883a ch&#7881 email l&#7853p l&#7841i:</b></td>
            <td class="row2"><input type="text" name="user_email2"  size="30" value="<a href="mailto:admin@yourdomain.com">admin@yourdomain.com</a>" class="input" /></td>
          </tr>

i think it replace to html hyperlink -> error!
THANK YOU VERY MUCH!
i don't known everyone not see this bug! ( :() oh! my pc very bad  :evil: ->pc

oh!
bug:
  //$text = replace_url($text);  <--- my bug
  if ($word_wrap && $text != "") {
    $text = preg_replace("/([^\n\r ?&\.\/<>\"\\-]{".$word_wrap."})/i", " \\1\n", $text);
  }
  $text = str_replace("\n", "<br />", $text);
  $text = str_replace("\\'", "'", $text);
  $text = str_replace("\\\"", "&quot;", $text);
  $text = replace_badwords(stripslashes($text));

if i set "//" , can my gallery have error?

a! my comment textarea name is "comment_text", pm textarea name is message.
in my comment javascript error. i can't use bbcode.
i will test repaid JS code!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fast on November 12, 2007, 08:51:05 PM
is this mod working with 1.74. has someone with this version runnig this mod successfully?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fast on November 13, 2007, 11:47:58 AM
Hi all... I need a PM Mod fpr 1.7.4. Could also be a paid mod. Any suggestions?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on November 13, 2007, 01:27:16 PM
Quote  [Expand]
Could also be a paid mod. Any suggestions?

Yes. If post in request for paid - I code PM for custom job. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: fast on November 13, 2007, 09:52:57 PM
thunderstrike... you have pm...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: getcom on November 23, 2007, 05:02:31 PM
can anyone tell me where steps 1 to 4 are. This MOD starts at step 4

thanks


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Rokkko on December 05, 2007, 09:51:07 AM
I want to buy pm v 3 to version 1.7.4, where do I find?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Rokkko on December 05, 2007, 09:52:56 AM
I want to buy pm v 3 to version 1.7.4, where do I find?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: mawenzi on December 05, 2007, 10:27:23 AM
@fast, Rokko, ...
... I think, there is no MOD PMv3 ...
... but on some 4images versions 1.7.4 runs MOD PMv2 ...
 


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: derzimmerer on December 08, 2007, 11:49:11 AM
Hallo zusammen,

ich versuche auch grade diesen MOD einzubauen, aber anscheinend fehlt in der Datenbank etwas? Ich bekomme u.a. diese Fehlermeldung:

Quote  [Expand]
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'

Was muss ich denn jetzt noch ändern oder hinzufügen in der Datenbank?

Mfg, Andreas


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nobby on December 08, 2007, 12:34:18 PM
Er sagt doch "Unbekannte Spalte"
Es ist eine Spalte vorhanden die er nicht kennt  :wink:


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: derzimmerer on December 08, 2007, 02:09:00 PM
Hallo,

und nun? Einfach in der Datenbank die fehlenden eintragen? Aber mit welchen Werten?
In keinen der der Setupdateien die hier zu finden sind werden die Sachen in der Datenbank eingetragen. Oder muss ich nur etwas in der page_header.php ändern?
Das Ding muss man doch zum laufen bekommen.

Mfg, Andreas


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: nobby on December 08, 2007, 02:27:27 PM
Hilft Dir das weiter: http://www.4homepages.de/forum/index.php?topic=18780.0  :?:

Denn so ein Profi in sql bin ich nun mal auch nicht  :wink:

Oder Einfach im Suchfeld mal: "Unknown column" Eingeben...


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: derzimmerer on December 08, 2007, 02:43:13 PM
Hilft mir leider nicht weiter. Ich habe MySQL 4.1.10a. Aber trotzdem Danke für deinen Hilfeversuch. Evtl. hat ja ein anderer noch einen Tip für mich....

Mfg, Andreas


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: derzimmerer on December 08, 2007, 03:13:05 PM
Hallo,

ich glaube, ich habe es hinbekommen. In der constants.php am Ende dieses einfügen:

Quote  [Expand]
//PM
define('PM_TABLE', $table_prefix.'pm');
define('PM_RDLT', 0);
define('PM_SDLT', 1);
define('PM_SENT', 2);
define('PM_UNREAD', 3);
define('PM_USDLT', 4);

Mfg, Andreas


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 23, 2007, 02:31:18 PM
Hello,
PMv2 works at  1.7.4,

but I get this message, when I see link new images:

Notice: Undefined variable: pm_popup_header in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 203

Notice: Use of undefined constant BBCODE - assumed 'BBCODE' in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 204

203 and 204:
203 --> "pm_popup_header" => $pm_popup_header,
204 -->  "bbcode2" => (BBCODE == "bbcode") ? 0 : 1,

and this:

Fatal error: Call to undefined function: get_smiles_text() in /homepages/26/d83193504/htdocs/birdgallery/pm.php on line 427

427 --> "smiles_text" => get_smiles_text(),

What's wrong?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 23, 2007, 02:38:54 PM
In includes/page_header.php file,

find:

Quote  [Expand]
"pm_popup_header" => $pm_popup_header,

replace:

1
"pm_popup_header" => (isset($pm_popup_header) && !empty($pm_popup_header)) ? $pm_popup_header : "",

For BBCode, define name is exist in includes/constants.php file. If no exist, you miss step or you no install smilies MOD.

Quote  [Expand]
Fatal error: Call to undefined function: get_smiles_text() in /homepages/26/d83193504/htdocs/birdgallery/pm.php on line 427

You no install smilies MOD. Install smilies MOD and message error is gone. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 23, 2007, 03:48:24 PM
Thank you I installed smilies MOD but not works.
But I thought I have to comment out the smilie MOD.
However, PM works without smilies, but the messages are bad:

Notice: Use of undefined constant BBCODE - assumed 'BBCODE' in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 204
204 --> "bbcode2" => (BBCODE == "bbcode") ? 0 : 1,

Notice: Undefined index: wrote in /homepages/26/d83193504/htdocs/birdgallery/includes/functions.php on line 1886

Notice: Undefined index: quote in /homepages/26/d83193504/htdocs/birdgallery/includes/functions.php on line 1887

1886 -->"<div class=\"quotehead\"><b>\\1</b> ".$lang['wrote'].":<div class=\"quoteblock\">\\2",
1887 -->"<div class=\"quotehead\"><b>".$lang['quote'].":</b><div class=\"quoteblock\">\\1",


and the emailaddress in Controlcenter is wrong --> I have only changed functions.php and page-header.php

I give up and restore old files. ;-( But I'll wait some hours with restoring. Perhaps it easy to fix the errors?



Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 23, 2007, 05:37:27 PM
For fix - please start read this page:

http://www.4homepages.de/forum/index.php?topic=6692.495

I fix before.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 23, 2007, 05:47:33 PM
Thank you thunderstrike, but I'm confused and down.  :oops:
I think I make a paid job for checking my sites.
Are you interested in helping me? Please contact me if you like. ;-)

Chris.





Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 23, 2007, 05:49:43 PM
Quote  [Expand]
I think I make a paid job for checking my sites.

If is for checking - send PM and we deal but read last line in my signature for integrate. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 27, 2007, 01:48:26 AM
1) did you defined in includes/contants.php SCRIPT_URL constant?
2) in global.php check that this block of code present and is identical:
1
2
3
4
5
6
7
8
9
10
if (defined("SCRIPT_URL") && SCRIPT_URL != "") {
  $script_url = SCRIPT_URL;
}
else {
  $port = (!preg_match("/^(80|443)$/", getenv("SERVER_PORT"), $port_match)) ? ":".getenv("SERVER_PORT") : "";
  $script_url  = ($port_match[1] == 443) ? "https://" : "http://";
  $script_url .= (!empty($HTTP_SERVER_VARS['HTTP_HOST'])) ? $HTTP_SERVER_VARS['HTTP_HOST'] : getenv("SERVER_NAME");
  $script_url .= $port;
  $script_url .= (dirname($PHP_SELF) != "/") ? dirname($PHP_SELF) : "";
}

Hello V@no, I don't get this.  :oops:
How to define SCRIPT_URL in constants.php.
How has it to look exact for "dummies" ;-), with example: http://www.yourdomain.com ?
Can you please post code for constants.php and for global.php?

My files start with:

if (!defined('ROOT_PATH')) {
  die("Security violation");
}

I want to use {site_url} in pm_notify.html


Best Chris.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 27, 2007, 01:57:16 AM
Quote  [Expand]
I want to use {site_url} in pm_notify.html

If want for use {site_url}, use {self} for self file or {self_full} for full path. Use in pm_notify.html is no problem (page_header.php and page_footer.php file is must include in PHP source file for this). ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 27, 2007, 02:02:17 AM
My page_header.php and page_footer.php start with:

if (!defined('ROOT_PATH')) {
  die("Security violation");
}

I don't know, what is to do...

Can you explain for a fool like me? ;-)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 27, 2007, 02:06:52 AM
You ... no need for edit page_header.php file ... but sorry - I correct post before. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 27, 2007, 02:27:08 AM
no, it shows "{self}" or "{self_url}". "{site_url}" is not shown.
I have to declare/define my url anywhere, right?


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 27, 2007, 02:27:56 AM
I refix topic before. {self_url} is error - is {self_full} for full path. {self} is for self file. ;)

Quote  [Expand]
I have to declare/define my url anywhere, right?

No. Jan is do in 4images heart before in includes/page_header.php file. ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 27, 2007, 02:44:32 AM
Klicke hier, um die Nachricht zu lesen:
http://www....
---------------------------------------------------------------
Wenn du über den Eingang neuer Privater Nachrichten nicht benachrichtigt
werden möchtest, ändere bitte die Eintellungen in deinem Profil.
 
Liebe Grüße, Chris' birdgallery.
{self_full}  :lol:
 


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 27, 2007, 02:47:38 AM
If want for use with no SESSION ID in URL,

in includes/page_header.php file,

find:

1
"self_full" => $site_sess->url($script_url."/".$self_url),

add after:

1
"full_url" => format_url($script_url . "/" . $self_url),

Use: {full_url} in HTML (again - is for no SESSION ID include only if need). ;)


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 27, 2007, 03:00:20 AM
Puuuh, now is right. Thank you again!!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 27, 2007, 03:01:12 AM
Thank for posting.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 27, 2007, 11:14:18 AM
Hi @ all,

if unregistered users klick on "New images" or "All images"  they get the message:

Notice: Undefined variable: pm_inbox in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 205

Notice: Undefined variable: pm_outbox in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 206

Notice: Undefined variable: pm_sentbox in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 207

Notice: Undefined variable: pm_new_count in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 208

If registered users klick on  "New images" or "All images" is all right.

What' that?  8O

Can I comment this lines out without any restrictions/crashes? When I do that it no messages. ;-)
Is there a better/right solution?

Best Chris.


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: thunderstrike on December 27, 2007, 04:42:26 PM
Hi @ all,

if unregistered users klick on "New images" or "All images"  they get the message:

Notice: Undefined variable: pm_inbox in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 205

Notice: Undefined variable: pm_outbox in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 206

Notice: Undefined variable: pm_sentbox in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 207

Notice: Undefined variable: pm_new_count in /homepages/26/d83193504/htdocs/birdgallery/includes/page_header.php on line 208

If registered users klick on  "New images" or "All images" is all right.

What' that?  8O

Can I comment this lines out without any restrictions/crashes? When I do that it no messages. ;-)
Is there a better/right solution?

Best Chris.

No for uncomment.

In includes/page_header.php file,

find:

1
2
3
4
// "pm_inbox_total" => ($pm_inbox) ? $pm_inbox : 0,
 // "pm_outbox_total" => ($pm_outbox) ? $pm_outbox : 0,
 // "pm_sentbox_total" => ($pm_sentbox) ? $pm_sentbox : 0,
 // "pm_new_total" => ($pm_new_count) ? $pm_new_count : 0,

replace:

1
2
3
4
"pm_inbox_total" => (isset($pm_inbox) && !empty($pm_inbox)) ? $pm_inbox : 0,
"pm_outbox_total" => (isset($pm_outbox) && !empty($pm_outbox)) ? $pm_outbox : 0,
"pm_sentbox_total" => (isset($pm_sentbox) && !empty($pm_sentbox)) ? $pm_sentbox : 0,
"pm_new_total" => (isset($pm_new_count) && !empty($pm_new_count)) ? $pm_new_count : 0,


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: skiemor on December 27, 2007, 07:17:44 PM
...aaaannd??? Works (of course), thank you thunderstrike!


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: allister on February 27, 2008, 12:19:20 AM
I installed PM mod with following missing steps. Every thing working fine except 1 error :?

Can't delete any msgs. getting same msg every time I tried to delete a msg "Nothing to delete".

Need help here pls any one  :D

SQL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
-- --------------------------------------------------------

--
-- Table structure for table `PM_TABLE`
--

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',
  `PM_SENT` int(11) NOT NULL default '0',
  `PM_UNREAD` int(11) NOT NULL default '0',
  `PM_SDLT` int(11) NOT NULL default '0',
  `PM_USDLT` int(11) NOT NULL default '0',
  `PM_RDLT` int(11) NOT NULL default '0',
  KEY `pm_id` (`pm_id`,`pm_to`,`pm_from`)
) TYPE=MyISAM AUTO_INCREMENT=11 ;



--
-- Dumping data for table `PM_TABLE`
--

/lang/<yourlanguage>/main.php:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//--- PM (Private Messaging) ---
$lang['pm'] = "Private Messaging";
$lang['pm_inbox'] = "Inbox";
$lang['pm_outbox'] = "Outbox";
$lang['pm_sentbox'] = "Sentbox";
$lang['pm_link'] = "&nbsp;&nbsp;&nbsp;You have<br />&raquo&nbsp;<b>{msg_new_count}</b> new message(s)<br />&nbsp;&nbsp;&nbsp;in your <b>{inbox}</b>.";
$lang['pm'] = "Private Messaging";
$lang['pm_short'] = "PMS";
$lang['pm_error'] = "Error";
$lang['pm_error_to'] = "You must select a recipient.";
$lang['pm_error_to_notfound'] = "Recipients not found.";
$lang['pm_error_subject'] = "You must enter a subject.";
$lang['pm_error_message'] = "You must enter a message.";
$lang['pm_error_folder'] = "No folder selected.";
$lang['pm_error_id'] = "Nothing to show.";
$lang['pm_error_delete'] = "Nothing to delete.";
$lang['pm_compose'] = "Compose";
$lang['pm_delete'] = "Delete";
$lang['pm_delete_selected'] = "Delete selected";
$lang['pm_delete_all'] = "Delete all";
$lang['pm_delete_success'] = "The messages where deleted successfuly";
$lang['pm_delete_confirm'] = "Are you sure you want to delete that message from <b>".$lang['pms_'.$mode]."</b>?";
$lang['pm_delete_confirm_select'] = "Are you sure you want to delete selected messages from <b>".$lang['pms_'.$mode]."</b>?";
$lang['pm_delete_confirm_all'] = "Are you sure you want to delete ALL messages from <b>".$lang['pms_'.$mode]."</b>?";
$lang['pm_new'] = "New message";
$lang['pm_new_messages'] = "New messages";
$lang['pm_new_is_one'] = "You <b>{count}</b> new messages"; //You have xx new message(s)
$lang['pm_ppm'] = "<b>{count}</b> New";
$lang['pm_message_single'] = "Message";
$lang['pm_message_plural'] = "News";
$lang['pm_select_user'] = "Select a user";
$lang['pm_sent_success'] = "The message was send successfully";
$lang['pm_save_success'] = "The message was saved successfully.";
$lang['pm_redirect'] = "Please wait a moment";
$lang['pm_empty'] = "No messages in this folder";
$lang['pm_reply'] = "Reply";
$lang['pm_view'] = "View message";
$lang['pm_mark'] = "Mark";
$lang['pm_edit'] = "Edit";
$lang['pm_subject'] = "Subject";
$lang['pm_message'] = "Message";
$lang['pm_to'] = "Recipient";
$lang['pm_date'] = "Date";
$lang['pm_send'] = "Send";
$lang['pm_preview'] = "Preview";
$lang['pm_status'] = "Status";
$lang['pm_from'] = "Sender";
$lang['pm_html'] = "Enable HTML in this message";
$lang['pm_bbcode'] = "Enable BBCode in this message";
$lang['pm_smiles'] = "Enable Smilies in this message"; 
$lang['pm_perpage'] = "Messages per page";
$lang['pm_user_pm'] = "PM";
$lang['pm_user_pm_alt'] = "PM to this user";
$lang['pm_total'] = "Total messages";
$lang['pm_received'] = "Received";
$lang['pm_quote'] = "Quote";
$lang['pm_error_save'] = "Error saving message. (the message could has been received)";
$lang['pm_error_notfound'] = "Can't find message.";
$lang['pm_paging_stats'] = "You have {total_cat_images} message(s) {new} on {total_pages} page(s) in your {box}.<br />Displayed: massage {first_page} to {last_page}.";
$lang['pm_email'] = "Notify by email on new Private Message";
$lang['pm_popup'] = "Pop up window on new Private Message";
$lang['pm_popup_confirm'] = "You have a new private message. Click OK to view it, or cancel to hide this prompt.";
$lang['pm_popup_newwindow'] = "Open in new window?\\n\\n(Press cancel to open your Inbox in the current window.)";
$lang['pm_email_new'] = "New private message";
$lang['pm_comment_quote'] = "comment";
$lang['pm_mark_read'] = "All messages as read.";
$lang['pm_storage'] = "The folder {box} and (size)% full size";
$lang['pm_storage_unlimited'] = "(The folder box) has no limit";
$lang['pm_user_limit_reached'] = "{user}'s user's inbox is full";
$lang['pm_inbox_limit'] = "Inbox Messages Limit";
$lang['pm_sentbox_limit'] = "Sentbox Messages Limit";
$lang['pm_finduser'] = "By Name";
$lang['pm_finduser_notfound'] = "No Username.";
$lang['pm_finduser_wildcards'] = "Use * as a wildcard in the user name.";
$lang['pm_select'] = "Auswählen";
$lang['pm_finduser_many'] = "More than one user found.";
$lang['pm_user_id_priority'] = "Username <b>Selection</b> has a higher priority than the user name <b>Feld</b>.";
$lang['pm_user_inbox'] = "Inbox limit<span class=\"smalltext\"><br />set to <font color=red><b>0</b></font> to use global settings<br>or <font color=red><b>-1</b></font> for unlimited</span>";
$lang['pm_user_sentbox'] = "Sentbox limit<span class=\"smalltext\"><br />set to <font color=red><b>0</b></font> to use global settings<br>or <font color=red><b>-1</b></font> for unlimited</span>";
$lang['pm_toosoon'] = "Sorry, you can not have as many messages vershcicken behind each other.";
$lang['pm_toosoon_user'] = "Sorry, you can not behind each other so often another user to send a message.";
$lang['pm_next'] = "Next;";
$lang['pm_prev'] = "Back ";


Title: Re: [MOD] PMv2 Tutorial Republished here
Post by: Sumale.my on April 03, 2008, 02:08:28 AM
Ich kann es nicht installieren, ich verstehe das mit der functions.php nicht! Da ich kein Englisch kann ist das extrem schwierig, sowas einzubauen wenn es auf Englisch ist!

Ich verstehe STEP 6 + STEP 6.2 nicht!
http://www.4homepages.de/forum/index.php?topic=6692.0

Kann mir bitte einer helfen wie ich das einbaue?

Das ist meine functions.php

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
<?php
/**************************************************************************
 *                                                                        *
 *    4images - A Web Based Image Gallery Management System               *
 *    ----------------------------------------------------------------    *
 *                                                                        *
 *             File: functions.php                                        *
 *        Copyright: (C) 2002 Jan Sorgalla                                *
 *            Email: jan@4homepages.de                                    *
 *              Web: http://www.4homepages.de                             *
 *    Scriptversion: 1.7.6                                                *
 *                                                                        *
 *    Never released without support from: Nicky (http://www.nicky.net)   *
 *                                                                        *
 **************************************************************************
 *                                                                        *
 *    Dieses Script ist KEINE Freeware. Bitte lesen Sie die Lizenz-       *
 *    bedingungen (Lizenz.txt) für weitere Informationen.                 *
 *    ---------------------------------------------------------------     *
 *    This script is NOT freeware! Please read the Copyright Notice       *
 *    (Licence.txt) for further information.                              *
 *                                                                        *
 *************************************************************************/
if (!defined('ROOT_PATH')) {
  die(
"Security violation");
}

function 
set_download_token($token) {
  global 
$site_sess$user_info;

  if (
$user_info['user_level'] == ADMIN) {
    return;
  }

  
$download_token = @unserialize($site_sess->get_session_var('download_token'));

  if (!
$download_token) {
    
$download_token = array();
  }

  
$download_token[md5($token)] = 1;

  
$site_sess->set_session_var('download_token'serialize($download_token));
}

function 
clear_download_token($token) {
  global 
$site_sess$user_info;

  if (
$user_info['user_level'] == ADMIN) {
    return;
  }

  
$download_token = @unserialize($site_sess->get_session_var('download_token'));

  if (!
$download_token) {
    return;
  }

  
$token md5($token);

  if (isset(
$download_token[$token])) {
    unset(
$download_token[$token]);
    
$site_sess->set_session_var('download_token'serialize($download_token));
  }
}

function 
check_download_token($token) {
  global 
$site_sess$user_info;

  if (
$user_info['user_level'] == ADMIN) {
    return 
true;
  }

  
$download_token = @unserialize($site_sess->get_session_var('download_token'));

  if (isset(
$download_token[md5($token)])) {
    return 
true;
  }

  return 
false;
}

function 
get_gallery_image($image_name) {
  global 
$config;
  if (
file_exists(TEMPLATE_PATH."/images_".$config['language_dir']."/".$image_name)) {
    return 
TEMPLATE_PATH."/images_".$config['language_dir']."/".$image_name;
  }
  else {
    return 
TEMPLATE_PATH."/images/".$image_name;
  }
}

function 
get_basename($path) {
  
$path str_replace("\\""/"$path);
  
$name substr(strrchr($path"/"), 1);
  return 
$name $name $path;
}

function 
get_basefile($path) {
  
$basename get_basename($path);
  
ereg("(.+)\?(.+)"$basename$regs);
  return isset(
$regs[1]) ? $regs[1] : $basename;
}

function 
redirect($url) {
  global 
$script_url$site_sess;
  if (
strpos($url'://') === false) {
    
$url $script_url.'/'.$url;
  }
  
$location = @preg_match('/Microsoft|WebSTAR|Xitami/'getenv('SERVER_SOFTWARE')) ? 'Refresh: 0; URL=' 'Location: ';
  if (
is_object($site_sess)) {
    
$url $site_sess->url($url"&");
  }
  
header($location.$url);
  exit;
}

function 
is_remote($file_name) {
  return 
strpos($file_name'://') > 0;
}

function 
is_remote_file($file_name) {
  return 
is_remote($file_name) && preg_match("#\.[a-zA-Z0-9]{1,4}$#"$file_name) ? 0;
}

function 
is_local_file($file_name) {
  return !
is_remote($file_name) && get_basefile($file_name) != $file_name && preg_match("#\.[a-zA-Z0-9]{1,4}$#"$file_name) ? 0;
}

function 
check_remote_media($remote_media_file) {
  global 
$config;
  return 
is_remote($remote_media_file) && preg_match("#\.[".$config['allowed_mediatypes_match']."]+$#i"$remote_media_file) ? 0;
}

function 
check_local_media($local_media_file) {
  global 
$config;
  return !
is_remote($local_media_file) && get_basefile($local_media_file) != $local_media_file && preg_match("#\.[".$config['allowed_mediatypes_match']."]+$#i"$local_media_file) ? 0;
}

function 
check_remote_thumb($remote_thumb_file) {
  return 
is_remote($remote_thumb_file) && preg_match("#\.[gif|jpg|jpeg|png]+$#is"$remote_thumb_file) ? 0;
}

function 
check_local_thumb($local_thumb_file) {
  return !
is_remote($local_thumb_file) && get_basefile($local_thumb_file) != $local_thumb_file && preg_match("#\.[gif|jpg|jpeg|png]+$#i"$local_thumb_file) ? 0;
}

function 
get_file_extension($file_name) {
  
ereg("(.+)\.(.+)"get_basefile($file_name), $regs);
  return 
strtolower($regs[2]);
}

function 
get_file_name($file_name) {
  
ereg("(.+)\.(.+)"get_basefile($file_name), $regs);
  return 
$regs[1];
}

function 
check_media_type($file_name) {
  global 
$config;
  return (
in_array(get_file_extension($file_name), $config['allowed_mediatypes_array'])) ? 0;
}

function 
check_thumb_type($file_name) {
  return (
preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? 0;
}

function 
check_executable($file_name) {
  if (
substr(PHP_OS03) == "WIN" && !eregi("\.exe$"$file_name)) {
    
$file_name .= ".exe";
  }
  elseif (
substr(PHP_OS03) != "WIN") {
    
$file_name eregi_replace("\.exe$"""$file_name);
  }
  return 
$file_name;
}

function 
get_file_path($file_name ""$image_type "media"$cat_id 0$in_admin 0$return_icon 1$check_remote CHECK_REMOTE_FILES) {
  
$return_code = ($return_icon) ? ICON_PATH."/404.gif" 0;
  if (empty(
$file_name)) {
    return 
$return_code;
  }
  if (
is_remote($file_name)) {
    
$check_handle "check_remote_".$image_type;
    return (
$check_handle($file_name) && remote_file_exists($file_name$check_remote)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $file_name) : $return_code;
  }
  elseif (
is_local_file($file_name)) {
    
$check_handle "check_local_".$image_type;
    
$file_name = ($in_admin && preg_match("/^([\.]+|[^\/])/"$file_name)) ? "../".$file_name $file_name;
    if (!
file_exists($file_name)) {
      
$file_path preg_replace("/\/{2,}/""/"get_document_root()."/".$file_name);
      return (
$check_handle($file_name) && file_exists($file_path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $file_name) : $return_code;
    }
    else {
      return 
$file_name;
    }
  }
  else {
    
$check_handle "check_".$image_type."_type";
    
$path = (($image_type == "media") ? (($cat_id) ? MEDIA_PATH."/".$cat_id MEDIA_TEMP_PATH) : (($cat_id) ? THUMB_PATH."/".$cat_id THUMB_TEMP_PATH))."/".$file_name;
    return (
$check_handle($file_name) && file_exists($path)) ? (($in_admin && !preg_match("#(gif|jpg|jpeg|png)$#is"$file_name)) ? ICON_PATH."/".get_file_extension($file_name).".gif" $path) : $return_code;
  }
}

function 
safe_htmlspecialchars($chars) {
  
// Translate all non-unicode entities
  
$chars preg_replace(
    
'/&(?!(#[0-9]+|[a-z]+);)/si',
    
'&amp;',
    
$chars
  
);

  
$chars str_replace(">""&gt;",   $chars);
  
$chars str_replace("<""&lt;",   $chars);
  
$chars str_replace('"'"&quot;"$chars);
  return 
$chars;
}

function 
un_htmlspecialchars($text) {
  
$text str_replace(
    array(
'&lt;''&gt;''&quot;''&amp;'),
    array(
'<',    '>',    '"',      '&'),
    
$text
  
);

  return 
$text;
}

function 
get_iptc_info($info) {
  
$iptc_match = array();
  
$iptc_match['2#120'] = "caption";
  
$iptc_match['2#122'] = "caption_writer";
  
$iptc_match['2#105'] = "headline";
  
$iptc_match['2#040'] = "special_instructions";
  
$iptc_match['2#080'] = "byline";
  
$iptc_match['2#085'] = "byline_title";
  
$iptc_match['2#110'] = "credit";
  
$iptc_match['2#115'] = "source";
  
$iptc_match['2#005'] = "object_name";
  
$iptc_match['2#055'] = "date_created";
  
$iptc_match['2#090'] = "city";
  
$iptc_match['2#095'] = "state";
  
$iptc_match['2#101'] = "country";
  
$iptc_match['2#103'] = "original_transmission_reference";
  
$iptc_match['2#015'] = "category";
  
$iptc_match['2#020'] = "supplemental_category";
  
$iptc_match['2#025'] = "keyword";
  
$iptc_match['2#116'] = "copyright_notice";

  
$iptc iptcparse($info);
  
$iptc_array = array();
  if (
is_array($iptc)) {
    foreach (
$iptc as $key => $val) {
      if (isset(
$iptc_match[$key])) {
        
$iptc_info "";
        foreach (
$val as $val2) {
          
$iptc_info .= (($iptc_info != "" ) ? ", " "").$val2;
        }
        if (
$key == "2#055") {
          
$iptc_array[$iptc_match[$key]] = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})/""\\3.\\2.\\1"$iptc_info);
        }
        else {
          
$iptc_array[$iptc_match[$key]] = $iptc_info;
        }
      }
    }
  }
  return 
$iptc_array;
}

function 
get_exif_info($exif) {
  
$exif_match = array();
  
$exif_match['Make'] = "make";
  
$exif_match['Model'] = "model";
  
$exif_match['DateTimeOriginal'] = "datetime";
  
$exif_match['ISOSpeedRatings'] = "isospeed";
  
$exif_match['ExposureTime'] = "exposure";
  
$exif_match['FNumber'] = "aperture";
  
$exif_match['FocalLength'] = "focallen";

  
$exif_array = array();
  if (
is_array($exif)) {
    foreach (
$exif as $key => $val) {
      if (isset(
$exif_match[$key])) {
        
$exif_info $val;
        if (
$key == "DateTimeOriginal") {
          
$exif_array[$exif_match[$key]] = preg_replace("/([0-9]{4}):([0-9]{2}):([0-9]{2})/""\\3.\\2.\\1"$exif_info);
        }
        elseif (
$key == "ExposureTime") {
  $exposure explode("/"$exif_info);
          
$exif_array[$exif_match[$key]] = "1/" . ($exposure[1] / $exposure[0]);
        }
        elseif (
$key == "FNumber") {
  $aperture explode("/"$exif_info);
          
$exif_array[$exif_match[$key]] = "F/" . ($aperture[0] / $aperture[1]);
        }
        elseif (
$key == "FocalLength") {
  $focalLen explode("/"$exif_info);
          
$exif_array[$exif_match[$key]] = ($focalLen[0] / $focalLen[1]) . "mm";
        }
        else {
          
$exif_array[$exif_match[$key]] = $exif_info;
        }
      }
    }
  }
  return 
$exif_array;
}

function 
show_image($image_row$mode ""$show_link 1$detailed_view 0) {
  global 
$self_url$site_template$site_sess$user_info$config$cat_cache$lang$additional_image_fields$user_table_fields$url_show_profile;

  
$is_new = ($image_row['image_date'] >= (time() - 60 60 24 $config['new_cutoff'])) ? 0;
  
$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 101) : REPLACE_EMPTY;

  if (!empty(
$image_row['image_keywords'])) {
    
$split_keywords explode(" "$image_row['image_keywords']);
    
$keywords "";
    foreach (
$split_keywords as $key => $val) {
      
$keywords .= (($keywords != "" ) ? ", " "")."<a href=\"".$site_sess->url(ROOT_PATH."search.php?search_keywords=".urlencode($val))."\">".format_text($val2)."</a>";
    }
  }
  else {
    
$keywords REPLACE_EMPTY;
  }

  if (!
check_permission("auth_readcomment"$image_row['cat_id'])) {
    
$image_row['image_allow_comments'] = 0;
  }

  
$num_comments = ($image_row['image_allow_comments'] == 1) ? $image_row['image_comments'] : "";

  if (
$user_info['user_level'] != GUEST) {
    
$lightbox_url $self_url;
    
$lightbox_url .= (!empty($mode)) ? ((strpos($lightbox_url'?') !== false) ? "&amp;" "?")."mode=".$mode "";
    
$lightbox_url .= strpos($lightbox_url'?') !== false "&amp;" "?";
    if (
check_lightbox($image_row['image_id'])) {
      
$lightbox_url .= "action=removefromlightbox&amp;id=".$image_row['image_id'];
      
$lightbox_button "<a href=\"".$site_sess->url($lightbox_url)."\"><img src=\"".get_gallery_image("lightbox_yes.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
    else {
      
$lightbox_url .= "action=addtolightbox&amp;id=".$image_row['image_id'];
      
$lightbox_button "<a href=\"".$site_sess->url($lightbox_url)."\"><img src=\"".get_gallery_image("lightbox_no.gif")."\" border=\"0\" alt=\"\" /></a>";
    }
  }
  else {
    
$lightbox_button "<img src=\"".get_gallery_image("lightbox_off.gif")."\" border=\"0\" alt=\"\" />";
  }

  if (!
check_permission("auth_download"$image_row['cat_id'])) {
    
$download_button "<img src=\"".get_gallery_image("download_off.gif")."\" border=\"0\" alt=\"\" />";
    
$download_zip_button = (function_exists("gzcompress") && function_exists("crc32")) ? "<img src=\"".get_gallery_image("download_zip_off.gif")."\" border=\"0\" alt=\"\" />" "";
    
$allow_download 0;
    
clear_download_token($image_row['image_id']);
  }
  else {
    
$target = (!empty($image_row['image_download_url']) && !is_remote_file($image_row['image_download_url']) && !is_local_file($image_row['image_download_url'])) ? "target=\"_blank\"" "";
    
$download_button "<a href=\"".$site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download.gif")."\" border=\"0\" alt=\"\" /></a>";
    
$download_zip_button = ($target == "" && function_exists("gzcompress") && function_exists("crc32")) ? "<a href=\"".$site_sess->url(ROOT_PATH."download.php?action=zip&amp;".URL_IMAGE_ID."=".$image_row['image_id'])."\"".$target."><img src=\"".get_gallery_image("download_zip.gif")."\" border=\"0\" alt=\"\" /></a>" "";
    
$allow_download 1;
    
set_download_token($image_row['image_id']);
  }

  if (!
check_permission("auth_sendpostcard"$image_row['cat_id'])) {
    
$postcard_button "<img src=\"".get_gallery_image("postcard_off.gif")."\" border=\"0\" alt=\"\" />";
  }
  else {
    
$postcard_button "<a href=\"".$site_sess->url(ROOT_PATH."postcards.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode ""))."\"><img src=\"".get_gallery_image("postcard.gif")."\" border=\"0\" alt=\"\" /></a>";
  }

  if (!
check_permission("auth_viewimage"$image_row['cat_id']) || !check_permission("auth_viewcat"$image_row['cat_id'])) {
    
$show_link 0;
  }

  
$file_size "n/a";
  if (!
is_remote($image_row['image_media_file'])) {
    if (
$file_size = @filesize(MEDIA_PATH."/".$image_row['cat_id']."/".$image_row['image_media_file'])) {
      
$file_size format_file_size($file_size);
    }
  }
  elseif (
$detailed_view) {
    
$file_size get_remote_file_size($image_row['image_media_file']);
  }

  if (isset(
$image_row[$user_table_fields['user_name']]) && $image_row['user_id'] != GUEST) {
    
$user_name format_text($image_row[$user_table_fields['user_name']], 2);

    
$user_profile_link = (!empty($url_show_profile)) ? str_replace("{user_id}"$image_row['user_id'], $url_show_profile) : ROOT_PATH."member.php?action=showprofile&amp;".URL_USER_ID."=".$image_row['user_id'];
    
$user_name_link "<a href=\"".$site_sess->url($user_profile_link)."\">".$user_name."</a>";
  }
  else {
    
$user_name format_text($lang['userlevel_guest'], 2);
    
$user_name_link $user_name;
  }

  
$site_template->register_vars(array(
    
"image_id" => $image_row['image_id'],
    
"user_id" => $image_row['user_id'],
    
"user_name" => $user_name,
    
"user_name_link" => $user_name_link,
    
"image_name" => format_text($image_row['image_name'], 2),
    
"image_description" => $description,
    
"image_keywords" => $keywords,
    
"image_date" => format_date($config['date_format']." ".$config['time_format'],$image_row['image_date']),
    
"image_is_new" => $is_new,
    
"lang_new" => $lang['new'],
    
"image_active" => $image_row['image_active'],
    
"cat_id" => $image_row['cat_id'],
    
"cat_name" => format_text($image_row['cat_name'], 2),
    
"cat_url" => $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$image_row['cat_id']),
    
"image_downloads" => $image_row['image_downloads'],
    
"image_votes" => $image_row['image_votes'],
    
"image_rating" => $image_row['image_rating'],
    
"image_hits" => $image_row['image_hits'],
    
"allow_comments" => $image_row['image_allow_comments'],
    
"lang_comments" => $lang['comments'],
    
"image_comments" => $num_comments,
    
"lightbox_button" => $lightbox_button,
    
"postcard_button" => $postcard_button,
    
"download_button" => $download_button,
    
"download_zip_button" => $download_zip_button,
    
"image_download_url" => $image_row['image_download_url'],
    
"allow_download" => $allow_download,
    
"url_download" => $site_sess->url(ROOT_PATH."download.php?".URL_IMAGE_ID."=".$image_row['image_id']),
    
"image_file_size" => $file_size,
    
"image_url" => ($show_link) ? $site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_row['image_id'].((!empty($mode)) ? "&amp;mode=".$mode "")) : "",
    
"image" => get_media_code($image_row['image_media_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link$detailed_view),
    
"thumbnail" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link),
    
"thumbnail_openwindow" => get_thumbnail_code($image_row['image_media_file'], $image_row['image_thumb_file'], $image_row['image_id'], $image_row['cat_id'], $image_row['image_name'], $mode$show_link1),
    
"image_file_name" => $image_row['image_media_file'],
    
"thumbnail_file_name" => $image_row['image_thumb_file']
  ));

  if (!empty(
$additional_image_fields)) {
    
$additional_field_array = array();
    foreach (
$additional_image_fields as $key => $val) {
      
$additional_field_array[$key] = (!empty($image_row[$key])) ? format_text($image_row[$key], 1) : REPLACE_EMPTY;
      
$additional_field_array['lang_'.$key] = $val[0];
    }
    if (!empty(
$additional_field_array)) {
      
$site_template->register_vars($additional_field_array);
    }
  }

  
$rate_form "";
  if (
check_permission("auth_vote"$image_row['cat_id'])) {
    
$site_template->register_vars("rate"$lang['rate']);
    
$rate_form $site_template->parse_template("rate_form");
  }
  
$site_template->register_vars("rate_form"$rate_form);
  return 
true;
}

// ################ Start Mod Star Rating * Mouseover/ Hover * Rating without pagereload ##################
function rating_bar($image_id,$units='',$units_detail,$rating_image_width,$static='') {
global 
$site_db$config$site_sess$lang$user_info$setting;

$rating_details $config['starrating_details'];
$rating_images $config['starrating_details_images'];
$rating_details_text $config['starrating_details_text'];
$rating_thumbs_text $config['starrating_thumbs_text'];
$rating_image_width $config['starrating_details_width'];
$thumbnails_rating $config['starrating_thumbs'];
$thumbnails_rating_images $config['starrating_thumbs_images'];
$thumbnails_rating_image_width $config['starrating_thumbs_width'];

if (!
$rating_images) {$rating_images 10;}
if (!
$thumbnails_rating_images) {$thumbnails_rating_images 5;}
if (!
$static) {$static FALSE;}

$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_active, i.image_votes, i.image_rating, i.image_hits, i.image_used_ids, c.cat_id, c.auth_vote
        FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
        WHERE i.image_id = 
$image_id AND c.cat_id = i.cat_id";
$image_row $site_db->query_firstrow($sql);
$cat_id = (isset($image_row['cat_id'])) ? $image_row['cat_id'] : 0;
$auth_vote = (isset($image_row['auth_vote'])) ? $image_row['auth_vote'] : 0;
$image_used_ids_array explode(","$image_row['image_used_ids']);
$ip $_SERVER['REMOTE_ADDR'];

if (
$image_row['image_votes'] < 1) {
$count 0;
}
else {
$count$image_row['image_votes'];
}
if (
$user_info['user_id'] == $image_row['user_id']) {
$is_image_owner 1// replace 1 with 0, if Guests can upload images and vote
$is_already_voted 0;
}
elseif ((
in_array($user_info['user_id'], $image_used_ids_array)) && ($user_info['user_level'] != GUEST)) {
$is_image_owner 1;
$is_already_voted 1;
}
else {
$is_image_owner 0;
$is_already_voted 0;
}

$current_rating $image_row['image_rating'];
$current_rating_text = @number_format($current_rating,1);
$thumbnails_current_rating = @number_format($current_rating/$rating_images*$thumbnails_rating_images,2);
$thumbnails_current_rating_text = @number_format($current_rating/$rating_images*$thumbnails_rating_images,1);

$tense=($count==1) ? $lang['vote'] : $lang['votes'];
$voted=mysql_num_rows(mysql_query("SELECT image_used_ips FROM ".IMAGES_TABLE." WHERE image_used_ips LIKE '%".$ip."%' AND image_id='".$image_id."' "));

$rating_width = @number_format($current_rating,2)*$rating_image_width;
$thumbnails_rating_width = @number_format($thumbnails_current_rating,2)*$thumbnails_rating_image_width;
$image_idx2 = ($image_id*2);

// --- Thumbnails static ---

                
$static_rater_thumb[]  ='<br /><br /><table border="0" cellspacing="0" cellpadding="1" width="10" align="center"><tr><td class="bordercolor">';
                
$static_rater_thumb[] .='<table border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#ffffff" align="left">';
                
$static_rater_thumb[] .= '<div class="ratingblock">';
                
$static_rater_thumb[] .= '<div id="unit_long'.$image_id.'">';
                if (
$is_already_voted == 1) {
                
$static_rater_thumb[] .= '<ul id="unit_ul'.$image_id.'" class="unit-rating-thumbnails" style="width:'.$thumbnails_rating_image_width*$thumbnails_rating_images.'px;" title ="'.$lang['already_voted'].'">';
                
$static_rater_thumb[] .= '<li class="current-rating-thumbnails" style="width:'.$thumbnails_rating_width.'px;" title="'.$lang['rating'].'&nbsp;'.$thumbnails_current_rating.'&nbsp;'.$lang['vote_between'].'&nbsp;'.$thumbnails_rating_images.'&nbsp;&nbsp;&nbsp;'.$lang['already_voted'].'"></li>';
                }
                elseif (
$is_image_owner == 1) {
                
$static_rater_thumb[] .= '<ul id="unit_ul'.$image_id.'" class="unit-rating-thumbnails" style="width:'.$thumbnails_rating_image_width*$thumbnails_rating_images.'px;" title ="'.$lang['image_owner'].'">';
                
$static_rater_thumb[] .= '<li class="current-rating-thumbnails" style="width:'.$thumbnails_rating_width.'px;" title="'.$lang['rating'].'&nbsp;'.$thumbnails_current_rating.'&nbsp;'.$lang['vote_between'].'&nbsp;'.$thumbnails_rating_images.'&nbsp;&nbsp;&nbsp;'.$lang['image_owner'].'"></li>';
                }
                else {
                
$static_rater_thumb[] .= '<ul id="unit_ul'.$image_id.'" class="unit-rating-thumbnails" style="width:'.$thumbnails_rating_image_width*$thumbnails_rating_images.'px;" title ="">';
                
$static_rater_thumb[] .= '<li class="current-rating-thumbnails" style="width:'.$thumbnails_rating_width.'px;" title="'.$lang['rating'].'&nbsp;'.$thumbnails_current_rating.'&nbsp;'.$lang['vote_between'].'&nbsp;'.$thumbnails_rating_images.'"></li>';
                }
                 
$static_rater_thumb[] .= '</ul>';
                if (
$rating_thumbs_text == 'enable') {
                
$static_rater_thumb[] .='<font class="voted"><center>'.$thumbnails_current_rating.'&nbsp;('.$count.' '.$tense.')</center></font>';
                }
                
$static_rater_thumb[] .= '</div>';
                
$static_rater_thumb[] .= '</div>';
                
$static_rater_thumb[] .= '</td></tr></table></td></tr></table>';

// --- Thumbnails rater ---

                
$rater_thumb  ='<br /><br /><table border="0" cellspacing="0" cellpadding="1" width="10" align="center"><tr><td class="bordercolor">';
                
$rater_thumb .='<table border="0" cellspacing="0" cellpadding="3"><tr><td bgcolor="#ffffff" align="left">';
                
$rater_thumb .='<div class="ratingblock">';
                
$rater_thumb .='<div id="unit_long'.$image_id.'">';
                if(!
$voted) {
                
$rater_thumb .='<ul id="unit_ul'.$image_id.'" class="unit-rating-thumbnails" style="width:'.$thumbnails_rating_image_width*$thumbnails_rating_images.'px;">';
                }
                else {
                
$rater_thumb .='<ul id="unit_ul'.$image_id.'" class="unit-rating-thumbnails" style="width:'.$thumbnails_rating_image_width*$thumbnails_rating_images.'px;" title="'.$lang['already_voted'].'">';
                }
                
$rater_thumb .='<li class="current-rating-thumbnails" style="width:'.$thumbnails_rating_width.'px;" title="'.$lang['rating'].'&nbsp;'.$thumbnails_current_rating_text.'&nbsp;'.$lang['vote_between'].'&nbsp;'.$thumbnails_rating_images.'"></li>';

                for (
$ncount 1$ncount <= $thumbnails_rating_images$ncount++) {
                if(!
$voted) {
                
$rater_thumb .='<li><a href="index.php?j='.$ncount.'&q='.$image_id.'&c='.$thumbnails_rating_images.'&cd='.$rating_images.'&w='.$thumbnails_rating_image_width.'&v=1" title="'.$lang['rate'].': '.$ncount.' '.$lang['vote_between'].' '.$thumbnails_rating_images.'" class="r'.$ncount.'-unit-thumbnails rater" rel="nofollow">'.$ncount.'</a></li>';
                }
                else {
                
$rater_thumb .='<li class="current-rating-thumbnails" style="width:'.$thumbnails_rating_width.'px;" title="'.$lang['already_voted'].'"></li>';
                }
                }
                
$ncount=0;
                
$rater_thumb .='</ul>';
                if(
$voted){ $rater_thumb .=''; }
                if (
$rating_thumbs_text == 'enable') {
                
$rater_thumb .='<font class="voted"><center>'.$thumbnails_current_rating.'&nbsp;('.$count.' '.$tense.')</center></font>';
                }
                
$rater_thumb .='</div></div></td></tr></table></td></tr></table>';

// --- Details static---

                
$static_rater_details[]  ='<table border="0" cellspacing="0" cellpadding="0" width="10" align="center"><tr><td>';
                
$static_rater_details[] .='<table border="0" cellspacing="0" cellpadding="3"><tr><td align="left">';
                
$static_rater_details[] .= '<div class="ratingblock">';
                
$static_rater_details[] .= '<div id="unit_long'.$image_id.'">';
                if (
$is_already_voted == 1) {
                
$static_rater_details[] .= '<ul id="unit_ul'.$image_id.'" class="unit-rating" style="width:'.$rating_image_width*$rating_images.'px;" title="'.$lang['already_voted'].'">';
                
$static_rater_details[] .= '<li class="current-rating" style="width:'.$rating_width.'px;" title="'.$lang['already_voted'].'"></li>';
                }
                elseif (
$is_image_owner == 1) {
                
$static_rater_details[] .= '<ul id="unit_ul'.$image_id.'" class="unit-rating" style="width:'.$rating_image_width*$rating_images.'px;" title="'.$lang['image_owner'].'">';
                
$static_rater_details[] .= '<li class="current-rating" style="width:'.$rating_width.'px;" title="'.$lang['image_owner'].'"></li>';
                }
                else {
                
$static_rater_details[] .= '<ul id="unit_ul'.$image_id.'" class="unit-rating" style="width:'.$rating_image_width*$rating_images.'px;" title="'.$lang['already_voted'].'">';
                
$static_rater_details[] .= '<li class="current-rating" style="width:'.$rating_width.'px;" title="'.$lang['already_voted'].'"></li>';
                }
                
$static_rater_details[] .= '</ul>';
                if (
$rating_details_text == 'enable') {
                
$static_rater_details[] .='<font class="voted"><center>'.$lang['rating'].'&nbsp;&nbsp;'.$current_rating.'&nbsp;('.$count.' '.$tense.')</center></font>';
                }
                
$static_rater_details[] .= '</div>';
                
$static_rater_details[] .= '</div>';
                
$static_rater_details[] .= '</td></tr></table></td></tr></table>';

// --- Details rater---

                
$rater_details  ='<div class="ratingblock">';
                
$rater_details .='<div id="unit_long'.$image_idx2.'">';
                if(!
$voted) {
                
$rater_details .='<ul id="unit_ul'.$image_idx2.'" class="unit-rating" style="width:'.$rating_image_width*$rating_images.'px;">';
                }
                else {
                
$rater_details .='<ul id="unit_ul'.$image_idx2.'" class="unit-rating" style="width:'.$rating_image_width*$rating_images.'px;" title="'.$lang['already_voted'].'">';
                }
                
$rater_details .='<li class="current-rating" style="width:'.$rating_width.'px;" title="'.$lang['rating'].'&nbsp;'.$current_rating_text.'&nbsp;'.$lang['vote_between'].'&nbsp;'.$rating_images.'"></li>';

                for (
$ncount 1$ncount <= $rating_images$ncount++) {
                if(!
$voted) {
                
$rater_details .='<li><a href="index.php?j='.$ncount.'&q='.$image_idx2.'&c='.$rating_images.'&cd='.$rating_images.'&w='.$rating_image_width.'&v=2" title="'.$lang['rate'].': '.$ncount.' '.$lang['vote_between'].' '.$rating_images.' " class="r'.$ncount.'-unit rater" rel="nofollow">'.$ncount.'</a></li>';
                }
                else {
                
$rater_details .='<li class="current-rating" style="width:'.$rating_width.'px;" title="'.$lang['already_voted'].'"></li>';
                }
                }
                
$ncount=0;
                
$rater_details .='</ul>';
                if(
$voted){ $rater_details .=' '; }
                if (
$rating_details_text == 'enable') {
                
$rater_details .='<font class="voted"><center>'.$lang['rating'].'&nbsp;&nbsp;'.$current_rating.'&nbsp;('.$count.' '.$tense.')</center></font>';
                }
                
$rater_details .='</div></div>';


// --- Details ajax form---
if ($static == '6') {
                
$rater  ='<table border="0" cellspacing="0" cellpadding="0"><tr><td class="head1">';
                
$rater .='<table border="0" cellspacing="0" cellpadding="3" class="row1"><tr>';
                if (
$is_image_owner == '0') {
                
$rater .='<form method="post" action="details.php?image_id='.$image_id.'">';
                }
                
$rater .='<td valign="bottom">';
                
$rater .='<select name="rating" class="select">';
                
$rater .='<option value="">--</option>';
                
$rater .='<option value="5">5</option>';
                
$rater .='<option value="4">4</option>';
                
$rater .='<option value="3">3</option>';
                
$rater .='<option value="2">2</option>';
                
$rater .='<option value="1">1</option>';
                
$rater .='</select></td><td>';
                
$rater .='<input type="hidden" name="action" value="rateimage" />';
                
$rater .='<input type="hidden" name="id" value="'.$image_id.'" />';
                
$rater .='<input type="submit" value="'.$lang['rate'].'" class="button" name="submit" />';
                
$rater .='</td>';
                if (
$is_image_owner == '0') {
                
$rater .='</form>';
                }
                
$rater .='</tr></table></td></tr></table>';
                return 
$rater;
}
elseif (
$static == '4' && $user_info['user_level'] == GUEST && $auth_vote != 9) {
                
$static_rater $static_rater_details;
                return 
join("\n"$static_rater);
}
elseif (
$static == '4' && $is_image_owner == '0' && $user_info['user_level'] >= USER && $auth_vote != 9) {
                
$rater $rater_details;
                return 
$rater;
}
elseif (
$static == '4' && $is_image_owner == '1' && $user_info['user_level'] >= USER && $auth_vote != 9) {
                
$static_rater $static_rater_details;
                return 
join("\n"$static_rater);
}
elseif (
$static == '5' && $is_image_owner == '0' && $auth_vote != 9) {
                
$rater $rater_details;
                return 
$rater;
}
elseif (
$static == '5' && $is_image_owner == '1' && $auth_vote != 9) {
                
$static_rater $static_rater_details;
                return 
join("\n"$static_rater);
}
// --- Thumbnails Ajax form ---
elseif ($static == '1' && $auth_vote != 9) {
                
$static_rater $static_rater_thumb;
                return 
join("\n"$static_rater);
}
elseif (
$static == '2' && $user_info['user_level'] == GUEST && $auth_vote != 9) {
                
$static_rater $static_rater_thumb;
                return 
join("\n"$static_rater);
}
elseif (
$static == '2' && $is_image_owner == '0' && $user_info['user_level'] >= USER && $auth_vote != 9) {
                
$rater $rater_thumb;
                return 
$rater;
}
elseif (
$static == '2' && $is_image_owner == '1' && $user_info['user_level'] >= USER && $auth_vote != 9) {
                
$static_rater $static_rater_thumb;
                return 
join("\n"$static_rater);
}
elseif (
$static == '3' && $is_image_owner == '0' && $auth_vote != 9) {
                
$rater $rater_thumb;
                return 
$rater;
}
elseif (
$static == '3' && $is_image_owner == '1' && $auth_vote != 9) {
                
$static_rater $static_rater_thumb;
                return 
join("\n"$static_rater);
}
else {
                
$rater  ='<br />';
                return 
$rater;
}
}
// ################## End Mod Star Rating * Mouseover/ Hover * Rating without pagereload ##############

function get_thumbnail_code($media_file_name$thumb_file_name ""$image_id$cat_id$image_name ""$mode ""$show_link 1$open_window 0) {
  global 
$site_sess$config$user_info$setting;

$thumbnails_rating $config['starrating_thumbs'];

  if (!
check_media_type($media_file_name)) {
    
$thumb "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
  }
  else {
    if (!
get_file_path($thumb_file_name"thumb"$cat_id00)) {
      
$file_src ICON_PATH."/".get_file_extension($media_file_name).".gif";
      
$image_info = @getimagesize($file_src);
      
$width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      
$thumb "<img src=\"".$file_src."\" border=\"0\"".$width_height." alt=\"".$image_name."\" />";
    }
    else {
      
$file_src get_file_path($thumb_file_name"thumb"$cat_id01);
      
$image_info = @getimagesize($file_src);
      
$width_height = (!empty($image_info[3])) ? " ".$image_info[3] : "";
      
$thumb "<img src=\"".$file_src."\" border=\"".$config['image_border']."\"".$width_height." alt=\"".$image_name."\" />";
// ################## Start Mod Star Rating * Mouseover/ Hover * Rating without pagereload ##############
      
$thumb .= rating_bar(''.$image_id.'','$thumbnails_rating_images','$rating_images','$thumbnails_rating_image_width',''.$thumbnails_rating.'','1');
// ################## End Mod Star Rating * Mouseover/ Hover * Rating without pagereload ##############
    
}
  }

  if (
$show_link) {
    if (
$open_window) {
      
$thumb "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode ""))."\" onclick=\"opendetailwindow()\" target=\"detailwindow\">".$thumb."</a>";
    }
    else {
      
$thumb "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode ""))."\">".$thumb."</a>";
    }
  }
  return 
$thumb;
}

function 
get_media_code($media_file_name$image_id 0$cat_id 0$image_name ""$mode ""$show_link 0$detailed_view 0) {
  global 
$site_template$site_sess$lang$mode;

  if (!
get_file_path($media_file_name"media"$cat_id00)) {
    
$media "<img src=\"".ICON_PATH."/404.gif\" border=\"0\" alt=\"\" />";
    
$site_template->register_vars("iptc_info""");
    
$site_template->register_vars("exif_info""");
  }
  else {
    
$media_src get_file_path($media_file_name"media"$cat_id01);
    
$file_extension get_file_extension($media_file_name);
    
$media_icon "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"".format_text($image_name2)."\" />";
    if (
$show_link) {
      
$media_icon "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&amp;mode=".$mode ""))."\">".$media_icon."</a>";
    }
    
$width_height "";
    
$width "";
    
$height "";
    
$iptc_info "";
    
$exif_info "";
    if (!
is_remote($media_src)) {
      
$src = (!file_exists($media_src) && file_exists(preg_replace("/\/{2,}/""/"get_document_root()."/".$media_src))) ? preg_replace("/\/{2,}/""/"get_document_root()."/".$media_src) : $media_src;
      if (
in_array(strtolower($file_extension), array('gif','jpg','jpeg','png','swf')) && $image_info = @getimagesize($src$info)) {
        
$width_height " ".$image_info[3];
        
$width $image_info[0];
        
$height $image_info[1];
        if (
$detailed_view && isset($info['APP13'])) {
          
$iptc_array get_iptc_info($info['APP13']);
          
$bgcounter 0;
          foreach (
$iptc_array as $key => $val) {
            
$row_bg_number = ($bgcounter++ % == 0) ? 2;
            
$site_template->register_vars(array(
              
"iptc_value" => format_text($val),
              
"iptc_name" => $lang['iptc_'.$key],
              
"row_bg_number" => $row_bg_number
            
));
            
$iptc_info .= $site_template->parse_template("iptc_bit");
          }
        }
        if (
$detailed_view && $image_info[2] == && function_exists('exif_read_data') && $exif_data = @exif_read_data($src'EXIF')) {
          
$exif_array get_exif_info($exif_data);
          
$bgcounter 0;
          foreach (
$exif_array as $key => $val) {
            
$row_bg_number = ($bgcounter++ % == 0) ? 2;
            
$site_template->register_vars(array(
              
"exif_value" => format_text($val),
              
"exif_name" => $lang['exif_'.$key],
              
"row_bg_number" => $row_bg_number
            
));
            
$exif_info .= $site_template->parse_template("exif_bit");
          }
        }
      }
    }
    
$site_template->register_vars(array(
      
"media_src" => $media_src,
      
"media_icon" => $media_icon,
      
"image_name" => format_text($image_name2),
      
"width_height" => $width_height,
      
"width" => $width,
      
"height" => $height,
      
"iptc_info" => $iptc_info,
      
"exif_info" => $exif_info
    
));
    
$media $site_template->parse_template("media/".$file_extension);
  }
  return 
$media;
}

function 
get_random_image_cache() {
  global 
$site_db$cat_cache$total_images;

  
$random_image_cache = array();
  
$cat_id_sql get_auth_cat_sql("auth_viewcat""NOTIN");

  if (
SHOW_RANDOM_CAT_IMAGE) {
    
$sql "SELECT DISTINCT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.""user_name")."
            FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
            LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
            WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND c.cat_id = i.cat_id
            ORDER BY RAND()"
;
    
$result $site_db->query($sql);
    while (
$row $site_db->fetch_array($result)) {
      
$random_image_cache[$row['cat_id']] = $row;
    }
  }
  else {
    if (empty(
$total_images)) {
      
$sql "SELECT COUNT(*) as total_images
              FROM "
.IMAGES_TABLE."
              WHERE image_active = 1 AND cat_id NOT IN (
$cat_id_sql)";
      
$row $site_db->query_firstrow($sql);
      
$total_images $row['total_images'];
    }
    if (empty(
$total_images)) {
      return 
$random_image_cache;
    }
    
mt_srand((double)microtime() * 1000000);
    
$number = ($total_images 1) ? mt_rand(0$total_images 1) : 0;

    
$sql "SELECT i.image_id, i.cat_id, i.user_id, i.image_name, i.image_description, i.image_keywords, i.image_date, i.image_active, i.image_media_file, i.image_thumb_file, i.image_download_url, i.image_allow_comments, i.image_comments, i.image_downloads, i.image_votes, i.image_rating, i.image_hits, c.cat_name".get_user_table_field(", u.""user_name")."
            FROM ("
.IMAGES_TABLE." i,  ".CATEGORIES_TABLE." c)
            LEFT JOIN "
.USERS_TABLE." u ON (".get_user_table_field("u.""user_id")." = i.user_id)
            WHERE i.image_active = 1 AND i.cat_id NOT IN (
$cat_id_sql) AND c.cat_id = i.cat_id
            LIMIT 
$number, 1";
    
$random_image_cache[0] = $site_db->query_firstrow($sql);
  }
  return 
$random_image_cache;
}

function 
get_random_image($cat_id 0$show_link 1$return_file 0) {
  global 
$site_template$random_image_cache;

  if (!isset(
$random_image_cache)) {
    
$random_image_cache get_random_image_cache();
 &