Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > General > Member Archives
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Problem with reading PM's Details »»
Problem with reading PM's
Version: , by SemperFidelis SemperFidelis is offline
Developer Last Online: Feb 2007 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 01-20-2003 Last Update: Never Installs: 0
 
No support by the author.

Ok, straight up I have a reasonably well hacked test board which once its finished 100%, I will be rolling out as my production board.

Right now Im having issues with viewing PM's.

Im getting this error when trying to view a PM :
Quote:
Line : 295
Char: 87
Error: Unterminated string constant
Here is the code from around that line when viewing source thru IE (with line 295 being "currently "+theform.message.value.length+" characters long.)
PHP Code:
<script language="javascript">
<!--
var 
pmmaxchars 1000;
function 
validate(theform) {
    if (
theform.touser.value=="" || theform.message.value=="" || theform.title.value=="") {
        
alert("Please complete the recipient, subject and message fields.");
        return 
false; }
    if (
pmmaxchars != 0) {
        if (
theform.message.value.length 1000) {
            
alert("Your message is too long.\n\nReduce your message to 1000 characters.\nIt is

currently "
+theform.message.value.length+" characters long.");
            return 
false; }
        else { return 
true; }
    } else { return 
true; }
}
function 
checklength(theform) {
    if (
pmmaxchars != 0) { message "\nThe maximum permitted length is 1000 characters."; }
    else { 
message ""; }
    
alert("Your message is "+theform.message.value.length+" characters long."+message);
}
//-->
</script
And here is a copy of my privmsg template :
PHP Code:
{htmldoctype}
<
html>
<
head><title>$bbtitle - Private Messages $message[title]</title>
$headinclude
<script language="javascript" type="text/javascript">
<!--
function 
aimwindow(aimid) {
window.open("member.php?s=$session[sessionhash]&action=aimmessage&aim="+aimid,"_blank","toolbar=no,location=no,menubar=no,scrollbars=no,width=175,height=275,resizeable=yes,status=no")
}
// -->
</script>
</
head>
<
BODY onLoad="document.forms.vbform.message.focus()">
$header

<table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextraalign="center">
<
tr>
    <
td width="75%">$navbar</td>
    <
td width="25%" align="right">
    
    </
b></smallfont></td>
    
</
tr>
</
table>

<
br>
$cpnav
<br>

<
table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextraalign="center">
<
tr>
    <
form action="private.php" method="post">
    <
td><smallfont><input type="hidden" name="s" value="$session[sessionhash]">
    <
input type="hidden" name="action" value="dodelete">
    <
input type="hidden" name="privatemessageid" value="$privatemessageid">
    <
input type="hidden" name="folderid" value="$folderid">
    <
b>Delete?</b> <input type="checkbox" name="delete" value="yes" $checked>
    <
input type="submit" class="bginput" value="Delete"></td>
    </
form>
    <
form action="private.php" method="post">
    <
td align="right"><smallfont><input type="hidden" name="s" value="$session[sessionhash]"><b>Jump to folder:</b>
        <
select name="folderid" onchange="window.location=('private.php?s=$session[sessionhash]&folderid='+this.options[this.selectedIndex].value)">
            <
option value="0" $folderselect[0]>$inboxname</option>
            <
option value="-1" $folderselect[$sent]>$sentitemsname</option>
            
$folderjump
            $readreceiptsoption
        
</select>$gobutton</smallfont></td>
    </
form>
</
tr>
</
table>

<
br>    

<
table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" {tableouterextrawidth="{contenttablewidth}" align="center"><tr><td>
<
table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextrawidth="100%">
<
tr>
    <
td bgcolor="{tableheadbgcolor}" width="20%" nowrap><smallfont color="{tableheadtextcolor}" class="thtcolor"><b>Author</b></smallfont></td>
    <
td bgcolor="{tableheadbgcolor}" width="80%"><smallfont color="{tableheadtextcolor}" class="thtcolor"><b>Message</b></smallfont></td>
</
tr>
<
tr>
    <
td bgcolor="{secondaltcolor}" width="20%" valign="top" nowrap>
    <
table width="100%" cellpadding="4" cellspacing="0" border="0">
    <
tr>
        <
td width="100%"><normalfont><b>$fromuserinfo[username]</b></normalfont><br>
        <
smallfont>$fromuserinfo[usertitle]</smallfont><br><br>
        
$post[avatar]<br><br>
        <
smallfont>Registered$fromuserinfo[joindate]<br>
        
Posts$fromuserinfo[posts]</smallfont></td>
    </
tr>
    </
table>
    </
td>
    <
td bgcolor="{secondaltcolor}" valign="top" width="80%">
    <
table width="100%" cellpadding="4" cellspacing="0" border="0">
    <
tr>
        <
td width="100%">$message[icon] <smallfont><b>$message[title]</b></smallfont>
        <
p><normalfont>$message[message]</normalfont></p></td>
    </
tr>
    </
table>
    </
td>
</
tr>
<
tr>
    <
td bgcolor="{secondaltcolor}" width="20%" height="16" nowrap><smallfont>$message[foldericon$message[postdate$message[posttime]</smallfont></td>
    <
td bgcolor="{secondaltcolor}" width="80%" valign="middle" height="16">
    <
table width="100%" border=0 cellpadding=0 cellspacing=0>
    <
tr>
        <
td><smallfont>$onlinestatus
        $fromuserinfo
[profile$fromuserinfo[useremail$fromuserinfo[homepage]
        <
a href="search.php?s=$session[sessionhash]&action=finduser&userid=$fromuserinfo[userid]"><img src="{imagesfolder}/find.gif" border="0" alt="Find more posts by $fromuserinfo[username]"></a>
        <!-- $ 
post[icqicon] $ post[aimicon] $ post[yahooicon] --> </smallfont></td>
    </
tr>
    </
table>
    </
td>
</
tr>
<
tr id="cat">
    <
td bgcolor="{tableheadbgcolor}" colspan="2" align="center"><smallfont color="{tableheadtextcolor}" class="thtcolor">
    <
b>$nextoldest $nextnewest</b>
    </
smallfont></td>
</
tr>
</
table>
</
td></tr></table>

<
br>

<
table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextraalign="center">
<
tr>
    <
td>$forumjump</td>
    <
td align="right"><smallfont><b>$timezone</b></smallfont></td>
</
tr>
<
tr>
    <
td colspan="2" align="center">
    <
a href="private.php?s=$session[sessionhash]&action=newmessage&privatemessageid=$privatemessageid"><img src="{imagesfolder}/pm_sendreply.gif" alt="Reply to this message" border="0"></a>
    <
a href="private.php?s=$session[sessionhash]&action=newmessage&forward=true&privatemessageid=$privatemessageid"><img src="{imagesfolder}/pm_forward.gif" alt="Forward this message to another member" border="0"></a>
    
$buddyforwardlink
    
<a href="private.php?s=$session[sessionhash]&action=newmessage"><img src="{imagesfolder}/pm_sendnew.gif" alt="Send a new private message" border="0"></a>
    </
td>
</
tr>
</
table>

<
script language="javascript">
<!--
var 
pmmaxchars $pmmaxchars;
function 
validate(theform) {
    if (
theform.touser.value=="" || theform.message.value=="" || theform.title.value=="") {
        
alert("Please complete the recipient, subject and message fields.");
        return 
false; }
    if (
pmmaxchars != 0) {
        if (
theform.message.value.length $pmmaxchars) {
            
alert("Your message is too long.\n\nReduce your message to $pmmaxchars characters.\nIt is 

currently "
+theform.message.value.length+" characters long.");
            return 
false; }
        else { return 
true; }
    } else { return 
true; }
}
function 
checklength(theform) {
    if (
pmmaxchars != 0) { message "\nThe maximum permitted length is $pmmaxchars characters."; }
    else { 
message ""; }
    
alert("Your message is "+theform.message.value.length+" characters long."+message);
}
//-->
</script>

<
form action="private.php" method="post" enctype="multipart/form-data" name="vbform" onSubmit="return 

validate(this)"
>
<
input type="hidden" name="s" value="$session[sessionhash]">
<
input type="hidden" name="privatemessageid" value="$privatemessageid">
<
input type="hidden" name="prevmessageid" value="$privatemessageid">
<
input type="hidden" name="action" value="dosend">
<
table cellpadding="{tableouterborderwidth}" cellspacing="0" border="0" bgcolor="{tablebordercolor}" 

{tableouterextrawidth="{contenttablewidth}" align="center"><tr><td>

<
table cellpadding="4" cellspacing="{tableinnerborderwidth}" border="0" {tableinnerextrawidth="100%">
<
tr>
<
tr id="cat">
    <
td bgcolor="{categorybackcolor}" colspan="6"><normalfont color="{categoryfontcolor}"><b>Quick PM 

Reply
</normalfont></b></td>
</
tr>
<
tr>
<
td bgcolor="{firstaltcolor}" colspan="6">

<
table width="100%" border="0" cellspacing="0" cellpadding="0"><tr>
<
td bgcolor="{secondaltcolor}"><normalfont><b>Recipient:</b></normalfont></td><td bgcolor="{secondaltcolor}">
<
normalfont><input type="text" class="bginput" name="touser" value="$fromuserinfo[username]size="25" 

maxlength="25" tabindex="1">&nbsp;&nbsp;</normalfont>
    <
smallfont><a href="memberlist.php?s=$session[sessionhash]target="_blank">Find user names</a></smallfont

</
td></tr>
<
tr><td bgcolor="{secondaltcolor}"><normalfont><b>Subject:</b></normalfont></td>
    <
td bgcolor="{secondaltcolor}"><normalfont><input type="text" class="bginput" name="title" value="RE: 

$message[title]size="40" maxlength="85" tabindex="2"></normalfont> </td>
</
tr><tr>
    <
td bgcolor="{secondaltcolor}" valign="top" nowrap><p><normalfont><b>Your Message:</b></normalfont>
    </
td>
    <
td bgcolor="{secondaltcolor}">
    
    <
table cellpadding="0" cellspacing="0" border="0">
    <
tr valign="top">
        <
td><textarea name="message" rows="7" cols="$textareacolswrap="virtual" tabindex="3">


[
quote]

$pmquote

[/quote]
</
textarea><br>
        <
smallfont><a href="javascript:checklength(document.vbform);">[check message 

length
]</a></smallfont></td>
    </
tr>
</
table>
</
td>
</
tr>
<
tr>
    <
td bgcolor="{firstaltcolor}" valign="top"><normalfont><b>Options</b></normalfont></td>
    <
td bgcolor="{firstaltcolor}" valign="top"><smallfont>
    <
input type="checkbox" name="deleteorig" value="yes"><b>Delete original:</bDelete original PM from PM box.
     <
br><input type="checkbox" name="parseurl" value="yes" checked><b>Automatically parse URLs:</b

automatically adds [url] and [/urlaround internet addresses.
    <
br><input type="checkbox" name="signature" value="yes" checked><b>Show Signature:</b> include your profile 

signature
.  Only registered users may have signatures.
    <
br><input type="checkbox" name="savecopy" value="yes" checked><b>Save a copy:</bAlso save a copy in the 

'Sent Items' folder.
    <
br><input type="checkbox" name="pmreceipt" value="yes" checked><b>Request Read Receipt:</bAllows you to 

check whether your message has been read by the recipient
.
    </
smallfont></td>
</
tr>
</
table>
</
td>
</
tr>
</
table>
</
td>
</
tr>
</
table>

<
br>

<
table cellpadding="2" cellspacing="0" border="0" width="{contenttablewidth}" {tableinvisibleextraalign="center">
<
tr>
    <
td align="center"><normalfont><input type="submit" class="bginput" name="submit" value="Send Message" 

accesskey="s" tabindex="4"><input type="reset" class="bginput" name="RESET" value="Clear Fields" tabindex="6">
    </
normalfont></td>
</
tr>
</
table>


</
form>

$footer

</body>
</
html

Can someone please give me some assistance with getting this one sorted ?
If you need to view private.php Im more than happy to email / PM it to you as I cant post it here in its entirity.


Thanks in advance for any assistance given
It is greatly appreciated.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-20-2003, 11:03 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Code:
        if (theform.message.value.length > 1000) {
            alert("Your message is too long.\n\nReduce your message to 1000 characters.\nIt is currently " + theform.message.value.length + " characters long.");
            return false;
        }
That will fix it.
Reply With Quote
  #3  
Old 01-21-2003, 12:11 AM
SemperFidelis SemperFidelis is offline
 
Join Date: May 2002
Posts: 188
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Teck
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 11:31 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.16278 seconds
  • Memory Usage 2,370KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (2)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete