Support Forum
I like the option to show userlocations on the forum beneath the username. BUT.. I don't use the simplepress forum profiles. So users cannot set their location (or any other custom fields I want).
With the Cimy User Extra Fields plugin for WordPress you can add a lot of different custom fields. For example I added the Location field. Now my users are able to add their location to their profile in the default profile editor of WordPress.
One thing left. Show these instead of the simplepress one on forum posts:
Open up sf-topic-components.php and find the function: # Inner poster details table
Find the line with the output: $out.= '<tr align="center"><td class=".$alt."></td></tr>';
BEFORE this line you should call the Location information from WordPress with the following code:
<?php $wplocation = get_cimyFieldValue($pid, 'Location'); if ( $wplocation == NULL ) { $locationecho = "Unknown Location"; } else { $locationecho = $wplocation; } ?>
Now you have captured the User Location in a variable $locationecho and you can simply output this anywhere you want on the forum. My example:
$out.= '<tr align="center"><td class=".$alt."><span class="userlocation">'.$locationecho.'</span></td></tr>';
Of course you can do this with any custom field you want. With this trick you can add everyting to a userprofile and show this directly on the forums.
Thought to share it, since I get a lot of help here too 🙂
this will be very simple come v5.0 with themes and plugins... thanks for sharing...
Visit Cruise Talk Central and Mr Papa's World
1 Guest(s)