jinoOM
Forum Replies Created
-
Forum: Plugins
In reply to: [Qtranslate Slug] [Plugin: Qtranslate Slug] Adaptations request listHi Carlos,
ok i got an account on github but i really don’t know how to use it because i only worked with svn until now.For the nggallery adaptation i opened a new pull request because i cannot find a way to do it from the already opened issue, is it correct?
I’m glad to help when i can!
Forum: Plugins
In reply to: [Qtranslate Slug] [Plugin: Qtranslate Slug] Adaptations request listHello Gase,
can you post a link to a page where your nggallery does not work?Forum: Plugins
In reply to: [Qtranslate Slug] [Plugin: Qtranslate Slug] Adaptations request listHello, everyone.
I make “Google XML Sitemaps v3 for qTranslate” works with qtranslate-slug. That is, all modifications have to be applied to two files in the sitemap for qtranslate plugin.First, in file ‘plugins/google-xml-sitemaps-v3-for-qtranslate/sitemap-core.php‘:
– find this:else qt_permalink($qt, $permalink, $post->post_content, ($post->post_modified_gmt && $post->post_modified_gmt!='0000-00-00 00:00:00'?$post->post_modified_gmt:$post->post_date_gmt), ($isPage?$cf_pages:$cf_posts), $prio, $this);
replace with:
else qt_permalink($qt, $permalink, $post->post_content, ($post->post_modified_gmt && $post->post_modified_gmt!='0000-00-00 00:00:00'?$post->post_modified_gmt:$post->post_date_gmt), ($isPage?$cf_pages:$cf_posts), $prio, $this, $post);
– find this:
else qt_permalink($qt, get_category_link($cat->ID), null, $cat->last_mod, $this->GetOption("cf_cats"), $this->GetOption("pr_cats"), $this);
replace with:
else qt_permalink($qt, get_category_link($cat->ID), null, $cat->last_mod, $this->GetOption("cf_cats"), $this->GetOption("pr_cats"), $this, $cat);
– find this:
else qt_permalink($qt, get_category_link($cat->term_id), null, 0, $this->GetOption("cf_cats"), $this->GetOption("pr_cats"), $this);
replace with:
else qt_permalink($qt, get_category_link($cat->term_id), null, 0, $this->GetOption("cf_cats"), $this->GetOption("pr_cats"), $this, $cat);
Last file ‘plugins/google-xml-sitemaps-v3-for-qtranslate/sitemap-qtranslate.php‘:
– find this:function qt_permalink($qt, $permalink, $post_content, $modified_time, $change_freq, $priority, &$sitemap) {
replace with:
function qt_permalink($qt, $permalink, $post_content, $modified_time, $change_freq, $priority, &$sitemap, &$object = null) {
– find this:
$sitemap->AddUrl(qtrans_convertURL($permalink, $language, true), $modified_time, $change_freq, $priority) ;
replace with:
if( $object && class_exists( 'QtranslateSlugWidget' ) && is_plugin_active( 'qtranslate-slug/qtranslate-slug.php' ) ) { $temp = $GLOBALS['q_config']['language']; $GLOBALS['q_config']['language'] = $language; if( isset( $object->post_type ) ) { $url = get_permalink( $object->ID ); } else if( isset( $object->taxonomy ) ) { $url = get_term_link( $object ); } $GLOBALS['q_config']['language'] = $temp; } else { $url = qtrans_convertURL( $permalink, $language, true ); } $sitemap->AddUrl( $url, $modified_time, $change_freq, $priority );
Last: regenerate the sitemap trough the admin panel and now it should work.
Some note:
– This has been tested ONLY with the last versions of plugins: qtranslate 2.5.31 – qTranslate slug 1.1 – Google XML Sitemaps v3 for qTranslate 3.2.8.1
– only posts, page and category are supported (maybe also tag, but i didn’t tested them)
– this is a technically horrible adaption but maybe can give some ideas to someone more expert then about wordpress
– in all modifications illustrates i suggest not to delete original code but to comment it (possibily putting a placeholder to find it easily), so if something is wrong you can quickly revert my mods.Good night
Hello angio,
i had the same problem and i solved this way:
in file includes/CF7reCAPTCHA.class about on line 573, just at the beginning of the mothod ‘recaptcha_validation_filter’ add following code enclosed by /*mod*/:function recaptcha_validation_filter( $result, $tag ) { /*mod*/ if( ($this->recaptcha_tool === CF7reCAPTCHA::RECAPTCHATOOL_BWP_RECAPTCHA && $bwp_capt->user_can_bypass() ) || ($this->recaptcha_tool === CF7reCAPTCHA::RECAPTCHATOOL_WP_RECAPTCHA && $this->wp_recaptcha_user_can_bypass() )) { return $result; } /*mod*/
Maybe Andrea can come up with a more elegant solution…
Forum: Plugins
In reply to: [Qtranslate Slug] [Plugin: Qtranslate Slug] Adaptations request listHello Carlos,
thanks for this plugin!I have adapted it for NextGen gallery plugin and possibly many others..
In the main file, filter method ‘query_vars’ you return $wp->public_query_vars instead of passed arg $query_vars and i found that they are different!
That’s why nextGen gallery is stuck at loading or cannot load gallery dropdown in admin side: its query_vars do not exist anymore.
I am working with wordpress from about three days so i chose a super paranoid way to resolve this problem: simply return passed $query_vars if it has more elements than $wp->public_query_vars:return count(array_diff($query_vars, $wp->public_query_vars)) > 0 ? $query_vars : $wp->public_query_vars;
Hope it helps, cheers!
An advice: replace in all hooks calls that ‘array($this, …’ with ‘array(&$this, …’ (note the &) because it should be less resource consuming passing by reference your object..