goldenapples / recommended-links

a plugin to add a reddit-style system of link sharing, commenting, and rating to WordPress
http://goldenapplesdesign.com/projects/recommended-links-plugin-for-wordpress/
23 stars 0 forks source link

New feature: Author archive pages #11

Open goldenapples opened 12 years ago

goldenapples commented 12 years ago

I'm getting around to building out author archive pages for version 0.5 of the plugin and wanted to get feedback as to how that should work.

Typically WordPress will just pull the author.php template from the theme, but if I just inject recommended links and comments into that query, it will look really bad unless the theme author has specifically prepared that template for this post type. So I'm thinking I will need to make site owners create a stub page to hold that archive similar to the way there's already a stub page to hold the recommended link archive page.

Some questions:

How should the page be laid out? Can it use the same page template as the recommended links archive page, or does it need its own holder page and page template?

Should author link archive pages try to deal with regular posts as well, or just posts of the "recommended link" type?

What metrics are most important to display? Do users want to see total karma? Or karma broken down by submissions / comments?

And finally, how should the page be linked from the rest of the site? Should the WordPress the_author_link() be hijacked to point to this archive page? Should it only be linked from the headers on RecLinks pages? Should there be a widget set up to view top users?

I'll be going forward and making some decisions, but would like feedback from users as to what options to offer.

vicmaine commented 12 years ago

Howdy sir,

RE: Should the WordPress the_author_link() be hijacked

I'm tempted to say you should just hijack the the_author_link() for simplicity sake since it worked so well for the_title(). I had a heck of a time trying to figure out how to set up a new taxonomy for the categories. I did finally get it done though so I guess I should be happy I learned something new (thanks? ... I guess :). [also see answer #2 below which fits into both of these questions].

RE: Should author link archive pages try to deal with regular posts as well

For my own purposes I would vote for just having reclinks on the author page because I envision a site like this being just for reclinks. Maybe I'm wrong, but I think it would get real confusing for readers trying to figure out what the hell was going on between external links and internal posts being all mixed together.

RE: Can it use the same page template as the recommended links archive page

My knowledge of PHP is sporatic at best, but I'd say it needs it's own template author-reclink.php because we'd probably want the top of that page showing more than just the author's reclinks (ie, author avatar, website url, bio, twitter, etc, all the stuff they fill in when registering).

I've got a few questions of my own while I've got your attention, if you don't mind:

1. Are there separate template tags for the individual elements of the reclinks_votebox() instead of having them all bundled into that one ... like the way you did the reclinks_domain(). For example: reclinks_upvote_button(), reclinks_downvote_button(), reclinks_score(), reclinks_comments(). I've been able to accomplish some of this with some creative css work (overflow:hidden and negative margins) but I was thinking you might already have individualized calls and maybe you just decided not to publish them for some reason?

2. How would you suggest getting the archive-reclinks.php to be the home page of the site. All I can think of is doing a 301 but I'm not sure that's the best way to go at it.

thanks

goldenapples commented 12 years ago

@vicmaine - Thanks for the feedback. I think I agree for the most part.

I'm picturing a situation where users have to can either create a page stub to hold the author pages, or create a new template file like author-reclinks.php... the same way its done with the archive page pages currently.

I'm thinking that there will be a public function to get the link to the author pages, and an option to overload the output of the_author_link() with that function (for sites that don't need regular author archives) or not.

To answer your questions:

vicmaine commented 12 years ago

btw, is there any chance that you have a working wordpress theme already set up for this and working that I could load up onto my own development.site to play around with (to use as sort of a starting point) to understand how this is all supposed to fit together and function?

After about 60 hours of busting my ass with this I do have some big chunks of it working properly and it's exciting to see the potential, but I think it would make it WAY WAY easier (for those of us that only have a basic knowledge of PHP) if we could step back and see "the big picture" (ie, by having you give us a generic theme to use that's already setup exactly the way it should be).