WordPress.org

Support

Support » Plugins and Hacks » [Plugin: Qtranslate Slug] Adaptations request list

[Plugin: Qtranslate Slug] Adaptations request list

Viewing 15 replies - 1 through 15 (of 17 total)
  • Hi Carlos, i’m using your plugin with Google XML Sitemaps v3 for qTranslate and it doesn’t works, the sitemap shows the old slugs before installing your plugin and doesn’t detect the new ones.I must notice that these old slug are still working, so it’s very confuse!!!

    And what about seo???
    I start to use now Qtranslate meta for the two languages seo, do you think it’s working with your plugin??? Does the override title function will disturb qtranslate slug ???
    thanks

    Plugin Author Carlos
    Member

    @carlos_a_sanz

    Multisite addaptation done! next: google xml sitemap 🙂

    Can’t wait!!

    teonsight
    Member

    @teonsight

    Google XML Sitemaps v3 for qTranslate, really needed! 🙂

    Plugin Author Carlos
    Member

    @carlos_a_sanz

    More compatibility additions:

    Hello 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..

    Plugin Author Carlos
    Member

    @carlos_a_sanz

    Thanks!

    Hey Carlos,

    I really like your plugin. It’s workin verry well!

    But how about the adaptation of “Google XML Sitemaps v3 for qTranslate”?

    Plugin Author Pedro Carvalho
    Member

    @pedroghandi

    +1 for the “Google XML Sitemaps v3 for qTranslate” :))

    hi.
    Thanks jinoOM for the NextGen fix. I was stuck.

    although it seems the nextgen gallery is now running, and i can insert gallery to posts, but at the site i can only see a huge preloader gif at the div of the slideshow.

    any idea?

    thanks. Gas

    Hello, 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 Gase,
    can you post a link to a page where your nggallery does not work?

    Plugin Author Carlos
    Member

    @carlos_a_sanz

    Thanks for this report JinoOM,

    did you know there is a issue opened in github repo? If you have a Github account I can add you as collaborator and maybe you can resolve directly committing, as you want.

    Anyway I have signed up to open an issue in Google XML Sitemaps to solve this.

    Thanks for collaborate!

    re: jinoOM

    hi.
    since than i have redesigned my template, because I couldn’t find what caused the glitch.
    And now I totally omitted gallery functionality…

    So I can not link any page at the moment. If I reconsider adding -nextGen again I will post here my findings.
    thanks again.
    Gas

    Hi 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!

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘[Plugin: Qtranslate Slug] Adaptations request list’ is closed to new replies.