Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-17-2001, 04:08 AM
Jason Hung
Guest
 
Posts: n/a
Default

I think that the private messages are missing the paging feature... perhaps add << < 1 2 ... > >> feature?
Reply With Quote
  #2  
Old 04-17-2001, 04:19 AM
Kier Kier is offline
 
Join Date: Oct 2001
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Most administrators won't allow you to have more than 50-100 private messages, which is why the multipage nav feature is not currently implemented.
Reply With Quote
  #3  
Old 04-17-2001, 05:49 AM
Jason Hung
Guest
 
Posts: n/a
Default

Time for a hack?
Reply With Quote
  #4  
Old 04-17-2001, 09:58 AM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yeah please, i would like it as an admin as i stored lots of pms myself and hate waiting for 200 to load.... until a "download pm thing" comes along..
Reply With Quote
  #5  
Old 04-17-2001, 10:48 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Chris,

Here's a simple and dirty download hack for you. I've had this running on my BB since 1.1.3:

1) Open private.php. Find:

Code:
  if ($delete!="") {
    $what="delete";
  }
Immediately under it put:

Code:
  if ($download!="") {
    $what="download";
  }
Find:

Code:
    eval("standardredirect(\"".gettemplate("redirect_pmdelete")."\",\"private.php?s=$session[sessionhash]&folderid=$thisfolder\");");
  }
immediately under it put:

PHP Code:
  if ($what=="download") {
      
    if (
is_array($privatemessage)) {
        
header("Content-disposition: filename=messages.txt");
        
header("Content-type: application/octetstream");
        
header("Pragma: no-cache");
        
header("Expires: 0");

          while(list(
$key,$val)=each($privatemessage)) {
            
$downloads mysql_query("SELECT * FROM privatemessage WHERE privatemessageid='$key' AND userid=$bbuserinfo[userid]");
            
$mydownload mysql_fetch_array($downloads);
            
$tousername mysql_query("SELECT username FROM user WHERE userid='$mydownload[touserid]'");
            
$mytousername mysql_fetch_array($tousername);
            
$fromusername mysql_query("SELECT username FROM user WHERE userid='$mydownload[fromuserid]'");
            
$myfromusername mysql_fetch_array($fromusername);
            
$msgdt vbdate($dateformat,$mydownload[dateline]);
            
$msgtm vbdate($timeformat,$mydownload[dateline]);

                    
                    print(
"Date/Time Sent: $msgdt$msgtm\r\n");
                    
printf("From: %s\r\n"$myfromusername["username"]);
                    
printf("To: %s\r\n"$mytousername["username"]);
                    
printf("Subject: %s\r\n\r\n"$mydownload["title"]);
                    
printf("%s\r\n"$mydownload["message"]);
                    print(
"=======================================================================\r\n\r\n\r\n");


        } 
//end while
    
    
} else {
      eval(
"standarderror(\"".gettemplate("error_pmnoselected")."\");");
      exit;
    }
  } 
Upload to server.

2. Open template privfolder. Find:

Code:
<input type="submit" class="bginput" name="move" value="Move" style="background-color:#6C6081;color:#F5D300;font-size:10px;font-weight:bold">
	$massforwardlink
	or <input type="submit" class="bginput" name="delete" value="Delete" style="background-color:#6C6081;color:#F5D300;font-size:10px;font-weight:bold">
change to (change in red):

Code:
<input type="submit" class="bginput" name="move" value="Move" style="background-color:#6C6081;color:#F5D300;font-size:10px;font-weight:bold">
or <input type="submit" class="bginput" name="download" value="Download" style="background-color:#6C6081;color:#F5D300;font-size:10px;font-weight:bold">
$massforwardlink
or <input type="submit" class="bginput" name="delete" value="Delete" style="background-color:#6C6081;color:#F5D300;font-size:10px;font-weight:bold">
That's it. Now, upon selecting message(s) and clicking on "Download", you will be prompted to save the file with the selected messages in it, sorted by descending chronological order. You can then save the file under any name you like.


This can be tested on my Bulletin Board.

Cheers,

Bira
Reply With Quote
  #6  
Old 04-17-2001, 10:58 AM
Kier Kier is offline
 
Join Date: Oct 2001
Posts: 131
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've moved this thread out of the vB2 Bug reports forum, as it has turned into more of a hacks thread than a bug report.
Reply With Quote
  #7  
Old 04-17-2001, 11:02 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Kier, why don't you take my proposal above here and improve it? I don't have your skills and knowledge
Reply With Quote
  #8  
Old 04-17-2001, 11:36 AM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

than's bira, that is very useful.

cheers
Reply With Quote
  #9  
Old 04-17-2001, 11:42 AM
bira's Avatar
bira bira is offline
 
Join Date: Nov 2001
Posts: 387
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

if people are interested in this, I can improve this code to use a template (rather than hard-coded format) and a little less code lines.

Let me know if you are.
Reply With Quote
  #10  
Old 04-17-2001, 12:11 PM
chrispadfield's Avatar
chrispadfield chrispadfield is offline
 
Join Date: Oct 2001
Posts: 180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i am definitely interested, going to test it on your forum as well soon....
Reply With Quote
Reply

Thread Tools
Display Modes

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 03:36 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.04283 seconds
  • Memory Usage 2,268KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_code
  • (1)bbcode_php
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (8)postbit_onlinestatus
  • (10)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
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • postbit_imicons
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete