Unique memebr blog creation/placement in Drupal 6

Events happening in the community are now at Drupal community events on www.drupal.org.
opegasus's picture

Attempting to create a special situation.
Wanting the Member's profile to be able to post blogs but the blog post of
that member must show up on their page (below profile or somewhere) or on a block
next to the members main content/profile

Drupal 6

Currently each member gets a blog, using core blog.
Members are generated through the MS (Money Scripts) module.

What is desired is: that after a member is created, they can post to their blog,
it shows up in a block form next to their profile with titles or title and teasers links
to the full blog or blog page/node.

I mucked about in Views but became stumped on exactly how to set this up.

Does one set this up as a node type or a users type?

How does one find the unique variable for each member of a certain group and then use that
to pass it in to the function?

Or am I going about this all wrong? Is Views the smartest way one can do this?

Note: The solution to this situation is down towards the bottom in a reply titled: Arguing with arguments...

Comments

Sounds like you're on the

scottrouse's picture

Sounds like you're on the right track. The view should be a listing of content (or nodes) since that is the data you're actually listing. You'd add an argument based on the UID of the author. You could grab the UID from the URL of the user page on which you'll place the View (which could be placed as a block).

See if that makes any sense. I can get more detailed if you need.

Thanks...

opegasus's picture

Yeah I think a wee bit more detail is in order for me on this?
But then again I think I get to give more detail too.

I 'believe' that an open wildcard or variable gets to be in the argument (%) of some sort so that when the person becomes a member
the View for that persons blog is unique to them. Not sure if I am explaining it properly or not, apologies.

If you have a wee bit of time in the upcoming week (or this weekend) I could meet you in our Drupal hangout and show you/explain
far better than my typing it out here. Plus it might save you (or not?) a lot of time typing it all out here in a reply.

And yes, your answer does make sense to me. Just getting my noodle wrapped around this is taking some work right now. ;-D

Sure, we can meet sometime

scottrouse's picture

Sure, we can meet sometime this week.

Basically, if we're talking Drupal 6:

  1. Create a new View of type Node (https://skitch.com/scottrouse/g4s5d/views-d6.local).
  2. Add filters to display the content you want. (https://skitch.com/scottrouse/g4s51/edit-view-user-blogs-d6.local)
  3. Add the fields you want to display (https://skitch.com/scottrouse/g4s55/edit-view-user-blogs-d6.local) (as well as any sorting criteria, etc)
  4. Add an argument for User: UID and make the settings look like this: https://skitch.com/scottrouse/g4shk/edit-view-user-blogs-d6.local
  5. Create a Block display: https://skitch.com/scottrouse/g4shu/edit-view-user-blogs-d6.local
  6. Save the View
  7. Go to Blocks admin page and place the block in the desired region
  8. Set the block to only show on user profile pages: https://skitch.com/scottrouse/g4s71/user-blogs-block-block-d6.local
  9. That should do it.

https://skitch.com/scottrouse/g4s7q/admin-d6.local and https://skitch.com/scottrouse/g4s7c/testuser-d6.local

I will follow your directions...

opegasus's picture

...first. If I run into issues...I will holler.

Muchas Burritos! I have security issues on the server (oh Joy!) to handle for a bunch of people first, (the host was hacked)
then off to implement your work flow....

P.S. Your 'skitches' are AWESOME!

OOohhh so close!

opegasus's picture

Scott,

Your directions and screen shots are perfect! I was able to create the block view just as you described. I did a little mucking about and found the 'teaser' bit and was able to trim it down so only 200 characters show up with an ellipse.. way cool! Plus the title of the blog is a link to the full node...awesome!

I did restrict the block view to only user/* and that works perfectly. The blog block for that user only shows up with just
their blog block with just their blog content...again, perfect....exactly as I had imagined.

Now I added guides/* to have it show on the guides pages as well but the block does not show up on those pages/nodes.

so in the block configuration I have:

Page specific visibility settings
Show block on specific pages:
users/*
guides/*

But it only shows in the user's page. When I go to that same user's 'guide' page the block does not show up.

I changed the Validator options to : Allow both numeric UIDs and string usernames

since the page url's looks like sitename/guides/tls OR like sitename/guides/1rikkiwashereso I imagined that the last part ( /tls ) is a string name?

I attempted various combinations but no joy. Any clue how to add guides/* to the block pages or to the view? Again, that unique user has both a user page (account page) which the block view is working in and they also have a guide page but I have not been able to get that block to show up.

Arguing with arguments...pays off!

opegasus's picture

After arguing with the arguments, I finally got the View I wanted.

Using Scott's directions above...

Basically, if we're talking Drupal 6:

Create a new View of type Node (https://skitch.com/scottrouse/g4s5d/views-d6.local).
Add filters to display the content you want. (https://skitch.com/scottrouse/g4s51/edit-view-user-blogs-d6.local)
Add the fields you want to display (https://skitch.com/scottrouse/g4s55/edit-view-user-blogs-d6.local) (as well as any sorting criteria, etc)
Add an argument for User: UID and make the settings look like this: https://skitch.com/scottrouse/g4shk/edit-view-user-blogs-d6.local
Create a Block display: https://skitch.com/scottrouse/g4shu/edit-view-user-blogs-d6.local
Save the View
Go to Blocks admin page and place the block in the desired region
Set the block to only show on user profile pages: https://skitch.com/scottrouse/g4s71/user-blogs-block-block-d6.local
That should do it.

https://skitch.com/scottrouse/g4s7q/admin-d6.local and https://skitch.com/scottrouse/g4s7c/testuser-d6.local

I went on and tried a number of argument types until I found the combination that works for this particular VIEW.
A reminder that I wanted each special registered user (on this site called a GUIDE) to be able to blog about various things and have that unique users blog only show up on their particular pages (USER account and Profile pages/nodes) as a Title and teaser block with the title linking to the full blog entry.

Here is where I ended up and all in just one view!

Again first started with Scott's directions and then..

You will note that I didn't finish the view with Scott's UID Argument. For some reason it only allowed the USERS blog to show up on their personal account and not on the USERS public profile page/node where it really needed to be. But the Node Type: User posted or commented worked perfectly. Now the USER/Guides can see their blog posts on their private/personal account page and the public (anonymous) can see the blog posts of the individual GUIDE and only that guides blog posts on that guides profile page/node.

I haven't trimmed down the block restrictions to only just what is needed as it is late and I have been wrestling with this for days now but this is what the restrictions for that block looks like: http://screencast.com/t/t2Vu4rCsw

Granted there are site specifics that you may not be using but hopefully you get the general idea of how to set up a VIEW for this type of functionality in Drupal 6. I would love to show you the VIEW in action but this feature hasn't been released to the GUIDES yet so they haven't populated their blogs. Oh, one neat feature of this VIEW is that until the USER creates their very first blog entry, the block won't even show up on the site. Not only does it keep the site tidier, it helps motivate the GUIDES to start blogging.

Many thanks again to Scott Rouse for your tireless support. You not only put me on the right track, you got me way down the road on this one.

Good write-up! And a tip on screenshots…

laken's picture

Christopher, thanks for taking the time to document your process for the community. Getting it out here helps people who may have similar issues find and benefit from your work.

Just wanted to offer a hint - if you're taking the trouble to make screenshots to illustrate your post, you can embed them directly in your page just by using <img> tags, like I did in this old post: http://groups.drupal.org/node/17151

The image tags couldn't be simpler, e.g.

<img src="http://img.skitch.com/20081130-ei2me2aj96tkxt2eea39qxytin.preview.jpg"  />

Just make sure to use a screenshot hosting service that will hopefully be around for a long time!

Thanks Andy!

opegasus's picture

I appreciate the tip. Sadly I go way to fast (what's new, eh?) and don't explore all the options. Yes well I hope TechSmith (Jing) is around for a while as
I alpha test for them. ;-D

Western Montana

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: