Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Full Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
private messages backup hack Details »»
private messages backup hack
Version: 1.00, by Cano2 Cano2 is offline
Developer Last Online: Dec 2002 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 04-07-2002 Last Update: Never Installs: 53
 
No support by the author.

This hack allows users to backup their private messages to a local file.

I know that there exists allready a very similar hack (https://vborg.vbsupport.ru/showthrea...=&pagenumber=1 ) but it contains a serious bug, which allows every users to read everybodys private messages (details see link).

Aditionally this hack works with templates and has some enhanced functionality.

This hack is succesfully tested with a fresh install of vBulletin 2.2.4

I post it here, not as a full release, because of the unclear situation (im new to this board...).

@mods Please excuse me, and move this thread, if you think it's located better elsewhere

lates, Cano2

Show Your Support

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

Comments
  #32  
Old 06-01-2002, 10:45 PM
JZarate's Avatar
JZarate JZarate is offline
 
Join Date: Oct 2001
Posts: 17
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Hack! Thanks!
Reply With Quote
  #33  
Old 06-08-2002, 10:46 AM
Angelus1753 Angelus1753 is offline
 
Join Date: Jan 2002
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Must say, this is an awsome hack.

Question (more of a request though): In the genereated HTML page, the PM's shown are in any order, so is there any way to show them in a more date/time oriented approach?
Reply With Quote
  #34  
Old 06-08-2002, 11:29 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cano2,

Are you still supporting this hack? I'm still having a problem with the message format on saved messages.
Reply With Quote
  #35  
Old 06-09-2002, 11:12 AM
Cano2 Cano2 is offline
 
Join Date: Apr 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Of course im still supporting it.. Sry, I just have been away for a month, i will try to help you as soon as possible.

@Angelus1753 :
Yes it is possible and allready implemented in the next big release (hope it doesn't much time for me anymore to finish it).

Until then:
Replace
Code:
$msgs= $DB_site->query("SELECT
  privatemessage.*,
  IF(ISNULL(touser.username),'[Deleted User]',touser.username) AS tousername,
  IF(ISNULL(fromuser.username),'[Deleted User]',fromuser.username) AS fromusername
  FROM privatemessage
  LEFT JOIN user AS touser ON (touser.userid=privatemessage.touserid)
  LEFT JOIN user AS fromuser ON (fromuser.userid=privatemessage.fromuserid)
  WHERE $cond ORDER BY folderid");
with
Code:
$msgs= $DB_site->query("SELECT
  privatemessage.*,
  IF(ISNULL(touser.username),'[Deleted User]',touser.username) AS tousername,
  IF(ISNULL(fromuser.username),'[Deleted User]',fromuser.username) AS fromusername
  FROM privatemessage
  LEFT JOIN user AS touser ON (touser.userid=privatemessage.touserid)
  LEFT JOIN user AS fromuser ON (fromuser.userid=privatemessage.fromuserid)
  WHERE $cond ORDER BY folderid,dateline ");
lates, cano2
Reply With Quote
  #36  
Old 06-09-2002, 11:45 AM
Cano2 Cano2 is offline
 
Join Date: Apr 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

@Boofoo:
There are two ways, it depends on what you want:

first find
Code:
eval("\$messages .= \"".gettemplate("privbackup_message")."\";");
right before it insert
Code:
$message[message]=nl2br($message[message]);
or
Code:
$message[message]=pmcodeparse($message[message],0,$allowsmilies);
With the first one, the Linebreaks would show up correctly, the second one shows the message as it would be shown in the board (with smillies, lists, ... ) (but the paths to images are relative, so you wont ?see the smilies, if you save it to disk)

Hope that helps you

Maybe I find a way to include the first one in the next release...

Cano2
Reply With Quote
  #37  
Old 06-09-2002, 02:16 PM
saibal saibal is offline
 
Join Date: May 2002
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi cano2,

have you suggestions for my problem?
Reply With Quote
  #38  
Old 06-09-2002, 02:28 PM
Cano2 Cano2 is offline
 
Join Date: Apr 2002
Posts: 15
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Can you tell me plz what exactly happens after you click "backup" (and with witch Browserversion/OS of course)? Does the Download window popup, or is the page shown in the Browser? Which name has the file to download, if it shows up?
Reply With Quote
  #39  
Old 06-09-2002, 06:33 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much. You are a gentleman and a scholar.

The only question I have now is which way is the better one to go? The first one only saves the smilie code, too (i.e. ) And is there a way to have it save to the date in the filename instead of saying today? That way it won't overwrite any backups and you will know on which date you made the last backup.

Thanks for the quick fix.

Quote:
Originally posted by Cano2
@Boofoo:
There are two ways, it depends on what you want:

first find
Code:
eval("\$messages .= \"".gettemplate("privbackup_message")."\";");
right before it insert
Code:
$message[message]=nl2br($message[message]);
or
Code:
$message[message]=pmcodeparse($message[message],0,$allowsmilies);
With the first one, the Linebreaks would show up correctly, the second one shows the message as it would be shown in the board (with smillies, lists, ... ) (but the paths to images are relative, so you wont ?see the smilies, if you save it to disk)

Hope that helps you

Maybe I find a way to include the first one in the next release...

Cano2
Reply With Quote
  #40  
Old 06-09-2002, 10:27 PM
saibal saibal is offline
 
Join Date: May 2002
Posts: 6
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally posted by Cano2
Can you tell me plz what exactly happens after you click "backup" (and with witch Browserversion/OS of course)? Does the Download window popup, or is the page shown in the Browser? Which name has the file to download, if it shows up?

thanks for the attention cano2


i have two forums: one is to test the hacks and the other is "public". the only difference between these two forums is that the public forum has 4 template while the test forum has only one.

when i installed your hack on test forum it works good but when i install it on public forum it doesn't work.

it try to download a page named "private.php".
this page contains the right html code with all messages but the name adn the extension of the file is wrong (it may be like "some_date.html" no?)


p.s.
excuse me for me bad english
Reply With Quote
  #41  
Old 06-10-2002, 12:15 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Cano2,

I'm still curious as to what "von" means. You have it in the code for "at" or "von".
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 01:28 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.12636 seconds
  • Memory Usage 2,311KB
  • Queries Executed 25 (?)
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
  • (8)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)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_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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete