Page 1 of 1

feature request - ability to get author email and name

Posted: Fri Nov 19, 2004 8:39 am
by anonymous coward
I have not searched to see if either of these are mentioned elsewhere, I probably should have but I am somewhat lazy, and as an anonymous coward my life is much simplier :)

When getting a document why cant the sql query resemble something like:
(modified from lib/content.functions.php)
$query = "SELECT a.last_name,a.first_name,a.email,p.page_id,
p.page_content, p.page_title, p.page_type, p.head_tags, t.template_id,
t.stylesheet, t.template_content FROM ".cms_db_prefix()."pages p,".cms_db_prefix()."users a INNER JOIN ".cms_db_prefix()."templates t ON p.template_id = t.template_id WHERE (p.page_id = ".$tpl_name." OR p.page_alias=".$db->qstr($tpl_name).") AND p.active = 1";

And then set $firstname = $list[first_name]; etc for last name and email. Do the regex replace (like title is) and poof.


This would give people the ability to place in their templates {firstname} ... Handy for META author tags, or just anywhere you want this.

If this functionality is in there I had a difficult time locating it (all the SQL queries I saw did not appear to pull this info. This is working in my evaluation site of CMSMS.

feature request - ability to get author email and name

Posted: Fri Nov 19, 2004 10:26 am
by Ted
There are some tweaks to work out with that, but, yeah, it's a good idea. I'll see what I can do to put that in.

Thanks!