Hi David,
Just a quick note, I placed the code in viewtopic_body.html a little higher so that it's under username.
Now when you look at one of my topics you see under my Avatar
Graham
Poems by Graham
Nothing Major just more aesthetic.
Thanks again for all the help.
Graham
Link to members forum?
Moderator: Experts
Re: Link to members forum?
i like ur post.......... thanks for sharing this.......DavidIQ wrote:Got it going and without doing any physical code changes
Here's what you do to get this working.
1st PART:
First you'll need to create a custom profile field: ACP -> Users and Groups -> Custom profile fields. Create a new one and call it "My Poems" and select "Numbers" from the drop-down. Make field identification "my_poems_forum", Display Profile Field - Yes, Display in user control panel - selected, Description that I put: "Enter the forum ID/Number where your poems are stored at." but you can make that anything you want. Once you finish that you have a custom profile field for all the users to enter the forum ID for their poems in their profile.
2nd PART:
This is a bit more tricky but I'll make it as easy as possible. Go to the Styles tab then click on templates and edit for your style. Select viewtopic_body.html and find this part (assuming you're using a prosilver-based style):Replace with:Code: Select all
<dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd>
That should be it. You'll need to explain to your users how to get their forum's id by looking at the URL for their forum and getting the number after f=Code: Select all
<!-- IF postrow.custom_fields.PROFILE_FIELD_NAME == 'My Poems' --> <dd><strong><a href="./viewforum.php?f={postrow.custom_fields.PROFILE_FIELD_VALUE}">{postrow.POST_AUTHOR}'s Poems</a></strong></dd> <!-- ELSE --> <dd><strong>{postrow.custom_fields.PROFILE_FIELD_NAME}:</strong> {postrow.custom_fields.PROFILE_FIELD_VALUE}</dd> <!-- ENDIF -->