Brian Zeligson
Forum Replies Created
-
Glad I could help Brad and thanks for updating the plugin and adding a credit!
Forum: Plugins
In reply to: [WP MVC] [Plugin: WP MVC] Code generation fails silentlyFixed!
Added the following right before the include statement –
$_SERVER = array(
“HTTP_HOST” => “localhost”,
“SERVER_NAME” => “localhost”,
“REQUEST_URI” => “/”,
“REQUEST_METHOD” => “GET”
);thanks to info found here – https://vocecommunications.com/blog/2011/03/running-wordpress-from-command-line/
I’d suspect this works on any setup, but I haven’t tested anywhere other than my local (should be localhost no matter what though, even if over ssh.)
In the case that’s correct, the author might like to add this code to the plugin, and better yet, add me as contributor… ??
Forum: Plugins
In reply to: [WP MVC] [Plugin: WP MVC] Code generation fails silentlyIf it helps, when I hack wpmvc.php to accept $_GET[‘argv’] and visit https://localhost/wp-content/plugins/wp-mvc/core/wpmvc.php?argv%5B%5D=caller&argv%5B%5D=generate&argv%5B%5D=plugin&argv=test in my browser, here’s the output:
[35;1m[4mWelcome to WP MVC Console![0m[0m Sorry, a shell named “e_shell” couldn’t be found in any of the MVC plugins. Please make sure a shell class exists in “app/shells/e_shell.php”, or execute “./wpmvc” to see a list of available shells.
Additionally, visiting https://localhost/wp-content/plugins/wp-mvc/core/wpmvc.php outputs
[35;1m[4mWelcome to WP MVC Console![0m[0m Available Shells: Core [1mDestroy[0m [1mGenerate[0m [1mHelp[0m To get information about a shell try: wpmvc help shell
and register_argc_argv is on.
No output at the terminal at all…
This happens because the table that the plugin uses is created on plugin activation, and the plugin activation method is not multisite aware. The formal way of addressing this would be by following the structure found here – https://www.ads-software.com/extend/plugins/proper-network-activation/
We are actually using this as a must-use plugin, which never runs an activation hook, so we handled it a bit differently. The solution we used involves fewer lines of code and will work whether you are running it as a must use or just using network activate. The only tradeoff is one extra query every time you load wp-admin.
Add the following between lines 163 and 164 of wp-category-meta.php:
global $wptm_table_name;
global $wpdb;
if(is_admin() and $wpdb->get_var(“show tables like ‘$wptm_table_name'”) != $wptm_table_name) {
wptm_createTable($wpdb, $wptm_table_name);
}What this does now is every time you load wp-admin, the plugin will check to ensure that a table exists for the current network site, and if it does not, it will create it.
Works like a charm.
In case anybody else has this issue or the plugin author wishes to repair this lurking resource hog in the plugin source, here’s how we fixed the issue to maintain the same functionality in the plugin, while limiting overhead to one extra query per page load, instead of one extra query per registered user on each page load, (which in our case is over 2K.)
in blackbird-pie.php,
1- commented out lines 86-108
2- changed lines 314-320 from original code to the code below:
$favorite_url = esc_url( “https://twitter.com/intent/favorite?tweet_id={$id}” );
$handle = get_user_meta( $post->post_author, ‘twitter’, true );
// If we have a Twitter handle for this post author then we can mark them as ‘related’ to this tweet
if ( $handle and trim($handle) != ” ) {
$retweet_url .= “&related=” . $handle;
$reply_url .= “&related=” . $handle;
$favorite_url .= “&related=” . $handle;
}Currently it’s not possible, because of the way the plugin handles the re-ordering of the loop.
When you say adding elements to your vertical menu, can you elaborate a bit? If you can even provide screenshots or a link to the issue live it’d help me understand, as this doesn’t sound like an issue that should be caused by the plugin.
Thanks.
Hey Jason I just updated the plugin with a check that should prevent this. Please reinstall the new version (I still can’t seem to get the upgrade notifications working with WP svn…) and let me know the results.
Forum: Fixing WordPress
In reply to: set different taglines for each pageTry this plugin – https://www.ads-software.com/extend/plugins/wp-custom-taglines/
Forum: Plugins
In reply to: [Seaofclouds Tweet!] "Sufficient Permisions"Hey guys sorry about that link.
To keep things simple I’ve just removed it from the plugins page.
Please configure Tweet! under Settings->Tweet! from the left sidebar of your WP Admin.
Forum: Plugins
In reply to: [Seaofclouds Tweet!] "Sufficient Permisions"Hey grapefeed – I just updated the plugin to address a js issue – haven’t heard of this coming up yet. Can you reinstall the newer version and let me know how it works?
I just updated the plugin version so hopefully you’ll be able to just upgrade automatically in 20 min or so, but I’m still figuring out SubVersion so only time will tell.
Let me know if it clears up the issue.