Accesing post title and URL from Blogger gadget - javascript

I'm trying to build a Blogger gadget for posts sharing using Diaspora!
I've started with Diaspora Sharing Service usinh HTML and JavaScript (you can take a look at my work in progress) and found that URL and TITLE are empty
Neither accessing url using post.url or window.location.href can I obtain a valid value.
Any help will be appreciated.

Maybe you could provide more information? It's not clear to me what exactly you're asking, so it might not be clear to others, too.

As the author of DSS I have to point out that I have some time ago ramped it down. Instead anyone wanting a similar service should use the Diaspora* Advanced Sharer which is based on DSS.
As for the question on how to get it working with Blogger, D*AS has instructions for this;
Blogger blogs
This method will include a Diaspora* share button next to Google +1 button. It is necessary to enable the sharing buttons.
Enter your dashboard and choose your blog.
In section Template, click on Edit HTML. If a warning appears, click Continue.
Check Expand widget templates, press Ctrl+F and write sharebuttons.
Find the line <b:includable id='shareButtons' var='post'>. Just after that, copy the following code:
<a expr:href='"http://sharetodiaspora.github.com/?url=" + data:post.url + "&title=" + data:post.title' target='_blank' title='Share on Diaspora'>
<img src='http://joindiaspora.com/favicon.ico' style='width:16px; height:16px; padding:0; border:0; vertical-align:middle;'/>
</a>
Ps. Found this question from my Apache error logs :P

Related

Link to tab from different page

We are working on a Bootstrap website to present our schoolwork. I have a fair understanding of the used html code, but I am having one problem.
To link to a specific tab/section within a page this link is used:
href="#tab"
I have copied the original index.html and thus created a second webpage. I'm able to link to this page using:
href="page2.html"
But I'm not able to link directly to a tab/section on that second page. I tried using href="page2.html/#tab" or "page2.html#tab" etc. But it doesn't work yet, I think I miss some fundamental knowledge about this coding.
Could anyone explain me how to get this working, in 'normal' language. There are several (older) solutions, but can't get them to work in the javascript files.
This should help...
http://codepen.io/mattsince87/pen/exByn
LINK -> <a id="link1" class="nav-section1" href="#section1">S1. Info</a>
Content -> <h1 id="section1">1. Info</h1>
You can use something like this as i have this thing running in my project. these will check the page if it contains the tabs then it will take the last value from the url of the page2 and will make it visible.
if($("#tabs").length)
{
var id = window.location.hash.substr(1);
$('#tabs a[href="#'+id+'"]').tab('show');
}

Problems in implementing Disqus plugin due to jQuery issues

I am working on a blog website at http://d361.azurewebsites.net/Blog. I have used a template for full page flip from http://tympanus.net/codrops/2012/12/11/fullscreen-pageflip-layou which uses javascript and jquery, other than the obvious.
I have 2 problems.
I need disqus plugin on every article of the blog. But since the whole website is basically one single webpage, I have not been able to implement it. Further anchor tags are not working.
Currently the disqus plugin is working in case of the first article only.
I am also using social sharing buttons on the site. Again, they share only the mail website link, i.e d361.azurewebsites.net/Blog and not the actual articles. I tried to use anchor tags but it is not working.
Kindly help me out here. As you must have already known, I dnt know much beyond html and css.
Disqus won't work with single-page applications out of the box, you have to use our AJAX protocol to reload the thread with the new information. The process is documented here: http://help.disqus.com/customer/portal/articles/472107-using-disqus-on-ajax-sites
Whenever the page content is changing, you would call DISQUS.reset like this:
DISQUS.reset({
reload: true,
config: function () {
this.page.identifier = "new_disqus_identifier";
this.page.url = "http://example.com/#!new-url";
}
});

Sitemap generator for popup window javascript

On my HTML index page, I am using a popup javascript code that has something like
<li> <font color ="#000"> » </font> <font color ="#ccc">
Some text</font><b>, XYX, Country</b></li>
<li><font color ="#000"> » </font><a href ="secondpage.php" alt="Blog" />
I used a free xml-sitemap generator and strangely, the second li which is a regular a href URL and shows up in the sitemap as a linked page. However, the first one which calls the page using a javascript function does not show up.
This got me thinking,
Would this impact SEO results, would search engines also skip JS code and hence not crawl the linked pages which open in a popup?
Or is this an issue with the sitemap generator that does not understand JS and I have to manually create it?
Totally new to this. Was hoping to get some advise .
thanks!
Ryan
answer will vary based of crawlers, but you should keep your markup readable and less dynamic in areas you want crawler to read or you can follow the guidelines provided. For specific answer to your question:
Since 2009 Google looks for and finds OnClick links in any and all HTML tags. When found they will add the URL to their crawl.
If there is sensible "anchor" text then the text of the element will be used as anchor text.
The OnClick link also passes PageRank.
For more info:
http://www.searchenginepeople.com/blog/onclick.html
http://seogadget.com/google-does-not-crawl-hidden-java-onclick/

Addthis Twitter Follow Button Customize

I'm currently using Addthis for my social media share / follow buttons, the problem I'm facing is on the twitter follow button I don't want it to display the username (so the button isn't so wide) I just want the word follow and the counter, I'm displaying this follow button like so on my site,
Twitter Follow
<a class="addthis_button_twitter_follow_native" tw:screen_name="myaccount"></a>
And once this has loaded I took a look at the source code and noticed that it loads a <span> element with the id #1 and inside that is a <b> tag and that's where the username is so I need to remove #1 b but when I try to do this with css #1 b { display: none !important;} or with jQuery $('#1 b').remove() its not working, does anyone have any suggestions or other approaches to this, thanks in advance for any help!
Check Twitter api here...https://twitter.com/about/resources/buttons#tweet
You can customize your self there.
To integrate followers count just use,
data-show-count="true"
and for removing user name from button,
data-show-screen-name="false"
Now it only shows the follow button and count of followers and here is the full code,
Follow #twitterapi
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="http://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>

Custom links in facebook share post

Is there still a way to add custom links to links footer in facebook share post (e.g. next to "Like - Comment - Share" below the text of text of the post itself)? Some "link" parameter or something, maybe? Or is it deprecated now?
Thanks in advance.
With the current API, I don't see any way to add additional links to a feed posting other than in the content of the message or as the primary link of a feed link share.

Categories