This user has been denied support.
(2010-08-07, 10:00 PM)HolyPhoenix Wrote: But the complete seo package offered by the google seo plugin is a resource hog. :p
[rant]
The only thing that does use some resources is the URL component of Google SEO, and you don't have to enable that if you don't want to. Google SEO does not even load the URL code if you do not enable the option.
This plugin uses database queries to build description and keywords. 2 queries for forum pages, 4 queries for thread pages. In comparison, the Meta component of Google SEO uses 0 queries. So in a manner of speaking, this plugin is more of a resource hog than Google SEO.
Originally, Google SEO Meta used the same approach as this plugin - a variable in the headerinclude template. Caveat is that template variables have to be initialized before the template is evaluated, which unfortunately and unnecessarily, happens early on for the headerinclude template.
So your variables have to be initialized early on too, so you're not able to use hooks that would provide the data you need for free, and instead you have to run expensive database queries to get at the data yourself.
I abandoned this approach in Google SEO, instead it makes use of hooks properly, and just adds the tags to the headerinclude directly. This meant less queries, and also less headache for users - no more template edits, it just works.
[/rant]
@mastermunj,
I sincerely apologize for hijacking your thread. I made the font smaller, though...
To get back on topic, maybe you're interested in some warnings I seem to be getting from your plugin.
On a thread page:
The following warnings occurred:
Warning [2] arsort() expects parameter 1 to be array, string given -
Line: 486 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 486 arsort
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] array_sum() expects parameter 1 to be array, string given -
Line: 488 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 488 array_sum
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] Division by zero - Line: 489 - File:
inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo (Linux)
File Line Function
/inc/plugins/master_meta_tags.php 489 errorHandler->error
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] Invalid argument supplied for foreach() - Line: 492 - File:
inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo (Linux)
File Line Function
/inc/plugins/master_meta_tags.php 492 errorHandler->error
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] array_keys() expects parameter 1 to be array, string given -
Line: 389 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 389 array_keys
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] shuffle() expects parameter 1 to be array, null given -
Line: 392 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 392 shuffle
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] array_slice() expects parameter 1 to be array, null given -
Line: 393 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 393 array_slice
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Warning [2] implode(): Invalid arguments passed - Line: 394 - File:
inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo (Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 394 implode
/inc/plugins/master_meta_tags.php 193 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/showthread.php 22 require_once
Similar issue on a forum that contains no threads:
The following warnings occurred:
Warning [2] arsort() expects parameter 1 to be array, string given -
Line: 486 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 486 arsort
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
Warning [2] array_sum() expects parameter 1 to be array, string given -
Line: 488 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 488 array_sum
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
Warning [2] Division by zero - Line: 489 - File:
inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo (Linux)
File Line Function
/inc/plugins/master_meta_tags.php 489 errorHandler->error
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
Warning [2] Invalid argument supplied for foreach() - Line: 492 - File:
inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo (Linux)
File Line Function
/inc/plugins/master_meta_tags.php 492 errorHandler->error
/inc/plugins/master_meta_tags.php 388 get_content_density
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
Warning [2] array_keys() expects parameter 1 to be array, string given -
Line: 389 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 389 array_keys
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
Warning [2] shuffle() expects parameter 1 to be array, null given -
Line: 392 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 392 shuffle
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
Warning [2] array_slice() expects parameter 1 to be array, null given -
Line: 393 - File: inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo
(Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 393 array_slice
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
Warning [2] implode(): Invalid arguments passed - Line: 394 - File:
inc/plugins/master_meta_tags.php PHP 5.3.3-pl0-gentoo (Linux)
File Line Function
[PHP] errorHandler->error
/inc/plugins/master_meta_tags.php 394 implode
/inc/plugins/master_meta_tags.php 246 get_keywords
[PHP] master_meta_tags_global
/inc/class_plugins.php 101 call_user_func_array
/global.php 95 pluginSystem->run_hooks
/forumdisplay.php 21 require_once
The same warnings are displayed when actually writing a new thread in this empty forum. Your plugin actually just checks for fid/tid in $mybb->input so it does a description for newpost.php?fid=3 too. You should check THIS_SCRIPT that it's actually on a forum page and not something else entirely, otherwise your plugin is doing work for naught.