Back to vBulletin Tips & Tricks

phpcode Preview in Plugin Manager
by Lynne 19 Oct 2008

Ever been searching for a plugin and wish you didn't have to open each one to edit to find the one you want? All you need is to see the first couple lines in order to see if it's the one you want, so why not have a preview like you can with threads?

Open up admincp/plugin.php and find this code:
PHP Code:
$title = ($plugin['active'] AND $product['active']) ? $title "<strike>$title</strike>"

Right under it add:
PHP Code:
$preview strip_quotes($plugin['phpcode']);
$preview htmlspecialchars_uni(fetch_trimmed_title($preview,200)); 

Now find this line (a couple lines below the above lines):
PHP Code:
"<a href=\"plugin.php?" $vbulletin->session->vars['sessionurl'] . "do=edit&amp;pluginid=$plugin[pluginid]\">$title</a>"

And change it to:
PHP Code:
"<a href=\"plugin.php?" $vbulletin->session->vars['sessionurl'] . "do=edit&amp;pluginid=$plugin[pluginid]\" title=\"$preview\">$title</a>"

Save the file and upload it. Now when you hover your mouse over the plugin link in the Plugin Manager, you should see the first 200 characters of the phpcode. (If you want more or less than 200 characters, then change that number in the second $preview statement above.)

I've tested this on both my 3.6.8 board and my 3.7.3 board and it worked fine.

Similar Mods

Administrative and Maintenance Tools Advanced Plugin Manager vBulletin 3.6 Add-ons
Advanced Plugin Manager vBulletin 3.5 Add-ons
Advanced Plugin Manager vBulletin 3.5 Add-ons

vblts.ru supports vBulletin®, 2022-2024