• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Rob Spoor
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Henry Wong
  • Liutauras Vilda
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Tim Holloway
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Mikalai Zaikin
  • Piet Souris

user.id equals session.userId && logged>

 
Greenhorn
Posts: 24
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I'm trying to put this condition at user_profile.htm. . I want the forum to detect who is online, if it is the user shown in the profile page, then it will appear a button; otherwise it won't.
So, I tried with that condition, but it didn't work. Any suggestions?

Thank you!
 
Saloon Keeper
Posts: 7098
165
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What does "it didn't work" mean, exactly? What did you expect to happen, and what happened instead?
 
Jackie Bermudez
Greenhorn
Posts: 24
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
User_profile.htm allows you to preview the user's profile. I want to add an additional feature on this page; for example a button, but I don't want it to be visible for other people that see that user profile page, just the owner of the account. So, I've been trying to use the code that I mentioned before on this post in many different ways, I get the id using this code: user.id and session.userId, so if I could just make the comparison between these two numbers I could be able to do it. But the problem is that I get this error:

FreeMarker template error (DEBUG mode; use RETHROW in production!)...............


I'm sure that it is because of some sort of permission. Could you help me with this?

Thanks!
 
Tim Moores
Saloon Keeper
Posts: 7098
165
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't post the actual error message, but the user object is named "u" rather than "user" in that template, so I'm guessing that is at least part of the problem.

And just to be sure, you're using the latest source from https://sourceforge.net/projects/jforum2/, yes? That is the latest version with all the bug and security fixes.
 
Jackie Bermudez
Greenhorn
Posts: 24
jQuery Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
OMG you are right!! It's working now. Thank you so much Tim!! And yes, I'm using that last version.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic