vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   private messages backup hack (https://vborg.vbsupport.ru/showthread.php?t=37172)

JZarate 06-01-2002 10:45 PM

Great Hack! Thanks!

Angelus1753 06-08-2002 10:46 AM

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?

Boofo 06-08-2002 11:29 AM

Cano2,

Are you still supporting this hack? I'm still having a problem with the message format on saved messages.

Cano2 06-09-2002 11:12 AM

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

Cano2 06-09-2002 11:45 AM

@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

saibal 06-09-2002 02:16 PM

hi cano2,

have you suggestions for my problem? :)

Cano2 06-09-2002 02:28 PM

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?

Boofo 06-09-2002 06:33 PM

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:

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


saibal 06-09-2002 10:27 PM

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 :)

Boofo 06-10-2002 12:15 AM

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 11:32 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.01239 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_code_printable
  • (2)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete