1
2
But there’s two bits of code disqus wants you to include. The first bit does the comments (x) part, and the second bit does the actual comment form.
The comments (x) part can go, as you said, inside the the {regular} block, instead of after all the post type blocks. But the part that makes the actual comment form has to go inside the http://pierreism.tumblr.com/post/40614367/re-re-dear-lazy-tumblr block, which renders on ever post-type’s permalink page. If the comment form code goes inside the {regular} block, then it’ll render a comment form on the main page as well as the permalink page.
It seems that what I’m asking for requires some CSS-fu of the sort that Paul Giacherio’s siloTheme uses, or Nostrich uses on Peacock Tail, to get different styling on the main page and the permalink page, but then goes further and has different styling on the permalink page, depending on the post type.
Hmm… I know I left my too hard basket around here somewhere.
Livejamie, looks like our css woes aren’t over yet :(
thatguyben, I’m gonna assume you’ve read my previous reply, but the TagsAsClasses styling will be carried across to the permalink page right? That means not only will you be able to make the comments visible on command, but also the comment form, since you can address it specifically through CSS.
What you need to do is make a <div> containing the comment form and place it next to the ‘comments (x)’ <div>, both within your posts’ {block}, give it a new id (for example “#form”) and then make it invisible again through CSS like how I last explained.
This time, you need to add the { block:Permalink } modification to your code to allow Permalink styling.
And then you should be able to address the comment form in a ‘commentsenabled’ tagged post and a normal, non-commentsenabled post via:
body#permalink #content div.regular #form {
/* style for Regular Post Permalink page
with Disqus comment form set to invisible */
display: none;
}
and:
body#permalink #content div.commentsenabled #form {
/* style for Regular Post Permalink page
with Disqus comment form set to visible */
display: block;
}
This should work, assuming the TagsAsClasses styling is carried over to the permalink page, but again, it’s just me thinking aloud here and not proven method. Good luck!
[Because this worked so well the last time, I figured I’d try again.]
Suppose I wanted to enable disqus comments on only some of my posts (or, if you like, only some of my post types, eg text only) and then only some of the time.
Here is what I imagine the behaviour to be:
- write a new text post
- tag is with “commentsenabled”
- comments are enabled
Text posts that don’t have comments enabled are ordinary text posts without comments.
I’ve had a brief look at the tagsasclasses functionality and, awesome as it is, it seems that it only really supports differential styling, not differential functionality. Of course, I could be totally wrong on that.
Is this even possible?
Differentially yours,
Ben
The way that your tumblr theme works is that you have a main posts block, that contains the formatting for all your posts, it goes like this:
{ block:Posts }
{ block:Video }
blah blah video code
{ /block:Video }
{ block:Quote }
blah blah quote code
{ /block:Quote }
and all the other blocks, video, text, etc
{ /block:Posts }By default disqus wants you to throw in their code at the end, before the {/block:Posts} so every single post type gets the default treatment of the disqus comments and comment box. But if you wanted to enable it for certain types of posts you would throw in the code that disqus gives you not before the {/block:Posts} but before the blocks you wanted to enable commenting for.
This also comes in handy when you want to customize the comment link for certain blocks. (i.e. right justifying the comment link for quotes, etc)
If you don’t include the code on a certain type of post, Disqus won’t append anything to it. But you have to do it before the {/block} tag for each category you want it enabled on.
I hope that makes sense. If you, or anybody else needs clarification drop me an email or IM, I’d be happy to help. :)
I think what thatguyben meant was that he wanted the option to have both a regular post (for example) that had comments and a regular post that wouldn’t have comments, all operated with the omission/inclusion of a tag.
This is totally a shot in the dark, but maybe you could try Cameron’s TagsAsClasses method with a stylesheet that had Disqus’s comments in a <div> within all posts’ {block} code, but set to invisible, and then use the TagsAsClasses to enable a new styling with the Disqus comments <div> set to visible.
To clarify, say you put in a new <div> containing the Disqus comments within the Regular Posts {block} and give it the id “disqus”, the CSS would be:
#content div.regular disqus {
/* style for Regular Post with Disqus comments set to invisible */
display: none;
}
But then when you add the TagsAsClasses of your choice, say adding the tag "commentsenabled" the <div> would be set to visible via:
body #content div.commentsenabled disqus {
/* style for Regular Post with Disqus comments set to visible */
display: block;
}
I might be wrong since I haven’t implemented Disqus before and haven’t tried out TagsAsClasses either, but it seems feasible. Give it a shot and e-mail me if you need any more clarification.
oh and sorry for breaking everyone’s Dashboard.
“New Y Combinator startup Posterous launches today with what might be the simplest blogging platform to date. Yes, it’s even easier to use than Tumblr, which has a cult-following of users who like to post lots of pictures and short messages.
Here’s how you create a blog on Posterous - email something to post@posterous.com. You’re done (…) The subject line of the email is the post title, the text area is the content. You can also email photos, videos and sounds files, which will be displayed in a custom Flash player on the site.”
Not too shabby. (via Techcrunch)
But going forward, Jakob Lodwick, the person, is withdrawing from the public web. You will see the results of my efforts through Normative and other companies. I just cannot deal with these animals any longer.
Say what you will about his ego, but so far he’s left 2 companies he’s vehemently supported. That doesn’t paint him as a very trustworthy business man.
Immortality - a philosophical game.
With Immortality, Jason Rohrer questions our feelings about life and death. Is immortality good? Is death bad? If you could become immortal, would you? Immortality is a game about that question, and it’s also about the converse of that question: Does death have some fundamental value that we usually ignore?