By Denis Lafont-Trevisan on
Hi everyone,
We have an intranet developped with drupal. We would like to have:
- A page automatically presenting all the users blogs
- A theme for users blog different (=Kubrick) from standard pages.
Any clue?
Denis
Comments
Yes
The first is www.yourdomain.com/blogs -- this will display in teaser format all of your recent blogs, paginated according to your settings. (If you want just a list of blogs, see the php snippets section of the handbook. Codes are there that you can paste into a node, sidebar block or front_page area.)
As for theme, there's a new contributed module that does this (I forget the title, but you can find it under "downloads"). Also, using phpTemplate, you can give just the blog nodes a different look (such as different colored links or background) by making a node-blog.tpl.php template file. There are other ways, such as placing a conditional at the top of your page.php.php that would direct blog posts to a different file (e.g., "blogpage.tpl.php").
A search on these topics will yield code and more, so you don't need to be a php wiz to do it.
===
Laura
pingV
_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet
Sections
http://drupal.org/project/sections
Still in development.
-sp
---------
Test site...always start with a test site.
Drupal Best Practices Guide
-Steven Peck
---------
Test site, always start with a test site.
Drupal Best Practices Guide
snippet - list of blogs
I looked thru the snippets - http://drupal.org/node/23220 and http://drupal.org/node/21867 - found several blog-related but did not find one that listed all blogs.
Please help me find it - or even point out the best starting point snippet to modify to list all blogs and/or all users.
Thanks.
Keith
hmmm
Yes this would be good to have. A hack could use global user function to display all user id's with the word "blog" before it in the url, but not all users have a blog. A blogroll of onsites blogs seems like a pretty necessary feature.
blogroll
There is a blogroll module - http://drupal.org/project/blogroll - but I was thinking something much simpler - just a block that lists all users who have a blog, sorted alphabetically, for starters.
not blogroll
This lets each users lists blogs or any links they like. I know you are talking about a blogroll for the site. I'm wondering how to do that as well. It seems like a simple and needed feature. Someone out there must know some code that accomplishes this.
There is precisely such a
There is precisely such a block on www.ofbyandfor.org (look at the Bloggers block on the left), but I think it is a manually created menu.
Not sure if this is what you are looking for.
Yes that is it
The Bloggers block at www.ofbyandfor.org is all that I was looking for. If I knew how to code my way out of a paper bag, I could come up with that custom code myself. I bet it is pretty simple. Alas, I can only borrow and hack. I will see if Zacker will share his snippet - or does someone else have it handy?
Snippet - List of accounts with blogs
Here is some custom block code that appears to do the trick. Lists all accounts (alpha order) that have blog entries. Users without any blog entries are not shown. Each account in the list is a link to the blog for that user (and not a link to their user account).
Disclaimer: I am new to this, so I am sure this is not perfect code, but it seems to work for me. I bet there are some "access checks" and other good practices that are missing!
Suggestion
Why don't you add this to the php Snippets section of the handbook, where others can find it more easily?
(also, if you bracket your posts with
...instead of the < code > brackets, your php code will be color-themed for readability.)===
Laura
pingV
_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet
Posting in the snippets area
I will post there - but since I am new to this, I would like someone who knows what they are doing to check it over first. I figured if I left the code sit here for a few days, somone would speak up if it was significantly wrong. If silence, then OK to post over there.
"You may post code ...<?php ... ?> (highlighted PHP) tags."
I see that in the formatting guidelines now, will do better next time, thanks.
Correction
The blog teaser display is www.yourdomain.com/blog (no 's').
===
Laura
pingV
_____ ____ ___ __ _ _
Laura Scott :: design » blog » tweet
Blog Theme module and a hacked Site Map module
For presenting blogs you can check out my modified version of site_map.module in my sandbox. The function that intrest you are "_site_map_blogs".
http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/frjo/
For special blog themes check out "Blog Theme" http://drupal.org/node/19248. A users blog will be presented with the theme that the user has chosen in his/her settings. I use it on my site and it works well.