Not Solved Plugin "QUICK REINSTALL"
#1
Not Solved
Hello,
I installed "Quick Reinstall" base on "http://mods.mybb.com/view/quick-re-install".

But the things that i confuse about MANUAL INSTALL that mentioned in that page:

ADD
PHP Code:
$table->construct_cell(" ", array("class" => "align_center", "width" => 150));
end of the if($installed == false) statement before closed with bracket.

ADD
PHP Code:
$table->construct_cell($quickri, array("class" => "align_center", "width" => 150));
end of the else if($active_plugins[$codename]) statement before closed with bracket.

ADD
PHP Code:
$table->construct_cell(" ", array("class" => "align_center", "width" => 150));
end of the else if($installed == true) statement before closed with bracket.


My question is: I have to add those command in which place?
is it after "$table->construct_header($lang->controls, array("colspan" => 2, "class" => "align_center", "width" => 300)); "?
Reply
#2
Not Solved
No.

$table->construct_header($lang->controls, array("colspan" => 2, "class" => "align_center", "width" => 300));
needs to be changed to:
$table->construct_header($lang->controls, array("colspan" => 3, "class" => "align_center", "width" => 300));

Also:
			if($installed == false)
			{
				if($compatibility_warning)
				{
					$table->construct_cell("{$compatibility_warning}", array("class" => "align_center", "colspan" => 2));
				}
				else
				{
					$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=activate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->install_and_activate}</a>", array("class" => "align_center", "colspan" => 2));
				}
			}
			// Plugin is activated and installed
			else if($active_plugins[$codename])
			{
				$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=deactivate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->deactivate}</a>", array("class" => "align_center", "width" => 150));
				if($uninstall_button)
				{
					$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));
				}
				else
				{
					$table->construct_cell("&nbsp;", array("class" => "align_center", "width" => 150));
				}
			}
			// Plugin is installed but not active
			else if($installed == true)
			{
				$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=activate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->activate}</a>", array("class" => "align_center", "width" => 150));
				if($uninstall_button)
				{
					$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));
				}
				else
				{
					$table->construct_cell("&nbsp;", array("class" => "align_center", "width" => 150));
				}
			}
should be replaced with:
			if($installed == false)
			{
				if($compatibility_warning)
				{
					$table->construct_cell("{$compatibility_warning}", array("class" => "align_center", "colspan" => 2));
				}
				else
				{
					$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=activate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->install_and_activate}</a>", array("class" => "align_center", "colspan" => 2));
				}
                                $table->construct_cell(" ", array("class" => "align_center", "width" => 150));
			}
			// Plugin is activated and installed
			else if($active_plugins[$codename])
			{
				$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=deactivate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->deactivate}</a>", array("class" => "align_center", "width" => 150));
				if($uninstall_button)
				{
					$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));
				}
				else
				{
					$table->construct_cell("&nbsp;", array("class" => "align_center", "width" => 150));
				}
                                $table->construct_cell($quickri, array("class" => "align_center", "width" => 150)); 
			}
			// Plugin is installed but not active
			else if($installed == true)
			{
				$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=activate&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->activate}</a>", array("class" => "align_center", "width" => 150));
				if($uninstall_button)
				{
					$table->construct_cell("<a href=\"index.php?module=config-plugins&amp;action=deactivate&amp;uninstall=1&amp;plugin={$codename}&amp;my_post_key={$mybb->post_code}\">{$lang->uninstall}</a>", array("class" => "align_center", "width" => 150));
				}
				else
				{
					$table->construct_cell("&nbsp;", array("class" => "align_center", "width" => 150));
				}
                                $table->construct_cell(" ", array("class" => "align_center", "width" => 150));
			}

But I don't really see the usefulness of this - it just saves one click. If you really want to apply these changes, I recommend doing this with Patches plugin: http://mods.mybb.com/view/patches
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)