Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter wallenium

    (@wallenium)

    Any News regarding this Topic? I opened the github ticket, waiting for a hint ??

    https://github.com/lloc/Multisite-Language-Switcher/issues/98

    I had the same problem. I disabled the cache in the settings. after that it worked. i had no javascript error. not sure where the problem is, but definitely a bug ?? shows a 0 in some cases. cannot test it with IE.

    Rene, some hints:
    – the update from 1.2.9 to 2.0.3 didn’t work.
    – the version in the database seems strange: (INSERT INTOwp_4_options(option_id,option_name,option_value,autoload`)
    VALUES
    (224226, ‘mashsb_version’, ‘EDD_VERSION’, ‘yes’);)`
    Seems to be a bug with the version number. maybe the cause for the failure of the update?
    – if you change the tab in the settings, the settings are not saved. It should automatically be saved on tab change
    – Error: Element div not allowed as child of element label in this context. (Suppressing further errors from this subtree.)

    <label class="onoffswitch-label" for="myonoffswitch">
                            <div class="onoffswitch-inner"></div>
                            </label>

    the div should be a span ?? (not sure if its valid then… please check & confirm HTML valid code as it is an issue for rendering time and due to that google page rank.

    thats all for now ??

    Thread Starter wallenium

    (@wallenium)

    you are welcome ?? thanks a lot.

    The share daddy plugin needs an update, too.

    Error: The scrolling attribute on the iframe element is obsolete. Use CSS instead.
    Error: The frameborder attribute on the iframe element is obsolete. Use CSS instead.
    Error: The allowtransparency attribute on the iframe element is obsolete. Use CSS instead.

    Thread Starter wallenium

    (@wallenium)

    Thanks a lot for that hint, that worked.

    Thread Starter wallenium

    (@wallenium)

    ok. I think i got a solution. i wrote a function to search all URLs. These URLs are added to an array and this array is used in the foreach. Smarter and easier. And working ??

    Thread Starter wallenium

    (@wallenium)

    As described in the second post (i couldn’t edit my first) i want to get the URLs of the available languages of a known post id.

    Example: PostID 555 has an english, german and french post article. If you visit the german blog, i want to add a link to the other languages on the index (not on the detailed view as it already exists). For that, i need the links to the articles in more than one language.

    i fetched the data using

    $blogs			= MslsBlogCollection::instance();
    $mydata			= MslsOptions::create(get_the_ID());

    now i am able to get the details of the available languages minus the current one:

    foreach ($blogs->get() as $blog)
    problem: $siteurl = $blog->siteurl; does link to the index, not to the article itself. i tried to generate the link to the article using

    switch_to_blog($blog->userblog_id);
    			var_dump($mydata->get_permalink($language));

    within the foreach loop. But it links to the index as well. i am not sure how to get the article link.

    other problem: ($mydata->has_value($language) seems to be always false… not sure why..there seems to be an issue with my implementation. but not sure where. do you get my problem?

    Thread Starter wallenium

    (@wallenium)

    Ok. Additional Problem:

    $blogs			= MslsBlogCollection::instance();
    $mydata			= MslsOptions::create(get_the_ID());
    
    foreach ($blogs->get() as $blog) { var_dump($blog);
    			$language	= $blog->get_language();
    			$langname	= $blog->get_description();
    			$siteurl	= $blog->siteurl;
    			$siteid		= $blog->siteid;
    
    			// get the URL of the translation
    			switch_to_blog($blog->userblog_id);
    			var_dump($mydata->get_permalink($language));
    
    			// build the array with the languages https://www.ads-software.com/support/topic/check-if-the-post-has-translation?replies=3
    			if($mydata->has_value($language)){
    				if(isset($this->options['show_flags']) && $this->options['show_flags']){
    					$languages[]	= sprintf(
    						'<a href="%s" title="%s"><img src="%s" alt="Flag" class="nopin" /> %s</a>',
    						$siteurl,
    						$language,
    						plugins_url('/images/'.$language.'.svg' , __FILE__ ),
    						$langname
    					);
    				}else{
    					$languages[]	= sprintf(
    						'<a href="%s" title="%s">%s</a>',
    						$siteurl,
    						$language,
    						$langname
    					);
    				}
    			}
    			restore_current_blog();
    		}

    i thought that i am able to get the my data of the current POST Id on the index, switch to the blog with the ID of the translation and switch back. But… the link is still the site url and not the post URL… not sure where i am wrong..

    Thread Starter wallenium

    (@wallenium)

    And another small issue:
    Element script must not have attribute charset unless attribute src is also specified.

    Please, just change
    <script type="text/javascript" charset="utf-8">
    to
    <script type="text/javascript">

Viewing 10 replies - 1 through 10 (of 10 total)