Thread Rating:
  • 10 Vote(s) - 4.5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Undo Delete - Restore deleted posts/threads/attachments/polls
#51
I can't see "Undo Delete" in the manteinance menu.
Uploaded plugin and language pack.
Any tip?
Thanks!
Foroholic.com: adicto a administrar foros.
Reply
#52
I'm getting
Quote:Fatal error: Class 'Text_Diff_Renderer' not found in /home/vivavoxc/public_html/forum/inc/3rdparty/diff/Diff/Renderer/inline.php on line 32
as well. How can this be solved?
Reply
#53
(2014-02-28, 03:24 PM)palmanus Wrote: I'm getting
Quote:Fatal error: Class 'Text_Diff_Renderer' not found in /home/vivavoxc/public_html/forum/inc/3rdparty/diff/Diff/Renderer/inline.php on line 32
as well. How can this be solved?

maybe this will help you?

http://community.mybb.com/thread-61600-p...pid1013993
Reply
#54
(2014-02-28, 03:24 PM)palmanus Wrote: I'm getting
Quote:Fatal error: Class 'Text_Diff_Renderer' not found in /home/vivavoxc/public_html/forum/inc/3rdparty/diff/Diff/Renderer/inline.php on line 32
as well. How can this be solved?

Hey,

try this changes:

Changes this (Line 240)

function undodelete_compare_table($table)
{
	global $db,$lang;
	undodelete_lang();
	require_once MYBB_ROOT.'inc/3rdparty/diff/Diff.php';
	require_once MYBB_ROOT.'inc/3rdparty/diff/Diff/Renderer/inline.php';
	$create_backup=$db->show_create_table(BACKUPTABLE_PREFIX.$table);
	$create_backup=preg_replace('#AUTO_INCREMENT=([0-9]+) #Usi','',$create_backup);
	$create=$db->show_create_table($table);
	$create=str_replace(TABLE_PREFIX.$table,TABLE_PREFIX.BACKUPTABLE_PREFIX.$table,$create);
	$create=preg_replace('#AUTO_INCREMENT=([0-9]+) #Usi','',$create);
	$create_backup=explode("\n",$create_backup);
	$create=explode("\n",$create);
	$diff=&new Text_Diff('auto',array($create_backup,$create));
	$renderer=&new Text_Diff_Renderer_inline();
	$itable=new Table;
	$itable->construct_cell('<pre>'.$renderer->render($diff).'</pre>');
	$itable->construct_row();
	$itable->output($lang->sprintf($lang->undodelete_update_table,TABLE_PREFIX.BACKUPTABLE_PREFIX.$table));
}

to this:

function undodelete_compare_table($table)
{
	global $db,$lang;
	undodelete_lang();
	require_once MYBB_ROOT.'inc/3rdparty/diff/Diff.php';
	require_once MYBB_ROOT.'inc/3rdparty/diff/Diff/Renderer.php';
	require_once MYBB_ROOT.'inc/3rdparty/diff/Diff/Renderer/Inline.php';
	$create_backup=$db->show_create_table(BACKUPTABLE_PREFIX.$table);
	$create_backup=preg_replace('#AUTO_INCREMENT=([0-9]+) #Usi','',$create_backup);
	$create=$db->show_create_table($table);
	$create=str_replace(TABLE_PREFIX.$table,TABLE_PREFIX.BACKUPTABLE_PREFIX.$table,$create);
	$create=preg_replace('#AUTO_INCREMENT=([0-9]+) #Usi','',$create);
	$create_backup=explode("\n",$create_backup);
	$create=explode("\n",$create);
	$diff=&new Horde_Text_Diff('auto',array($create_backup,$create));
	$renderer=&new Horde_Text_Diff_Renderer_inline(); 
	$itable=new Table;
	$itable->construct_cell('<pre>'.$renderer->render($diff).'</pre>');
	$itable->construct_row();
	$itable->output($lang->sprintf($lang->undodelete_update_table,TABLE_PREFIX.BACKUPTABLE_PREFIX.$table));
}

These changes work for me perfect.

Best regards
Bodo
Reply
#55
What's the difference between "restore backup" and "restore thread"?
Reply
#56
If you are using 1.8 then the "soft delete" concept is built in.
Random Fish and Sims Maniac
MY PLUGINS
Help MyBBSupport help you - remember to mark your threads as solved


Reply
#57
I know, but I don't feel like updating right now, because I don't have time to update the necessary plugins.
Reply


Forum Jump:


Users browsing this thread: