How to make "Previous Page" go to the permalink of the previous post on Tumblr? - tumblr

On Tumblr, I'm trying to set up a webcomic format for my theme.
I have it set so that you see 1 post per page. When you hit the front page, you should see the most recent post and then the "Previous Post" button. I want this button to link to the permalink of the previous post, not the next page of the blog.
I know that within a post, you can navigate to the previous/next posts with this block:
{block:PermalinkPagination}
{block:NextPost}Next{/block:NextPost}
{block:PreviousPost}Previous{/block:PreviousPost}
{/block:PermalinkPagination}<p>
Is there any way to get this to work on the front page?

In case you didn't find the solution yet, here's how to do what you want.
First way:
Set 'post per page' to 1 in "customize theme > Advanced" page. You can show all things like notes, tags etc on the front page (Index Page) like you do on permalink page, if it's what you need.
{block:Pagination}
{block:PreviousPage}
<a title="Newer" href="{PreviousPage}">Newer</a>
{/block:PreviousPage}
{block:NextPage}
<a title="Older" href="{NextPage}">Older</a>
{/block:NextPage}
{/block:Pagination}
Second way (With the codes you're trying to do):
Put the cover of your comic, little about the comic, plus your imagination on the first page within blocks;
{block:IndexPage} YOUR DESIGNS {/block:IndexPage}
and all your 'posts' within blocks;
{block:PermalinkPage} YOUR POST {/block:PermalinkPage}
Put a link to first page (most recent post's permalink page) of your comic,
and then you can use your code for next and previous posts to your comic.
{block:PermalinkPagination}
{block:NextPost}
<a title="Newer" href="{NextPost}">Newer</a>
{/block:NextPost}
{block:PreviousPost}
<a title="Older" href="{PreviousPost}">Older</a>
{/block:PreviousPost}
{/block:PermalinkPagination}
This last code won't work on the front (Index Page) 'cause it's for pagination on permalink pages.
Notice, the block says: "Permalink Pagination".
Hope it helps, best wishes with your comics.

Related

Facebook Like plugin with big buttons?

I need a social media plugin just for FB. I need big share buttons for FB. I have seen it in several websites but I do not know which one it is.
I leave this link to show you what I am talking about (big FB buttons at the beginning and ending of the article):
http://www.viralnova.com/animals-eating-ice-cream/
Any idea?
There's no secret sauce for making big like (that's not a like button, that's share button) button it all comes down to basic knowledge in Facebook developers tools ...
Facebook has the Sharer which accept the GET parameter u which is the URL you want to share on your timeline, on a friend's wall or even in a private message ...
Break Down
You can create a new element or wrapper for your share button I will just use <a> because they seems quick and easy to use for this purpose.
<a class="fsl fsl-facebook" data-href="{URL_to_Share}" href="#">
<span class="fa-facebook fa-icons fa-lg"></span>
<span class="sc-label">Share on Facebook</span>
</a>
pay attention to data-href attribute as you should replace it with the URL you want to share
next we need some JavaScript (jQuery) to make our share button do something
$('.fsl-facebook').click(function(e){ // target all elements with fsl-facebook class in the DOM
e.preventDefault(); // prevent scrolling to top or bottom, because href is set to #
var href = $(this).attr('data-href'); // get URL from the data-href
window.open('https://www.facebook.com/sharer/sharer.php?u=' + encodeURIComponent(href), "", "width=800, height=350"); // pop up a new window, it's prefered to urlencode the URL because of 2nd & 3rd GET parameter that can be found in some URLs (?a=1&b=2&c=3)
});
DEMO

How can we make comments and likes ignore the #anchor from URLs so one whole page only has one set of comments and likes?

I always find concrete examples help the most... so here's an example URL:
http://www.humanreligions.info/humanism.html
The comments and like button work as expected. But if I user has clicked on this link to get the the page, or if they click on one of the menu items and then happen to refresh the page, the browser URL is:
http://www.humanreligions.info/humanism.html#Organisations
and none of the likes and comments from the base page show up. Because of the anchor, FB is treating it as a whole new page, which is not what an anchor means nor what I want it to do.
Questions/answers on this (I've been searching for a while, sure that others must have stumbled across this simple bug!) all seem to be where people do want the # to mean something special. This was asked a year ago here facebook comment count url with an '#' anchor tag? but there are no answers,
Here are relevent code snippets from the page:
LIKE BUTTON CODE (simplified):
<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.humanreligions.info%2Fhumanism.html"></iframe>
COMMENTS:
<div id="fb-root"></div><fb:comments href="http://www.humanreligions.info/humanism.html"></fb:comments>
MISC:
<meta property="og:url" content="http://www.humanreligions.info/humanism.html">
What else does it require to make FB treat one page as one page regardless of (irrevelent) internal anchors?
I know that I'm really late with this, but you can add a the data-href attribute to the facebook like button when you are using the XMLNS version of it, which I can see is being used from the comments section. So for your example you would put:
<fb:like layout="box_count" action="like" show_faces="true" share="true" data-href="http://www.humanreligions.info/humanism.html"></fb:like>

Blogger (Blogspot) share buttons to count individual post pages on Homepage

I have blog on the blogger (blogspot) platform. When looking at the homepage, the number next to the share buttons for each individual post is only showing how many times the homepage has been shared through each social button.
Is there are way to display the accurate number of how many each individual post has been shared and not just the homepage?
For example, http://mashable.com/ displays accurate social media numbers for individual posts on the homepage. Yet, http://dmw-test-blog.blogspot.com/ is displaying only the number of times the homepage has been shared, even though the buttons are displayed under each post title.
I been searching for hours for a solution. Some suggest to not place the script under the < /head > tag, others suggested using the individual scripts from each social share site instead of the 3rd party ShareThis script, but neither suggestion worked.
Is there a solution or is the Blogger platform the problem?
I found a solution.
By using the 3rd party share buttons from ShareThis, they have a tweak where you can add:
"expr:st_title='data:post.title' expr:st_url='data:post.url'" to each button, forcing the share buttons to display the number of the post title url instead of the browser url.
For example, using the share buttons above, the new code would look like this:
<span class='st_twitter_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>
<span class='st_facebook_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>
<span class='st_googleplus_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>
<span class='st_linkedin_hcount' expr:st_title='data:post.title' expr:st_url='data:post.url'/>

Like Box - Showing "check in's" rather than recent posts?

I just added a Facebook Like Box, per the instructions on the developers page here:https://developers.facebook.com/docs/reference/plugins/like-box/
The page says it should show recent posts from the page. However, on my site, it only shows the "friendly activity" feed on the page which seems to be ONLY the people that have checked in to the restaurant. Is it because its a "place" that its doing this? And I may need to make it a business rather than location to adjust the feed?
Is there a settings somewhere that will change this or something? Other wise I have no idea!
Add this parameter to your Like Box code:
&force_wall=true
The parameter is listed in the "Attributes" section of the Like Box page, but Facebook forgot to include it as an option in the tool that creates the Like Box code.
To expand on this "force_wall - for Places, specifies whether the stream contains posts from the Place's wall or just checkins from friends. Default value: false."
So in the second bit of code (not the script), you will need to add the force_wall parameter similar to this:
<div class="fb-like-box" data-href="http://www.facebook.com/pages/XXXXXXXXXXXXXX" data-width="595" data-show-faces="true" data-stream="true" data-header="true" force_wall="true"></div>
I think this should be data-force-wall="true" , but it still has no effect... it seems this issue really relates to facebook URLs that still use the ".../pages/..." segment

How to get "Facebook Like" to focus on items in the page not the page itself?

<iframe src='http://www.facebook.com/plugins/like.php?href=http%3A%2F%2Fwww.example.com&layout=standard&show_faces=false&width=100&action=like&colorscheme=light&height=35' scrolling='no' frameborder='0' style='border:none; overflow:hidden; width:100px; height:35px;' allowTransparency='true'></iframe>
or:
<script src='http://connect.facebook.net/en_US/all.js#xfbml=1'></script><fb:like href='http://www.example.com' show_faces='false' width='100'></fb:like>
I have media files that are loaded dynamically onto a page.
After the file is loaded, I want to put out a Facebook Like button for it so that the text that appears in the Facebook News Feed is specific to the media item.
At the moment it always describes the page itself.
In the developer docs it says to do this you need to set Open Graph info in the page HEAD section.
I don't see how that would work with the multiple media items I'm dealing with.
Create a new page for each media item (as a parameter to a script) so that FB indexes each individually:
<fb:like href='http://www.example.com/fblike.php?item=name_id_url_whatever' show_faces='false' width='100'></fb:like>
Where fblike.php redirects back to the main example.com or whatever page the media item in question is on. You'll probably need some sort of database to track it, unless everything links back to the main page.