I have a client that would like to put a "back to blog homepage" link on their Tumblr posts. The issue is that using the standard Tumblr framework, that button will appear on permalink posts (where it should be) but also on the index page. Obviously I don't need a link on the homepage pointing TO the homepage. Any ideas on how to specify here? Your help is greatly appreciated!
Link to blog: http://blog.molliestones.com/
If you only want it to appear on Posts (ie, not appear on Pages) then you can use this little tweak to #stevether's answer:
{block:PermalinkPage}{block:Date}
<a />
{/block:Date}{/block:PermalinkPage}
This means if the page being rendered as a date attached to it, which all blog posts do, then it will show. If there is no date attached to it, like all static pages, the link will not show.
{block:permalinkpage}
<a />
{/block:permalinkpage}
Related
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');
}
I have been searching around for links that I thought could help me in designing a customized home page for my tumblr, without showing the posts unless a link refers to a tagged page or a permalink page. Unfortunately I have found nothing that works, at least in the sites I've been to. Could someone please assist me on how to make this work?
Is there a certain code (like Javascript) that I have to insert? I'm pretty vague on Javascript except on CSS3 and HTML. Thanks in advance for answering!
Seperate homepage / tagged / permalink pages
It is possible to have different content / visuals for the following pages:
Homepage - http://you.tumblr.com
Tagged Page - http://you.tumblr.com/tagged/yourtag
Permalink Page - http://you.tumblr.com/post/123456/your-post-title
{block: IndexPage}, {block:PermalinkPage} and {block:TagPage} are your friends.
Below is an example of a homepage with no posts, and the tagged / permalink containing posts.
{block:IndexPage}
<h1>Homepage</h1>
<!-- Don't include Post loop here -->
{block:TagPage}
<h1>Tag Page</h1>
<!-- Include Post loop here -->
{block:Posts}
{block:Text}
{block:Title}{Title}{/block:Title}
{Body}
{/block:Text}
{/block:Posts}
{/block:TagPage}
{/block:IndexPage}
{block:PermalinkPage}
<h1>Permalink Page</h1>
<!-- Include Post loop here -->
{block:Posts}
{block:Text}
{block:Title}{Title}{/block:Title}
{Body}
{/block:Text}
{/block:Posts}
{/block:PermalinkPage}
Inside the Posts loop include what ever post types you need. More information can be found here: http://www.tumblr.com/docs/en/custom_themes#basic_variables & http://www.tumblr.com/docs/en/custom_themes#tag-pages
Well, you have three choices:
Work within tumblr, and do your CSS/JS on there (though I believe it's very limited) through the "Customize" feature (or, you can get a theme that does what you want).
Route all of your tumblr posts through a custom domain name (so your blog shows up as a different domain name instead of yourblog.tumblr.com).
Make your own custom website, on your own custom webspace, and pull your blogs RSS feed (yourblog.tumblr.com/rss), and then format it however you want.
jsfidllde
I am trying to get the lazy load effect of social buttons through socialite.js. Everything is fine, but the +1s, likes, tweet counter is for socialite.com and not my website. For example, this code gives socialite.com a "like":
<li>
<a href="http://www.facebook.com/sharer.php?u=http://www.socialitejs.com&t=Socialite.js"
class="socialite facebook-like" data-href="http://socialitejs.com" data-send="false"
data-layout="box_count" data-width="60" data-show-faces="false" rel="nofollow"
target="_blank"><span class="vhidden">Share on Facebook</span></a>
</li>
I want it to be for my page. Manually changing http://socialitejs.com to mywebsite.com for each and every different page is too tiresome.
I believe there is a trick to do this with javascript and replacing href with expr:share_url='data:post.url', however this is not working as the code has many other attributes apart from href. Can anyone help me please. Thanks a ton.
When you add the element in which you'll invoke socialite.js:
<a class="socialite twitter-share" href="http://twitter.com/share" data-url="http://socialitejs.com">
Share on Twitter
</a>
You're supposed to replace the value at data-url for your website URL. Then the generated elements will point to your website.
If you, by mistake, already included the wrong URL in many places - and feel it's easier to correct it with JavaScript instead of doing search-and-replace in a bunch of files - then I suggest running this jQuery line before calling Socialite.load():
$('[data-url]').attr('data-url', 'mywebsite.com');
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
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.