plugins_lexblog
Forum Replies Created
-
Well, yesterday I disabled and then reenabled the plugin and news module. Weirdly, after reenabling, it indexed three recent urls. And then stopped again. Very frustrating. And we can’t get other plugins for sitemaps to work, I suspect because of the rewrite rules Yoast needs in the server (nginx).
I also want to point out that all other sitemaps, like posts and so forth, are generating dynamically.
Forum: Plugins
In reply to: [WordPress HTTPS (SSL)] [Plugin: WordPress HTTPS (SSL)] PHP errors on 3.1.2Hi- we are having the same problem. Is the fix for this forthcoming or is the official current fix just to revert to 3.0.4? If I were to try and leverage a code fix myself, can the developer provide me with more information on the non-object here?
Forum: Fixing WordPress
In reply to: HTML in Widget TitlesAh, this is tougher than I thought. I was hoping to be able to just use the remove_filter() funtion, but the world doesn’t work that way.
Beware of hackiness below; proceed prepared to test and assess on your own…
Option 1: Allow shortcodes in widget title:
add_filter('widget_title', 'do_shortcode');With Option 1, the possibilities really are endless, but dang, that’s a lot of work to go through to just make some HTML tags. But, it’s as secure as shortcodes.
Option 2:
//allow html in widget title function lxb_change_widget_title($title) { //convert square brackets to angle brackets $title = str_replace('[', '<', $title); $title = str_replace(']', '>', $title); //strip tags other than the allowed set $title = strip_tags($title, '<a><blink><br><span>'); return $title; } add_filter('widget_title', 'lxb_change_widget_title');With option 2, it’s a bit less work, but can expose your widget titles to script injection if you are not careful about what tags you allow. I’m really paranoid about security, if you can’t tell. I’m also wondering about compatibility with unicode characters in foreign languages (ie, the add_slashes vs msqli_real_escape_string issue).
The above error messages have morphed a bit, in response to the fact that I have changed my shortcode options a bit in implementing this plugin.
I am still getting a ton of undefined variable errors, which I have solved thusly:
Line 23 of the plugin file:
function Twitterfeedreader($atts) { $avatar =''; $wholetweet =''; $divstart =''; $pleer =''; $linktofeed =''; $divend ='';Would love to see an update to address this.
Thanks for the otherwise great plugin; very nice work.
Forum: Plugins
In reply to: [User Photo] [Plugin: User Photo] How to RETURN photo instead of ECHO photo?That’s really good.
Caution, some setups balk at your assumption on where wp-conent is, and require:
http://codex.wordpress.org/Function_Reference/content_url
But it seems REALLY unlikely that the plugin devs on wp-photo will change the user_meta key for the image files. Seems very future-proof. Nice work.
Forum: Plugins
In reply to: [User Photo] [Plugin: User Photo] How to RETURN photo instead of ECHO photo?Ugh… This is the best I could come up with:
$user_photo = userphoto__get_userphoto($author_id, USERPHOTO_THUMBNAIL_SIZE, ”, ”, array(), ”);
You guys gonna go and change that userphoto__get_userphoto() function in an update and break my theme, or what?
Forum: Fixing WordPress
In reply to: Squarespace to WordPressHere’s a good step-by-step article to get the migration done:
http://kaslnetwork.com/articles/migrating-blog-content-and-assets-from-squarespace-to-wordpress/
Thanks very much for the prompt response!
Forum: Plugins
In reply to: [Events] [Plugin: Events] Possible to only show archive from last 6 months?Changed line 289 in wp-events-functions.php to filter for 6 months:
$events = $wpdb->get_results("SELECT * FROM“.$wpdb->prefix.”eventsWHEREarchive= 'yes' ANDthetime<= $present ANDthetime>= ($present - 15778463)$category$one_event ORDER BY $order$amount");This is how I’m solving the issue for now. Any better ideas? I’d like to come up with more of a best-practice way of preventing direct access to the page.
<?php /* Plugin Name: Google Analytic Dashboard Bouncer Description: The problem: If we enable the Google Analytic Plugin for clients, they might be able to configure the plugin to show analytics from any site on our network. I say "might" because some of our clients are admin level and some aren't.The solution: This plugin. It hides the analytics menu from everyone except for super admins. Also, I've contacted the plugin dev to make this native: http://wordpress.org/support/topic/plugin-google-analytics-dashboard-protecting-access-across-wpmu-setup?replies=1#post-2908556 Author: Scott Fennell */ function lxb_google_analytic_dashboard_bouncer() { //is the GAD plugin active in the first place? if(is_plugin_active('google-analytics-dashboard/google-analytics-dashboard.php')) { //get the current user $current_user_id=get_current_user_id(); //are you a super admin? if so, great if(is_super_admin( $current_user_id )){ //$out='<script>alert("you are a super admin")</script>'; //you're not a super admin? we got problems, then. } else { //remove the nav menu item for GAD page $one = 'options-general.php'; $two = 'google-analytics-dashboard/gad-admin-options.php'; remove_submenu_page( $one , $two); //thwart any attempts to access the page directly if(isset($_GET['page'])){ $p = $_GET['page']; if ($p == 'google-analytics-dashboard/gad-admin-options.php'){ wp_die('Insufficient permissions'); } } } } } add_action('admin_menu', 'lxb_google_analytic_dashboard_bouncer'); ?>Forum: Plugins
In reply to: php errors in Debug modeAnd also:
Notice: Use of undefined constant custom_CSS – assumed ‘custom_CSS’ in /var/www/html/wp-content/plugins/contextual-related-posts/contextual-related-posts.php on line 236