WordPress.org

Ready to get started?Download WordPress

Forums

Qtranslate Slug
Adaptations request list (18 posts)

  1. Carlos
    Member
    Plugin Author

    Posted 2 years ago #

    Here you can make requests for adaptations to other plugins do you want:

    http://wordpress.org/extend/plugins/qtranslate-slug/

  2. Smithore
    Member
    Posted 2 years ago #

    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

  3. Carlos
    Member
    Plugin Author

    Posted 2 years ago #

    Multisite addaptation done! next: google xml sitemap :)

  4. Smithore
    Member
    Posted 2 years ago #

    Can't wait!!

  5. teonsight
    Member
    Posted 2 years ago #

    Google XML Sitemaps v3 for qTranslate, really needed! :)

  6. Carlos
    Member
    Plugin Author

    Posted 1 year ago #

    More compatibility additions:

  7. jinoOM
    Member
    Posted 1 year ago #

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

  8. Carlos
    Member
    Plugin Author

    Posted 1 year ago #

    Thanks!

  9. MeraX
    Member
    Posted 1 year ago #

    Hey Carlos,

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

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

  10. Pedro Carvalho
    Member
    Plugin Author

    Posted 1 year ago #

    +1 for the "Google XML Sitemaps v3 for qTranslate" :))

  11. gase12
    Member
    Posted 1 year ago #

    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

  12. jinoOM
    Member
    Posted 1 year ago #

    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

  13. jinoOM
    Member
    Posted 1 year ago #

    Hello Gase,
    can you post a link to a page where your nggallery does not work?

  14. Carlos
    Member
    Plugin Author

    Posted 1 year ago #

    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!

  15. gase12
    Member
    Posted 1 year ago #

    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

  16. jinoOM
    Member
    Posted 1 year ago #

    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!

  17. idejuan
    Member
    Posted 1 year ago #

    another +1 for the "Google XML Sitemaps v3 for qTranslate"

    thank you very much

    UPDATE: I have tested the hack above by JinoOM and it works perfectly

    thank you JinoOM

  18. marcelneosono
    Member
    Posted 1 year ago #

    another +1 for the "Google XML Sitemaps v3 for qTranslate"

    I will test the hack by JinoOM, and will post the result here!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.