vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 5.x Products & Extensions (https://vborg.vbsupport.ru/forumdisplay.php?f=258)
-   -   Major Additions - [BETA 2] vBFoster - The Missing vBulletin Features [Lite] (https://vborg.vbsupport.ru/showthread.php?t=287910)

MARCO1 09-22-2012 05:36 PM

Quote:

Originally Posted by simonhind (Post 2367698)
he's talking about your install code when your inserting new tables within the database

$vbulletin->db->

Even within your installation code you should never use $vbulletin anymore in vBulletin 5 as $vbulletin is planned to be dropped very soon, So don't use it in any of your modifications in the long term :)

PHP Code:

$vbulletin->db = &vB::getDBAssertor()->getDBConnection(); 


nhawk 09-22-2012 06:09 PM

Quote:

Originally Posted by MARCO1 (Post 2367696)
Unfortunate that's not true, vBulletin doesn't have a custom database engine,There's no other way to make a query in MySQL without using mysql_query(), vBulletin use a normal mysql queries that has been advanced by making a custom classes like any other database classes.

In vB 5 you should be using...
PHP Code:

vB::getDbAssertor()->update('node', array('approved' => '0'), array('nodid' => $nid)); 

Not...
PHP Code:

mysql_query("UPDATE node SET approved = '0' WHERE nodeid = '$nid'"); 

You will run into problems on many Nginx servers using the later method.

The vb 4 equivalent was only mentioned because many Nginx servers have trouble if you don't use the $vbulletin->db->... and use a straight mysql query in a mod's code.

MARCO1 09-23-2012 12:17 AM

Quote:

Originally Posted by nhawk (Post 2367722)
In vB 5 you should be using...
PHP Code:

vB::getDbAssertor()->update('node', array('approved' => '0'), array('nodid' => $nid)); 

Not...
PHP Code:

mysql_query("UPDATE node SET approved = '0' WHERE nodeid = '$nid'"); 


I know how to do that via vB Assertor "There's a full tutorial about it within the alpha team" It will be visible to the public when vB5 goes Gold and for sure there's some more great tutorials will be released to all of the developers as well.

Quote:

Originally Posted by nhawk (Post 2367722)
You will run into problems on many Nginx servers using the later method.

The vb 4 equivalent was only mentioned because many Nginx servers have trouble if you don't use the $vbulletin->db->... and use a straight mysql query in a mod's code.

That's technically not possible as I told you, vBulletin is also use mysql_query() function there's no innovative in vBulletin database class, There's no way ever to make a mysql query without using mysql_query() and that's how vBulletin database assertor make a query to database, It's use mysql_query() so how it will not make a problem with vBulletin and will make a problem with modifications.

In other hand, Since 5 minutes ago, To make things very clear with me I was discussing this with a vBulletin Developer, Which is said the same thing, He's never heard about any issues with nginx about that.

P.S : There's a benefit to use a direct straight mysql_query in your mods, If you are working in a huge project like vBFoster pro, Instead of upgrading the database structure every time vBulletin changing it, You have two options :

1- Build your own project database class. "Which is done for the vBFoster Pro version"
2- Use mysql_query() function directly.

So when vBulletin release a new updated code base, You will just need to change the template display code and phrases no more :)

You can safely use mysql_query() in any of your modification in vBulletin :up:

vBFoster 09-23-2012 12:33 AM

Quote:

1) Most *nix servers are case sensitive. You must use lower case letters for the package name in the core/packages folder. (if you don't believe that, check the thread about DBTech's infopanels mod in the alpha forums - page 2 post 18)
A new version has been released based on this suggestion, Hope this will really fix your problems as we don't have enough information about the problem, We are not experiencing these issues in our testing servers.

nhawk 09-23-2012 10:19 AM

OK, I'll just stick to reporting what I find..

In the latest version I get these errors prior to the mod being installed...

Code:

Strict Standards: call_user_func_array() expects parameter 1 to be a valid
callback, non-static method vBFoster_Api_Phrase::fetch() should not be called statically in /var/www/html/vb5b10
/core/vb/api/wrapper.php on line 126
Notice: Undefined index: powered_by_vbulletin in /var/www/html/vb5b10
/core/packages/vbfoster/api/phrase.php on line 15


MARCO1 09-23-2012 04:43 PM

Quote:

Originally Posted by nhawk (Post 2367856)
OK, I'll just stick to reporting what I find..

In the latest version I get these errors prior to the mod being installed...

Code:

Strict Standards: call_user_func_array() expects parameter 1 to be a valid
callback, non-static method vBFoster_Api_Phrase::fetch() should not be called statically in /var/www/html/vb5b10
/core/vb/api/wrapper.php on line 126
Notice: Undefined index: powered_by_vbulletin in /var/www/html/vb5b10
/core/packages/vbfoster/api/phrase.php on line 15


Simple enough, Re-download the package and re-upload it again and let me know.

TheSupportForum 09-23-2012 08:57 PM

Quote:

Originally Posted by MARCO1 (Post 2367964)
Simple enough, Re-download the package and re-upload it again and let me know.

this time no errors

thank you for your fix
i have no idea what you done to fix those issues, but all i can say is it hasn't broke my board this time

MARCO1 09-23-2012 09:38 PM

Quote:

Originally Posted by simonhind (Post 2368027)
this time no errors

thank you for your fix
i have no idea what you done to fix those issues, but all i can say is it hasn't broke my board this time

Glad to hear that, Let me know if there's any other problems.

nhawk 09-24-2012 09:56 AM

Quote:

Originally Posted by MARCO1 (Post 2367964)
Simple enough, Re-download the package and re-upload it again and let me know.

No errors now, works correctly.

MARCO1 09-29-2012 08:26 PM

Tested on the latest beta version "beta 11" on our staging servers, If you found any issues let me know.


All times are GMT. The time now is 04:47 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.01108 seconds
  • Memory Usage 1,758KB
  • 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_code_printable
  • (5)bbcode_php_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)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