I have a number of Drupal sites that are supposed to be just blogs. For one blogger.

I have two questions:

How do I make a blog for a single blogger display the blog content for visitors. Right now, it's only displaying for the author. No one else can see the blog content.

Also, since only one blog is to appear on this site, so no "my blog" navigation should appear except when the author logs in. How do I make that happen.

Thank you for the advice.

Comments

timbo-1’s picture

For your purposes, I would suggest using a blogging CMS instead of a portal CMS such as Drupal. The learning curve with Drupal is a bit too steep and being a sort of purist, I believe that it has some major issues with extensibility at it's core. Plus, if you pierce to any level of abstraction in the forums and start suggesting improvments to its core concepts, you'll be met with stern replies.

I haven't given up on it though, but I have moved to a CMS which offers immediate productivity. The fact of the matter is, I don't want to have a highly modified Drupal core, in order to make it do exactly what I want, and have something totally different than what's floating around, and then be in a real mess when a new version is released that I need.

Try textpattern for blogging. Themes easily and has a much more intuitive tagging interface than drupal.

Good luck.

-tb

sepeck’s picture

I and hundreds of others disagree with your purity.

The nice thing about Drupal is that it will work just fine as a single user blog. You will also be nicely positioned to extend and expand your site's focus later if you choose to.

Now I used the blog module for mine, but have since learned that the story module works better in single user blog situations.

To that end I added this to the handbook http://drupal.org/node/41373
Now it's not quite done, but I had a friend run through it and he got a test site setup with these instructions.

-sp
---------
Test site, always start with a test site.
Drupal Best Practices Guide -|- Black Mountain

-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide

enkydu’s picture

Thanks. Do you know a way to port the content I already have posted as blog posts into story-type posts (other than cutting and pasting)?

Thank you, again.

Geary’s picture

Execute this SQL query:

UPDATE node SET type = 'story' WHERE type = 'blog';

You can execute that in phpMyAdmin or in a MySQL interactive session, whichever you prefer and have available.

I'm pretty sure that is the only database change required--I just tried it on a test site--but if I'm mistaken someone should come along and set us straight. :-)

As always, be sure to back up your database first.

enkydu’s picture

Thanks for this suggested SQL query. I've been learning about backup so i could do step one first. I think I backed-up correctly, so I went ahead and tried the query with the following result:

mysql 4.0.24-nt-max> use drupal;

Database changed

mysql 4.0.24-nt-max> UPDATE node SET type = 'story' WHERE type = 'blog';

ERROR 1146: Table 'drupal.node' doesn't exist

What do you think I'm doing wrong? I know my DB "drupal" exists, because the Drupal interface is reading from and writing to it nicely and because I do other command line queries successfully.

Thanks again.

venkat-rk’s picture

If you want a safer option, try the altertype module:
www.settingtheworldtorights.com/node/417.

After installing and enabling the module, edit each blog post and you will find a new option to change its node type. It is not automatic like the sql stuff above, but it works well. I have done it twice now for a production site.

Geary’s picture

Are you using table prefixes? That would explain this.

What does it print if you do:
mysql> show tables;

enkydu’s picture

When I enter "show tables;" it prints out a long list of things under the heading, " Tables_in_drupal" that each begin with one of the names of my 4 websites followed by an underscore, followed by various things like names of modules. This is repeated for all 4 website names.

Thanks for the help.

Geary’s picture

Whenever you see someone mention a SQL query that has something like 'node' in it, you will need to substitute the appropriate prefixed name. You need to pick the correct prefix, of course. So if the site you want to modify uses a table prefix of "mysite_", then you would use "mysite_node" instead of "node" in the query.

If you're not sure which site uses which table prefix, look in the settings.php for each site to see what prefix it uses.

enkydu’s picture

Thanks! It was the prefix issue. So I did query for all sites, changing "node" to "x_node" where x=name of site.

SQL liked that.

And when look at posts through Drupal, they all are type story.

Problem is, I don't see them anywhere except when go administer>content. There are all listed and can be viewed by clicking on edit. All seems well with them, but I can't see them any where else and my other test users can't either.

Could this be because of what Varun V Nair says below about clearing "cache table"? If so, how do I do that?

I've followed all the steps you list on the handbook page correctly, I believe, BTW.

Thanks again for all the help.

Geary’s picture

I saw what you describe when I did this and forgot to enable the story module in the modules page. You might want to check that.

If it's the cache table, you can do this at the MySQL prompt:

delete from cache;

Change "cache" to your prefixed cache table name, e.g.

delete from mytableprefix_cache;

enkydu’s picture

I figured out how to clear cache table and lo, Drupal is behaving like a single blogger site, more or less. I have some things to clean up with navigation and theming, but basically I'm there, thanks to the advice of everyone on this thread.

Thank you.

varunvnair’s picture

Don't forget to empty your cache table. I don't know exactly why this is required but this is recommended in cases like this. About a month back I also converted my 'blog' nodes to 'page' nodes (not 'story' nodes).

Is there any significant difference between 'page' and 'story'?

My Drupal-powered Blog: ThoughtfulChaos

timbo-1’s picture

See above.

tb

yvelle’s picture

Sounds to me like you just have to set your blogs publish to the front page. Go to admin/node/configure/types/blog and selected "promote to front page". If you have problems viewing the blogs in the blog or blog/# directories, then the problem may also be a permissions problem. Under admin/access and make sure "Login module... access content" is selected for anonymous user.

rjung’s picture

Create two (or maybe three) user roles: registered user and administrator/blogger. Set access control so only the administrator/blogger can create blog entries, but allow everyone else to view them.

I've got something like that set up on my site -- there's only one blog (mine), but folks can register and leave comments. A PHP snippet on the front page displays the three most recent blog entries.

--R.J.
http://www.electric-escape.net/

--R.J.

enkydu’s picture

by giving "authenticated" and "anonymous" users checks for "access content" in their "node module" columns and by giving "author" only the permission to "edit own blog."

But it's not working. Any thoughts? I didn't create these users, BTW, they were default options and I just chose the permissions settings.

BTW, I went to your site, and yes, you are doing more or less what I want to do. Which is why I picked your advice to try first. 4 response and 4 completely different pieces of advice! Whew, this is not easy.

I do have to stick to Drupal, or at least I'm willing to incur some difficulties doing that for the time being. I've already invested a lot in getting it to do some special things that are (I think) unrelated to this problem.

Thank you, everyone, for the thoughts here.

enkydu’s picture

thanks, now it's working!

rjung’s picture

BTW, I went to your site, and yes, you are doing more or less what I want to do. Which is why I picked your advice to try first. 4 response and 4 completely different pieces of advice! Whew, this is not easy.

That's because Drupal is flexible enough to give you multiple alternatives to do the same thing. :-) Even if some of those solutions might be better than others. ;-) Be thankful for that power.

--R.J.
http://www.electric-escape.net/

--R.J.

Geary’s picture

Turn off the blog module and turn on the story module. Use the story module for your blog posts.

The blog module is designed for a multiuser blog, not a single user blog. The story module is perfect for a single user blog.

To make sure your visitors can see your blog content, simply go to the Access Control page under administration and look for "access content" under the node module. Turn on the checkbox for all roles. (If it is already on, then something else must be amiss.)

enkydu’s picture

I've changed all blog posts to story posts (see above), and checked "access content" for all users under the node module. Any thoughts as to what else might be amiss?

Thank you.

varunvnair’s picture

My blog is also powered by Drupal. I have posted some details about my blog here that you might find useful.

My Drupal-powered Blog: ThoughtfulChaos