AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

Filter by custom fields

Topic prefix

AI Assistant
Notifications
Clear all

[Solved] How do I ad Member Locations?

8 Posts
5 Users
5 Reactions
5,400 Views
Posts: 8
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@charleyh)
Active Member
Joined: 6 years ago
[#12625]

Hello, I run an International Forum and I would like to be able to show members location under their Forum names so that other Forum members will know their location.  How can I add this?

Thank you for the help,

Charley

https://radicalsportscarregistry.com/radicalforum/


7 Replies
Sofy
Posts: 5774
 Sofy
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sofy)
Support Team
Joined: 8 years ago

Hi @charleyh,

you should customize the topic.php file of the layout you're using.

For example, if you use the wpForo Extended layout you should customize the topic.php file located in the /wpforo/wpf-themes/classic/layouts/1/  folder. 

To add the value of the custom field just use this function: 

<?php echo wpforo_member($userid, 'CUSTOM_FIELD_NAME') ?>

Just change the red marked code according to the custom field value (in your case location).

Please follow this instruction to customize the wpForo files:

https://wpforo.com/docs/root/forum-themes/theme-customization/

 


1 Reply
(@sreek)
Joined: 6 years ago

Active Member
Posts: 15
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@sofy @Robert

Hey, please can you say where to add this function in topic.php? Also, from where does the custom field value be picked up? Can Wp User custom field value be showed below avatar image?

Tried adding this line in the topic.php, but didn't reflect. 

Any help? 


Alvina
Posts: 1857
Moderator
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@alvina)
Member
Joined: 7 years ago
Posted by: @sreek

Hey, please can you say where to add this function in topic.php?

wpForo allows you to customize and add the values of the fields under the avatar.

You should customize the post.php file of the layout you're using, and add the new field anywhere you want. See the screenshot below: 

For example, if you use the wpForo Extended layout you should customize the post.php file located in the /wpforo/wpf-themes/classic/layouts/1/  folder. 

To add the value of the custom field just use this function:

<?php echo implode( ', ', array_diff((array) wpforo_member($member, 'CUSTOM_FIELD_NAME'), array(0)) ) ?>

Just change the red marked code according to the custom field value.

Please follow this instruction to customize the wpForo files:

https://wpforo.com/docs/root/forum-themes/theme-customization/

Also, from where does the custom field value be picked up?

The custom field value comes from the wpForo – User Custom Fields add-on. Once the addon is installed you can start with managing User Fields in Dashboard > Forums > Member Fields admin page. Here you see all available fields. To create the custom field, you just need to click on the [+] button (below all fields). Click on preferred field type on the pop-up window.

More info on how to add custom fields: https://wpforo.com/docs/root/addons/wpforo-user-custom-fields/user-fields-manager/


Posts: 15
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sreek)
Active Member
Joined: 6 years ago
Posted by: @sofy

you should customize the topic.php

Thank you @Alvina confused with the above. Tried topic.php and it didn't work. Now, will try what ever you suggested and will update you here with the result.


1 Reply
Alvina
Moderator
(@alvina)
Joined: 7 years ago

Member
Posts: 1857
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian

@sreek,

Ok, please keep us informed.


Posts: 15
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@sreek)
Active Member
Joined: 6 years ago
Posted by: @alvina

To add the value of the custom field just use this function:

Thank @Alvina this worked for me. Was able to show the custom location data below avatar. Will now check with WP User Custom fields and post the update.  


Page 1 / 2
Share: