4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started 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)
-
******************************
----------------------------------------------------
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:
// 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:
//-----------------------------------------------------
//--- PM (Private Messenging) -------------------------
//-----------------------------------------------------
$lang['pm'] = "Private Messaging";
$lang['pm_inbox'] = "Inbox";
$lang['pm_outbox'] = "Outbox";
$lang['pm_sentbox'] = "Sentbox";
$lang['pm_link'] = " You have<br />» <b>{msg_new_count}</b> new message(s)<br /> 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 »";
$lang['pm_prev'] = "« 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:
show_table_separator($setting_group
Look what is the number of the last set:
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
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:
show_form_footer($lang['save_changes'], "", 2);
Add before:
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 ?>:
/*-- 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:
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):
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 ?>
//---Code added for PM MOD------
function strip_brackets($text){
global $lang;
$code_entities_match = array('#<#', '#>#', '#"#', '#:#', '#\[#', '#\]#', '#\(#', '#\)#', '#\{#', '#\}#');
$code_entities_replace = array('<', '>', '"', ':', '[', ']', '(', ')', '{', '}');
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("\"", """, $row['image_name'])."\" align=\"".$align."\" border=\"1\" /></a>";
}
return $text;
}
function bb_code($text){
global $lang;
$text = strip_brackets($text);
$text = str_replace(" ", " ", $text);
// now Replace 2 spaces with " " to catch odd #s of spaces.
$text = str_replace(" ", " ", $text);
// Replace tabs with " " so tabbed code indents sorta right without making huge long lines.
$text = str_replace("\t", " ", $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',
'{\1}',
$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('{', '}');
$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(">", ">", $code);
$code = str_replace("<", "<", $code);
$code = str_replace("&", "&", $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,'<?');
$closingpos = strrpos($buffer, '?');
$buffer=substr($buffer, 0, $openingpos).substr($buffer, $openingpos+5, $closingpos-($openingpos+5)).substr($buffer, $closingpos+5);
}
// $buffer = str_replace(""", "\"", $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("<", "<", str_replace(">", ">", 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\"> ".$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:
$site_template->register_vars(array(
"media_url" => MEDIA_PATH,
Replace with:
//-----------------------------------------------------
//--- 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." | ".$sentbox." | ".$outbox." | ".$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:
$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:
$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:
"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:
$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:
$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:
"comment_id" => $comment_row[$i]['comment_id'],
Add after:
"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:
<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}
<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}
<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:
.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:
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]
-
Continue PM v2
Step 17
If u wish use smiles in comments, in details.php find:
"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:
"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:
if (!ereg("index.php", $url) && !ereg("lightbox.php", $url) && !ereg("login.php", $url) && !ereg("register.php", $url) && !ereg("member.php", $url)) {
Replace with:
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:
//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:
//--- PMS ----
$lang['pms_inbox'] = "Inbox";
$lang['pms_outbox'] = "Outbox";
$lang['pms_sentbox'] = "Sentbox";
$lang['pms_link'] = " You have<br />» <b>{msg_new_count}</b> new message(s)<br /> 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
//-----------------------------------------------------
//--- 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:
"pms_boxes" => ($user_info['user_level'] < USER) ? "" : $inbox." | ".$sentbox." | ".$outbox." | ".$newpms,
"pms_popup_script" => $pms_popup_script,
"pms_popup_header" => $pms_popup_header,
Step 4.3
Remove:
"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
"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
"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
$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
-
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 . . .
-
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.
-
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:
onClick="action.value='preview';"
-
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
-
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.
-
OMG!!! what a great MOD!!! The best MOD ever!
-
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
-
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:
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 Upgrade from PMS v1
here
http://www.4homepages.de/forum/index.php?topic=6692.msg30080#msg30080 (just a few posts above)
-
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
"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),
-
onClick="action.value='preview';" where I shoul put this?
-
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...
-
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
-
But I still don't know where to put that
<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
-
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
<td width="50%" align="right"><input type="submit" name="preview" value=" {lang_preview} " class="button" /></td>
it should look like this
<td width="50%" align="right"><input type="submit" name="preview" value=" {lang_preview} " class="button" onClick="action.value='preview';" /></td>
(just an example...) ;)
-
Thank you Martrix :):):)
-
I just added the JS fix into the package...
-
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:
-
@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.
-
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
-
If I find that on my HDD, I'll repost it ;
That would be nice.
-
calendar mod by Cr@zy Sash:
http://www.4homepages.de/forum/index.php?topic=7485.0
have fun
-
Great, thank you!
-
Does not go:
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
if(($heute==6) || ($heute==7))else
}
:?:
Gruß
michi-w.
-
Does not go:
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
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)
-
Does not go:
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
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.
-
Does not go:
Parse error: parse error, unexpected T_ELSE in /www/htdocs/wupload/includes/page_header.php on line 58
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...
-
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 ;)
-
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.
-
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: onClick="action.value='preview';"
What :?:
Where does that have purely, in the header HTML?
-
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:
-
My last download was 17.04.05, the mod is inserted, I am finished?
There is a German translation (main.php)?
-
There is a German translation (main.php)?
Did you mean:
Is there a german translation of the main.php part?
?
:wink:
//--- PM (Private Messaging) ---
$lang['pm'] = "Private Messaging";
$lang['pm_inbox'] = "Inbox";
$lang['pm_outbox'] = "Outbox";
$lang['pm_sentbox'] = "Sentbox";
$lang['pm_link'] = " du hast<br />» <b>{msg_new_count}</b> neue Nachricht(en)<br /> 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 »";
$lang['pm_prev'] = "« 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
-
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."
-
Can I use "u.userpic" there?
yes
-
lang\english\email\ pm_notify.html
{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.
-
sorry, I didnt quet understand your question...
where do u want use another email? to be notifyed of new PMs?
-
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.
-
ah, ok, lets try this: in pm.php find:
$site_email->set_to($user_row['user_email']);
insert below: $site_email->set_from("message@domain.de", "michi-w.");
$site_url = ($site_url) ? $site_url : "http://<yoursite_url>";
replace <yoursite_url>
-
Thank you!
insert below or replace? $site_email->set_from("message@domain.de", "michi-w.");
$site_url = ($site_url) ? $site_url : "http://<yoursite_url>";
-
insert below: $site_email->set_from("message@domain.de", "michi-w.");
$site_url = ($site_url) ? $site_url : "http://<yoursite_url>";
-
Wow, fast answer,
again thank you and good night!
michi-w.
-
{lang_pm}, {comment_user_pm} and {lang_show_user_images} does not work in detials.html, what can I do?
Please!
Gruß
michi-w.
-
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:
-
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
-
@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)
-
{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?
-
Hi V@no! how do you put a welcome private mesaje when a new user register?
-
that is planned for a new version. (no comments on release date ;))
-
hehehehe ok, :)
-
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)
-
I see now.
in includes/functions.php find: "user_name" => $user_name,
Insert below: "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:
{if pm_url}
<a href="{pm_url}"><img src="{template_url}/images/pm.gif"></a>
{endif pm_url}
-
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.
-
belove the line u inserted in functions.php insert this:
"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)
-
I have the linie insert the function.php,
after
$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?
-
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
$site_template->register_vars(array(
"image_id" => $image_row['image_id'],
After
"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
{lang_show_user_images}
Done
-
doh!
instead of using {url_show_user_images} tag, u'd better change the code, eh?
-
includes/functions.php
find
$site_template->register_vars(array(
"image_id" => $image_row['image_id'],
After
"url_show_user_images" => $site_sess->url(ROOT_PATH."search.php?search_user=".urlencode($user_row['user_name'])),
templates/default/details.html
insert
{url_show_user_images}
Result:
(http://www.web-upload.de/data/media/49/Unbenannt-4.jpg)
includes/functions.php
find
$site_template->register_vars(array(
"image_id" => $image_row['image_id'],
After
"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
{lang_show_user_images}
Result:
(http://www.web-upload.de/data/media/49/Unbenannt-5.jpg)
-
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?
-
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?
-
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)
-
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 ;)
-
ooh ok I thougth that it was a style.css modification
-
I've already proposed such feature for the future version ;)
Future version :) sounds great!
-
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
-
Here is my functions, test it:
http://www.web-upload.de/datei/functions.zip
-
Wirklich vielen Dank!!!
Jetzt funktioniert alles ordnungsgemäß.
Hatte irgendwie durch einen anderen MOD eine total verstellte functions.php
Thanks!
It works now very nice....
-
...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! ...
-
...hm also der einfachste Weg das herauszufinden, ist in den richtigen MODs nachzuschauen ;)
-
... 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)
-
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.
-
genau, so einfach ist das ;)
-
.. 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 ...
-
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
-
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
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
:?
-
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 ... ?
if ($brackets) {
$entities_match = array('{', '}');
$entities_replace = array('{', '}');
$text = str_replace($entities_match, $entities_replace, $text);
}
I am right ... :?:
mawenzi
-
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
[thumb=xxx]
works fine, but if I write more behind that like e.g.:
[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...
-
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
-
the error
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...
-
I will send you a pm ... :wink:
mawenzi
-
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? :|
-
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: ):
$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!
-
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 :
$entities_replace = array('{', '}');
it shows now the following code :
$entities_replace = array('{', '}');
is there still another FIX from the FIX ... :wink: ... ?
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
-
Hi,
I'm trying to create 'short urls' for this mod and I could use some help.
For the sessions.php, i got this
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
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.
-
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:
$image_info = @get_imagesize($file_src, $info);
should be
$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
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("\"", """, $row['image_name'])."\" align=\"".$align."\" border=\"1\" /></a>";
}
return $text;
}
into
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("\"", """, $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...
-
oh, crap, by any chance, do u have unchanged code from step 6.2 ?
-
Yes, I'll find it and send it via PM
-
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
-
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...
-
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 :)
-
in details.html or details php? this mod doesen't work :( but private messaging works,why??
can anybody help?
-
what?
-
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 :(
-
this mod has nothing to do with details.php...what are u talking about? :?
-
the mod doesen't work in detail.html
-
are u talking about the "PM" icon under a comment?
-
I guess maikew means, that the smilies and BBCode form the PM does not work for the images...
-
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...
-
now,after reinstall it works.sorry it was my mistake :mrgreen:
-
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...
-
bug fixes
-
Thanks a lot.
Great Mod again...
-
this work ???
cuz the old one, give me huge troubles... :S
-
Hi Guys, I have the same problem like ascanio #12
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)
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?
-
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 !!!
-
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
-
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
-
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
-
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.
-
I have a few Problem with the if clauses... )o:
{if preview}<div class="msg_plain">{lang_preview}:</div>{endif preview}
{if nextprev}
In the Preview will printout only the ":"
{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
{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:
-
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.
-
/admin/plugin/pm_prude.php mit folgenden Inhalt erstellen
<?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_TITEL, 2);
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();
?>
-
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!?
-
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?
-
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.
-
@ Acidgod
PM Prude ... ein sehr nützliches PlugIn ... Danke ... :D
[ PS. Das PlugIn ist absolut selbsterklärend ... doch was bedeutet eigentlich "Prude" ... ? ]
mawenzi
-
sollte eigentlich prune heissen... Habe dann aber aus mir völlig unerklärlichen Gründen überall prude benutzt...
-
prune ... alles klar ... hatte schon etwas gezweifelt ... an mir ... :wink:
mawenzi
-
a simple question :
This plugins are compatible with old PMS ? or it's just with this version ?
Cheers ;)
-
i dont now...
show me the table from the old PMS and then i will make a Plugin for the old...
-
{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?
-
Gute Frage, habe das Problem nicht nur mit der IP... )o:
-
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 ;)
-
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) ??
-
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
-
@bxbx
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
-
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
-
{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.
-
Okay I understand. Yes, I logged in as regular member.
-
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
-
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: 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
{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:
-
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
-
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 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: <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?
-
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
-
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 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
-
the line in global.php mentioned above should fix all these problems.
-
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
-
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
-
maybe this bug fix?
http://www.4homepages.de/forum/index.php?topic=7493.0
-
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!
-
Double check Step 11 perhaps you added the line in a wrong place ;)
-
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!!
-
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
-
Hello,
thanks for help :roll:
I find the easy error...................
Thanks guys
-
I've discovered a security hole in the new BBCode parser, please redo Step 6.2
-
Parse error: parse error, expecting `')'' in /srv/www/htdocs/web9/html/includes/functions.php on line 1426
You forgotten a comma...
"/(\[)(list)(=)(['\"]?)([^\"']*)(\\4])(.*)(\[\/list)(((=)(\\4)([^\"']*)(\\4]))|(\]))/siU",
"/(\[)(list)(])(.*)(\[\/list\])/siU",
"/(\[\*\])/siU" <---
"/javascript:/si",
-
could someone help mi with this
Parse error: parse error in details.php on line 319
$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)
-
please paste the complete code... (o:
-
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)
-
is my request so hard to understand? :roll:
then please redo step 12...
-
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 ?
-
der hinweis mit dem auskommentieren gilt nur wenn du den simlies Mod installiert hast...
-
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
-
`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?
-
schau deine 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!
-
The code of the index.php:
// 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 = " <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:
$admin_links .= "<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&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&comment_id=".$comment_row[$i]['comment_id'])."\" target=\"admin_edit\">".$lang['edit']."</a> ";
$admin_links .= ($config['user_delete_guestbook'] != 1) ? "" :
"<a href=\"".$site_sess->url(ROOT_PATH."guestbook.php?action=removecomment&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:
$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.....
-
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)...!???
:?: :?: :?:
-
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
-
redo Step 3
-
Thats it.
THX :mrgreen:
-
What can I do :?: :?: :?:
-
What can I do :?: :?: :?:
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 ;)
-
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...
-
The problem is in Step 6.x
Restore you backup of includes/functions.php and try again ;)
-
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
-
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.
-
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....???
-
That error is still comming from Step 6.x
-
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:
-
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
-
Thanks a lot man, I have understand.... no more error :lol:
-
Hello everyone,
i have a new problem. The popup doesnot work.
Is my header.html correct?
<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 />
-
how can i make this MOD , using the old smilies MOD (BBcode Smileys) and not with the V.2 of the same ??
-
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...
-
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 ;)
-
:D Thank you V@no! This was the thing I missed.... :mrgreen:
-
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....
-
hmmm..didnt it work before? if so, then I dont know what you've changed...try reupload pm.php file.
-
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....
-
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?!
-
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
-
@Leppi,
... dann warte mal einige Stunden ... und gallery.vano.org wird wieder online sein ... :roll:
-
k'sen werds später halt nochmal probieren!
cya & mfg Leppi
-
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..
-
Help at me a problem at performance 6 items(points) on installations gives out:
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
REMOVED
-
Restore backups and try again.
-
At me a problem when I insert it /* and
*/
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:
*/
-
At me a problem when I insert it /* and
*/
Do not insert this. This comments a code block out...
-
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 ?
-
Ok, here is an example:
in functions.php you have a block of code
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:/*
function format_text($text)
{
.... some more code here ....
}
*/
Hope this is more clear.
-
At me it turns out so!
\*
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;", $text);
$text = str_replace(">", "&gt;", $text);
$text = str_replace("<", "<", $text);
$text = str_replace(">", ">", $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!
-
First of all, can you see the difference between: \* and /* ?
Second, можно и по-русски ;)
-
Да не это я просто тут опечатался!
-
ну а пункт Step 6.2 как я понял просто тупо в конце перед ? > вставить или там тоже эти штуки нужны /* */
-
Да, просто нужно вставить перед ?> и ничего больше. Если установлен "Smiles" MOD, то изменения в functions.php сделанные тем модом, тоже нужно исправить на коментарий.
-
я не могу в рубиться что за комментарий эти звездачки чтоли если да то при добовлении их у меня ошибка (((
-
В принцапе у меня все и без этого работает единственное то что при вставки смайла в письмо или комментарий он просто отображается как значек а не как картинка!!!! при отправки само сабой или при предварительном просмотре !
вот собственно сам файл
-
Добавленный код в файле не соответствует опубликованому коду (не одинаков).
-
Все теперь все работает ! ))) спасибо! Странно как я мог не правельно кода вставить!
-
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
"ALTER TABLE `".USERS_TABLE."` CHANGE `user_pms_popup` `user_pm_popup` tinyint(1) NOT NULL default '0'",
to
"ALTER TABLE `".USERS_TABLE."` CHANGE `user_pms_popup` `user_pm_popup` tinyint(1) NOT NULL default '1'",
Am I Correct ?
-
Correct
-
Correct
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
-
In the installer below
$sql_data = array(
insert this: "UPDATE `".USERS_TABLE."` SET `user_pm_popup` = 1",
and run the installer again. (you'll see bunch of error messages, just ignore them).
-
In the installer below $sql_data = array(
insert this: "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
-
Oh, I forgot I've added that check :)
just comment out or remove this line:$result = $site_db->query_firstrow("SHOW TABLES LIKE '".str_replace("_", "\_", $table_prefix)."pm'");
-
Thanks V@no,
You Rock!
-
Добрый день. Надеюсь в этот раз я попал "в тему" :) Все дело в том, что при устанолвке мода смайликов в коментариях, у меня при посте коментария отображается все как надо. Но на главной странице в последних коментариях некоторые смайлы отображаются как в приватных сообщениях. Что именно делать с функцией format text() я не понял.
-
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
-
Is thee any way to include the userpicture? That would make the MOD almost perfect
-
The way to include the userpic MOD should be the same way as it was included in the previous version of the PM MOD.
-
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?
-
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:
-
oh, thanks - iam sorry, just to tired :|
-
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 ? :)
-
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.
-
he only wanna add an extra row where the userpics are showed from sender and recipent.
-
Already did. I tested this on a test server site from another user as he reported complete success already.
-
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 :/
-
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.
-
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.
-
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
-
In der page_header.php
Das hier
"pm_boxes" => ($inbox) ? $inbox." | ".$sentbox." | ".$outbox." | ".$newpm : "",
ersetzen durch das:
"pm_boxes" => ($inbox) ? $inbox."<br /> | ".$sentbox."<br /> | ".$outbox."<br /> | ".$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
-
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!
-
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
<td>".$bstart."<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$row['user_id'])."\">".$row['user_name']."</a>".$bend."</td>
and replace with
<td>".$bstart."<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$row['user_id'])."\">".$row['user_name']."</a>".$bend." ".$userpic_img."</td>
Search for
$msg_list .= "<tr class=\"row".(($bgcounter++ % 2 == 0) ? 1 : 2)."\" align=\"center\">
and insert above
$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.
-
@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..
-
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
<td>".$bstart."<a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&".URL_USER_ID."=".$row['user_id'])."\">".$row['user_name']."</a>".$bend." ".$userpic_img."</td>
with
$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 ;)
-
@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.
-
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
-
ja!
schau mal hier:
http://www.4homepages.de/forum/index.php?topic=6732.0
vielleicht findest du da die lösung
-
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
-
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
-
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: <td width="90" valign="top" rowspan="2"><b>{lang_message}</b>{if bbcode}<br /><br />
<span onMouseOver="helpline('sm')">
{smiles_text} <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>
-
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:
<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"> </td>
<td>{bbcode}</td>
</tr>
<tr>
<td width="90" valign="top"> </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:
{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}" />
</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> *
</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> </td>
<td>{bbcode}</td>
</tr>
<tr>
<td> </td>
<td>
{if lang_html}<input type="checkbox" name="html" value="1"{html_select}> {lang_html}<br />{endif lang_html}
{if lang_bbcode}<input type="checkbox" name="bbcode" value="1"{bbcode_select}> {lang_bbcode}<br />{endif lang_bbcode}
<input type="checkbox" name="smiles" value="1"{smiles_select}> {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"> * {lang_user_id_priority}</td>
</tr>
{endif username_list}
</table>
</td>
</tr>
</table>
</td>
</tr>
</form>
</table>
-
Its in bbcode.html template
-
it works now - but i still didnt know how to show all smileys, instead of open a new window
-
change the number in includes/functions.php[qcode] if ($i > 18) {[/qcode]
-
yes, works perfectly now, thanks.
-
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
<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}
<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}
<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}
<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}
<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}
<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"> {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
-
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:
$text = replace_url($text);
3. Ersetze mit / remove with:
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.
-
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
-
Hi
@roger
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
-
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
-
probably made a misstake in step 4 or 5
-
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
-
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
-
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.
-
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: "Subject selftest | [Reply] | [Delete]
selftest
<br />ddfdfdfdf
so is anything not ok with the message settings for html messages?
-
then obviously you do it wrong. There is nothing much could be said on how to do that step, so try again.
/*
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:
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
-
I already see that you missed closing curly bracket at the end.
-
sry my english is bad... can't understand what u want me to say. What should i change in code?
-
hey v@no,
somehow ... the style.css is not working with my pm.php :(
What's wrong? format is all messed up. :cry:
-
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
-
in pm_new.html finde ...
<td><input type="text" name="subject" value="{subject}" size="20" class="commentinput" /></td>
und ersetze es durch ...
<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
-
I still doesn't know what i did wrong could somebody please help me. ( Site 17 )
-
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} /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
-
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: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) : "";
}
-
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 :)
-
Why does nobody answer my Question? Iam a bit frustrated.
Please answer my Question on page 17
-
Hat jemand eine Deutsche Version des Scripts?
Ó êîãî íèáóäü åñòü ðóññêàÿ âåðñèÿ?
-
when user add some smilies in commments without spaces between them they want show
how can i fix it ?
-
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?
-
Please help Script version 1.7.2
Analog problem on http://funchecks.fu.funpic.de/problem.JPG i fix this code
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
-
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
-
Any solution ? :P
-
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
$bbcode_form = "";
if ($config['pm_bbcode']) {
$bbc_help = "";
foreach ($lang['bbc_help'] as $key => $val) {
$bbc_help .= $key."_help = \"".$val."\";\n";
}
any ideas?
-
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
$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 ?
-
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?
-
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
-
Greetings, how make this mod work with default smileys (bbcode smileys MOD) and not with this new pm2 smileys ?
-
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:
$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
$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: (".time().", ".$user_id.", '1',
set there your ID!
then open lang/<your lang>/main.php
add before
?>
Your Mail. something like this!
$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
-
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:
$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
$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: (".time().", ".$user_id.", '1',
set there your ID!
then open lang/<your lang>/main.php
add before
?>
Your Mail. something like this!
$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
-
ok. please :D
-
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:
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?
-
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!
removed
-
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
-
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?
-
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
-
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:
-
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
-
I only have been installing MOD PM. :cry:
-
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
-
i ve got a problem with my controlpanel.
i think it was after this mod.
look at the attechment!
-
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
-
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! :(
-
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 ...
...
</head>
<body {pm_popup_header}>
...
-
<body>script</body>
ist so nicht richtig ... siehe oben !
-
Didnt understand the english variant...
-
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
-
hi guys,
anybody test that mod with 1.7.2?
my experience there is missing a template by sending a new message :?
-
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
-
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:
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
-
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:
$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
$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: (".time().", ".$user_id.", '1',
set there your ID!
then open lang/<your lang>/main.php
add before
?>
Your Mail. something like this!
$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 ?
-
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:
$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
$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: (".time().", ".$user_id.", '1',
set there your ID!
then open lang/<your lang>/main.php
add before
?>
Your Mail. something like this!
$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...
-
the problem...is ... i'm not php coder...so isn't easy for me !! :(
-
(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.
-
The template bbcode2.html already has this, so look in there ;)
-
The template bbcode2.html already has this, so look in there ;)
Replace bbcode.html with bbcode2.html ???
-
I dont understand your question...if you installed this mod correctly, you should see the help line without any additional modifications to the templates...
-
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
-
no, you dont need to replace anything.
-
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
-
Hy,
After i instaled this mod ...in admin panel appear this..
(http://img72.imageshack.us/img72/3042/adminxn1.jpg)
What is the problem?
-
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 ? :(
-
Hallo Ivan,
zu1.
... eine schnelle Lösung nur durch Änderung in der main.php ...
... finde ...
$lang['pm_sent_success'] = "Die Nachricht wurde erfolgreich gesendet.";
$lang['pm_redirect'] = "Bitte warte einen Moment ... ";
... und ändere in ...
$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 ...
-
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
-
1) did you test it on fresh, not modifyed v1.7.2?
2) what doesnt work?
-
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
-
im getting when trying to create new message
Fatal error: Call to undefined function: strip_brackets() in /home/sexymal/public_html/Galeries/pm.php on line 531
-
Failed in step 6.2
-
im getting when trying to create new message
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?
-
cheers vano sorted that,
but now getting all sorts of if qoutes (see image below)
(http://www.sexymalecelebs.co.uk/show.JPG)
Cheers
James
-
sexy male celebs
noice :lol:
-
http://www.4homepages.de/forum/index.php?topic=7493.0
-
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
-
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
-
lang/your_language/main.php
:?:
-
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
-
Was steht denn da für ein Text?
Immer der gleiche oder sind das die Einträge aus der Shoutbox?
-
Texte aus der Shoutbox
und eigenartiger weise immer der letzte der in der Shoutbox angezeigt wird (steht auf 20)
Anzahl der Nachrichten, die im Template angezeigt werden sollen.
-
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
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 {
-
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:
$text = replace_url($text);
3. Ersetze mit / remove with:
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
-
Texte aus der Shoutbox
und eigenartiger weise immer der letzte der in der Shoutbox angezeigt wird (steht auf 20)
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:
$shoutings .= $site_template->parse_template("shout_bit");
Add Before:
$message = "";
-
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
-
I've attached the file to the original tutorial post.
-
sorry,but cant find any link,also your tutorial is lost.
how to find your attachment?
thanks.
-
@FOTZENCLUB
http://www.4homepages.de/forum/index.php?topic=6692.msg30080#msg30080
-
:wink:
thats it,thanks!
-
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
-
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
-
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!
-
The file is attached to the post...
-
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
-
In functions.php
theres:
if ($html == 0) {
$text = str_replace("<", "&lt;", $text);
$text = str_replace(">", "&gt;", $text);
$text = str_replace("<", "<", $text);
$text = str_replace(">", ">", $text);
Maybe this is cause that I´ve got in my comments some smiles looks like this:
<img src=\"./templates/default/smiles/surprised.gif\"
alt=\"\" border=\"0\">
In my quellcode it looks like:
<img src="./templates/default/smiles/surprised.gif" alt="" border="0">
PLZ Help
-
@ Flo2005,
wenn du "html" in deinen Privaten Nachrichten zulassen willst, so solltest du das unter ACP -> Allgemein -> Einstellungen -> Private Messaging auch so einstellen ...
denn ...
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.
-
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:
<img src=\"./templates/default/smiles/very_sad.gif\" alt=\"\"
border=\"0\">
-
Hello,
how can I send a pm to all users?
Thanks and Greetz
Chull
-
@ chull
... there is a [Plugin] Pm to Members ...
http://www.4homepages.de/forum/index.php?topic=6732.0
-
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?
-
danke ivan
hab 1.7.3 und bei mir wird jetz das
<a href=...
nicht mehr angezeigt
vielen vielen dank
-
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 :/
$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
-
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 errorNotice: 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
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
-
anyone know how to fix this?
-
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
format_text($image_row['image_description'], 0)
durch
format_text($image_row['image_description'], 1,0,1)
eigentlich recht simpel, man muss sich nur die funktionen mal richtig durchsehen :D
-
great support here
-
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
-
Hello!!
I getting error when installing
I get this message
SHOW TABLES LIKE '4images\_pm'
MOD Private Messaging v2 (by V@no)
Sorry, can not continue, you missed some steps of the installation..
-
Hello!!
I getting error when installing
I get this message
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!!!
-
in /includes/page_header.php
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_head = "";
$pm = "";
maybe correct $pm_popup_header = "";
:?:
-
if you have error in 1.7.4 Undefined variable: pm_xxxx
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:
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_head = "";
$pm = "";
and replace this
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_header = "";
$pm = "";
$pm_inbox = "";
$pm_outbox = "";
$pm_sentbox = "";
$pm_new_count = "";
-
if you have error in 1.7.4 Undefined variable: pm_xxxx
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:
//-----------------------------------------------------
//--- pm ---------------------------------------------
//-----------------------------------------------------
$inbox = "";
$outbox = "";
$sentbox = "";
$newpm = "";
$pm_popup_script = "";
$pm_popup_head = "";
$pm = "";
and replace this
//-----------------------------------------------------
//--- 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
-
so... your version php and mysql?
i use this installer on php5 and mysql 4.1.x
all works fine...
-
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
-
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
-
or use PhpMyAdmin and create this:
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
-
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
-
Hello,
i need the file pm_install.php
!!!
--------------------------------------
Hallo,
ich brauche die Datei pm_install.php
-
or use PhpMyAdmin and create this:
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
-
hier ist die original pm_install
<?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> (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> $key", $val);
}
$error_msg .= "</ol>";
echo "<p class=\"rowtitle\">".$error_msg."</p>";
?>
</blockquote></td></tr>
<tr class="tablefooter"><td colspan="2"> </td></tr>
</table>
</td>
</tr>
</table>
</table>
<p align="center"> Powered by <b>4images</b> <?php echo SCRIPT_VERSION; ?><br />Copyright © 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')) ? 0 : 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> (by <?php echo $mod_author; ?>)</td></tr>
<tr class="tablefooter"><td align="center"> </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 <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 © 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..
-
@ 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 ... ?
-
@ 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! :((((((((((((((
-
... 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 ...
-
Hello!!
mawenzi please help me too !!
when I try to install i get error (see error in attachment file
Please Help
-
ok... use phpMyadmin and this sql
-- 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 ;
-
ok... use phpMyadmin and this sql
-- 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!
-
ok... use phpMyadmin and this sql
-- 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.
:(
-
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!
-
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
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'
:(
-
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.
-
Congraculations! :)
I modify this installer for 1.7.4 version... Use it..
Need fresh 4images database!
-
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
-
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.
-
???????????????????????????????????????????????????????????????????
Hi,
i have version 1.7.4 too. But it just doesn't work.
-
... try this ...
... http://www.4homepages.de/forum/index.php?topic=6692.msg86674#msg86674 ...
-
Where 's
Step 1, 2 and 3?
Help me please
-
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.
-
Excuse I did not understand?
-
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'
-
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
-
ok... use phpMyadmin and this sql
-- 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!
-
are you sure that you use the right prefix?
CREATE TABLE `4images_pm` (
-
are you sure that you use the right prefix?
CREATE TABLE `4images_pm` (
Yes - I checked it again.
-
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!
-
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?
-
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.
-
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.
-
Wäre cool wenn jemand weiterhelfen könnte wie man diesen mod für die Version 1.7.4 benützen kann!!
-
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
-
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!
-
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:
return replace_badwords($text);
}
Wenn ich die pm_install.php ausführe bekomme ich immer folgendes:
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
-
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... ???
-
ich brauche auch ganz dringend hilfe....finde auch keine lösung für die fehlermeldungen
-
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.
-
Sorry, can not continue, you missed some steps of the installation..
on 4images 1.7.4
-
Wow ... this seem long discuss. Resolve now ?
-
This mean new version to build ?
-
-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).
problem with input field stand this: admin@yourdomain.com" class="input">
> failure in acp
Settings not save correctly when execute a spec function.
problem with bad word list
Rational chars no detect correct.
i send a new message with follow words "test"
after send is the word so \\"test\\"
Stripslashes miss (easy one). ;)
-
Would be great project to do in request for paid. :)
-
I re-write full. No by other for codings (acxept functions if can still use). Load coding so take time.
-
Installed MOD build 4images < v1.7.4 (< = old). Make prob if no make for it (v1.7.4+).
-
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????????????!!!!!!!
-
Not sure of prob ... SQL query in pm_install.php file ...
"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)
-
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
-
May be time to rewrite. ;)
-
Not sure of prob ... SQL query in pm_install.php file ...
"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:
-
".PM_TABLE."
On paragraf, change this to real table PMS name. Next, execute same paragraf in phpmyadmin (PHP execute). ;)
-
".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!!!
-
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:
4images_pms
(4images_) - one that you use (examp). If not use, change to real one you use.
-
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
-
Like this:
'4images_pm`
no ".4IMAGES_PM." ;)
-
the install problem its solved ;)
upload and execute this install (attached here) :mrgreen:
-
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
:?
-
Look that need rewrite ...
-
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
-
Topic too large. Think of new system: http://www.4homepages.de/forum/index.php?topic=18268.msg97389#new - lets change. :)
-
yea damn ... still something wrong :(
somebody had the install of the old pms ??? :|
-
any idea for sql?
-
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 ?
-
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?
-
Correct. 1st time, PM V2 publish for upgrade. No core install but SQL error nothing do with upgrade.
-
so who have the old pms installer ?? can attach here please :|
-
@Stoleti:
Reason error:
"CREATE TABLE `".4images_pm."`
No do. It:
"CREATE TABLE " . PMS_TABLE . "
Must add in constant.php file:
define('PMS_TABLE', $table_prefix . "pms");
This all.
-
yes i got that, but i still looking for the old pms installer :roll: please !!
-
k sajalelenyu ya do six por PMS ne nashel kto-to smojit nam naidet pojalyusta!
-
Hi all,
Struggling a little with the install.
I get this 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 '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??
-
No do constants.php file. Add PM_TABLE in file.
-
same problem above with me ! :S
agree might be in the lang main !!
ganna check it :P
-
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 !
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 :
foreach ($lang['bbc_help'] as $key => $val) {
$bbc_help .= $key."_help = \"".$val."\";\n";
}
-
same problem above with me ! :S
Add constant name is constants.php file.
Template Error: Couldn't open Template ./templates/infoqatar/BBCODE.html
Upload BBCODE.html (case sensitive) in templates/infoqatar folder.
-
thaaaaaaaaaaaaaaaaaaaanks ^_^
just solved the first one ! :)
still im getting this !
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
-
Post from 410 to 420 from pm.php file.
-
Sorry my bad :(
$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
-
$lang['bbc_help']
This no go ... from lang/your_language/main.php - what say (full line) ?
-
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:
$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
-
"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.
-
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 !
-
Ask MOD author. No point of foreach for $lang.
-
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 ^^
-
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 )
-
Hi Thunderstrike,
I am still getting the same error. I have only followed the instructions up to Step 9 so far.
I have
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!
-
Table not create in DB (or empty). No error come if 2 of them there ...
-
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
-
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?
-
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:
-
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 !
-
Question ... which PHP version 2 of you use ?
-
@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!
-
I use PHP4.
Precise ? ACP - > phpinfo().
@Thunderstrike, is it possible to turn of the case sensitiveness?
Where ? Which file ? Which action of file ?
-
I use PHP4.
Precise ? ACP - > phpinfo().
@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:
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?
-
If the bbcode.html is in small letters, the comment form works but PMv2 does not.
In 2 the files (PM + 2nd file),
find:
$site_template->parse_template("bbcode");
2 - replace low case. ;)
-
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?
-
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
-
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
-
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 ;-)
-
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."
-
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)
-
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 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!
-
- Vote expire in chit / chat. Have answer for recoding PM MOD. -
-
- 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:
-
maybe there will be many idea's from members here
Feature from members ...
-
maybe there will be many idea's from members here
Feature from members ...
i mean they will say's there idea's :)
-
Exact.
-
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!
-
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
-
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!
-
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
-
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.
?
-
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.
-
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:
-
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.
-
Please no post 2 time - yes - I see it and your problem is no detail - too small. Please read step 6 of my signature.
-
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
-
Please post from line 410 to line 430 of pm.php (by read step 5 of my signature).
-
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);
}
-
Post 410 to 430 of pm.php file (with bbcode) and I check.
-
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...........}
-
So much for bbcode. :roll:
Now, what is in lang/english/main.php file for $lang['bbc_help'] ?
-
My code in lang/bulgarian/main.php
-
No matter - what is say for : $lang['bbc_help'] ?
-
$lang['pm_bbcode'] = "Anable BBCode in this message";
-
I say: $lang['bbc_help'] - no $lang['pm_bbcode']. :?
-
ops....It is not there...
-
And is why is no work ... you miss a step ... is must include in main.php file.
-
how.... :?
-
I look from here.... http://www.4homepages.de/forum/index.php?topic=5374.0 for main.php
-
Like this:
http://www.4homepages.de/forum/index.php?topic=6627.msg33687#msg33687
(line 9 in code instruction (array line))
-
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
:( :( :(
-
Use this:
http://www.4homepages.de/forum/index.php?topic=4745.msg68102#msg68102
Check for: get_smilies_text block function in code.
-
This code insert where.....?
-
my smiles.php is....
-
Add get_smilies_text function block in includes/functions.php (top of ?>).
-
:cry:
Template Error: Couldn't open Template ./templates/default/BBCODE.html
-
Sigh - your bbcode.html file is miss from templates/default folder ... upload file again to this folder for remove error.
-
:D
Everything is ok.Thank you!!!
-
{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.....
-
lang_limit_prc
Check in PHP source file and check in lang file if lang definition exist.
-
nothing came of it :(
-
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.
-
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...
-
Kann mir jemand mal Schritt 6.2 genau erlären?? ich finde in der functions.php das
return replace_badwords($text);
nicht
Habe den Smilie Mod installiert...
der ensprechende Abschnitt in meiner File sieht so aus
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
-
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
-
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!!!
-
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 ...
-
Sorry ... I no get question ...
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.
-
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.
-
Wait - I find here:
http://www.4homepages.de/forum/index.php?topic=4745.msg20105#msg20105
Is correct patch. ;)
-
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>Địa chỉ 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>Địa chỉ email lập lại:</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("\\\"", """, $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!
-
is this mod working with 1.74. has someone with this version runnig this mod successfully?
-
Hi all... I need a PM Mod fpr 1.7.4. Could also be a paid mod. Any suggestions?
-
Could also be a paid mod. Any suggestions?
Yes. If post in request for paid - I code PM for custom job. ;)
-
thunderstrike... you have pm...
-
can anyone tell me where steps 1 to 4 are. This MOD starts at step 4
thanks
-
I want to buy pm v 3 to version 1.7.4, where do I find?
-
I want to buy pm v 3 to version 1.7.4, where do I find?
-
@fast, Rokko, ...
... I think, there is no MOD PMv3 ...
... but on some 4images versions 1.7.4 runs MOD PMv2 ...
-
Hallo zusammen,
ich versuche auch grade diesen MOD einzubauen, aber anscheinend fehlt in der Datenbank etwas? Ich bekomme u.a. diese Fehlermeldung:
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
-
Er sagt doch "Unbekannte Spalte"
Es ist eine Spalte vorhanden die er nicht kennt :wink:
-
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
-
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...
-
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
-
Hallo,
ich glaube, ich habe es hinbekommen. In der constants.php am Ende dieses einfügen:
//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
-
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?
-
In includes/page_header.php file,
find:
"pm_popup_header" => $pm_popup_header,
replace:
"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.
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. ;)
-
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?
-
For fix - please start read this page:
http://www.4homepages.de/forum/index.php?topic=6692.495
I fix before.
-
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.
-
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. ;)
-
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: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.
-
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). ;)
-
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? ;-)
-
You ... no need for edit page_header.php file ... but sorry - I correct post before. ;)
-
no, it shows "{self}" or "{self_url}". "{site_url}" is not shown.
I have to declare/define my url anywhere, right?
-
I refix topic before. {self_url} is error - is {self_full} for full path. {self} is for self file. ;)
I have to declare/define my url anywhere, right?
No. Jan is do in 4images heart before in includes/page_header.php file. ;)
-
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:
-
If want for use with no SESSION ID in URL,
in includes/page_header.php file,
find:
"self_full" => $site_sess->url($script_url."/".$self_url),
add after:
"full_url" => format_url($script_url . "/" . $self_url),
Use: {full_url} in HTML (again - is for no SESSION ID include only if need). ;)
-
Puuuh, now is right. Thank you again!!
-
Thank for posting.
-
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.
-
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:
// "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:
"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,
-
...aaaannd??? Works (of course), thank you thunderstrike!
-
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
-- --------------------------------------------------------
--
-- 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:
//--- PM (Private Messaging) ---
$lang['pm'] = "Private Messaging";
$lang['pm_inbox'] = "Inbox";
$lang['pm_outbox'] = "Outbox";
$lang['pm_sentbox'] = "Sentbox";
$lang['pm_link'] = " You have<br />» <b>{msg_new_count}</b> new message(s)<br /> 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 ";
-
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
<?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 ? 1 : 0;
}
function is_remote_file($file_name) {
return is_remote($file_name) && preg_match("#\.[a-zA-Z0-9]{1,4}$#", $file_name) ? 1 : 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) ? 1 : 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) ? 1 : 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) ? 1 : 0;
}
function check_remote_thumb($remote_thumb_file) {
return is_remote($remote_thumb_file) && preg_match("#\.[gif|jpg|jpeg|png]+$#is", $remote_thumb_file) ? 1 : 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) ? 1 : 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'])) ? 1 : 0;
}
function check_thumb_type($file_name) {
return (preg_match("#(gif|jpg|jpeg|png)$#is", $file_name)) ? 1 : 0;
}
function check_executable($file_name) {
if (substr(PHP_OS, 0, 3) == "WIN" && !eregi("\.exe$", $file_name)) {
$file_name .= ".exe";
}
elseif (substr(PHP_OS, 0, 3) != "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',
'&',
$chars
);
$chars = str_replace(">", ">", $chars);
$chars = str_replace("<", "<", $chars);
$chars = str_replace('"', """, $chars);
return $chars;
}
function un_htmlspecialchars($text) {
$text = str_replace(
array('<', '>', '"', '&'),
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'])) ? 1 : 0;
$description = (!empty($image_row['image_description'])) ? format_text($image_row['image_description'], 1, 0, 1) : 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($val, 2)."</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) ? "&" : "?")."mode=".$mode : "";
$lightbox_url .= strpos($lightbox_url, '?') !== false ? "&" : "?";
if (check_lightbox($image_row['image_id'])) {
$lightbox_url .= "action=removefromlightbox&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&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&".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)) ? "&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&".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)) ? "&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_link, 1),
"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'].' '.$thumbnails_current_rating.' '.$lang['vote_between'].' '.$thumbnails_rating_images.' '.$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'].' '.$thumbnails_current_rating.' '.$lang['vote_between'].' '.$thumbnails_rating_images.' '.$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'].' '.$thumbnails_current_rating.' '.$lang['vote_between'].' '.$thumbnails_rating_images.'"></li>';
}
$static_rater_thumb[] .= '</ul>';
if ($rating_thumbs_text == 'enable') {
$static_rater_thumb[] .='<font class="voted"><center>'.$thumbnails_current_rating.' ('.$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'].' '.$thumbnails_current_rating_text.' '.$lang['vote_between'].' '.$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.' ('.$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'].' '.$current_rating.' ('.$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'].' '.$current_rating_text.' '.$lang['vote_between'].' '.$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'].' '.$current_rating.' ('.$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_id, 0, 0)) {
$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_id, 0, 1);
$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)) ? "&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)) ? "&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_id, 0, 0)) {
$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_id, 0, 1);
$file_extension = get_file_extension($media_file_name);
$media_icon = "<img src=\"".ICON_PATH."/".$file_extension.".gif\" border=\"0\" alt=\"".format_text($image_name, 2)."\" />";
if ($show_link) {
$media_icon = "<a href=\"".$site_sess->url(ROOT_PATH."details.php?".URL_IMAGE_ID."=".$image_id.((!empty($mode)) ? "&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++ % 2 == 0) ? 1 : 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] == 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++ % 2 == 0) ? 1 : 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_name, 2),
"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();
}
if ($cat_id && SHOW_RANDOM_CAT_IMAGE) {
$template = 'random_cat_image';
$category_id = $cat_id;
}
else {
$template = 'random_image';
if (SHOW_RANDOM_CAT_IMAGE) {
srand((float)microtime() * 1000000);
$category_id = array_rand($random_image_cache);
}
else {
$category_id = 0;
}
}
if (!empty($random_image_cache[$category_id])) {
if (!$return_file) {
show_image($random_image_cache[$category_id], "", $show_link);
$random_image = $site_template->parse_template($template);
return $random_image;
}
else {
return get_file_path($random_image_cache[$category_id]['image_thumb_file'], "thumb", $category_id, 0, 1);
}
}
}
function format_file_size($file_size = 0) {
//$file_size = intval($file_size);
if (!$file_size) {
return "n/a";
}
if (strlen($file_size) <= 9 && strlen($file_size) >= 7) {
$file_size = number_format($file_size / 1048576,1);
return $file_size." MB";
}
elseif (strlen($file_size) >= 10) {
$file_size = number_format($file_size / 1073741824,1);
return $file_size." GB";
}
else {
$file_size = number_format($file_size / 1024,1);
return $file_size." KB";
}
}
function get_remote_file_size($file_path) {
if (!CHECK_REMOTE_FILES) {
return 'n/a';
}
ob_start();
@readfile($file_path);
$file_data = ob_get_contents();
ob_end_clean();
return format_file_size(strlen($file_data));
}
function update_comment_count($image_id = 0, $user_id = 0) {
global $site_db, $user_table_fields;
if ($image_id) {
$sql = "SELECT COUNT(comment_id) AS comments
FROM ".COMMENTS_TABLE."
WHERE image_id = $image_id";
$countcomments = $site_db->query_firstrow($sql);
$sql = "UPDATE ".IMAGES_TABLE."
SET image_comments = ".$countcomments['comments']."
WHERE image_id = $image_id";
$site_db->query($sql);
}
if ($user_id != GUEST && $user_id && !empty($user_table_fields['user_comments'])) {
$sql = "SELECT COUNT(comment_id) AS comments
FROM ".COMMENTS_TABLE."
WHERE user_id = $user_id";
$countcomments = $site_db->query_firstrow($sql);
$sql = "UPDATE ".USERS_TABLE."
SET ".get_user_table_field("", "user_comments")." = ".$countcomments['comments']."
WHERE ".get_user_table_field("", "user_id")." = $user_id";
$site_db->query($sql);
}
}
function update_image_rating($image_id, $rating) {
global $site_db, $user_info;
$sql = "SELECT cat_id, image_votes, image_rating
FROM ".IMAGES_TABLE."
WHERE image_id = $image_id";
$image_row = $site_db->query_firstrow($sql);
if (check_permission("auth_vote", $image_row['cat_id'])) {
$old_votes = $image_row['image_votes'];
$old_rating = $image_row['image_rating'];
$new_rating = (($old_rating * $old_votes) + $rating) / ($old_votes + 1);
$new_rating = sprintf("%.2f", $new_rating);
if ($user_info['user_id'] != GUEST) {
$sql = "INSERT INTO ".VOTED_TABLE."
(user_id, image_id, vote)
VALUES
(".$user_info['user_id'].", ".$image_id.", ".$rating.")";
$site_db->query($sql);
}
$sql = "UPDATE ".IMAGES_TABLE."
SET image_votes = ($old_votes + 1), image_rating = '$new_rating'
WHERE image_id = $image_id";
$site_db->query($sql);
}
}
function check_email($email) {
return (preg_match('/^[-!#$%&\'*+\\.\/0-9=?A-Z^_`{|}~]+@([-0-9A-Z]+\.)+([0-9A-Z]){2,4}$/i', $email)) ? 1 : 0;
}
function format_date($format, $timestamp) {
global $user_info;
$timezone_offset = (defined("TIME_OFFSET")) ? TIME_OFFSET : 0;
return date($format, $timestamp + (3600 * $timezone_offset));
}
function format_url($url) {
if (empty($url)) {
return '';
}
if (!preg_match("/^https?:\/\//i", $url)) {
$url = "http://".$url;
}
return $url;
}
function replace_url($text) {
$text = " ".$text." ";
$url_search_array = array(
"#([^]_a-z0-9-=\"'\/])www\.([a-z0-9\-]+)\.([a-z0-9\-.\~]+)((?:/[^, \(\)<>\n\r]*)?)#si",
"#([^]_a-z0-9-=\"'\/])([a-z]+?)://([^, \(\)<>\n\r]+)#si"
);
$url_replace_array = array(
"\\1<a href=\"http://www.\\2.\\3\\4\" target=\"_blank\" rel=\"nofollow\">www.\\2.\\3\\4</a>",
"\\1<a href=\"\\2://\\3\" target=\"_blank\" rel=\"nofollow\">\\2://\\3</a>",
);
$text = preg_replace($url_search_array, $url_replace_array, $text);
if (strpos($text, "@")) {
$text = preg_replace("#([\n ])([a-z0-9\-_.]+?)@([\w\-]+\.([\w\-\.]+\.)?[\w]+)#i", "\\1<a href=\"mailto:\\2@\\3\">\\2@\\3</a>", $text);
}
return substr($text, 1, -1);
}
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);
}
// Replace { to prevent parsing in templates
global $site_template;
$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);
}
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\" rel=\"nofollow\">\\8</a>",
"<a href=\"\\5\" target=\"_blank\" rel=\"nofollow\">\\7</a>",
"<a href=\"http://www.\\5\" target=\"_blank\" rel=\"nofollow\">www.\\5</a>",
"<a href=\"\\4\" target=\"_blank\" rel=\"nofollow\">\\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);
}
$text = str_replace("\\'", "'", $text);
// Smilie Mod
$text = show_smilies($text);
// End Smilie Mod
return $text;
}
function utf8_to_htmlentities($source) {
// array used to figure what number to decrement from character order
// value
// according to number of characters used to map unicode to ascii by
// utf-8
$decrement = array();
$decrement[4] = 240;
$decrement[3] = 224;
$decrement[2] = 192;
$decrement[1] = 0;
// the number of bits to shift each charNum by
$shift = array();
$shift[1][0] = 0;
$shift[2][0] = 6;
$shift[2][1] = 0;
$shift[3][0] = 12;
$shift[3][1] = 6;
$shift[3][2] = 0;
$shift[4][0] = 18;
$shift[4][1] = 12;
$shift[4][2] = 6;
$shift[4][3] = 0;
$pos = 0;
$len = strlen($source);
$str = '';
while ($pos < $len) {
$asciiPos = ord(substr($source, $pos, 1));
if (($asciiPos >= 240) && ($asciiPos <= 255)) {
// 4 chars representing one unicode character
$thisLetter = substr($source, $pos, 4);
$pos += 4;
}
elseif (($asciiPos >= 224) && ($asciiPos <= 239)) {
// 3 chars representing one unicode character
$thisLetter = substr($source, $pos, 3);
$pos += 3;
}
else if (($asciiPos >= 192) && ($asciiPos <= 223)) {
// 2 chars representing one unicode character
$thisLetter = substr($source, $pos, 2);
$pos += 2;
}
else {
// 1 char (lower ascii)
$thisLetter = substr($source, $pos, 1);
$pos += 1;
}
// process the string representing the letter to a unicode entity
$thisLen = strlen($thisLetter);
$thisPos = 0;
$decimalCode = 0;
while ($thisPos < $thisLen) {
$thisCharOrd = ord(substr($thisLetter, $thisPos, 1));
if ($thisPos == 0) {
$charNum = intval($thisCharOrd - $decrement[$thisLen]);
$decimalCode += ($charNum << $shift[$thisLen][$thisPos]);
} else {
$charNum = intval($thisCharOrd - 128);
$decimalCode += ($charNum << $shift[$thisLen][$thisPos]);
}
$thisPos++;
}
if (($thisLen == 1) && ($decimalCode <= 128)) {
$encodedLetter = $thisLetter;
}
else {
$encodedLetter = '&#' . $decimalCode . ';';
}
$str .= $encodedLetter;
}
return $str;
}
function uni_to_utf8($char) {
$char = intval($char);
switch ($char) {
case ($char < 128) :
// its an ASCII char no encoding needed
return chr($char);
case ($char < 1 << 11) :
// its a 2 byte UTF-8 char
return chr(192 + ($char >> 6)) .
chr(128 + ($char & 63));
case ($char < 1 << 16) :
// its a 3 byte UTF-8 char
return chr(224 + ($char >> 12)) .
chr(128 + (($char >> 6) & 63)) .
chr(128 + ($char & 63));
case ($char < 1 << 21) :
// its a 4 byte UTF-8 char
return chr(240 + ($char >> 18)) .
chr(128 + (($char >> 12) & 63)) .
chr(128 + (($char >> 6) & 63)) .
chr(128 + ($char & 63));
case ($char < 1 << 26) :
// its a 5 byte UTF-8 char
return chr(248 + ($char >> 24)) .
chr(128 + (($char >> 18) & 63)) .
chr(128 + (($char >> 12) & 63)) .
chr(128 + (($char >> 6) & 63)) .
chr(128 + ($char & 63));
default:
// its a 6 byte UTF-8 char
return chr(252 + ($char >> 30)) .
chr(128 + (($char >> 24) & 63)) .
chr(128 + (($char >> 18) & 63)) .
chr(128 + (($char >> 12) & 63)) .
chr(128 + (($char >> 6) & 63)) .
chr(128 + ($char & 63));
}
}
// Smilie Mod
function show_smilies($text) {
$search_smilie = array(":)",":-)",":smile:", ":D",":-D",":grin:", ":(",":-(",":sad:", "8o","8-o",":shock",":eek:", ":?:", ":?",":-?",":???:", "8)","8-)",":cool:", ":x",":-x",":mad:", ":p",":P",":-p",":-P",":razz:", ":*",":-*",":oops:", ":'(",":'-(",":cry:", ">:(",">:-(",":evil:", ":roll:", ";)",";-)",":wink:", ":|",":-|",":neutral:", ":o",":-o", ">:)",">:-)",":twisted:", ":lol:","LOL", ":!:", ":idea:", ":arrow:", ":mrgreen:");
$replace_smilie = array("smile","smile","smile", "biggrin","biggrin","biggrin", "sad","sad","sad", "eek","eek","eek","eek", "question", "confused","confused","confused", "cool","cool","cool", "mad","mad","mad", "razz","razz","razz","razz","razz", "redface","redface","redface", "cry","cry","cry", "evil", "evil", "evil", "rolleyes", "wink","wink","wink", "neutral","neutral","neutral", "surprised","surprised", "twisted","twisted","twisted", "lol","lol", "exclaim", "idea", "arrow", "mrgreen");
for($smile=0;$smile<count($search_smilie);$smile++){
$text = str_replace($search_smilie[$smile],"<img src=\"".TEMPLATE_PATH."/smilies/icon_".$replace_smilie[$smile].".gif\">",$text);
}
return $text;
}
// End Smilie Mod
function get_user_info($user_id = 0) {
global $site_db, $user_table_fields;
$user_info = 0;
if ($user_id != 0 && $user_id != GUEST) {
$sql = "SELECT *
FROM ".USERS_TABLE."
WHERE ".get_user_table_field("", "user_id")." = $user_id";
if ($user_info = $site_db->query_firstrow($sql)) {
foreach ($user_table_fields as $key => $val) {
if (isset($user_info[$val])) {
$user_info[$key] = $user_info[$val];
}
elseif (!isset($user_info[$key])) {
$user_info[$key] = "";
}
}
}
}
return $user_info;
}
function get_icq_status($uin) {
if (!is_numeric($uin)) return false;
$fp = @fsockopen('status.icq.com', 80, $errno, $errstr, 8);
if (!$fp) return false;
$request = "HEAD /online.gif?icq=$uin&img=3 HTTP/1.0\r\n"
."Host: status.icq.com\r\n"
."Connection: close\r\n\r\n";
fputs($fp, $request);
do {
$response = fgets($fp, 1024);
}
while (!feof($fp) && !stristr($response, 'Location'));
fclose($fp);
if (strstr($response, 'online1')) return 'online';
if (strstr($response, 'online0')) return 'offline';
if (strstr($response, 'online2')) return 'disabled';
return FALSE;
}
function add_to_lightbox($id) {
global $user_info, $site_db;
$id = intval($id);
if (!$id) {
return false;
}
$lightbox_ids = $user_info['lightbox_image_ids'];
$lightbox_array = explode(" ", $lightbox_ids);
if (!in_array($id, $lightbox_array)) {
$lightbox_ids .= " ".$id;
}
$user_info['lightbox_image_ids'] = trim($lightbox_ids);
$user_info['lightbox_lastaction'] = time();
$sql = "UPDATE ".LIGHTBOXES_TABLE."
SET lightbox_lastaction = ".$user_info['lightbox_lastaction'].", lightbox_image_ids = '".$user_info['lightbox_image_ids']."'
WHERE user_id = ".$user_info['user_id'];
return ($site_db->query($sql)) ? 1 : 0;
}
function remove_from_lightbox($id) {
global $user_info, $site_db;
$lightbox_array = explode(" ",$user_info['lightbox_image_ids']);
foreach ($lightbox_array as $key => $val) {
if ($val == $id) {
unset($lightbox_array[$key]);
}
}
$user_info['lightbox_image_ids'] = trim(implode(" ", $lightbox_array));
$user_info['lightbox_lastaction'] = time();
$sql = "UPDATE ".LIGHTBOXES_TABLE."
SET lightbox_lastaction = ".$user_info['lightbox_lastaction'].", lightbox_image_ids = '".$user_info['lightbox_image_ids']."'
WHERE user_id = ".$user_info['user_id'];
return ($site_db->query($sql)) ? 1 : 0;
}
function clear_lightbox() {
global $user_info, $site_db;
$current_time = time();
$sql = "UPDATE ".LIGHTBOXES_TABLE."
SET lightbox_image_ids = '', lightbox_lastaction = $current_time
WHERE user_id = ".$user_info['user_id'];
if ($site_db->query($sql)) {
$user_info['lightbox_image_ids'] = "";
$user_info['lightbox_lastaction'] = $current_time;
return true;
}
else {
return false;
}
}
function check_lightbox($id) {
global $user_info;
$lightbox_array = explode(" ", $user_info['lightbox_image_ids']);
return in_array($id, $lightbox_array);
}
function get_random_key($db_table = "", $db_column = "") {
global $site_db;
$key = md5(uniqid(microtime()));
if ($db_table != "" && $db_column != "") {
$i = 0;
while ($i == 0) {
$sql = "SELECT ".$db_column."
FROM ".$db_table."
WHERE ".$db_column." = '$key'";
if ($site_db->is_empty($sql)) {
$i = 1;
}
else {
$i = 0;
$key = md5(uniqid(microtime()));
}
}
}
return $key;
}
function get_subcat_ids($cid = 0, $cat_id = 0, $cat_parent_cache) {
global $subcat_ids;
if (!isset($cat_parent_cache[$cid])) {
return false;
}
foreach ($cat_parent_cache[$cid] as $key => $val) {
if (check_permission("auth_viewcat", $val)) {
$subcat_ids[$cat_id][] = $val;
get_subcat_ids($val, $cat_id, $cat_parent_cache);
}
}
return $subcat_ids;
}
function get_subcategories($parent_id) {
global $cat_parent_cache, $cat_cache, $site_sess, $config;
if (!isset($cat_parent_cache[$parent_id]) || $config['num_subcats'] < 1) {
return "";
}
$visible_cat_cache = array();
foreach ($cat_parent_cache[$parent_id] as $key => $val) {
if (check_permission("auth_viewcat", $val)) {
$visible_cat_cache[$key] = $val;
}
}
$num_subs = sizeof($visible_cat_cache);
$sub_cat_list = "";
$i = 1;
foreach ($visible_cat_cache as $subcat_id) {
if ($i <= $num_subs && $i <= $config['num_subcats']) {
$sub_url = $site_sess->url(ROOT_PATH."categories.php?".URL_CAT_ID."=".$subcat_id);
$sub_cat_list .= "<a href=\"".$sub_url."\" class=\"subcat\">".format_text($cat_cache[$subcat_id]['cat_name'], 2)."</a>";
if ($i != $config['num_subcats'] && $i < $config['num_subcats'] && $i < $num_subs) {
$sub_cat_list .= ", ";
}
if ($i == $config['num_subcats'] && $i < $num_subs) {
$sub_cat_list .= " ...\n";
}
}
$i++;
}
return $sub_cat_list;
}
function get_categories($cat_id = 0) {
global $site_template, $site_db, $site_sess, $config, $lang;
global $cat_cache, $cat_parent_cache, $new_image_cache, $subcat_ids;
$cattable_width = ceil((intval($config['cat_table_width'])) / $config['cat_cells']);
if ((substr($config['cat_table_width'],-1)) == "%") {
$cattable_width .= "%";
}
if (!isset($cat_parent_cache[$cat_id])) {
return "";
}
$visible_cat_cache = array();
foreach ($cat_parent_cache[$cat_id] as $key => $val) {
if (check_permission("auth_viewcat", $val)) {
$visible_cat_cache[$key] = $val;
}
}
if (empty($visible_cat_cache)) {
return "";
}
$total = sizeof($visible_cat_cache);
$table_columns = (intval($config['cat_cells'])) ? intval($config['cat_cells']) : 2;
if ($total <= $table_columns) {
$table_rows = 1;
}
else {
$table_rows = $total / $table_columns;
if ($total >= $table_columns && !is_integer($table_rows)) {
$table_rows = intval($table_rows) + 1;
}
}
$categories = "\n<table width=\"".$config['cat_table_width']."\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">\n<tr>\n<td valign=\"top\" width=\"".$cattable_width."\" class=\"catbgcolor\">\n";
$categories .= "<table border=\"0\" cellpadding=\"".$config['cat_table_cellpadding']."\" cellspacing=\"".$config['cat_table_