In 1.4.x and in a 2.x beta version, when I displayed a profile image in my template, hovering over the image would pop-up the hover profile, but in 2.0, this seems to be disabled. I spent a little time trying to debug it today, but really got nowhere. Is there a way to enable the profile hover feature?
Thanks,
John
P.S. I like the dynamic load feature. It really helps with page loading.
Hi John,
I'm not really sure about this. First on DynamicLoad. I have a simple template like this:
#set($pqUser = $userAccessor.getUserByName("fgrund")) #logoForUserIfExists("fgrund")
Even if I set the DynamicLoad feature on the macro, this works perfectly fine: http://g.recordit.co/EOknGUwWPa.gif
Does this not work for you? Please let me know.
Felix (Scandio)
Thanks Felix. I will do a bit more looking at this later today. One question I have is what, if any, query is invoking the template? In your example you are hard-coding your username, but in my case the username is being returned by a query of the Confluence database. I wonder if that is the difference. Also, did you see my question above regarding documentation of the parms that you provided? I can find them reference in the documentation link for 2.0. Thanks for all of your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1.) reg. hard-coded username: this wouldn't make a difference. You can access your query result from the $result variable. So if the target user is the first row in the result and the column is called "username", you'll get it with $result.get(0).username. So sure that hard-coded works fine for you and it doesn't when taken from the query result? 2.) Do you mean your question "Is this documented somewhere?" -- well, Velocity helpers like #logoForUserIfExists("%username%") come from the Confluence core. They are globally available in Velocity templates (so also in PQ templates) but they aren't really documented anywhere. So basically you'll have to look in the Confluence source code. Or ask me ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1) I'm not having any issue getting the username from my query or displaying it. I just lose the hover ability when I turn on "Dynamic Load". That was why I asked about the query vs. hard-coding as the "Dynamic Load" seems to be creating a timing issue for me. Of course, I haven't done any other browser testing yet to see if it's specific to Chrome. I'll try IE and Firefox later and Safari when I get home and can use my Macbook. 2) Thanks! I thought maybe that was the case. If I get stuck with something, I will ask. You are always fast with your responses.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
1.) really strange - I'm using Mac and Chrome too and that works fine for me with dynamic load. Does it not work either for you with a dummy query "SELECT 1" and a template with the code above with a hard-coded username? Or are you sure it's only with usernames from queries? 2.) "You are always fast with your responses." - glad to hear, thanks! ;)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Felix, Your example works just fine, so it is my query that is throwing off the timing. I certainly don't consider this a bug. I have plenty of other places where I can use dynamic loading that are not dependent on this kind of timing. If this was super important to me, I would spend some time to see if I could make my query more efficient, but for the situations where I am displaying the logos and name links, page load speed is not really noticeably enhanced by the dynamic load, so I think I will let this go for the time being. Again, thank you for all your help. This has helped me get a much better understanding of PocketQuery and I already thought of it as an awesome product!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Great - thanks John! Let me know if you need more help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh my goodness! I cannot believe I wasted your time. My comment above about timing made me think....Could it be the Dynamic Load Option? I thought I had tested with and without, but I guess I was so excited about the feature, I just added it and forgot about it. That was what was causing my issue.
It's still a very valuable feature, but it cannot be used if the query needs to be completed before the page is loaded.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I did a little more digging and it looks like 'data-user-hover-bound="true"' is not getting added to the link and no addClass is performed to add the userlink-#. There appears to be js present to do this, but maybe it's the way in which the loading has changed that the timing of the link creation is off. That's a real stretch of my limited knowledge. but that is how it appears.
Before 2.0
before.jpg
2.0
after.jpg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Felix,
Not exactly what I was looking for. Prior to 2.0, a hover over my profile picture gave the results below. I am showing the results with and without the Communardo User Profile Plugin enabled. I tried this... #logoForUserIfExists(
"%username%"
) and the hover only shows the user name.
Profile.png
Profile2.png
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I am going to try this later today if I have time. Is this documented somewhere? I cannot find it in the Documentation link within PocketQuery. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi John!
I'm glad you like dynamic load - this is the first feedback we got so far on version 2.0. So thanks
You should easily be able to achieve this in your template. Try this:
#logoForUserIfExists("%username%")
If you only want the link with the hover feature, you can do this:
#set($pqUser = $userAccessor.getUserByName("%username%")) #userLink($pqUser)
Let me know if this helps!
Regards, Felix (Scandio)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.