Posters interests shown in viewtopic?

Get help with installation and running phpBB 3.0.x here. Please do not post bug reports, feature requests, or MOD-related questions here.
Anti-Spam Guide
Forum rules
END OF SUPPORT: 1 January 2017 (announcement)
Locked
sublime1
Registered User
Posts: 100
Joined: Sun Aug 03, 2003 10:14 pm

Posters interests shown in viewtopic?

Post by sublime1 » Wed Feb 03, 2010 10:15 am

Is it possible to show the INTERESTS field under the posters user details in a thread (viewtopic)?

I've tried this:

Code: Select all

<!-- IF postrow.POSTER_INTERESTS --><br /><b>{L_INTERESTS}:</b> {postrow.POSTER_INTERESTS}<!-- ENDIF -->
With no luck..
Last edited by ric323 on Thu Feb 04, 2010 11:23 am, edited 1 time in total.
Reason: Topic icon changed

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: Posters interests shown in viewtopic?

Post by tbackoff » Wed Feb 03, 2010 10:41 am

Why not use a custom profile field? Also, POSTER_INTERESTS has to be defined in the postrow array in viewtopic.php for that code to work. ;)
Flying is the second best thrill to cheerleaders; being caught is the first.

sublime1
Registered User
Posts: 100
Joined: Sun Aug 03, 2003 10:14 pm

Re: Posters interests shown in viewtopic?

Post by sublime1 » Wed Feb 03, 2010 1:45 pm

Thing is, when I started the forum seven years ago, I changed the LOCATION variable to "Vehicle" in the language file, and used the INTERESTS variable as "Location". I can't remember why, even though there was a good reason at the time.

Cars are the main topic on the forum, therefor I'd like to keep the "Vehicles" field (LOCATION) in viewtopic as it is today, but users are missing the location field (INTERESTS) as well.

I'm not very good with SQL-queries... do I need to add more than this to viewtopic.php?

'POSTER_INTERESTS' => $user_cache[$poster_id]['interests'],

sublime1
Registered User
Posts: 100
Joined: Sun Aug 03, 2003 10:14 pm

Re: Posters interests shown in viewtopic?

Post by sublime1 » Thu Feb 04, 2010 8:06 am

Anyone? :?

User avatar
tbackoff
Former Team Member
Posts: 7022
Joined: Thu Jun 04, 2009 1:41 am
Location: cheerleading practice
Name: Tabitha Backoff

Re: Posters interests shown in viewtopic?

Post by tbackoff » Thu Feb 04, 2010 10:12 am

Here you go. Make sure you clear your cache.

user interests in viewtopic
Flying is the second best thrill to cheerleaders; being caught is the first.

sublime1
Registered User
Posts: 100
Joined: Sun Aug 03, 2003 10:14 pm

Re: Posters interests shown in viewtopic?

Post by sublime1 » Thu Feb 04, 2010 11:18 am

Awesome!Works like a charm.

Thank you. :P

User avatar
Savigny
Registered User
Posts: 7
Joined: Sun Mar 23, 2008 1:42 am

Re: Posters interests shown in viewtopic?

Post by Savigny » Thu Feb 25, 2010 11:25 pm

Thank you for that!

I tried this one too - and it worked very good with POSTER_OCCUPATION - but I got nothing for POSTER_INTERESTS (of course there are values in the database ;) ).
I made the changes in the viewtopic.php,
I cleared the cache (this was not necessary for POSTER_OCCUPATION; but to be sure, that this isn't the problem here I did it) - but there is nothing to see :cry: .
I changed {L_INTERESTS} and POSTER_INTERESTS with a simple text, but there is nothing to see, too.
So I deleted <!-- IF postrow.POSTER_INTERESTS != '' --> and the <ENDIF> and I see the simple text - but no values for postrow.POSTER_INTERESTS.

Where could be my mistake??

Locked

Return to “[3.0.x] Support Forum”