sasdts
Forum Replies Created
-
Forum: Plugins
In reply to: [WPML Editor Languages] issue with logged out usersHi, sorry to get back to you so late, but yes, that fixed the issue, thanks
Forum: Plugins
In reply to: [WPML Editor Languages] issue with logged out usersHi, thanks for the reply. This issue cropped up again after updating to the new version. I changed line 91 in class-wpml-editor-languages-admin.php to
if (( ! isset( $user_languages[ ICL_LANGUAGE_CODE ] ) ) && ( is_user_logged_in()))
which seem to fix it.
Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Google XML Sitemaps and WPML problemThis seems to be the same issue:
https://wpml.org/forums/topic/wrong-links-in-a-xml-sitemap-after-wmpl-3-2-2/Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Issues with WPML and empty xml filesThis is what I did in case anyone has similar problems
add_action('plugins_loaded', 'replace_index', 999); function replace_index (){ include_once(WP_PLUGIN_DIR . "/google-sitemap-generator/sitemap-builder.php"); if ( class_exists( 'GoogleSitemapGeneratorStandardBuilder' ) ) { Class sfGoogleSitemapGeneratorStandardBuilder extends GoogleSitemapGeneratorStandardBuilder { function __construct() { $this->unregister_parent_hook(); add_action('sm_build_index',array($this,'Index'), 10, 1); } function unregister_parent_hook() { global $wp_filter; if (!empty($wp_filter['sm_build_index'])) { foreach($wp_filter['sm_build_index'] as $cb) { foreach ($cb as $k => $v) { if ( isset($v['function']) && is_a($v['function'][0],'GoogleSitemapGeneratorStandardBuilder') && isset($v['function'][1]) && 'Index' == $v['function'][1] ) { remove_action('sm_build_index',$k); } } } } } /** * Generates the sitemap index * * @param $gsg GoogleSitemapGenerator */ public function Index($gsg) { /** * @var $wpdb wpdb */ global $wpdb; $blogUpdate = strtotime(get_lastpostmodified('gmt')); $gsg->AddSitemap("misc", null, $blogUpdate); $taxonomies = $this->GetEnabledTaxonomies($gsg); foreach($taxonomies AS $tax) { $gsg->AddSitemap("tax", $tax, $blogUpdate); } $pages = $gsg->GetPages(); if(count($pages) > 0) { foreach($pages AS $page) { if($page instanceof GoogleSitemapGeneratorPage && $page->GetUrl()) { $gsg->AddSitemap("externals", null, $blogUpdate); break; } } } $enabledPostTypes = $gsg->GetActivePostTypes(); $hasEnabledPostTypesPosts = false; $hasPosts = false; if(count($enabledPostTypes) > 0) { $excludedPostIDs = $gsg->GetExcludedPostIDs($gsg); $exPostSQL = ""; if(count($excludedPostIDs) > 0) { $exPostSQL = "AND p.ID NOT IN (" . implode(",", $excludedPostIDs) . ")"; } $excludedCategoryIDs = $gsg->GetExcludedCategoryIDs($gsg); $exCatSQL = ""; if(count($excludedCategoryIDs) > 0) { $exCatSQL = "AND ( p.ID NOT IN ( SELECT object_id FROM {$wpdb->term_relationships} WHERE term_taxonomy_id IN (" . implode(",", $excludedCategoryIDs) . ")))"; } $lang = ICL_LANGUAGE_CODE; foreach($enabledPostTypes AS $postType) { $q = " SELECT YEAR(p.post_date_gmt) AS <code>year</code>, MONTH(p.post_date_gmt) AS <code>month</code>, COUNT(p.ID) AS <code>numposts</code>, MAX(p.post_modified_gmt) as <code>last_mod</code>, ID FROM {$wpdb->posts} p, {$wpdb->prefix}icl_translations wicl_translations WHERE p.post_password = '' AND p.post_type = '" . esc_sql($postType) . "' AND p.post_status = 'publish' AND p.ID = wicl_translations.element_id AND wicl_translations.language_code = '$lang' $exPostSQL $exCatSQL GROUP BY YEAR(p.post_date_gmt), MONTH(p.post_date_gmt) ORDER BY p.post_date_gmt DESC"; $posts = $wpdb->get_results($q); if($posts) { if($postType=="post") $hasPosts = true; $hasEnabledPostTypesPosts = true; foreach($posts as $post) { //print_r($post); $gsg->AddSitemap("pt", $postType . "-" . sprintf("%04d-%02d", $post->year, $post->month), $gsg->GetTimestampFromMySql($post->last_mod)); } } } //Only include authors if there is a public post with a enabled post type if($gsg->GetOption("in_auth") && $hasEnabledPostTypesPosts) $gsg->AddSitemap("authors", null, $blogUpdate); //Only include archived if there are posts with postType post if($gsg->GetOption("in_arch") && $hasPosts) $gsg->AddSitemap("archives", null, $blogUpdate); } } new sfGoogleSitemapGeneratorStandardBuilder(); } }
Forum: Plugins
In reply to: [Email Users] No Line Breaks in EmailI seem to be having the same problem – if I send to one user only, or if I send a test mail, there is no problem, but if I send to a group, the line breaks are missing
Forum: Plugins
In reply to: [Email Users] Change email fontI see…
Have you escaped the the quotes so PHP will display correctly?
<td style=\”font-family:Trebuchet;\”And have you tried adding another font after Trebuchet?
style=”font-family:Trebuchet, arial, sans-serif;”Forum: Plugins
In reply to: [Email Users] Change email fontTo change the font styles in emails, you need to use inline CSS in the template:
<p style=”font-family: arial”>Hallo,</p>
Forum: Plugins
In reply to: [Registration Options for BuddyPress] Add approve, deny buttons to front endHi, I added issue to github.
I wasn’t necessarily asking for a new feature to be added to the plugin, just wondering if it was possible, and if so, how it could be done. Thanks for the quick reply!
There may be an easier way to use it, but I used it in my theme page templates, so
<?php if (bp_registration_status_unapproved()){ echo "Hello, please wait until an admin activates your account.<br />";} else if (have_posts()) : while (have_posts()) : the_post(); ?>
instead of something like
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
Thanks for the heads up. I’m checking the 4.2 BETA 2 version, everything is working well so far, I haven’t found any issues.
In case anyone needs it, the updated code from above is:
function bp_registration_status_unapproved() { if ( is_user_logged_in() ) { $user_ID = get_current_user_id(); $key = '_bprwg_is_moderated'; $single = 'true'; $test = get_user_meta($user_ID, $key, $single); if ( $test == 'true' ) { return true; //add stuff for unapproved users } } }
Thanks for the code, I had just figured out a similar way to do this, but this is a much simpler method.
Forum: Plugins
In reply to: [qTranslate] different featured image for each languageI would also like to know if anyone has any tips on how this could be achieved…