![]() |
private messages backup hack
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 |
Works well! I uninstalled the download PM hack, and changed to your.
Thanks! |
thanks, great job!
|
Still haven't tested it but looks promising. :) Will probably install this one here later.
You know what would be ever "awesomer"? If you could download AND upload your PM's. :D Just a thought tho. |
nice. added. ;)
demo on cano2's board.. ;) |
@FireFly:
I thought about that too.. It's not trivial, because the format of the messages can be changed via template, but it's a nice challenge and not too difficult... An other good idea is to add a new status symbol for PMs wich indicates, which messages are allready backed up. This prevents people from deleting messages by accident. (thx @ lou for this suggestion) I will add these features, if i have the time.. Cano2 |
please move to full releases. thanks.
|
Problem
getting a parse error on this line eval("dooutput(\"".gettemplate("privbackup")."\"); "); //and run everything through the template |
hm.. this line of code itself is syntacally correct...
Paste the exact error message, the 2-3 lines of code before this line and the code in the privbackup_header template please! Does the errmsg say, the error occured in "eval()'d code"??? |
Working fine for me with no errors.
|
Parse error: parse error in c:\program files\nusphere\apache\htdocs\forums\private.php(18 1) : eval()'d code on line 1
|
The error is not in that line but in the code it's trying to evaluate (i.e the template).
|
right.. the error is probably in the privbackup_header template (witch has to be valid phpcode)
Cano2 |
"Added a new status symbol for PMs wich indicates, which messages are allready backed up."
good work.. but can you add different graphics? (forward&save, replay&save)? this would be very useful... |
For those who are updating from the previous version:
******************** open private.php ******************** search for: eval(gettemplate("privbackup_header",0)); eval("dooutput(\"".gettemplate("privbackup")."\"); "); //and run everything through the template ******************** after it insert: //set status to "backed up" $DB_site->query("UPDATE privatemessage SET messageread=4 WHERE $cond"); ******************** search for: eval(stripslashes(gettemplate("privbackup_header") ); ******************** replace with: eval(gettemplate("privbackup_header",0)); ******************** download the new hack, and move pmbackedup.gif to /images @lou thx.. to add the support for more icons is not a problem, but to create the icons ( 16x16 ist not much space ...). I'll do my best lates Cano2 |
Also, when updating from the previous version, make these changes too:
********************************* search for: PHP Code:
right after it insert: PHP Code:
|
hoops.. thx. Dunno where I have lost my brain today.
|
Hi Cano2
I have just installed this great hack on my Board and it seems to work fine. I have just one little question: I'm working with Mac OS X 10.1.3 and after I download my pm's, I find a file called "private.php" on my desktop, which contains the private messages. But before it can opened in a Browser, I must change the File-Extension every time manualy to "private.html". Is there a way to have the correct Extension (.html) after Download by default? |
hm. I doesn't have a mac, so I can't test it, but i'm sure its because of the headers in the "privbackup_header".. although the behaviour for the "Content-Disposition" header is clearly defined in the http-rfc, every browser behaves different. These headers were the best I found, but I will search again for a way to tweak these headers.
btw: which browser(s) are you using? Cano2 |
First, thanks for your reply. I use OmniWeb 4.1 (a Mac OS X only Browser) and MS Internet Explorer 5.1.3 for Mac OS X.
Let me know, if you find a solution. |
One Problem, the text "Save as a HTML File" is not shown anywhere...
|
I'm not sure if I understand your problem...
Did you used the optional "privbackup_header" template and now wondering about that message in the "privbackup" template?? It is included in the backup file and thus senseless (you can remove that messe form the template). Its thought to be used, when you don't use the "privbackup_header" template then a simple html page containig the messaged shows up in the browser, and this message tells the user, what to do... I think I schould correct the hacking instructions to make that more clear. thx Cano2 |
I just want to say thanks for this hack. I have representatives of financial firms on my site who must comply with regulations that require them to keep a record of all correspondence with their clients, even private messages. This hack enabled them to do that. Thanks again!
|
hi,
does it work with 2.2.5 release? :) |
One thing is that it does not change the icon in 2.2.5 after you back it up. I have looked through the code and it does not change the field "messageread" in the privatemessage table to "4" for case 4.
Any ideas? I tried adding this to the while statement you added to private.php: PHP Code:
|
Hi,
I've a problem. I succefully install this hack on my backup-board but when I tried to install the same hack on my public vbulletin the page to download didn't work. It trie to download named "private.php". The header's lines didn't work... why? Note: in my backup-board i've only one template; in my "public" vbulletin i've 5 template... |
i have the same problem as saibal
|
What does "von" mean in English? Here is the line of code i found it in.
May 9, 2002, 9:10 pm von Boofos Babe. |
Also, is there any way to have the messages save like they are written? Like using the same formatting. I saved a message tonight that had some quotes listed in it by numbers (1..2...3, etc) and the writing when it was saved was all run together in one paragrah.
Great hack, by the way! Uninstalled the buggy one and installed this one. :) |
Go to Post #15 in this thread and do the first find and replace step and the icon will appear after you have backed up the messages. :)
Quote:
|
Great Hack! Thanks!
|
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? |
Cano2,
Are you still supporting this hack? I'm still having a problem with the message format on saved messages. |
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 Code:
$msgs= $DB_site->query("SELECT |
@Boofoo:
There are two ways, it depends on what you want: first find Code:
eval("\$messages .= \"".gettemplate("privbackup_message")."\";"); Code:
$message[message]=nl2br($message[message]); Code:
$message[message]=pmcodeparse($message[message],0,$allowsmilies); Hope that helps you Maybe I find a way to include the first one in the next release... Cano2 |
hi cano2,
have you suggestions for my problem? :) |
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?
|
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. :eek:) 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:
|
Quote:
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 :) |
Cano2,
I'm still curious as to what "von" means. :) You have it in the code for "at" or "von". |
All times are GMT. The time now is 09:48 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|