ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Have a few different authors contributing to a weblog... question

February 12, 2008 11:47pm

Subscribe [3]
  • #1 / Feb 12, 2008 11:47pm

    Deron Sizemore

    1033 posts

    OK, so I’ve got a few different authors that will be contributing to a weblog. There won’t be any frequency in their posting habits and for right now, I’m just going to have them email me the articles and I’ll upload them myself. Not worth training them how to upload articles as well as show them basic html to insert images, etc. Something will go wrong and I’ll have to fix it anyway.

    Each of these authors will have their own profile page. Now, it won’t be a profile page in which they manage their self. It will be a very basic bio page with a pic. For each article they write, I’m including a “written by author_name” where the author’s name will be a link leading the visitor to their profile page. Also, each article they write will include a very short bio about them at the end of the article with a “read more” link to their full bio/profile page.

    So, I’m wondering what would be the best way to go about this? In my experience, I see it as I’ve got two choices:

    1. Create user accounts for each of the authors (even though they won’t be logging into the control panel) and select the authors name from the select menu in the publish page before the entry goes live. Then, simply link to the author’s bio page with conditionals, maybe something like this:

    Written by: {if author == "joe|bob|mike"}<a href="http://{path=">{author}</a>{/if}

    Not sure if something like that is possible or not? Or if I should just write out the conditional for each author individually? Is that the most efficient way?

    2. I could simply create a custom field to hold the authors name in which I would have to manually type in the author’s name for each new entry and then use conditionals in the same fashion as above to dynamically generate links to the bio page and generate the small bio section at the bottom of the entry.

  • #2 / Feb 13, 2008 12:10am

    Casey Reid

    82 posts

    I recently did a project where the client needed to list different authors but didn’t want to setup separate user accounts for them. I used option 2 and just setup a custom field for them to choose the author when submitting the article. I set it up as a custom field dropdown with the authors pre-populated, so they didn’t have to type in the name every time. They could just choose it from the list. You could then just use conditionals as you’ve already mentioned to link to their bio.

  • #3 / Feb 13, 2008 12:29am

    Deron Sizemore

    1033 posts

    Oh yeah, I forgot all about the ability to be able to create a drop down custom field, that would be perfect for me.

    As for the conditionals, do you know if “joe|bob|mike” will work or do I just need to use this:

    {if author == "joe" OR author == "bob" OR author == "mike"}<a href="http://{path=">{author}</a>{/if}
  • #4 / Feb 13, 2008 11:07am

    Robin Sowell

    13255 posts

    You need the OR format- as you cited in the code tags.  And you’ll want to use the custom field name instead of author if you go with the dropdown.

  • #5 / Feb 13, 2008 11:27am

    Deron Sizemore

    1033 posts

    Thanks Robin,

    Yeah, I realized that last night after I went to bed that I was using “author” instead of the custom field name. I actually meant well, but just threw that code in there quickly! 😉

  • #6 / Feb 13, 2008 12:11pm

    oldgoldblack

    113 posts

    Hey Deron,

    I would use option 1. It more easily allows for expansion and letting your users do the posting themselves down the road. Future modifications are always more trouble than they seem in the present. Not sure why you need the if author is bob joe or mike thing, but it seems hardly inefficient dB wise.

    Another option I thought is to use categories, whose custom fields would provide plenty of flexibility for a bio page with a single template.

    P.S. I’m a fan of NiceStylesheet. Cheers.

  • #7 / Feb 13, 2008 12:28pm

    Deron Sizemore

    1033 posts

    Hey Kevin,

    I appreciate the thoughts on NiceStylesheet! Glad you like it. 😊

    Yeah, the whole “if author ==” stuff is basically so I can display the author name below the title of the article (just to show who wrote it) and as well to show display a short bio about the author at the bottom of the article. I’m not sure how to get around this without conditionals? If I select the author name from a drop down list, with conditionals I can use one template and display all of this information.

    Can you elaborate on your categories idea? I’m not sure exactly how I might go about using categories for this.

    Thanks

  • #8 / Feb 13, 2008 10:34pm

    oldgoldblack

    113 posts

    Ah, I didn’t get that you wanted to do the bio on the same page. I’m not sure how that could be done with categories, but it may very well be possible with archive and heading tags. I’d have to experiment though.

    Stepping back, though. I mean create a separate login for each author, assign them all to the weblog. Then you can have their screen name display what you want it to display (ie: “Joe Smith”). And the tag {author} will be all that’s need to call that up in the template. As admin, you will have a pulldown box under options on the Publish page to set the other from among whoever is assigned to that blog. Get it? It’s just as easy for you, one less conditional, and in the future if you want them to do it themselves, just give them their password and it’s automatic.

    Not sure if that meets all your needs, but that’s what I was thinking.

  • #9 / Feb 13, 2008 10:39pm

    oldgoldblack

    113 posts

    Oops, re-reading your post I guess I still don’t get the conditional, because you already have the straight {author} tag, I didn’t see the need to only link if it was joe or mike or bob, but you may have your own reasons for that. But therefore my method doesn’t necessarily mean one less conditional at all.

    It’s probably too late at night for me to be thinking about this.

  • #10 / Feb 13, 2008 11:23pm

    Deron Sizemore

    1033 posts

    Yeah, you’re right. The first conditional to display the author name below the title as the “written by” part is not needed. I was thinking to much on that one.

    Your solution is what I was thinking for option 1 above. I’m just not sure I need it. I mean yeah, I could do it that way and if they never need to be able to post themselves, no big deal and if they did, all they need is the login info. With this section though, I really, really just don’t see them ever logging in to make posts, but I guess there is always a chance.

    Thanks Kevin. I’ll sleep on all these ideas tonight.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases