Content last modified Monday 6 March 2017
hop to #bottom
Categories:
Author:
Current version:
1.5
About It:
Get it:
Rate it:
  • Helpful?
  • 3 Yes
  • 1 No
Flag it:
Contact Reason [ ? ]

pvc_users_info

This pvc_users_info provides the ability to create a profile for each author on your site. These includes assigning a job title, personal web site address (uri/url), nickname, slogan, bio, phone and fax numbers, start date and image for each user. All of this information is stored safely in the database and can be called by adding the following tags to forms:

<txp:pvc_author_articles />
<txp:pvc_author_bio />
<txp:pvc_author_cell />
<txp:pvc_author_date />
<txp:pvc_author_email />
<txp:pvc_author_fax />
<txp:pvc_author_firstname />
<txp:pvc_author_id />
<txp:pvc_author_image />
<txp:pvc_author_lastname />
<txp:pvc_author_last_login />
<txp:pvc_author_list />
<txp:pvc_author_longbio />
<txp:pvc_author_nickname />
<txp:pvc_author_phone />
<txp:pvc_author_privs />
<txp:pvc_author_slogan />
<txp:pvc_author_title />
<txp:pvc_author_web /> <txp:if_pvc_author_web />

Tag attributes are outlined in the help

This plugin used heavily on Cre8tiveGroup.com. It powers the staff pages as well as the bylines at the bottom of articles.

Upgrade instructions:
  1. Delete the old plugin—don’t worry, your profile information in the database won’t be deleted!
  2. Install the new plugin.
  3. Visit the “User Profiles” admin tab to upgrade the database table.
  4. Enjoy!

Version History
  • Version 1.5 – 05/18/2009 – (Charlie) Added functions: pvc_safe_join_rows() [private], pvc_author_realname(), pvc_author_last_login(), pvc_author_privs(), pvc_author_list(), and changed pvc_author_firstname() and pvc_author_lastname() to have db fields
  • Version 1.4 – 02/19/2009 – Added Long Bio and pvc_author_id()
  • Version 1.3 – 10/20/2008 – Allowed TXP tags in bio and added pvc_if_author_web – (User contributed from Charlie)
  • Version 1.2 – 09/05/2008 – Fixed SQL errors and pvc_users_email
  • Version 1.1 – 07/14/2008 – Added pvc_users_firstname and pvc_users_lastname
  • Version 1.0 – 04/06/2008 – First Release

Credits: Peter V Cook & Charlie Fiskeaux II

Article Request Count:
Keywords/tags:
Initially released:
21 July 2008
Posted here:
21 Jul 2008
Article modified:
28 May 2009

You may want to leave your comments/questions at the Forum thread for quicker feedback. Otherwise, comment away:

Your comment will NOT be submitted until you click the 'Submit' button on the next pageload.

Commented (12)

Renobird:

This plugin looks awesome. I installed in (TXP 4.0.6) and I get the error.

Warning: Column ‘name’ in where clause is ambiguous SELECT * FROM txp_pvc_users_info JOIN txp_users USING (name) where (name = “admin”) in /xxx/xxx/xxx/xxx/xxx/xxx/xxxxx/xxxxxx/textpattern/lib/txplib_db.php on line 81

@Renobird

What version of MySQL are you using? Do you have multiple users set up on your site? Or is “admin” the only one? When do you get this error?

michiko:

I am having the same problem. I have multiple users and would love to use this plugin!

Warning: Column ‘name’ in where clause is ambiguous SELECT * FROM txp_pvc_users_info JOIN txp_users USING (name) where (name = “admin”) in …/textpattern/lib/txplib_db.php on line 81

Michiko and Renobird, I believe I may have fixed the problem. Give v1.2 a try. Let me know if it works, but if not tell me what page you are on when you get the error.

michiko:

Hey Peter,
that worked perfectly! Thanks for updating.
One request, I would like to allow permission to edit only your own profile.
Otherwise, a great plugin!

Something like this has been on my wishlist for a long time.

However, I can only output data for first name, last name, date and email address. The tags for the other fields don’t produce any output for me in an article form.

@ Peter

Thanks for your help so far…

At the moment, as suggested, I have a page template containing
<txp:article form=“default” limit=“1” />

and in the “default” form,

bio: <txp:pvc_author_bio />
cell: <txp:pvc_author_cell />
date: <txp:pvc_author_date />
email: <txp:pvc_author_email />
fax: <txp:pvc_author_fax />
first name: <txp:pvc_author_firstname />
image: <txp:pvc_author_image />
last name: <txp:pvc_author_lastname />
nickname: <txp:pvc_author_nickname />
phone: <txp:pvc_author_phone />
slogan: <txp:pvc_author_slogan />
title: <txp:pvc_author_title />
web: <txp:pvc_author_web />

but still, only 4 of the fields output any user profile data in an article page

@michiko Actually I meant to include that feature, but forgot to test it, and thusly doesn’t work.

@pieman You mentioned the date is being output, if you change the date will the new date be output or just the date you installed the plugin?

I added some data for all authors to be sure, but that didn’t affect anything.

All authors and respective data are in the database as expected.

But as you suggest, if I change the date in one of their User Profiles, the change isn’t reflected in the front-end. And that brought to light that the only bits of data published are the ones from the standard txp_users table. Nothing from the txp_pvc_users_info table is output.

That said, the date field seems to have a mind of it’s own – it shows today’s date for all profiles – which doesn’t match either the txp_pvc_users_info date, or the last_access field of txp-users.

Hope that makes sense.

Peter, just noticed you upgraded the plugin and tried it out. Seems to have sorted all the issues I had previously.

Thanks again – this is a real string to the Txp bow.

Are you planning to update it any further? If so, can I suggest you start a forum thread so people can track changes.

It would be great if there were structured fields for address details, so you could mark-up contact info as a more complete hCard Microformat.

A small bug: the author_email element is currently output as a href without the ‘mailto:’ prefix, and the link=“0” attribute appears not to work.

publiclee:

This plugin (v1.5) is flaky again with txp v4.5.1.
I have two users so previous comments may be relevant. The plugin seems to install OK but when I select a user from the User Profiles page I get the error below:
“Internal error “Unknown column ‘txp_pvc_users_info.name’ in ‘field list’”
in /textpattern/lib/txplib_db.php at line 95.

Checking the db and I find the wanted table and its column are there but there are no records. I suppose they might be populated when the profile is first saved. Using MAMP with PHP 5.4.4, MySQL 5.5.25.

Subscribe to this article's comments RSS feed. [ ? ]   View Recent Comments across the site.

Would you care to write a comment or visit the forum discussion?

You know you want to visit the Archives.

Browse

Categories


Articles

There are also tag clouds, 'cause those are fun.
Published with Textpattern