Welcome to Egypt Forums Mark forums read | Egypt Main Page
Egypt Forums
Arabic Movies



Articles Thread, phpcode Preview in Plugin Manager in vBulletin; phpcode Preview in Plugin Manager Ever been searching for a plugin and wish you didn't have to open each one ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=4986


Reply
LinkBack Thread Tools Display Modes
phpcode Preview in Plugin Manager
 
 
The God Father
Developer's Avatar

Reply With Quote
 
Join Date: Jul 2008
Location: NDC
Posts: 5,425
22-10-2008, 02:24 AM
 
phpcode Preview in Plugin Manager

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:
PHP Code:
$title = ($plugin['active'] AND $product['active']) ? $title : "<strike>$title</strike>";


Right under it add:
PHP Code:
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:
PHP Code:
"<a href=\"plugin.php?" . $vbulletin->session->vars['sessionurl'] . "do=edit&amp;pluginid=$plugin[pluginid]\">$title</a>",


And change it to:
PHP Code:
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.
__________________
I Love Walking In The Rain Cuz Nobody Know I'm Crying !!
 
 
 
Reply

Articles Thread, phpcode Preview in Plugin Manager in vBulletin; phpcode Preview in Plugin Manager Ever been searching for a plugin and wish you didn't have to open each one ...

Short Link: http://forum.egypt.com/enforum/showthread.php?t=4986


Bookmarks

Tags
manager, phpcode, plugin, preview


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to make a plugin: Developer Articles 0 28-09-2008 08:12 PM
I want to learn to develop a plugin – where should I start ? Developer Articles 0 28-09-2008 07:49 PM
Wrestling Day 3 Preview: War of the giants Developer Beijing 2008 4 14-08-2008 08:20 PM
Overall Day 1 Preview: Let the action commence Developer Beijing 2008 0 09-08-2008 03:03 AM
Badminton Day 1 Preview: Shuttlers take off Developer Beijing 2008 0 08-08-2008 08:16 PM