4images Forum & Community
4images Modifications / Modifikationen => Mods & Plugins (Releases & Support) => Topic started by: V@no on April 30, 2003, 10:23:09 PM
-
------------------------------------------------
This MOD originaly was created by Cr@zy Sash, but after I tryed to troubleshooting it, I got an idea how to make it more advanced and using only one entry in the database for each message instead of doublicating for each folder.
Still 51% of credit goes to Cr@zy Sash ;) :D
------------------------------------------------
-----------| Overview |-----------------------
With this MOD members will be able send private messages to other members.
Each member has 3 folders:
- Inbox
- Sentbox
- Outbox
Q: Whats the difference betwen Sentbox and Outbox?
A: In Sentbox stores messages that have been received (the recipient read them). In Outbox stores messages that have not been received (the recipient has not read them yet).
Advantage of having Outbox is that u can edit messages from that folder (only).
---- Updated 5-03-2003 2pm (EST) ----
Now also, members can set to receive email notify or open popup window when received new message.
-----------| Changed Files |--------------------
/member.php
/details.php
/includes/constants.php
/includes/page_header.php
/lang/<yourlanguage>/main.php
<templates of your chose>
---- Updated 5-03-2003 2pm (EST) ----
/includes/db_field_definitions.php
/templates/<yourtemplate>/member_editprofile.html
/templates/<yourtemplate>/header.html
-----------| New file |---------------------------
pms.php
-----------| New templates |--------------------
pms.html
pms_folder.html
pms_view.html
pms_new.html
pms_delete.html
pms_perpage_dropdown_form.html
---- new added 5-03-2003 2pm (EST) ----
pms_notify.html
-----------| New images |----------------------
asc_order.png
desc_order.png
-----------| Installation |-----------------------
Step 1. Updated 5-03-2003 2pm (EST)
Download "PMS (http://come.no-ip.com/files.php?id=11)" package.
Extract files acording this:
/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
---- new added 5-03-2003 2pm (EST) ----
/lang/<yourlanguage>/email/notify.html
Step 2.
Open /includes/constants.php
At the end of the file, just before closing ?> add this://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. Updated 5-03-2003 2pm (EST)
Open /lang/<yourlanguage>/main.php
At the end of the file, just before closing ?> add this://--- 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.
In your browser start pms_install.php
* in address bar type something like this: http://YOURSITE/4images/pms_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/pms.php
Step 5. Updated 5-03-2003 2pm (EST)
Open /includes/page_header.php
Find:$site_template->register_vars(array(
"media_url" => MEDIA_PATH,
Replace with://-----------------------------------------------------
//--- 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()\"";
}
}
$site_template->register_vars(array(
"pms_boxes" => ($user_info['user_level'] < USER) ? "" : $inbox." | ".$sentbox." | ".$outbox." | ".$newpms,
"pms_popup_script" => $pms_popup_script,
"pms_popup_header" => $pms_popup_header,
"media_url" => MEDIA_PATH,
Step 6.
Edit templates where u want to show folders links.
Use those tags:
{pms_boxes} - this will show folders
{pms} - this will show "You have 2 new images in Inbox"
Step 7.
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."pms.php?action=reply&user_id=".$user_row['user_id'])."\" alt=\"".$lang['pms_user_pm_alt']."\">".$lang['pms_user_pm']."</a>" : "",
Step 8. Updated 05-21-03
Open /details.php
Find: "comment_id" => $comment_row[$i]['comment_id'],
Add after: "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 9.
Open:
/templates/<yourtemplate>/member_profile.html
/templates/<yourtemplate>/comment_bit.html
Use this tag to show link to PM the user:
{lang_pm}
Step 10. new added 05-03-2003 2pm (EST)
Open /includes/db_field_definitions.php
At the end of the file, just before closing ?> add this:$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 11. new added 05-03-2003 2pm (EST)
Open /templates/<yourtemplate>/member_editprofile.html
Add this: <tr>
<td class="row2"><b>{lang_user_pms_email}</b></td>
<td class="row2">
<input type="radio" name="user_pms_email" value="1"{user_pms_email_yes} />
{lang_yes}
<input type="radio" name="user_pms_email" value="0"{user_pms_email_no} />
{lang_no}
</td>
</tr>
<tr>
<td class="row1"><b>{lang_user_pms_popup}</b></td>
<td class="row1">
<input type="radio" name="user_pms_popup" value="1"{user_pms_popup_yes} />
{lang_yes}
<input type="radio" name="user_pms_popup" value="0"{user_pms_popup_no} />
{lang_no}
</td>
</tr>
Step 12. new added 05-03-2003 2pm (EST)
Open /templates/<yourtemplate>/header.html
1. in between <head> and </head> add this:
{pms_popup_script}
2. inside <body> tag add {pms_popup_header}
Should looks like this: <body {pms_popup_header}
-----------| Note |-----------------------------
All templates where created for my site design, and just little bit adopted for default teplate. Because of that some colors ar missing - that's your work now ;).
Also, I didnt remove one, might be useful, feature - different color for "success" messages and "warning/error".
If u wish use it, here what u need to do:
create two new classes in style.css for examle:
.msg0 {
background-color: #FFCECE;
color: #2F6B9D;
}
.msg1 {
background-color: #CEFFDD;
color: #2F6B9D;
}
then use something like this in the pms.html template:
class="msg{msg_color}"
-
vano, osobenno udalos' nazvanie :lol: :lol: :lol:
-
aga, no ne moya ideya. :D
-
didn't insert this mod yet, but if this thing works... its AWESOME!!!!!!!
it would be cool if every comment made to user images would be forward to his inbox
GREAT MOD!!!
-
I had follow the instruction to install PMS to my 4images system. Unfortunately, there was a problem occured.
Please help me to solve it.
Jackie
bid@jackie.net
--> http://album.barndisco.com/pms.php?action=new
-
I had follow the instruction to install PMS to my 4images system. Unfortunately, there was a problem occured.
Please help me to solve it.
Agree with Cr@zy Sash ;)
if u where talking about JavaScript error, and that most of BBCode buttons dont work, I fixed it, just download the package again, and replace pms.php and pms_new.html files.
-
If you click into the message box, it will pop-up the message box say error.
Can you fix it??
:cry:
I had follow the instruction to install PMS to my 4images system. Unfortunately, there was a problem occured.
Please help me to solve it.
Agree with Cr@zy Sash ;)
if u where talking about JavaScript error, and that most of BBCode buttons dont work, I fixed it, just download the package again, and replace pms.php and pms_new.html files.
-
did u redownload the package?
btw, I dont see any error messages when I click into the message box.
only when I click on "B", "I" or "U" buttons. But that I fixed in the updated package.
P.S. u might want first delete internet cache, before u download package again.
[EDITED] ah, yes, u where right, it showed error message on text area click...that's because I use different BBCode editor at my site...
Fixed that too.
-
I'm using IE 5.0, I still not work normal to the PMS.
Can you e-mail pms.php & pms_new.html to me.
Jackie
jackie911@so-net.com.hk
Thanks a lot.
did u redownload the package?
btw, I dont see any error messages when I click into the message box.
only when I click on "B", "I" or "U" buttons. But that I fixed in the updated package.
P.S. u might want first delete internet cache, before u download package again.
[EDITED] ah, yes, u where right, it showed error message on text area click...that's because I use different BBCode editor at my site...
Fixed that too.
-
I'm using IE 5.0, I still not work normal to the PMS.
Can you e-mail pms.php & pms_new.html to me.
Jackie
jackie911@so-net.com.hk
Thanks a lot.
did u redownload the package?
btw, I dont see any error messages when I click into the message box.
only when I click on "B", "I" or "U" buttons. But that I fixed in the updated package.
P.S. u might want first delete internet cache, before u download package again.
[EDITED] ah, yes, u where right, it showed error message on text area click...that's because I use different BBCode editor at my site...
Fixed that too.
-
Can I make a Group Mail ??
-
Can I make a Group Mail ??
hum? :?
-
Is is possible to do it??
Can I make a Group Mail ??
hum? :?
-
yes, but I didnt want do it, because its a good way for spamming. 8)
-
Any information about this MOD??
yes, but I didnt want do it, because its a good way for spamming. 8)
-
Found little bug (already updated the package)
when u edit messages in the Outbox, it wouldnt update recipent if u change it.
so, in pms.php find: SET pms_date = $time, pms_subject = '$subject', pms_text = '$message', pms_bbcode = $bbcode, pms_html = $html, pms_ip = '".$session_info['session_ip']."'
Replace with: SET pms_date = $time, pms_to = $user_id, pms_subject = '$subject', pms_text = '$message', pms_bbcode = $bbcode, pms_html = $html, pms_ip = '".$session_info['session_ip']."'
-
no i mean just a admin function maybe put as plugin in admin panel...
Great idea!
here u go the plugin:
Update 05-04-2003 8pm (EST)
---------| Installation |----------------
Create /admin/plugins/pms_to_members.php
with this code:<?php // PLUGIN_TITLE: Send PMs to members
$nozip = 1;
define('IN_CP', 1);
$root_path = (eregi("\/plugins\/", $PHP_SELF)) ? "./../../" : "./../";
define('ROOT_PATH', $root_path);
require(ROOT_PATH.'admin/admin_global.php');
if ($action == "") {
$action = "pmsusers";
}
show_admin_header();
if ($action == "sendpms") {
$error = array();
$stealth = ($HTTP_POST_VARS['stealth']) ? 1 : 0;
$subject = stripslashes(trim($HTTP_POST_VARS['subject']));
$message = stripslashes(trim($HTTP_POST_VARS['message']));
if ($subject == "") {
$error['subject'] = 1;
}
if ($message == "") {
$error['message'] = 1;
}
if (!isset($HTTP_POST_VARS['pms']) || empty($HTTP_POST_VARS['pms'])) {
$error['pms'] = 1;
}
if (empty($error)) {
$pms = $HTTP_POST_VARS['pms'];
include(ROOT_PATH.'includes/email.php');
foreach ($pms as $key) {
if ($key) {
$sql = "INSERT INTO ".PMS_TABLE."
(pms_date, pms_to, pms_from, pms_subject, pms_type, pms_text, pms_bbcode, pms_html, pms_ip)
VALUES
(".time().", ".$key.", ".(($stealth) ? 0 : $user_info['user_id']).", '".$subject."', ".PMS_UNREAD.", '".$message."', 1, 1, '0')";
$result = $site_db->query($sql);
$result_error = ($result) ? $result_error : $result_error++;
$user_to = get_user_info($key);
if ($user_to['user_pms_email']){
@set_time_limit(1200);
$site_email = new Email();
// $pms_url = "http://come.no-ip.com/pms.php?action=view&mode=inbox&id=".$site_db->get_insert_id();
$pms_url = $script_url."/pms.php?action=view&mode=inbox&id=".$site_db->get_insert_id();
$site_email->set_to($user_to['user_email']);
$site_email->set_subject($lang['pms_email_new']);
$site_email->register_vars(array(
"user_name" => $user_to['user_name'],
// "site_url" => "http://come.no-ip.com",
"site_url" => $script_url,
"url" => $pms_url,
"site_name" => $config['site_name']
));
$site_email->set_body("pms_notify", $config['language_dir_default']);
$site_email->send_email();
}
}
}
echo (!$result_error) ? "Messages sent successfully" : "Error sending messages";
echo "<p>";
show_text_link($lang['back'], "javascript:history.back(1)");
}
else {
$msg = sprintf("<span class=\"marktext\">%s</span>", $lang['lostfield_error']);
$action = "pmsusers";
}
}
if ($action == "pmsusers") {
if ($msg != "") {
printf("<b>%s</b>\n", $msg);
}
show_form_header("pms_to_members.php", "sendpms");
show_table_header("Send PMs", 2);
show_input_row("Subject", "subject", "", 45);
show_textarea_row("Message", "message", "", 60, 20);
$select = "<select name=\"pms[]\" size=\"15\" multiple=\"multiple\">\n";
$sql = "SELECT ".get_user_table_field("", "user_id").get_user_table_field(", ", "user_level").get_user_table_field(", ", "user_name")."
FROM ".USERS_TABLE."
WHERE ".get_user_table_field("", "user_id")." <> ".GUEST." AND ".get_user_table_field("", "user_id")." <> ".$user_info['user_id']."
ORDER BY ".get_user_table_field("", "user_level")." DESC, ".get_user_table_field("", "user_name")." ASC";
$result = $site_db->query($sql);
$level = 1000;
while ($row = $site_db->fetch_array($result)) {
$user_level = $row[$user_table_fields['user_level']];
if ($level != $user_level && $user_level == ADMIN) {
$select .= "<option value=\"0\">__________________________</option>\n";
$select .= "<option value=\"0\" class=\"dropdownmarker\">".$lang['userlevel_admin']."</option>\n";
}
elseif ($level != $user_level && $user_level == USER) {
$select .= "<option value=\"0\">__________________________</option>\n";
$select .= "<option value=\"0\" class=\"dropdownmarker\">".$lang['userlevel_registered']."</option>\n";
}
elseif ($level != $user_level && $user_level == USER_AWAITING) {
$select .= "<option value=\"0\">__________________________</option>\n";
$select .= "<option value=\"0\" class=\"dropdownmarker\">".$lang['userlevel_registered_awaiting']."</option>\n";
}
$user_id = $row[$user_table_fields['user_id']];
$user_name = $row[$user_table_fields['user_name']];
$selected = (isset($HTTP_POST_VARS['pms']) && !in_array($user_id, $HTTP_POST_VARS['pms'])) ? "" : " selected=\"selected\"";
$select .= "<option value=\"".$user_id."\"".$selected.">» ".$user_name."</option>\n";
$level = $user_level;
}
$select .= "</select>\n";
$title = $lang['select_email_user'];
if (isset($error['pms'])) {
$title = sprintf("<span class=\"marktext\">%s *</span>", $title);
}
$stealth = (isset($HTTP_POST_VARS['stealth'])) ? " checked" : "";
show_custom_row($title, $select);
show_custom_row("", "<input type=\"checkbox\" name=\"stealth\" value=\"1\"".$stealth."> Stealth mode. If u check this, member wont know from who the message came");
show_form_footer("Send", "", 2);
}
show_admin_footer();
?>
if u did everything correctly, u'll find new link at the left-bottom in the Admin Control Panel.
If u already installed the MOD and whant use "Stealth" mode, u'll need do small correction in the MOD (I have updated the original MOD):
in pms.php find: $user_id = $result['pms_from'];
$reply = 1;
Replace with: $user_id = ($result['pms_from']) ? $result['pms_from'] : 0;
$reply = ($user_id) ? 1 : 0;
-
Great Thanks to ALL.
:lol:
-
I think it would be great to send e-mail notification to user which received private message. And the other thing is pop-up window, when user logins, if she / he has got a new private message. :)
-
yes, I just updated the original post.
U will need redo almost all steps :(
even run pms_install.php script one time (if u see some errors about tables dublication, just ignore them)
also, the plugin was updated too.
-
So far some things seem to be working. I already had a phpbb forum and its displaying when I have message there in the popup. However when I try to click on the PM field in the comment section or profile, I get the following:
Fatal error: Call to undefined function: get_smiles_text() in /home/test/public_html/pms.php on line 222
Any ideas?
-
ops...
either redownload the package and replace your pms.php
or open pms.php find: "smiles_text" => get_smiles_text()
delete it, and also delete coma ( , ) at the end of line above that one.
-
Thanks V@no, works great!
-
and what about the picture comments, can they be forward to picture owner inbox?
i think it would be really cool :)
-
and what about the picture comments, can they be forward to picture owner inbox?
i think it would be really cool :)
and what do want to do with comments posted by guests?
-
in my gallery, guests are not allowed to comment
only registed members can
-
Fixed little bug, that didnt sort correctly messages by recipient/sender name.
in pms.php find: $order_by = "pms_".$sort." ".$sort_order.", pms_".$sort_default." ".$sort_order;
Replace with: $order_by = (($sort == $box_table) ? "u.user_name" : "pms_".$sort)." ".$sort_order.", pms_".$sort_default." ".$sort_order;
-
I used the smile text for bbcode. Unfortunately, there are some errors.
I'm not an expert, please help me to debug it.
http://jackie.net/barndisco.com/album/pms.php?action=new
Jackie
jackie911@so-net.com.hk
-
I used the smile text for bbcode. Unfortunately, there are some errors.
I'm not an expert, please help me to debug it.
Nothing personaly, but next time I wont even click :roll:
I'm not sure what u did, but I have tryed your site yesterday and it was working perfectly!
-
Where can I insert this code to pms.php
"smiles_text" => get_smiles_text()
I used the smile text for bbcode. Unfortunately, there are some errors.
I'm not an expert, please help me to debug it.
Nothing personaly, but next time I wont even click :roll:
I'm not sure what u did, but I have tryed your site yesterday and it was working perfectly!
-
Where can I insert this code to pms.php
find: "lang_list_item_prompt" => $lang['list_item_prompt']
Replace with: "lang_list_item_prompt" => $lang['list_item_prompt'],
"smiles_text" => get_smiles_text()
-
I get this error plz help
DB Error: Bad SQL Query: SELECT COUNT(pms_id) AS total FROM 4images_pms WHERE pms_to = 1 AND (pms_type = 2 OR pms_type = 1 OR pms_type = 3)
Table 'v15168.4images_pms' doesn't exist
DB Error: Bad SQL Query: SELECT COUNT(pms_id) AS total FROM 4images_pms WHERE pms_from = 1 AND pms_type = 3
Table 'v15168.4images_pms' doesn't exist
DB Error: Bad SQL Query: SELECT COUNT(pms_id) AS total FROM 4images_pms WHERE pms_from = 1 AND (pms_type = 2 OR pms_type = 0)
Table 'v15168.4images_pms' doesn't exist
DB Error: Bad SQL Query: SELECT COUNT(pms_id) AS new FROM 4images_pms WHERE pms_to = 1 AND pms_type = 3
Table 'v15168.4images_pms' doesn't exist
DB Error: Bad SQL Query: SELECT pms_date FROM 4images_pms WHERE pms_to = 1 AND pms_type = 3 ORDER BY pms_date DESC
Table 'v15168.4images_pms' doesn't exist
or see it at my hp http://www.fos-spion.de/4images1.7/4images/
-
did u do step 4.?
-
den vierten schritt hab ich gemacht und das script hat auch angezeigt dass die installation correct verlaufen ist, nachem ich aber die pms. php aufgerufen habe kam dieser error[/u]
-
vielleicht liegt das Problem daran das ich folgenden Code in der member.php nicht finde.
$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,
anstatt dieses codes hab ich bei mir nur folgenden gefunden
$site_template->register_vars(array(
"user_id" => $user_row['user_id'],
"user_name" => htmlspecialchars($user_row['user_name']),
und den neuen darunter geschrieben!
-
da steht nichts von erstetzen in step 7
is nur komisch das der codein meiner member.php anders aussieht
für eure Hilfe wär ich sehr dankbar
thx tobi
-
hat funktioniert 1000 danke
-
ich hab mir das neue package nochmals runtergeladen und frisch installiert, nur wenn ich jetzt auf die pm gehe, dann sieht das design plötzlich scheisse aus. hab 3x am bildschirm das feld mit registrierter user, darunter ein minibild, in der mitte selbst ist dann die pn.
ein 2. problem. ich bekomme keine benachrichtigungsmail wenn eine neue pn angekommen ist. die funktion ist aber aktiviert worden.
der rest läuft bestens :D
-
es gibt noch ein problem
wenn ich eine neue nachricht schreiben will wird auf im browser ein fehler angezeigt
und die meisten BBCode optionen gehen nicht, d.h. es öffnen sich keine fenster
danke für Hilfe
-
well maybe it's better 2 say what your problem is...:lol:
By the way thanks 4 that
------------------------------------------------
This MOD originaly was created by Cr@zy Sash, but after I tryed to troubleshooting it, I got an idea how to make it more advanced and using only one entry in the database for each message instead of doublicating for each folder.
Still 51% of credit goes to Cr@zy Sash ;) :D
------------------------------------------------
Hy Crazy Sasch,
danke für dieses geniale Mod,
es ergeben sich aber mehrere Probleme. :oops: Bitte logge dich doch mal kurz in meine HP ein, denn ich kann das Prob nicht genau erklären. In der Gallerie habe ich die beiden Tags eingesetz und wenn ich alles richtig verstanden habe sollen sich die Inbox etc. in einem popup öffnen...tut es nicht auch beim scheiben einer neuen Nachricht funz nicht alles aber das zu erklären ist zu heftig.... mein URL http://www.foto-place.de
Zugangsdaten für dich:
Benutzername: Test
Passwort: Test
Habe alles durgesehen und keinen Fehler gefunden..
lg
Gabi
-
well maybe it's better 2 say what your problem is...:lol:
By the way thanks 4 that
------------------------------------------------
This MOD originaly was created by Cr@zy Sash, but after I tryed to troubleshooting it, I got an idea how to make it more advanced and using only one entry in the database for each message instead of doublicating for each folder.
Still 51% of credit goes to Cr@zy Sash ;) :D
------------------------------------------------
Hy Crazy Sasch,
danke für dieses geniale Mod,
es ergeben sich aber mehrere Probleme. :oops: Bitte logge dich doch mal kurz in meine HP ein, denn ich kann das Prob nicht genau erklären. In der Gallerie habe ich die beiden Tags eingesetz und wenn ich alles richtig verstanden habe sollen sich die Inbox etc. in einem popup öffnen...tut es nicht auch beim scheiben einer neuen Nachricht funz nicht alles aber das zu erklären ist zu heftig.... mein URL http://www.foto-place.de
Zugangsdaten für dich:
Benutzername: Test
Passwort: Test
Habe alles durgesehen und keinen Fehler gefunden..
lg
Gabi
Hy also das erste Prob habe ich gerade beseitigt bekommen...peinlich :oops: Musste natürlich das pms.html erst noch an meines anpassen....ich Schussel....
Nur ein Prob besteht noch...und zwar in der Userauswahl Box erscheinen keine Namen ist komplett weiß nur der default Text wird angezeigt "selekt a user" danach kommt nur noch weiß......
Noch eine 2 Frage da ich phpbb in meine Page includet habe kommen die user ja nicht auf die 4images member.php sondern ins Forum als "Normalzustand" müsste also das empangen und senden von pms eingestellt sein bei allen usern. Ist dies so ???? Denn sonst würde sich der "leere" Mitgliederramen schon erklären :?:
Grüße
Gabi
-
Hy Crazy,
du hast einen kleinen Fehler in der lang Datei und zwar :
$lang['pms_sentbox'] = "Posteingang"; müsste POSTAUSGANG heissen.
ups und noch einen
$lang['pms_popup_confirm'] = "Du hast eine neue Nachricht. Drücke OK um die NAchricht zu sehen oder Abbrechen um diese BEnachrichtigung zu schließen.";
lg
Gabi
-
hier die URL zum BBcode Fehler
http://www.fos-spion.de/4images1.7/4images/pms.php?action=new
Login:
Ben: Test
PW: Test
versuch die button zu drücken udn klick mit der maus in das textfeld
dann siehst du auch unten im browser den Fehler
Danke
-
jo danke Gabi aber dazu musst du nicht nocheinmal den ganzen Code posten. Nimm den bitte aus deinbem Beitrag danke..
Schon erledigt :D
Sag konntest Du schon was raus bekommen warum das Skript bei mir net richtig funzt ?
-
Hi V@no
Thank you very much for working out this nice mod.
Everythink works fine but there is one thing left i need assistance for:
1)
If you are in view mode of a private mail you´ll find 2 buttons
answer & delete message.
When trying to delete a message in view mode first a message comes up asking if i am sure to delelte the mesasge...(yes/no option)....ok...but after pressing yes for confirmation i got a page not found error...
crazy but in inbox mod everything works fine....
2.) How can i redirect to another page after using the logout function when on pms page ???... i always got the message screen ....(after logging of from pms menu...you have to be logged in.....)
Thanks for help...!
Heiko
1.) I'm not sure why is that...works fine for me. maybe try to clear your interenet cache? cookies? if wont help, maybe u can give me the link so I can check it out?
2.) yes, sure, thx for the note! I will add one more step to fix this.
but for now, open logout.php
Find:if (!ereg("index.php", $url)
(this is just a part of long line ;)
then add after: && !ereg("pms.php", $url) so it should looks like this:
if (!ereg("index.php", $url) && !ereg("pms.php", $url)
again, remmber, this is only begining of the line ;) (I dont want post entire line, because my line is about double size of the original now :?
-
nein, ich hab nur die große ein wenig verändert!
-
Ok i will try to explain my problem with this Mod in english :oops: :oops:
I have installd the PMS Mod in my homepage everything seams to work but i can´t selekt a user. I think the problem is the inclusion from phpbb in my 4images homepage. The gallerie is now using user table fom the phpbord, so i think the skript cant read userstable. I build manuel the pms table in my forums table so the prefix is not 4images_pms it is now fotopl_pms what changes must i do in the script, that the pms.php can read user id etc. from forums table?
Code wieder rausgenommen !!!
Here is the pms.php meby somon can help me to fix this site. I hope somone could undarstand my problem...
lg
Gabi
-
also ich würde mir das ja gerne nochmal anschauen, aber dazu musst du den TEstaccount wieder aktivieren, damit kannich mich nimma einloggen...
Hy Crazy,
hast ja recht..war n bissel viel :oops: Der Account besteht aber noch
User: Test
PW: Test
Wichtig! Achte auf groß / kleinschreibung !!!!
lg
Gabi
Nachtrag:
Ich glaub ich werde irre !!!!! Ich habe mir gerade den Spaß gemacht und noch das ZusatzMOD Massen PM versenden installiert. Das funzt zu 100% absolut Fehlerfrei !!!!!
Ich gehe davon aus da ich ja das Mod mit dem "erweiterten bbcode verwende das der Text im Feld "user auswählen" einfach nur in weiß ist und ich deshalb keinen Namen sehe. Vom Adminbereich aus sind alle Namen sichtbar die angemeldet sind. Also funzt das Mod auch mit der Integration. Wo kann ich denn die Hintergrundfarbe von diesem Feld ändern ???? bzw. die Textfarbe ?????
-
Also das kannst du in er pms_new.html anpassen, oder wie die Datei gleich heißt...
Hy Cr@zy Sash,
danke für den Tip. Habe mal dort nachgesehen. Ausgerechnet die (Userbox) ist ein javaskript. Habe keinen Plan wie ich was ändern kann. Wenn ich dir den Code der pms_new.html per e-mail zuschicke, wüdest du da vieleicht mal reinschauen ???
lg
Gabi
-
brauchst du nicht ich weiß wie der ausschaut hab ja mitgearbeitet am script... :lol: :lol:
Öhm ja, also am besten fügst du dort einfach in the tag class="categoryselect" so und dann müsste das eigentlich gehen...
-
Öhm ja, also am besten fügst du dort einfach in the tag class="categoryselect" so und dann müsste das eigentlich gehen...[/quote]
Ja, ok....aber wo genau....ich habs an 2 Sellen ausprobiert und nix passiert :oops:
-
Inklusion of Mod works fine. Last Problem i have to fix is color of Useres in selectbox. in pms_new.html here are my changes in java skrip at the beginning of code. Everything works but ony the users i can´t see because bg colour is altways the same like text colour. Only default text is in FFFF00. Here are my changes in Java Script. Can someone please help me to fix it ???
<script language="JavaScript" src="bbcode2.js" type="text/javascript"class="categoryselect" style="color: #FFFF00"></script>
<script language="JavaScript"class="categoryselect" style="color: #FFFF00">
function emoticon2(text,space,area,popup) {
if (!proba) {
proba = document.commentform.comment_text;
}
emoticon2(text,space,area,popup);
}
</script>
<script language="JavaScript"class="categoryselect" style="color: #FFFF00">
var reply = "{reply}";
var user_list = "{user_list}";
var list = user_list.split(",");
var user_list = new Array();
var user_list_id = new Array();
var ii=0;
for (var i=0; i < (list.length/2); i++){
user_list[i] = list[ii+1];
user_list_id[i] = list[ii];
ii=ii+2;
}
function print_list(recipient){
if (reply != "") {
return reply+"<input type='hidden' name='user_id' class='categoryselect' style='color: #FFFF00' value='"+recipient+"'>";
}
result="<select name='user_id' class='categoryselect' style='color: #FFFF00' >";
result +="<option value='0' class='categoryselect' style='color: #FFFF00'>{lang_select_user}</option>\n";
result +="<option value='0' class='categoryselect' style='color: #FFFF00'>---------------------------------------</option>\n";
for (var i=0; i<user_list_id.length; i++){
if (recipient == user_list_id[i]) {
mark = " selected='selected'";
}else{
mark = "";
}
result +="<option value='"+user_list_id[i]+"'"+mark+"class='categoryselect' style='color: #FFFF00' >"+user_list[i]+"</option>\n";
}
result +="</select>\n";
return result;
}
</script>
lg
Gabi
-
Inklusion of Mod works fine. Last Problem i have to fix is color of Useres in selectbox. in pms_new.html here are my changes in java skrip at the beginning of code. Everything works but ony the users i can´t see because bg colour is altways the same like text colour. Only default text is in FFFF00. Here are my changes in Java Script. Can someone please help me to fix it ???
first delete all changes u made style="color: #FFFF00"
then, open style.css and create new class, with background and text color settings, name it for example "categoryselect_users" and then change the class name in the code u showed ;)
-
first delete all changes u made style="color: #FFFF00"
then, open style.css and create new class, with background and text color settings, name it for example "categoryselect_users" and then change the class name in the code u showed ;)
THX V@no,
oki i have build an new claas change code, but there is same problem like bevore. only default text is in colour FFFFOO the users are bg colour black and text too. Did i forgot something to change ??? Here is my fixt code:
<script language="JavaScript">
var reply = "{reply}";
var user_list = "{user_list}";
var list = user_list.split(",");
var user_list = new Array();
var user_list_id = new Array();
var ii=0;
for (var i=0; i < (list.length/2); i++){
user_list[i] = list[ii+1];
user_list_id[i] = list[ii];
ii=ii+2;
}
function print_list(recipient){
if (reply != "") {
return reply+"<input type='hidden' name='user_id' class='categoryselect_users' value='"+recipient+"'>";
}
result="<select name='user_id' class='categoryselect_users'>";
result +="<option value='0' class='categoryselect_users'>{lang_select_user}</option>\n";
result +="<option value='0' class='categoryselect_users'>---------------------------------------</option>\n";
for (var i=0; i<user_list_id.length; i++){
if (recipient == user_list_id[i]) {
mark = " selected='selected'";
}else{
mark = "";
}
result +="<option value='"+user_list_id[i]+"'"+mark+"class='categoryselect_users'>"+user_list[i]+"</option>\n";
}
result +="</select>\n";
return result;
}
</script>
regrets from germany
Gabi
-
make sure u specifyed both colors for font and backround:
.categoryselect_users {
background-color: red;
color: #ffff00;
}
-
Changed code once more like your exampel bg colour red.... same prob like before.... :oops:
you can see that in my page http://www.foto-place.de
User: Test
PW: Test
-
seems just perfecly working for me...
the problem that u can not see users is because u have board integration, and this mod doesnt support any integrations...
sorry, I cant help u with that, but try do same thing what this guy/girl did for another mod:
http://4homepages.de/forum/viewtopic.php?p=23758#23758
-
seems just perfecly working for me...
the problem that u can not see users is because u have board integration, and this mod doesnt support any integrations...
sorry, I cant help u with that, but try do same thing what this guy/girl did for another mod:
http://4homepages.de/forum/viewtopic.php?p=23758#23758
V@no,
i dont think that integation is the problem because send mass pm from admin panel with same mod works to 100%
-
the mass send doesnt use user names it uses only user ids ;)
so, if read the posts I showed above, u can see what I'm talking about: in phpbb users database table has different name that stores names, that's the problem in your case. u'll need replace all user_name in the mod to username, in the same way as in the thread above
-
oki,
i changed all user_name to username in pms.php but now i get this errormassage, and unserselektbox is empty(only defaulttext is still there):
>DB Error Bad SQL Query SELECT user_id, user_level
FROM fotopl_users
WHERE user_level -1 AND user_id 81
ORDER BY ASC You have an error in your SQL syntax near 'ASC' at line 4
You have an idea where i can serch for error ???
lg
Gabi
-
yes, I have explained it in the link I showed ;)
u need replace ORDER BY ".get_user_table_field("", "user_name")." ASC";
withORDER BY username ASC";
-
Ups :oops: sorry i dont see that. Now i changed this Code too.....and what will i say 8O it looks same like befor changing code of the tread you had posted....defauttex ok....users bg=red names=red i think the skript could read the userstable because now the list is like before changes very long.....:oops: :oops:
-
users bg=red names=red
you are wrong here.
since all selections uses same class, and u can see word at the top of list and at the bottom u can see "underfined" that means, that the script didnt print names at all.
to prove that I'm right, open your site and open source of your page, then search for var user_list = this is the list generated by pms.php the format of that list is:
xx,name,xx2,name2,xx3,name3
where xx is member ID.
so, as u can see in your source it shows only xx,,xx2,,xx3,,
no names where displayed at all...so, thats not the style problem, that your integration messing up, do again changes above.
-
ups sorry you are right, in default template is same problem too. Ok now i will fix everything once more. The changes i must only do in the pms.php or in other sites too???
-
if everything else works fine, then only in the pms code
-
if everything else works fine, then only in the pms code
in line 550 is u.user_name change this too ???
line 102 changed to "username" => $user_to['username'],
line 162 changed to $username = get_user_info($user_id);
line 163 changed to $message = "".$result['pms_text']."
";
Are the changes corect so ???? Rest of changes are no problem...
-
and what about the picture comments, can they be forward to picture owner inbox?
i think it would be really cool :)
and what do want to do with comments posted by guests?
in my gallery, guests are not allowed to comment
only registed members can
sorry for asking this again but this mod i would really like to have :)
anyone?
thanks
-
Bin am verzweifeln!!!
Habe den Code von PMS (toller MOD!!) durchgegangen und weis nicht mehr weita!
Habe folgenden Fehler:
Beim Anzeigen des Paging Stats wird nicht die richtige Lang angezeigt. Bekomme immer "Gefunden: 1 Bild(er) auf 1 Seite(n). Angezeigt: Bild 1 bis 1. " Dies steht bei mir im lang-file:
$lang['pms_paging_stats'] = "Du hast {total_cat_images} Nachricht(en) {new} auf {total_pages} Seite(n) in deinem {box}.Angezeigt: Seite {first_page} bis {last_page}.";
Jetzt hab ich mal probiert im template "pms_folder.html" dieses {paging_stats} durch {pms_paging_stats} auszutauschen. Dann bekomme ich gar keine Anzeige!!
Was habe ich falsch gemacht?
mfg
Olaf
http://olindner.axxs.de
-
First off, let me say thank you, it's a great mod.
But I do have a minor problem.
If im in the private messaging system (anywhere in the private messaging system, i.e. inbox, sentbox, outbox etc), and I use my logoff button which would normally take me back to the index.php page, instead it takes me to the pms.php which produces an error, like "Your not logged in".
So, Im wondering where I can change things so that if a user logs off from anywhere in the PMS system, it takes them to the index.php page instead of the pms.php page.
Also, on the comment_bit.html page, I have the code: {lang_pm}
But when I click on it, it brings out the new message page, but the user is not selected for me. when I examine the link it says:
http://www.mydomain.com/4gallery/pms.php?action=reply&user_id=
You'll notice that the user_id= nothing. How do I go about fixing this?
I know there is another problem that Im having as well, and thats with the popup, if a users selects to show popup message when new message is received I get the following error at the top of my sites pages:
Warning: Cannot add header information - headers already sent by (output started at /home/x1/xx2/4gallery/includes/stats.php:83) in /home/x1/xx2/4gallery/includes/page_header.php on line 126
>
On line 126 of page_header.php I have the following:
setcookie($cookie_name.'pmsnewpopup', serialize($result['pms_date']), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
Please note also the following is how I have my page_header.php if you remember you created some code so that I could have a direct link to the users gallery, so that might be my problem but I dont know how to solve it.
//-----------------------------------------------------
//--- 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()\"";
}
}
$site_template->register_vars(array(
"pms_boxes" => ($user_info['user_level'] < USER) ? "" : $inbox." | ".$sentbox." | ".$outbox." | ".$newpms,
"pms_popup_script" => $pms_popup_script,
"pms_popup_header" => $pms_popup_header,
"media_url" => MEDIA_PATH,
"user_cat_url" => ($user_cat_id) ? "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$user_cat_id)."\" class=\"box2\">My Gallery</a>" : "",
Thanks again
-
So, Im wondering where I can change things so that if a user logs off from anywhere in the PMS system, it takes them to the index.php page instead of the pms.php page.
heiko already asked ;):
http://4homepages.de/forum/viewtopic.php?p=23679#23679
-
Sorry, I must have missed that and I read all 6 pages, at least all that I thought was in english. But the rest of my problems still stand unfortunately (I hit send before writing them all, so I edited it).
Again thanks for your time,
-
Sorry to *BUMP*, but im at a loss as to the rest of my edited questions and problems.
V@no, can you help with this.
I know, I hate bumps too, but Im deperate as I didnt make backups as I should have, so now it's only partially working.
-
Also, on the comment_bit.html page, I have the code: {lang_pm}
But when I click on it, it brings out the new message page, but the user is not selected for me.
ah, yes, sorry, that was my bad...I just updated Step 8.
I know there is another problem that Im having as well, and thats with the popup, if a users selects to show popup message when new message is received I get the following error at the top of my sites pages:
I just tryed the code you posted - nothing happend...
would u PM me with entire page_header.php?
-
Okay, I've pm'd you the entire page_header.php file.
Another problem Im having, dont know whats going on.
I use {pms} in my userlogin_info.html template, but nothing shows up for it. It should show, "you have 2 new messages in your inbox" but it shows nothing when there is 1 new message in my inbox.
Did I miss a step, or is this related specifically to my pageheader.php file or something left out of the coding all together?
Thanks for your time and effort V@no, it is much appreciated.
-
Have i missed something.. ?
Warning: Wrong parameter count for trim() in C:\apache\htdocs\4images\pms.php on line 274
And line 274 in pms.php is
"user_list" => trim($user_list, ","),
The error only shows at the top of the page in "new message"
In Inbox, sentbox, outbox i dont gets the error
-
V@no: Any solution yet with the page_header.php that I pm'd you? Sorry to be a bother.
Thank you again,
-
V@no: Any solution yet with the page_header.php that I pm'd you?
no, sorry, it didnt give me any error messages, even though the popup didnt work either...
-
Hallo, ich habe 4 (kleinere) Fehler bei der Ausführung des PMS.
(http://www.digitalfotograf.com/temp/pms2.jpg)
und
(http://www.digitalfotograf.com/temp/pms1.jpg)
außerdem lässt sich in dem Textfeld geschriebener Text nicht mit der Maus markieren (also Linksklick und ziehen).
BBCode habe ich erstmal rausgenommen, weil er nicht richtig funktionierte. Bei B, I und U kamen keine Eingabefelder, was sonst eigentlich im restlichen Forum funktioniert.
Der Eintrag von {lang_pm} in der member_profile.html bringt keine Anzeige von PM
Hat jemand Hilfe für diese Fehler?
Gruß Ingo.
http://www.digitalfotograf.com/bilderkiste
-
Hallo, ich habe vermutlich einen Fehler entdeckt, warscheinlich ist er noch keinem weiter aufgefallen. Hier mal die "Anleitung" wie der Fehler zustande kommt:
Schritte wie folgt: Im Ordner Posteingang...oder Gesendet... oder Postausgang
1. Keine Nachrichten ausgewählt -> auf den Button alle Nachrichten löschen gedrückt-> Nein gewählt-> wieder zurück
2. Eine Nachricht gewählt -> Button "Ausgewählte Nachrichten löschen" gedrückt -> der gleiche Dialog mit der Frage "ALLE löschen?" erscheint und alle Nachrichten sind weg.
Das ist ziemlich gemein! Ist das nur bei mir oder könnt Ihr diesen Fehler auch bestätigen?
Gruß Ingo.
-
Hallo, bin ich der einzigste, der diese Problematik hat? Muß das Thema noch einmal nach oben schieben.
Gruß Ingo.
-
it works, and it's GREAT!! :lol:
-
Okay, Im posting my page_header.php and my stats.php here in code so that hopefully someone else can help me diagnose why I dont get the popup box, but instead get the error message:
Warning: Cannot add header information - headers already sent by (output started at /home/xxx/xxx-www/gallery/includes/stats.php:83) in /home/xxx/xxx-www/gallery/includes/page_header.php on line 126
Heres my stats.php file:
<?PHP
//-----------------------------------------------------
//--- Show number of Users ----------------------------
//-----------------------------------------------------
$sql = "SELECT COUNT(*) as users
FROM ".USERS_TABLE."
WHERE user_id <> ".GUEST;
$row = $site_db->query_firstrow($sql);
$total_users = "".$lang['users']."<B> ".$row['users']."</B>\n";
$site_template->register_vars("total_users", $total_users);
unset($total_users);
//-----------------------------------------------------
//--- Hits --------------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_hits) AS sum
FROM ".IMAGES_TABLE;
$row = $site_db->query_firstrow($sql);
$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_hits = "".$lang['total_hits']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_hits", $total_hits);
unset($total_hits);
//-----------------------------------------------------
//--- Votes -------------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_votes) AS sum
FROM ".IMAGES_TABLE;
$row = $site_db->query_firstrow($sql);
$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_votes = "".$lang['total_votes']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_votes", $total_votes);
unset($total_votes);
//-----------------------------------------------------
//--- Downloads ---------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_downloads) AS sum
FROM ".IMAGES_TABLE;
$row = $site_db->query_firstrow($sql);
$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_downloads = "".$lang['total_downloads']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_downloads", $total_downloads);
unset($total_downloads);
//-----------------------------------------------------
//--- Comments ----------------------------------------
//-----------------------------------------------------
$sql = "SELECT SUM(image_comments) AS sum
FROM ".IMAGES_TABLE;
$row = $site_db->query_firstrow($sql);
$sum = (isset($row['sum'])) ? $row['sum'] : 0;
$total_comments = "".$lang['total_comments']."<B> ".$row['sum']."</B>\n";
$site_template->register_vars("total_comments", $total_comments);
unset($total_comments);
//-----------------------------------------------------
//--- New Member --------------------------------------
//-----------------------------------------------------
// $sql = "SELECT *
// FROM ".USERS_TABLE."
// WHERE user_level > ".USER_AWAITING."
// ORDER by user_joindate DESC";
// $row = $site_db->query_firstrow($sql);
//
// $new_member = "Welcome to our newest member, ".(($row['user_id']) ? " <a href=\"".$site_sess->url(ROOT_PATH."member.php?action=showprofile&user_id=".$row['user_id'])."\"><B>".$row['user_name']."</B></a>\n" : "<B>".$row['user_name']."</B>");
// $site_template->register_vars("new_member", $new_member);
// unset($new_member);
?>
And here is my entire page_header.php:
<?php
/**************************************************************************
* *
* 4images - A Web Based Image Gallery Management System *
* ---------------------------------------------------------------- *
* *
* File: page_header.php *
* Copyright: (C) 2002 Jan Sorgalla *
* Email: jan@4homepages.de *
* Web: http://www.4homepages.de *
* Scriptversion: 1.7 *
* *
* 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");
}
//-----------------------------------------------------
//--- Maintenance --------------------------------
//-----------------------------------------------------
$maintenance = $config['maintenance'];
$redirect_url = TEMPLATE_PATH."/maintenance.html";
if ($maintenance){
header("Location: ".$site_sess->url($redirect_url, "&"));
exit;
}
//-----------------------------------------------------
//--- End of Maintenance -------------------------
//-----------------------------------------------------
// Cache Templates
$template_list = 'header,footer,category_dropdown_form,user_logininfo,user_loginform';
if (isset($templates_used) && $templates_used != "") {
$template_list = $template_list.",".$templates_used;
}
$site_template->cache_templates($template_list);
$waktu=date("l, j F Y");
$site_template->register_vars("date",$waktu);
//-----------------------------------------------------
//--- Register Global Vars ----------------------------
//-----------------------------------------------------
$total_images = 0;
$total_categories = 0;
$auth_cat_sql['auth_viewcat']['IN'] = 0;
$auth_cat_sql['auth_viewcat']['NOTIN'] = 0;
if (!empty($cat_cache)) {
foreach ($cat_cache as $key => $val) {
if (check_permission("auth_viewcat", $key)) {
$total_categories++;
if (isset($val['num_images'])) {
$total_images += $val['num_images'];
}
else {
$cat_cache[$key]['num_images'] = 0;
}
$auth_cat_sql['auth_viewcat']['IN'] .= ", ".$key;
}
else {
$auth_cat_sql['auth_viewcat']['NOTIN'] .= ", ".$key;
}
}
}
$user_cat_id = "";
foreach($cat_cache as $key => $val){
if ($user_info['user_name'] == $cat_cache[$key]['cat_name']) {
$user_cat_id = $key;
break;
}
}
//-----------------------------------------------------
//--- 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()\"";
}
}
$site_template->register_vars(array(
"pms_boxes" => ($user_info['user_level'] < USER) ? "" : $inbox." | ".$sentbox." | ".$outbox." | ".$newpms,
"pms_popup_script" => $pms_popup_script,
"pms_popup_header" => $pms_popup_header,
"media_url" => MEDIA_PATH,
"user_cat_url" => ($user_cat_id) ? "<a href=\"".$site_sess->url(ROOT_PATH."categories.php?cat_id=".$user_cat_id)."\" class=\"box2\">My Gallery</a>" : "",
"thumb_url" => THUMB_PATH,
"icon_url" => ICON_PATH,
"template_url" => TEMPLATE_PATH,
"template_image_url" => TEMPLATE_PATH."/images",
"template_lang_image_url" => TEMPLATE_PATH."/images_".$config['language_dir'],
"site_name" => $config['site_name'],
"site_email" => $config['site_email'],
"self" => $site_sess->url($self_url),
"self_full" => $site_sess->url($script_url."/".$self_url),
"script_version" => SCRIPT_VERSION,
"cp_link" => ($user_info['user_level'] != ADMIN) ? "" : "\n<p align=\"center\">[<a href=\"".$site_sess->url(ROOT_PATH."admin/index.php")."\">Control Panel</a>]</p>\n",
"total_categories" => $total_categories,
"total_images" => $total_images,
"url_new_images" => $site_sess->url(ROOT_PATH."search.php?search_new_images=1"),
"url_top_images" => $site_sess->url(ROOT_PATH."top.php"),
"url_top_cat_images" => $site_sess->url(ROOT_PATH."top.php".(($cat_id && preg_match("/categories.php/", $self_url)) ? "?".URL_CAT_ID."=".$cat_id : "")),
"url_register" => (!empty($url_register)) ? $site_sess->url($url_register) : $site_sess->url(ROOT_PATH."register.php"),
"url_search" => $site_sess->url(ROOT_PATH."search.php"),
"url_lightbox" => $site_sess->url(ROOT_PATH."lightbox.php"),
"url_control_panel" => (!empty($url_control_panel)) ? $site_sess->url($url_control_panel) : $site_sess->url(ROOT_PATH."member.php?action=editprofile"),
"url_categories" => $site_sess->url(ROOT_PATH."categories.php"),
"url_home" => $site_sess->url(ROOT_PATH."index.php"),
"url_login" => (!empty($url_login)) ? $site_sess->url($url_login) : $site_sess->url(ROOT_PATH."login.php"),
"url_logout" => (!empty($url_logout)) ? $site_sess->url($url_logout) : $site_sess->url(ROOT_PATH."logout.php"),
"url_member" => (!empty($url_member)) ? $site_sess->url($url_member) : $site_sess->url(ROOT_PATH."member.php"),
"url_upload" => (!empty($url_upload)) ? $site_sess->url($url_upload) : $site_sess->url(ROOT_PATH."member.php?action=uploadform"),
"url_lost_password" => (!empty($url_lost_password)) ? $site_sess->url($url_lost_password) : $site_sess->url(ROOT_PATH."member.php?action=lostpassword"),
"guest" => ($user_info['user_level'] == GUEST) ? 1 : 0
));
if (!empty($additional_urls)) {
$register_array = array();
foreach ($additional_urls as $key => $val) {
$register_array[$key] = $site_sess->url($val);
}
$site_template->register_vars($register_array);
}
// Replace Globals in $lang
$lang = $site_template->parse_array($lang);
$site_template->register_vars(array(
"lang_site_stats" => $lang['site_stats'],
"lang_registered_user" => $lang['registered_user'],
"lang_random_image" => $lang['random_image'],
"lang_categories" => $lang['categories'],
"lang_sub_categories" => $lang['sub_categories'],
"lang_new_images" => $lang['new_images'],
"lang_top_images" => $lang['top_images'],
"lang_search" => $lang['search'],
"lang_advanced_search" => $lang['advanced_search'],
"lang_lightbox" => $lang['lightbox'],
"lang_register" => $lang['register'],
"lang_reregister" => $lang['reregister'],
"lang_control_panel" => $lang['control_panel'],
"lang_login" => $lang['login'],
"lang_auto_login" => $lang['lang_auto_login'],
"lang_logout" => $lang['logout'],
"lang_lost_password" => $lang['lost_password'],
"lang_user_name" => $lang['user_name'],
"lang_password" => $lang['password'],
"lang_go" => $lang['go'],
"lang_images_per_page" => $lang['images_per_page'],
"lang_user_online" => $lang['user_online'],
"lang_user_online_detail" => $lang['user_online_detail'],
"charset" => $lang['charset'],
"direction" => $lang['direction'],
"memberbar" => $lang['memberbar']
));
//-----------------------------------------------------
//--- 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);
//-----------------------------------------------------
//--- Random Image ------------------------------------
//-----------------------------------------------------
$random_image = (defined("SHOW_RANDOM_IMAGE") && SHOW_RANDOM_IMAGE == 0) ? "" : get_random_image();
$site_template->register_vars("random_image", $random_image);
unset($random_image);
//-----------------------------------------------------
//--- Photo Of The Day --------------------------------
//-----------------------------------------------------
$potd_image = (defined("SHOW_POTD_IMAGE") && SHOW_POTD_IMAGE == 0) ? "" : get_potd_image();
$site_template->register_vars("potd_image", $potd_image);
$site_template->register_vars(array("lang_potd_title" => $lang['potd_title']));
switch (POTD_SELECT_MODE) {
case "by_rating" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_rating'])); break;
case "by_votes" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_votes'])); break;
case "by_comments" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_comments'])); break;
case "by_downloads" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_downloads'])); break;
case "by_hits" : $site_template->register_vars(array("lang_potd_type" => $lang['potd_type_hits'])); break;
}
unset($potd_image);
//--- End Photo Of The Day ----------------------------
//-----------------------------------------------------
//--- Set Paging Vars ---------------------------------
//-----------------------------------------------------
if (isset($HTTP_POST_VARS['setperpage'])) {
$setperpage = intval($HTTP_POST_VARS['setperpage']);
if ($setperpage) {
$site_sess->set_session_var("perpage", $setperpage);
$session_info['perpage'] = $setperpage;
}
}
if (isset($session_info['perpage'])) {
$perpage = $session_info['perpage'];
}
else {
$perpage = ceil($config['default_image_rows'] * $config['image_cells']);
}
//-----------------------------------------------------
//--- Set Perpage Dropdown ----------------------------
//-----------------------------------------------------
$setperpage_dropdown = "\n<select name=\"setperpage\" class=\"setperpageselect\">\n";
for($i = 1; $i <= $config['custom_row_steps']; $i++) {
$setvalue = $config['image_cells'] * $i;
$setperpage_dropdown .= "<option value=\"".$setvalue."\"";
if ($setvalue == $perpage) {
$setperpage_dropdown .= " selected=\"selected\"";
}
$setperpage_dropdown .= ">";
$setperpage_dropdown .= $setvalue;
$setperpage_dropdown .= "</option>\n";
}
$setperpage_dropdown .= "</select>\n";
if ($cat_id != 0) {
$setperpage_dropdown .= "<input type=\"hidden\" name=\"cat_id\" value=\"".$cat_id."\" />\n";
}
if (isset($show_result) && $show_result == 1) {
$setperpage_dropdown .= "<input type=\"hidden\" name=\"show_result\" value=\"1\" />\n";
}
$site_template->register_vars("setperpage_dropdown", $setperpage_dropdown);
$setperpage_dropdown_form = $site_template->parse_template("setperpage_dropdown_form");
$site_template->register_vars("setperpage_dropdown_form", $setperpage_dropdown_form);
$site_template->un_register_vars("setperpage_dropdown");
unset($setperpage_dropdown);
unset($setperpage_dropdown_form);
//-----------------------------------------------------
//--- Add & Delete from Lists -------------------------
//-----------------------------------------------------
if ($action == "addtolightbox" && $id) {
if ($user_info['user_level'] >= USER) {
$msg = (add_to_lightbox($id)) ? $lang['lightbox_add_success'] : $lang['lightbox_add_error'];
}
else {
$msg = $lang['lightbox_register'];
}
}
if ($action == "removefromlightbox" && $id) {
if ($user_info['user_level'] >= USER) {
$msg = (remove_from_lightbox($id)) ? $lang['lightbox_remove_success'] : $lang['lightbox_remove_error'];
}
else {
$msg = $lang['lightbox_register'];
}
}
if ($action == "clearlightbox") {
if ($user_info['user_level'] >= USER) {
$msg = (clear_lightbox()) ? $lang['lightbox_delete_success'] : $lang['lightbox_delete_error'];
}
else {
$msg = $lang['lightbox_register'];
}
}
//-----------------------------------------------------
//--- Save Rating -------------------------------------
//-----------------------------------------------------
if ($action == "rateimage" && $id) {
$rating = intval($HTTP_POST_VARS['rating']);
$cookie_name = (defined("COOKIE_NAME")) ? COOKIE_NAME : "4images_";
$cookie_rated = isset($HTTP_COOKIE_VARS[$cookie_name.'rated']) ? unserialize(stripslashes($HTTP_COOKIE_VARS[$cookie_name.'rated'])) : array();
if ($rating && $rating <= MAX_RATING && $id) {
if (!isset($session_info['rated_imgs'])) {
$session_info['rated_imgs'] = $site_sess->get_session_var("rated_imgs");
}
$split_list = array();
if (!empty($session_info['rated_imgs'])) {
$split_list = explode(" ", $session_info['rated_imgs']);
}
if (!in_array($id, $split_list) && !in_array($id, $cookie_rated)) {
$session_info['rated_imgs'] .= " ".$id;
$session_info['rated_imgs'] = trim($session_info['rated_imgs']);
$site_sess->set_session_var("rated_imgs", $session_info['rated_imgs']);
$cookie_rated[] = $id;
$cookie_expire = time() + 60 * 60 * 24 * 4;
setcookie($cookie_name.'rated', serialize($cookie_rated), $cookie_expire, COOKIE_PATH, COOKIE_DOMAIN, COOKIE_SECURE);
update_image_rating($id, $rating);
$msg = $lang['voting_success'];
}
else {
$msg = $lang['already_voted'];
}
}
else {
$msg = $lang['voting_error'];
}
}
//-----------------------------------------------------
//--- Parse Header & Footer ---------------------------
//-----------------------------------------------------
if (isset($main_template) && $main_template) {
$header = $site_template->parse_template("header");
$footer = $site_template->parse_template("footer");
$site_template->register_vars(array(
"header" => $header,
"footer" => $footer
));
unset($header);
unset($footer);
}
//-----------------------------------------------------
//--- User Box ----------------------------------------
//-----------------------------------------------------
if ($user_info['user_level'] >= USER) {
$site_template->register_vars("lang_loggedin_msg", preg_replace("/".$site_template->start."loggedin_user_name".$site_template->end."/siU", $user_info['user_name'], $lang['lang_loggedin_msg']));
$user_box = $site_template->parse_template("user_logininfo");
$site_template->register_vars(array(
"user_box" => $user_box,
"user_loggedin" => 1,
"user_loggedout" => 0,
"is_admin" => ($user_info['user_level'] == ADMIN) ? 1 : 0
));
$site_template->un_register_vars("user_logininfo");
unset($user_box);
}
else {
$user_box = $site_template->parse_template("user_loginform");
$site_template->register_vars(array(
"user_box" => $user_box,
"user_loggedin" => 0,
"user_loggedout" => 1,
"is_admin" => 0
));
$site_template->un_register_vars("user_loginform");
unset($user_box);
}
?>
-
it didnt give any error messages, but popup didnt showed up either...can I see your site?
-
URL sent in private (to protect the innocent) hehehehe
-
OKay...I have a style question.
The PMS Boxes are set up to show like this:
INbox | Sentbox | Outbox | New Message
okay...that's great...
but what if in a different template... I want it to show up as
Inbox{br}
Sentbox{br}
Outbox{br}
New Message{br}
I would like to keep the original set up...it's just that in a different template, I'd like them to show up straight down instead of side by side.
Any ideas?
-
sorry, its not possible in current version, the boxes created in .php files...
will change it in next version ;)
-
sorry, its not possible in current version, the boxes created in .php files...
will change it in next version ;)
*CHEESE* I figured out how to do it. :)
-
what about this?
Is there a way to include the from user's avatar in the PM?
Most of my users upload their own photos as their avatars. It would be great if that could be visible in the PM as it is in the Comments.
Any ideas how?
-
hm dead link ?! 8O
-
sorry, this mod is not supported for a year now, there was version 2 which is different from this...
Sorry, please wait a few days (or maybe weeks) untill I post the v2 instructions.
If u installed this mod already, I'd suggest u uninstall it (u'll need to do so anyway if u want to use v2)
-
Hallo zusammen,
ich kann nach der installation des Mods meine Galerie nicht mehr öffnen. Bekomme folgende Fehlermeldung:
Parse error: parse error, unexpected T_STRING in /mnt/kw2/08/926/00000017/htdocs/geschuetzt/pics/4Images/4images/includes/page_header.php on line 116
die page_header.php sieht in dem Bereich folgendermaßen aus:
$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']) {
Die fettgedruckte ist Zeile 116
Ich hoffe, Ihr könnt mir schnell helfen und danke euch schon mal im vorraus
Tarzan
-
since this mod is not supported and obsolete, there is no point to continue discuss it.
Topic locked.
-
Hallo rundrum,
ich habe mir die ältere Version des PMS eingebaut, kann mans noch irgendwo so umgestalten, dass beispielsweise unter eingeloggt als xxxx eine Meldung erscheint, wieviel neue Nachrichten in der Box sind?
Tnx im Voaus...
Pitt
-
Heloo.
Can somobodey post the code step by step for the PMS please.
Thankssssssssss!
HOHOH
-
Hy guys.
I have installed th PMS mod an when i get to make a new message i get this error
---------------------------------------------------------------------------------------------------------------------------------------------------------
Warning: Invalid argument supplied for foreach() in /www/htdocs/w008206a/pm.php on line 414
Fatal error: Call to undefined function: get_smiles_text() in /www/htdocs/w008206a/pm.php on line 427
---------------------------------------------------------------------------------------------------------------------------------------------------------
Why ?
Thanks !!
Thanks !!
-
You should post in the Orignal mods thread, not make a new post