Hi
I'd like to put an image in one of our confluence pages, but include the confluence username of the logged in user within the URL parameters.
For example:
<img src="https://www.google.com.au/images/branding/googlelogo/2x/googlelogo_color_120x44dp.png?user=ConfluenceUsername" alt="Google" height="44" width="120">
I don't have admin access.
Is this possible.
Cheers,
Matt
Matt G you ever find a workable solution for this?
I need this too :(
You could do this with a user macro, but it begs the question "why?". Confluence is not going to do anything with the username, as it's pointless and it already knows who the user is,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic - thanks for answering so quickly. How my I do this via the user macro? Would I be concatenating the image url and? then the paramater and using the usermacro output for the username?
Could you describe the process?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your user macro would construct the url from the information in the http request.
From memory, you'd need something like src="https://url?user=$req.username()"
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Nic Brough -Adaptavist-, clearly the above isn't ok.
Can I use $req.username() is other locations to output the user id? I'm not an admin, I can only edit the pages using the plugins and standard input.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We're using this for an extra level of internal tracking. That image is on another server, IIS is writing the logs to a DB, including that image and the use ID and the page in question.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.