vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - vbPluginOrder (https://vborg.vbsupport.ru/showthread.php?t=111679)

hambil 04-07-2006 04:54 PM

Quote:

Originally Posted by luroca
This can be a very useful hack. I click install for future use :)
Is it working ok now?

Thanks

It seems to be :)

jazde86 04-11-2006 09:39 AM

Sorry, but the plugin makes a lot of trouble. When there are "0" in a field, then other plugins doesn't work anymore, example for that ist the "Who has visited today"-Plugin. The same with "The threadprefix"-Plugin.

I deactivated it.

hambil 04-11-2006 11:52 AM

Quote:

Originally Posted by jazde86
Sorry, but the plugin makes a lot of trouble. When there are "0" in a field, then other plugins doesn't work anymore, example for that ist the "Who has visited today"-Plugin. The same with "The threadprefix"-Plugin.

I deactivated it.

Hmmmm. Could you be more specific? I tried installing two plugins in the same hook and setting the order of one to "0" and it worked fine.

jazde86 04-11-2006 12:34 PM

Plugin "Members who have visited the forum":

cache_templates -> Members who have visited (1) -> Order "0" The Plugin doesn't shown on forumhome, switch to "1" and ahh, there is it. ;)

forumhome_start -> Members who have visited (2)


Other Plugins in cache_templates:
  • Post Thank You Hack
  • Top 'X' Stats by InfiniteWebby
  • vB Pager 3.0.4
  • VBGooglemap by StonyArc

robert_2004 04-20-2006 01:41 PM

i can't get the 'plugin order' showing up in my adminCP's left menu pane.

hambil 04-20-2006 02:27 PM

Quote:

Originally Posted by robert_2004
i can't get the 'plugin order' showing up in my adminCP's left menu pane.

Hmmm. You've uploaded all the files? There is an xml file for the cpnav that has to be uploaded.

robert_2004 04-20-2006 04:09 PM

there are no files to upload on this thread mate. only the xml product.

hambil 04-20-2006 04:29 PM

Quote:

Originally Posted by robert_2004
there are no files to upload on this thread mate. only the xml product.

Well, that's a problem. Now I'm wondering what the other people who install this are doing...

Give me a few minutes and I'll fix that and replace with a zip.

Logician 05-14-2006 08:45 AM

Edit : Hambil fixed the problem below in his pluggin. Thanks!


This hack causes serious problems if your board has table prefixes. If it is installed in a board where tables are prefixed, the board start producing DB errors and it won't even allow you to access admin cp and disable product. So if you dont know what you are doing, you'll get stuck in a very bad position.

Problem & Fix:

This query in the pluggin is problematic:

PHP Code:

SELECT p.*, po.`orderFROM " . TABLE_PREFIX . "pluginorder AS po
JOIN plugin 
AS p ON(p.pluginid po.pluginid)
ORDER BY p.hooknamepo.order 

It should be:
PHP Code:

SELECT p.*, po.`orderFROM " . TABLE_PREFIX . "pluginorder AS po
LEFT JOIN 
" . TABLE_PREFIX . "plugin AS p ON(p.pluginid po.pluginid)
ORDER BY p.hooknamepo.order 

If you installed the hack and stuck with an DB error and you can't even access admin cp here is the fix for you:

Edit includes/init.php, find:
PHP Code:

if ($vbulletin->options['enablehooks'] OR defined('FORCE_HOOKS')) 

Before that add:
PHP Code:

$vbulletin->options['enablehooks'] = FALSE

Upload init.php.

This will cure DB error and now you can login to admin cp. Go to products and uninstall the product. Now delete the line you edit to init.php, reupload init.php and you are done.

@hambil : Sorry to post this into your thread and I appreciate your sharing your work with other vb members but I feel obligated to post this so that people won't get into trouble. It maybe a good idea to apply the fix I provided to your pluggin. Sorry again!

Boofo 05-14-2006 08:55 AM

An easier way is to add a disable hooks line to the config.php. That way you could comment it out and use it again if you had to. ;)

PHP Code:

define('DISABLE_HOOKS'true); 


Marco van Herwaarden 05-14-2006 09:00 AM

Thanks for providing this solution for members with problems.

Although your solution works, the proper way to disable all plugins from outside the ACP, is to add the following line to yhe includes/config.php:
PHP Code:

define('DISABLE_HOOKS'true); 


Boofo 05-14-2006 09:07 AM

That's what I just posted above, sir. ;)

akanevsky 05-14-2006 11:37 AM

Although I could see how this hack could be useful, I'd like to point out two things:
1. It would encourage a bunch of already-lazy coders to NOT care about making their hack in a way that would guarantee absense of conflicts with other hacks.
2. Instead of creating a new table and having to implement a whole new block of code, you should've added a displayorder column to the plugin table and used that.

hambil 05-14-2006 12:34 PM

Quote:

Originally Posted by Logician
Warning:
This hack causes serious problems if your board has table prefixes. If it is installed in a board where tables are prefixed, the board start producing DB errors and it won't even allow you to access admin cp and disable product. So if you dont know what you are doing, you'll get stuck in a very bad position.

Problem & Fix:

This query in the pluggin is problematic:

PHP Code:

SELECT p.*, po.`orderFROM " . TABLE_PREFIX . "pluginorder AS po
JOIN plugin 
AS p ON(p.pluginid po.pluginid)
ORDER BY p.hooknamepo.order 

It should be:
PHP Code:

SELECT p.*, po.`orderFROM " . TABLE_PREFIX . "pluginorder AS po
LEFT JOIN 
" . TABLE_PREFIX . "plugin AS p ON(p.pluginid po.pluginid)
ORDER BY p.hooknamepo.order 

If you installed the hack and stuck with an DB error and you can't even access admin cp here is the fix for you:

Edit includes/init.php, find:
PHP Code:

if ($vbulletin->options['enablehooks'] OR defined('FORCE_HOOKS')) 

Before that add:
PHP Code:

$vbulletin->options['enablehooks'] = FALSE

Upload init.php.

This will cure DB error and now you can login to admin cp. Go to products and uninstall the product. Now delete the line you edit to init.php, reupload init.php and you are done.

@hambil : Sorry to post this into your thread and I appreciate your sharing your work with other vb members but I feel obligated to post this so that people won't get into trouble. It maybe a good idea to apply the fix I provided to your pluggin. Sorry again!

This was one of my first hacks. I thought I'd fixed the table prefix issue in this - not sure how it crept back in. Anyway, thanks for pointing out. Perhaps a PM next time? :)

Edit: In fact I know I did - it's in the description of version 1.1. Somehow version 1.0 got reuploaded.

hambil 05-14-2006 12:37 PM

Quote:

Originally Posted by Psionic Vision
Although I could see how this hack could be useful, I'd like to point out two things:
1. It would encourage a bunch of already-lazy coders to NOT care about making their hack in a way that would guarantee absense of conflicts with other hacks.

That's silly. You can't possible predict what conflicts your hack might have with other hacks. And this isn't just for conflicts. What if you simply want to re-order things on forum home, for example?

Quote:

2. Instead of creating a new table and having to implement a whole new block of code, you should've added a displayorder column to the plugin table and used that.
That's your opinion. I prefer not to modify vb core tables if I can help it. The new table is indexed and performance is not an issue.

akanevsky 05-14-2006 12:45 PM

Quote:

You can't possible predict what conflicts your hack might have with other hacks.
True, you cannot predict. But you can avoid altering vBulletin core with your hacks, which is what many coders do, and which is what leads to problems.

Quote:

What if you simply want to re-order things on forum home, for example?
Last time I checked, to re-order things in the front end, you edit the templates. Templates, in their turn, do not have hooks so they have nothing to do with ordering.

Quote:

That's your opinion. I prefer not to modify vb core tables if I can help it. The new table is indexed and performance is not an issue.
That's not just my opinion, it's a fact. "JOIN" always requires more from the server than a straightforward "SELECT FROM". However, it was only a suggestion. You're the boss of your hack, so you may or may not follow it, depending on what you want...

hambil 05-14-2006 12:53 PM

Quote:

Originally Posted by Psionic Vision
True, you cannot predict. But you can avoid altering vBulletin core with your hacks, which is what many coders do, and which is what leads to problems.

Don't like my hack, don't find it useful, don't install it. Fine with me. I don't know why you feel you have to come in here and say so though. I created this hack because people requested, so obviously not all feel as you do. When did we start going into others hacks and publicly criticizing them?

Quote:

Last time I checked, to re-order things in the front end, you edit the templates. Templates, in their turn, do not have hooks so they have nothing to do with ordering.
And then when you upgrade you have to re-edit all those templates.

Quote:

That's not just my opinion, it's a fact. "JOIN" always requires more from the server than a straightforward "SELECT FROM". However, it was only a suggestion. You're the boss of your hack, so you may or may not follow it, depending on what you want...
It is most certainly an opinion, not a 'fact'. The cost of a proper join is nearly non-existant, especially compared to the design and maintainence benifits. It's called a relational database because it's designed for related tables, not flat tables.

hambil 05-14-2006 12:56 PM

I removed the old 1.0 zip and reuploaded the 1.1. zip. That should take care of the table_prefix problem.

akanevsky 05-14-2006 12:58 PM

Quote:

Don't like my hack, don't find it useful, don't install it. Fine with me. I don't know why you feel you have to come in here and say so though. I created this hack because people requested, so obviously not all feel as you do. When did we start going into others hacks and publicly criticizing them?
To ensure that you aren't going to be criticized, don't release hacks.
Just to point out, however, I did say that I find how this hack could be useful.

Quote:

And then when you upgrade you have to re-edit all those templates.
That, once again, has nothing to do with plugins.

Quote:

It is most certainly an opinion, not a 'fact'. The cost of a proper join is nearly non-existant, especially compared to the design and maintainence benifits. It's called a relational database because it's designed for related tables, not flat tables.
I am not going to argue about it, I am just going to say that in my opinion, creating an extra field for just one table is a waste.

hambil 05-14-2006 12:59 PM

Quote:

Originally Posted by Psionic Vision
I am only giving you suggestions. If you don't like people giving you suggestions, let everyone know publicly to rid yourself of it. Thanks for understanding.

Sorry if I over-reacted. I'm always open to suggestions. :)

Quote:

I am not going to argue about it, I am just going to say that in my opinion, creating an extra field for just one table is a waste.
So noted :)

Logician 05-14-2006 04:03 PM

Quote:

Originally Posted by hambil
Anyway, thanks for pointing out. Perhaps a PM next time? :)

Sorry I didn't want to offend at all! The reason I posted publicly was to post the fix in case some people got stuck after installation. If you updated the hack and prefer better I can delete my post, it is np.

hambil 05-14-2006 04:06 PM

Quote:

Originally Posted by Logician
Sorry I didn't want to offend at all! The reason I posted publicly was to post the fix in case some people got stuck after installation. If you updated the hack and prefer better I can delete my post, it is np.

Nah. I deserve a little public humilation for 1) leaving out the table prefix in the first place and 2) screwing up and uploading the wrong version of the zipfile. :) That'll learn me!

jazde86 05-14-2006 09:51 PM

hambil is very nice and at any time friendly. I like him. :cool: Thank you for updating it. :)

MThornback 05-21-2006 04:54 AM

IE Error:

Fatal error: Call to undefined function: can_administer() in ../forum/index.php(485) : eval()'d code on line 220

Plugin Manager causes this on forumhome for IE, not FF for some reason....thats a switch eh?

hambil 05-21-2006 05:25 AM

Quote:

Originally Posted by MThornback
IE Error:

Fatal error: Call to undefined function: can_administer() in ../forum/index.php(485) : eval()'d code on line 220

Plugin Manager causes this on forumhome for IE, not FF for some reason....thats a switch eh?

Can I get access to your forum so I can try to debug this?

MThornback 05-21-2006 05:26 AM

I have a guaest admin for just such an ocasion....PM your way shortly!

hambil 05-21-2006 12:52 PM

Quote:

Originally Posted by MThornback
I have a guaest admin for just such an ocasion....PM your way shortly!

Okay, it seems to be working all okay now. Let me know if you have any more problems.

I fixed a bug that was causing plugin order not to run.

The random numbers you where getting where due to Hellcats page compressor. I moved it to the first plugin in its hook and that seems to have fixed that.

MThornback 05-25-2006 08:42 AM

I have good news hambil :p remember how I told you no dice? Well all of a sudden today it started working with this hack :cool: I told ya it would all work out in the end :D

hambil 05-25-2006 03:15 PM

Quote:

Originally Posted by MThornback
I have good news hambil :p remember how I told you no dice? Well all of a sudden today it started working with this hack :cool: I told ya it would all work out in the end :D

Woot! Thanks for the update :)

nowrap 07-10-2006 12:15 PM

hello!

just installed the 1.2 release of this plugin. it killed me server due to high load.
the reason is quite simple. with this product activated it runs deactive plugins! without the deactivated plugins aren't executed!

did i made something wrong? uploading the 2 files and importing the product.xml

regards
.nowrap

hambil 08-28-2006 01:18 AM

This hack is being retired and no longer supported, as it is included in 3.6.

hambil 04-12-2007 11:48 PM

This hack has had the file removed, as it is not stable and the functionality already exists not in 3.6. Most likely this thread will get deleted for having no files when someone gets around to noticing :) If you really want it PM me.


All times are GMT. The time now is 01:31 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.01596 seconds
  • Memory Usage 1,850KB
  • 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
  • (10)bbcode_php_printable
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (32)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