Forums / Setup & design / How to get all of the information of an author?

How to get all of the information of an author?

Author Message

zfirst zlast

Thursday 16 October 2008 2:31:02 am

Hi everyone,

I want to add a link to author of articles, when people click this link, it will take them to a new page to view this author's biography. And i know the link for this biography page may be like this:

<public_site_url>/Users/<group>/<firstname>-<lastname>

Then i found the following codes in the "ezauthor.tpl":

{foreach $attribute.content.author_list as $author}
{$author.name|wash( xhtml )}{delimiter}, {/delimiter}
{/foreach}

so the problem is how could i get the "group" of this author( maybe i should get the firstname and lastname of this author too )? In fact, i think i need to fetch all the information of this author. Do i have to modify the codes in kernel or anybody who have experience about this can help me?

Andreas Kaiser

Thursday 16 October 2008 4:18:35 am

There should be no need of changing the kernel codes...

Do you will use different user groups for the authors of the articles? If the group of the authors is always the same, you could hardcode the group in the url with concat. For example:

{concat( 'Users/<group>/', '$node.object.owner.name' )} (this code has not been tested...)

You could also use the node of the author object... In documentation:

http://ez.no/doc/ez_publish/technical_manual/4_0/reference/datatypes/authors
http://ez.no/doc/ez_publish/technical_manual/4_0/reference/objects/ezauthor

"author_list" contains the author id, but I can't say if this is the node id or the user id...

eZ Partner in Madrid (Spain)
Web: http://www.atela.net/

zfirst zlast

Thursday 16 October 2008 6:43:04 pm

Hi Andreas,

Thanx for your comments. But i don't think hard code for the "user group" is a good idea, because there's more than one "author groups" in my current version.

And i have checked the object "ezauthor", it seems that there's not a key "id" in the Attribute "author_list". As i got nothing on page via following codes:

{foreach $attribute.content.author_list as $author}
{$author.id | wash()}
{/foreach}

eZ debug

Timing: Jan 30 2025 21:21:31
Script start
Timing: Jan 30 2025 21:21:31
Module start 'content'
Timing: Jan 30 2025 21:21:31
Module end 'content'
Timing: Jan 30 2025 21:21:31
Script end

Main resources:

Total runtime0.3104 sec
Peak memory usage8,192.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0104 588.0781370.2734
Module start 'content' 0.01040.0154 958.35161,001.5781
Module end 'content' 0.02580.2845 1,959.92973,890.5391
Script end 0.3103  5,850.4688 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00481.5529200.0002
Check MTime0.00130.4053200.0001
Mysql Total
Database connection0.00090.285410.0009
Mysqli_queries0.202465.18891410.0014
Looping result0.00130.42101390.0000
Template Total0.284091.510.2840
Template load0.00090.302810.0009
Template processing0.283091.170310.2830
Override
Cache load0.00050.172710.0005
Sytem overhead
Fetch class attribute can translate value0.00200.635210.0020
XML
Image XML parsing0.00040.130510.0004
General
dbfile0.00892.8794200.0004
String conversion0.00000.002030.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0002 secs