Showing Author on List Page
9 posts by 4 authors in: Forums > CMS Builder
Last Post: January 28, 2010 (RSS)
By gkornbluth - November 8, 2009 - edited: November 8, 2009
Probably missed this somewhere...
How can I show the author of a record on a list page?
Thanks,
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] Showing Author on List Page
http://www.interactivetools.com/iforum/Products_C2/CMS_Builder_F35/Showing_Author_on_List_Page_P75695/gforum.cgi?post=74121;search_string=show%20updated%20by%20user;guest=55438387&t=search_engine#74121
Kevin
Re: [kevbarker] Showing Author on List Page
Great find!
Looks like the user's full name might just do the trick, and even better than I thought I could.
I try it tomorrow and see where it goes.
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] Showing Author on List Page
By Dave - November 11, 2009
Try: <?php echo $record['createdBy.fullname'] ?>
It loads the record of the "owner" from createdByUserNum and adds all those fields with a "createdBy." prefix.
Hope the makes sense. Let me know if it works for you. (If it doesn't attach your viewer).
interactivetools.com
Re: [Dave] Showing Author on List Page
My client pointed out something that was an issue for him and possibly for others.
When a user account is created, the user's full name gets entered, but it's in the format First name Mi Last name. (especially if you're using the <?php echo $record['createdBy.fullname'] ?> function.
When there's a long list of users, they then get listed in the user name list sorted by first name, which he feels isn't the optimal way to sort an alphabetized list of users.
Is it possible to:
1) Add a First Name and a Last Name field to the user account table.
2) Get rid of (or optionally hide) the full name field for new user accounts without messing up some inner workings and existing user accounts during the conversion, and
3) Not lose the functionality currently provided by the <?php echo $record['createdBy.fullname'] ?> function by echoing both the First name and the Last name fields in the viewer?
Thanks,
Jerry Kornbluth
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] Showing Author on List Page
By Chris - January 27, 2010
You can certainly replace the fullname field with other fields in the accounts table. You can then output both fields in your viewer:
<?php echo $record['createdBy.first_name'] . " " . $record['createdBy.last_name'] ?>
I hope this helps. Please let me know if you have any questions.
Chris
Re: [chris] Showing Author on List Page
I'll certainly add these fields to my user accounts table.
Would there be anything that would have to be customized each time that I upgrade a client to a new version of CMSB?
Has anyone else mentioned this issue?
It might prove to be more flexible for developers if a "first_name mi last_name format was added as a built in option.
I guess. any switch would have to accommodate both formats, since full name is what we've become used to.
Best,
Jerry
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php
Re: [gkornbluth] Showing Author on List Page
By Chris - January 28, 2010
Nope, nothing will need to be changed when you upgrade. There are no hardcoded references to the fullname field, it's just a default.
I haven't heard of this issue before, but that doesn't mean it hasn't come up. Balancing simplicity and flexibility can be tricky.
Chris
Re: [chris] Showing Author on List Page
Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php