vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   Advanced Plugin Manager - Reloaded (https://vborg.vbsupport.ru/showthread.php?t=97278)

Revan 09-30-2005 10:00 PM

Advanced Plugin Manager - Reloaded
 
Advanced Plugin Manager - Reloaded v2.6


The original Advanced Plugin Manager was written by KirbyDE (found here). He expressed that this was not a release he intended to make into a full-fledged mod, and it also contained some bugs.
When I first saw the thread over at vB.com posted by Live Wire, he had photoshopped the Template Manager to indicate how Products and Plugins could work with this interface. I quite liked the idea, so I decided to make it so.
A week and one permission from Kirby later, I can present to you this Extension.

Features:
  • Mimicks the Template Manager in pretty much every sense
  • "Flag" Plugins for export/deletion
  • Remembers the expanded products indefinetely
  • Remembers the "flagged" plugins indefinetely
  • Automatically de-flags plugins when they have been exported/deleted.
  • Plugins that are subject to a disabled Product are marked as disabled themselves at runtime. Their TRUE state (as stored in the database) remains untouched.
  • Mass deletion of "flagged" plugins
  • Mass export of "flagged" plugins
  • Working "Save & Reload" button (Credits to Kirby for fixing it)
  • Shortcut to "Add / Import Product"
  • Fully phrased
  • NO Code Modifications needed!
Note:
This Extension will require page reloads for pretty much all its actions, as the Template Manager does. If you do not like this, please use Kirby's version.
Kirby does in no way support this version, nor do I support his.
Important! You need to uninstall Kirby's version before installing mine, should you choose my version.

Screenshots attached in 2nd post.

Install instructions:
  1. Click install (you want your precious support, don't you? ;)).
  2. Upload the files.
  3. Import the Product XML file through your ACP.
  4. Enjoy.
Upgrade instructions:
  1. Upload all files again.
  2. Import new product XML.
  3. Enjoy the improvements.

Revan 10-01-2005 09:42 AM

Screenshot gates hath been opened!

Jedi Blaze 10-01-2005 10:45 AM

....I love you. No seriously, awesome hack man. -clicks install-

Dan 10-01-2005 11:40 AM

Awsomeness :D

nexialys 10-01-2005 12:15 PM

i find this very interesting, but wouldn't it be more efficient to simply create a complete new plugin system, instead of replacing some functions by others ?!... i don't like to add these replacements in "admin_global" ... even if we don't have to edit the files...

Revan 10-01-2005 12:58 PM

The main reason is that the more advanced functions, like Delete Product, contain much code beyond executing delete_product(). As such, any changes in the original Jelsoft code would force me to update this hack with the new code. And in every new version, I would have to cross-check the code.
Until Jelsoft puts all the advanced functions into one big function (like delete_post() etc) and makes it easier for developers to execute all neccessary code elsewhere, this is how it must remain.

Oblivion Knight 10-01-2005 01:38 PM

[high]* Oblivion Knight bows down to you.
[/high]
This is the way that is should have always been. Jelsoft take note! ;)

Zachariah 10-01-2005 01:42 PM

Thank you Sir.

Boofo 10-01-2005 01:43 PM

I have to admit, you pulled it off. Must have been the "I'll believe it when I see it", huh? ;)

Good job! ;)

Bad Bunny 10-01-2005 01:56 PM

This looks very nice. I think I'll wait a little bit on it though. See if anyone has any trouble. I still need to update to gold anyway. *holds head at the thought of the templates*

uae 10-01-2005 04:38 PM

Clicked Hack Of The Month ;)

Thanks for sharing :)

Xplorer4x4 10-01-2005 04:41 PM

When i click Add New Plug In, i get this error.

Quote:

Fatal error: Cannot redeclare plugin_edit_handler() (previously declared in /forums/admincp/global.php(194) : eval()'d code:23) in /public_html/forums/admincp/global.php(194) : eval()'d code on line 59
Other then that it works fine so far.

Revan 10-01-2005 05:31 PM

Works for me, I just tested it on Gold version. Did you try to overwrite Kirby's version with this or something?
Either ways, you can try this, though: Open up the "Plugin System Adjustments" plugin, and change it to this:
PHP Code:

if (preg_match('/plugin\.php$/'$_SERVER['PHP_SELF']))
{
    if (!
$_REQUEST['do'] OR $_REQUEST['do'] == 'modify' OR $_REQUEST['do'] == 'product')
    {
        
exec_header_redirect('advplugins.php');
    }
    if (
$_REQUEST['do'] == 'updateactive')
    {
        function 
plugin_updateactive_handler()
        {
            
exec_header_redirect('advplugins.php');
        }
        
ob_start('plugin_updateactive_handler');
    }
    if (
$_REQUEST['do'] == 'edit' OR $_REQUEST['do'] == 'add')
    {
        if (!
function_exists('plugin_edit_handler'))
        {
            function 
plugin_edit_handler($output)
            {
                global 
$vbphrase$vbulletin;
    
                
$output str_replace("<input type=\"reset\"""<input type=\"submit\" class=\"button\" tabindex=\"1\" name=\"return\" value=\"$vbphrase[save] &amp; $vbphrase[reload]\" accesskey=\"e\" />\n<input type=\"reset\""$output);
                return 
$output;
            }
        }
        
ob_start('plugin_edit_handler');
        
$vbulletin->nozip true;
    }
    if (
$_REQUEST['do'] == 'update' AND $_REQUEST['return'])
    {
        function 
plugin_update_handler($output)
        {
            global 
$_REQUEST;
            return 
str_replace('plugin.php''plugin.php?do=edit&pluginid=' $_REQUEST[pluginid], $output);
        }
        
$vbulletin->nozip true;
        
ob_start('plugin_update_handler');
    }


See if that makes it go away :)

@others: Thanks for the nice comments, makes it all worth it :)

@Bad Bunny: I think your point was just proved ;)

Paul M 10-01-2005 06:08 PM

Very nice :)

A couple of points I notice instantly when using it ;

1. I don't like the blank line between each product.

2. I expect double clicking a product to expand/collapse it, not edit it (as per templates).

Revan 10-01-2005 06:29 PM

1. What blank line?
2. I thought of this too, but then again the templates don't allow you to edit Template Groups. It just takes some getting used to, but I would rather want to be consistent (double click = edit) than follow the Template Manager slavically.

dookie 10-01-2005 06:31 PM

fantastic hack :)

Paul M 10-01-2005 07:02 PM

Quote:

Originally Posted by Revan
1. What blank line?

I have a blank line between each product, screenshot attached.

Kirk Y 10-01-2005 07:04 PM

Quote:

Originally Posted by Paul M
Very nice :)

A couple of points I notice instantly when using it ;

1. I don't like the blank line between each product.

2. I expect double clicking a product to expand/collapse it, not edit it (as per templates).

1. See Attached (I'd like to get rid of this as well.)
2. I agree, could you provide the code to fix this, for those people that'd like to expand the Group Listing, instead of editing the Install/Uninstall code?

Revan 10-01-2005 08:56 PM

1. Figures this being Internet Explorer acting homosexual as usual...
Ill fix this up right now.

Actually, I can't fix it completely. It is just the way IE parses code. If you expand one template group in the template manager, you'll see that blank line again. At least I do, using IE7.
That being said, I can probably make it so that the number of blank lines are reduced.

Kirk Y 10-01-2005 09:10 PM

Then why aren't there any blank lines in the Styles Manager?

Paul M 10-01-2005 09:13 PM

Quote:

Originally Posted by acidburn0520
Then why aren't there any blank lines in the Styles Manager?

Exactly what I was going to ask. The styles manager works as expected. :)

Revan 10-01-2005 09:22 PM

Quote:

Originally Posted by acidburn0520
Then why aren't there any blank lines in the Styles Manager?

*points to the attachment*
You were saying?

Kirk Y 10-01-2005 09:27 PM

I thought you were talking about the Style Manager having all the blanks... I can live with a blank after an expanded group, that looks good as it seperates it from the next one.

Revan 10-01-2005 09:31 PM

Um you might wanna ahve a look at how it looks now, because it doesnt have a space where you think it does.
Its currently:
Product
*space*[indent and then its plugins]

Andreas 10-01-2005 09:33 PM

Quote:

Originally Posted by Oblivion Knight
This is the way that is should have always been.

Definitly not - in my opinion.
I really, really dislike the Style Manager.
It's visual appearance is good, but for every action it RELOADS.
And it doesn't save expanded state *big tumbs down*

Kirk Y 10-01-2005 09:37 PM

It saves the expanded state of whichever group the template you edited was in.

Quote:

Originally Posted by Revan
Um you might wanna ahve a look at how it looks now, because it doesnt have a space where you think it does.
Its currently:
Product
*space*[indent and then its plugins]

Huh? Did you update or... huh?

Edit: Ahh... okay I see what you're talking about. But the carraige return between each product is what needs to be removed...

Andreas 10-01-2005 09:38 PM

Quote:

Originally Posted by acidburn0520
It saves the expanded state of whichever group the template you edited was in.

Click somewhere else in ACP or log out and in again ... does it save state?

Kirk Y 10-01-2005 09:40 PM

Ahh... this is true. I thought you meant while you're still in the Style Manager.

Andreas 10-01-2005 09:44 PM

No.
It is gooddamn annoying when you are working on a Hack, edit a Template - then change some usergroup perm (or add a setting or whatever), you come back and the freaking style-manager forgot which template you where working on and you have to open it again ... and again and again and ... WAAAH!
How I hate this :(

Revan 10-01-2005 09:44 PM

Quote:

Originally Posted by acidburn0520
Edit: Ahh... okay I see what you're talking about. But the carraige return between each product is what needs to be removed...

Well when you don't have products expanded, theres no more space.
And just for the record, its not a carriage return per se. It is IE parsing a <select> in such a way that things that do not have a <optgroup> automatically gets space seperated from those that do. I cant speak for Opera but Firefox doesn't have this behaviour.
Quote:

Originally Posted by KirbyDE
Click somewhere else in ACP or log out and in again ... does it save state?

No, but it takes maximum 1 page reload to re-claim this state.
I could always just make it a cookie setting...

Andreas 10-01-2005 09:46 PM

If you can make it so it always remembers the last expanded product and selected plugin i'll love this Hack.
(Otherwise I'll hate it ;))

Kirk Y 10-01-2005 09:52 PM

Quote:

Originally Posted by Revan
Well when you don't have products expanded, theres no more space.
And just for the record, its not a carriage return per se. It is IE parsing a <select> in such a way that things that do not have a <optgroup> automatically gets space seperated from those that do. I cant speak for Opera but Firefox doesn't have this behaviour.

In my original screenshot (and Paul's for that matter) there weren't any products expanded, yet those spaces are still there...

Revan 10-01-2005 10:05 PM

Not after you upload the new admincp file, they arent.
Quote:

Originally Posted by KirbyDE
If you can make it so it always remembers the last expanded product and selected plugin i'll love this Hack.
(Otherwise I'll hate it ;))

Last selected Plugin too? Demanding bastard :p

Guest190829 10-01-2005 10:11 PM

mhm, this looks delicious. I Will test it out. :)

[high]* Guest190829 clicks install.[/high]

Kirk Y 10-01-2005 10:11 PM

Quote:

Originally Posted by Revan
Not after you upload the new admincp file, they arent.

Thanks, looks great now. Any chance of telling us how to make it so double-clicking a product expands it, instead of editing it? :rolleyes:

Mr Chad 10-01-2005 10:46 PM

Quote:

Originally Posted by Revan
1. What blank line?
2. I thought of this too, but then again the templates don't allow you to edit Template Groups. It just takes some getting used to, but I would rather want to be consistent (double click = edit) than follow the Template Manager slavically.

Very nice!

Revan 10-01-2005 11:01 PM

Quote:

Originally Posted by acidburn0520
Thanks, looks great now. Any chance of telling us how to make it so double-clicking a product expands it, instead of editing it? :rolleyes:

Ugh, hassle++ :p
Hm I have some stuff not related to this I gotta take care of first, I just finished the cookie saving stuff.
Ill have this done soonish.

Edit: Done. Im not bothering with that last selected plugin thingy, you can move your mouse and click the button once, Kirby dont be a lazy sod XD

Paul M 10-02-2005 10:14 AM

Update fails;

PHP Code:

Database error in vBulletin 3.5.0:

Invalid SQL:
ALTER TABLE `pluginADD `flagTINYINTUNSIGNED DEFAULT '0' NOT NULL;

MySQL Error  Duplicate column name 'flag'
Error Number 1060
Date         
SundayOctober 2nd 2005 12:12:40 PM
Script       
: [url]http://www.xxxxx.xxxx/board/admincp/plugin.php[/url]
Referrer     : [url]http://www.xxxx.xxxx/board/admincp/plugin.php?do=productadd[/url]
IP Address   xx.xx.xx.xx
Username     
Paul M
Classname    
vb_database 


Revan 10-02-2005 10:51 AM

XML reimport not really needed, I just put it there so the Product version number can be updated :p

Xplorer4x4 10-02-2005 11:02 AM

Quote:

Originally Posted by Revan
XML reimport not really needed, I just put it there so the Product version number can be updated :p

Now you tell us! :p Just an FYI if any one really cares, you can disable this plug in, upload the new XML, and the re-enable the product.

@Revan, I actually thought I would like Kirby's better but you got me hooked! Thanks for the great plug-in.


All times are GMT. The time now is 12:46 PM.

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.01509 seconds
  • Memory Usage 1,855KB
  • 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
  • (2)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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