Viewing 15 posts - 1 through 15 (of 21 total)
  • Author
    Posts
  • arucardx Friend
    #180526

    It came to my attention that JA Wall has two kind of url for articles. One for pop up view, one for direct link(say open in another tab)

    And this script in the header is used to generate the different url.
    <script type=”text/javascript”>
    if(window.parent == window && !window.opener && window.location.href.test(/tmpl=component/gi)) {
    window.top.location.href = window.location.href.replace(/(&*)tmpl=component/ , ”);
    }
    </script>

    direct link = domain.com/item/articlename
    pop up link = domain.com/item/articlename?tmpl=component

    Since the tmpl=component is added through a script, there’s no need to worry about SEO duplication because of two different url since technically the crawlers can’t trigger the pop up, so they can only crawl the direct links. (correct me if i’m mistaken)

    But Facebook treats this rather differently. Say, you have a facebook like button. By right if the url is the same, they should both share the same amount of likes. But that doesn’t hold true. The pop up link and the direct link are treated as different pages so the likes are not shared. I’m not sure whether Google Plus shows the same behavior since I don’t use it.

    For example.
    direct link = domain.com/item/articlename <– Has 10 facebook likes
    pop up link = domain.com/item/articlename?tmpl=component <– Has 2 facebook likes

    The Facebook comment box however, don’t seems to have that problem. The same comments can be found on both url. How can this behavior for Facebook Like counts be fixed? Or is that just a problem on my site? Granted the facebook like button code is added through this url.

    <iframe src="http://www.facebook.com/plugins/like.php?app_id=&href='+erl+'&send=false&layout=button_count&width=100&show_faces=false&action=like&colorscheme=light&font&height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe>'

    arucardx Friend
    #466443

    Looks like the problem is not with the facebook code i’m using, cause i tested with the K2 button which is using xfbml and the link count is different as well.

    Hopefully this can be fixed with a workabout >_< It would sux to be unable to use social bookmark.

    arucardx Friend
    #466473

    Oh I was wrong about google not being able to index ?tmpl-component pages. When posting to facebook thru facebook comments or social bookmark, can be twitter, googleplus etc etc while in pop up, the url with ?tmpl-component is published thus they get indexed, which result in duplicated result penalty when doing SEO.

    *scratch head* The only way I can think of to workabout this atm is to disable usage of pop up preview, but that means requiring the user to press back on his browser every time instead of just closing the pop up and resuming scrolling down the wall.

    (This problem can’t be solved by SEF plugin or the famous sh404sef as the ?tmpl-component is required by some modules or components to strip template. I looked it up already)

    ozzymanson2 Friend
    #466484

    <em>@arucardx 337406 wrote:</em><blockquote>Oh I was wrong about google not being able to index ?tmpl-component pages. When posting to facebook thru facebook comments or social bookmark, can be twitter, googleplus etc etc while in pop up, the url with ?tmpl-component is published thus they get indexed, which result in duplicated result penalty when doing SEO.

    *scratch head* The only way I can think of to workabout this atm is to disable usage of pop up preview, but that means requiring the user to press back on his browser every time instead of just closing the pop up and resuming scrolling down the wall.

    (This problem can’t be solved by SEF plugin or the famous sh404sef as the ?tmpl-component is required by some modules or components to strip template. I looked it up already)</blockquote>

    +1 please can you solved it, ‘cos it’s very important for my project. thnk you

    Stork11 Friend
    #466724

    Hello arucardx,

    Would you mind getting me a few screenshots for more clarifications? Then I shall know what you are trying to achieve.
    Right now, I am quite not sure where to start.

    Regards.

    arucardx Friend
    #466849

    The cause of the problem
    SEO Url to article if opened in new tab or new window = http://domain.com/category/item/articlealias
    URL in JA Wall Pop up Frame = http://domain.com/category/item/articlealias?tmpl=component

    The resulting behavior
    Both url points to the same article but there’s a extra ?tmpl=component for the Pop up frame’s URL. Since social bookmark buttons like facebook, google and twitter takes the instance’s url to count sharing. The two url are treated as two different pages, and so the share counter for Pop up Frame and New Window is not the same. The Pop up Frame may show 5 Facebook share, while the New Window would show a totally different Facebook share counter.

    What should be correct (But it’s not)
    Both the Pop up frame and Open in New Window should show the same amount of share counter because it’s the same article.

    I dunno how to explain this to you with screenshot because the explanation in the first post and the revised explanation I’m posting now clearly states the problem and the behavior. You can easily replicate the same problem by just looking at the “pop up frame url” and “direct url” of the articles in JA Wall. Put a facebook like button or Google Plus button, +1 on either view and you will see that only the pop up shows the +1 count but the direct url doesn’t. Or it could be the other way round, depending on how you test, but the problem can easily be replicated.

    arucardx Friend
    #466872

    Perhaps this will make it more clear with some actual example.

    Direct URL if Opened in a new tab or new window
    http://joomla25-templates.joomlart.com/ja_wall/en/78-hi-tech/105-melody-civilization-inclined-vincent.html

    Url of the POP up Frame
    http://joomla25-templates.joomlart.com/ja_wall/en/78-hi-tech/105-melody-civilization-inclined-vincent.html?tmpl=component

    When you put a social button inside the article someone shares the article within the pop up frame, the url gets a ?tmpl=component. The two url points to the same page but it’s treated as two different page by facebook, google etc thus the share counter is different.

    The worst I just found out is that if someone from facebook/google click on the shared url with ?tmpl=component, they simply get directed to page with the article’s content but without the template. Try clicking on that link with ?tmpl=component. This is just horrible, the template is rendered unusable if that’s the behavior when someone clicks on a social share link from within the pop up frame.

    arucardx Friend
    #466888

    Ok, I have tried to workaround this problem but when disqus commenting system’s internal links redirect me to the $tmpl=component url, that’s the last straw. The only solution I see to fixing this, is to disable Pop Up View in template settings. So my alternative is to open articles in a new tab instead of pop up.

    How can I implement this code into JA Wall so that articles open in a new tab, instead of pop up view / redirect.
    [PHP]function open_in_new_tab(url )
    {
    window.open(url, ‘_blank’);
    window.focus();
    }
    [/PHP]

    Stork11 Friend
    #467025

    <em>@arucardx 338007 wrote:</em><blockquote>Ok, I have tried to workaround this problem but when disqus commenting system’s internal links redirect me to the $tmpl=component url, that’s the last straw. The only solution I see to fixing this, is to disable Pop Up View in template settings. So my alternative is to open articles in a new tab instead of pop up.

    How can I implement this code into JA Wall so that articles open in a new tab, instead of pop up view / redirect.
    [PHP]function open_in_new_tab(url )
    {
    window.open(url, ‘_blank’);
    window.focus();
    }
    [/PHP]</blockquote>
    Hello arucardx,

    Firstly, you should disable popup preview setting in Template Settings of JA Wall

    Secondly, open “/templates/ja_wall/html/com_content/category/blog_item.php” file (for Joomla article). Then find all anchor tags which have “item-link” class and add target=”_blank” into them.

    Clean cache and refresh your front-end.

    Hope this help.

    Regards.


    1. Screenshot_6
    kagitin Friend
    #467796

    <em>@Stork11 338188 wrote:</em><blockquote>Hello arucardx,

    Firstly, you should disable popup preview setting in Template Settings of JA Wall

    Secondly, open “/templates/ja_wall/html/com_content/category/blog_item.php” file (for Joomla article). Then find all anchor tags which have “item-link” class and add target=”_blank” into them.

    Clean cache and refresh your front-end.

    Hope this help.

    Regards.</blockquote>

    And it is all? But how to use social sharing with popup preview mode?

    Stork11 Friend
    #468031

    <em>@kagitin 339238 wrote:</em><blockquote>And it is all? But how to use social sharing with popup preview mode?</blockquote>
    For using social sharing with popup preview mode, you can place social sharing code in “/templates/ja_wall/component.php” file.

    Regards.

    arucardx Friend
    #468088

    Hmm, just for testing purpose, I tested by adding the social buttons thru component.php instead of item.php but putting the social button code in component.php only brings out the root of the problem. Which I already explained in an earlier post that I will requote here.

    <em>@arucardx 337989 wrote:</em><blockquote>
    Direct URL if Opened in a new tab or new window
    http://joomla25-templates.joomlart.com/ja_wall/en/78-hi-tech/105-melody-civilization-inclined-vincent.html

    Url of the POP up Frame
    http://joomla25-templates.joomlart.com/ja_wall/en/78-hi-tech/105-melody-civilization-inclined-vincent.html?tmpl=component

    When you put a social button inside the article someone shares the article within the pop up frame, the url gets a ?tmpl=component. The two url points to the same page but it’s treated as two different page by facebook, google etc thus the share counter is different.

    The worst I just found out is that if someone from facebook/google click on the shared url with ?tmpl=component, they simply get directed to page with the article’s content but without the template. Try clicking on that link with ?tmpl=component. This is just horrible, the template is rendered unusable if that’s the behavior when someone clicks on a social share link from within the pop up frame.</blockquote>

    If the social buttons are added in component.php then they will only be available on pop up preview and then every click back link would have a ?tmpl=component like this http://joomla25-templates.joomlart.com/ja_wall/en/78-hi-tech/105-melody-civilization-inclined-vincent.html?tmpl=component replicated from your demo.

    It is impossible to do proper social sharing with that kind of link back behavior.

    Wall Crasher Developer
    #468110

    Hi arucardx,

    This is really annoying issue.
    It is also hard to fix. I will research on open graph for facebook and not sure it will success.
    The meta tag is also limit by Joomla. :p

    Regards

    Wall Crasher Developer
    #468145

    Hi,

    <blockquote>direct link = domain.com/item/articlename
    pop up link = domain.com/item/articlename?tmpl=component</blockquote>

    I will give you a solution for this problem.
    The solution will be apply on Joomla article.

    All most social share and like button will have a property ‘data-href’,
    We just need to modify and add our link back there.

    Here the steps for modify the Joomla article.

    1. Open file templatesja_wallhtmlcom_contentarticledefault.php
    2. Focus to the bottom of file
    3. Add following block code

    <script type="text/javascript">
    (function(d){
    var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
    if (d.getElementById(id)) {return;}
    js = d.createElement('script'); js.id = id; js.async = true;
    js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
    ref.parentNode.insertBefore(js, ref);
    }(document));
    </script>

    <!-- Place this tag after the last +1 button tag. -->
    <script type="text/javascript">
    (function(d) {
    var js, id = 'gplus-jssdk', ref = document.getElementsByTagName('script')[0];
    if (d.getElementById(id)) {return;}
    js = document.createElement('script'); js.id = id; js.type = 'text/javascript'; js.async = true;
    js.src = 'https://apis.google.com/js/plusone.js';
    ref.parentNode.insertBefore(js, ref);
    })(document);
    </script>

    <?php
    $fulllink = JURI::getInstance()->toString(array('scheme', 'host', 'port')) . $this->item->readmore_link;
    $sociallink = new JURI($fulllink);
    $sociallink->delVar('tmpl');
    ?>
    <div class="fb-like" data-href="<?php echo $sociallink; ?>" data-send="false" data-layout="button_count" data-width="150" data-show-faces="false"></div>
    <div class="g-plusone" data-annotation="inline" data-width="300" data-href="<?php echo $sociallink; ?>"></div>

    <div class="fb-comments" data-href="<?php echo $sociallink; ?>" data-num-posts="2" data-width="576"></div>

    The facebook like button is the first ‘<div> tag, second is google plus and the last is facebook comment box.

    You should add other buttons (other social netwrok) by yourself.

    For K2 articles. Please apply the same block code to
    templatesja_wallhtmlcom_k2ja_wallitem.php,
    templatesja_wallhtmlcom_k2ja_wall_blogitem.php,
    templatesja_wallhtmlcom_k2ja_wall_showcaseitem.php

    Hope it helps.

    Regads

    arucardx Friend
    #468280

    Hi Wall Crusher, hmm.. I have considered using the data-href for these options as I tried to workabout this problem. They works for these social buttons.

    But on my site, the problem is worsen when I integrate disqus into my k2 article as the comment system and disqus 2012 has backlinks within the comment box that point back to articles. Those linkback would have the ?tmpl=component link. And when I click on a username to see the disqus user profile, then click on the link that says “<— Return to Comments” I get redirected out of the pop up to ?tmpl=component#

    And every twitter share or facebook share from Disqus’s buttons all comes with the ?tmpl=component. That was when I broke down and decided that this problem cannot be resolved. You can see the disqus 2012 demo on their website. http://disqus.com/

    But my guess is that can’t be fixed ^^!!

Viewing 15 posts - 1 through 15 (of 21 total)

This topic contains 21 replies, has 6 voices, and was last updated by  activha 12 years, 1 month ago.

We moved to new unified forum. Please post all new support queries in our New Forum