How to get page creator !

liljoint April 23, 2012

I need to get page creator from a macro, to use in Profile user Macro.

Please Help.

1 answer

1 vote
Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012

Hi Bryan,

If you want the creator of the current page that the user macro is on then you can use:

$content.getCreatorName()

in your user macro. Is that what you wanted?

Andrew.

liljoint April 23, 2012

yep !!!! thnx men !!

liljoint April 23, 2012

UPS !!! doesn't work on production server. I test it on the developer server and work but on production server doesn't work... I need to use that with Bubbles community plugin. THNX !!

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012

Could you post the contents of your macro here and I'll have another look? Also, is it the creator of the current page you want, or the creator of a page listed by one of the Bubbles macros?

Thanks,

Andrew.

liljoint April 23, 2012

I need the topic Author... ( page creator :S )

"the creator of a page listed by one of the Bubbles macros"

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012

Ah, ok. If you use Tools -> Info on the forum root page and make a note of the pageID you could use something along the lines of:

#set ( $forumRoot = $pageManager.getPage(589833) )

<ul>
#foreach ($topic in $pageManager.getDescendents($forumRoot))
  <li>Topic = $topic.getDisplayTitle(), Creator = $topic.getCreatorName()</li>
#end
</ul>

where 589833 is the pageID of the root page I searched from in the above example.

It loops through all the child pages of the root page (which is what I think topics are?) and displays the title (topic) and who created it.

Needs tweaking to fit your exact needs, but hope it helps?

Andrew.

liljoint April 23, 2012

that looks awesome... but is not that I need... Only I need to display the creator profile inside the topic, something like

$content.getCreatorName()
but inside bubbles forum... :S this parameter doesn't work in bubbles... show:
com.atlassian.renderer.v2.macro.MacroException: No user $content.getCreatorName()

Andrew Frayling
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 23, 2012

I'm confused. Where are you entering $content.getCreatorName() ? Could you post the contents of your user macro or macro parameters on this thread?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events