• 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
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Profile Page -- Avatar Anchor

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have tied JForum into my webapp (www.evolvedturtle.com). Of course, my webapp presents a "profile page" to the user in my webapp. However, I do not want to replicate the code that JForum does already. Namely, I leverage the JForum Avatar for my users' profile. This works great.

Now, on my user's profile page, I would like to have a link for them to click to change the avatar. Currently, this just links to the JForum Profile page.

To improve this link, it would be nice to add an A anchor so that the link will scroll the page down to the avatar section. Otherwise, if the user is not aware that the avatar section is at the bottom of the page, they may be confused.

Better still! It would be much nicer if the Avatar upload could be a page all unto itself. I think that it makes sense, since the profile edit page is already complex enough. And the avatar is something I might change frequently (some users do, some don't). And my link to that page would be much cooler and more "obvious". The Avatar section could be left on the profile page, and the new page just added as a redundancy.

All of this aside, I cannot figure out how to modify the existing page in 2.1.4 to add the A anchor in my version. I add the anchor to then user_profile.htm template, but it never shows up in the actual page. For some reason it disappears from the html output. Can you tell me how to add this anchor in my version?


[originally posted on jforum.net by time]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hhmm.. you change user_profile.html and user/profile/xxx.page does not change? check if you have "development" set to "true" in your web.xml (for jforum servlet).

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have development set to true. No, the change to user_profile.htm does not appear. I suspect that it is because freemarker does not like my A anchor. I say this because I have made other changes to user_profile.htm and those changes DO appear.

Does freemarker have some special requirement for A anchors? I am using this simple construct:


Could it be that this is considered bad HTML?

[originally posted on jforum.net by time]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well, try using



But in post_show.htm I have a code like



and it seems to work

Rafael
[originally posted on jforum.net by Rafael Steil]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My misunderstanding of HTML I guess.

The problem what that my A anchor was outside of the TD element. Once I placed the anchor inside the TD element, it worked fine.
[originally posted on jforum.net by time]
 
He got surgery to replace his foot with a pig. He said it was because of this tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic