2
I solved this myself...
1. Open yogurt/index.php
find this at the end on the file
le="color: #000000"><?php /** * Closing the page */ include("../../footer.php"); ?>
Before that line Add the following code
le="color: #000000"><?php $gperm_handler = & xoops_gethandler( 'groupperm' ); $groups = is_object($xoopsUser) ? $thisUser->getGroups() : array(XOOPS_GROUP_ANONYMOUS); // Dynamic User Profiles $thisUsergroups =& $thisUser->getGroups(); $fieldids = xoops_getmodulehandler('visibility','profile')->getVisibleFields($groups, $thisUsergroups); $profile_handler =& xoops_getmodulehandler('profile','profile'); $fields =& $profile_handler->loadFields(); $profile = $profile_handler->get($thisUser->getVar('uid')); // Add dynamic fields foreach (array_keys($fields) as $i) { //If field should be shown if (in_array($fields[$i]->getVar('field_id'), $fieldids)) { //echo "VAL0:".$value."<P>"; $value = $fields[$i]->getOutputValue($thisUser, $profile); if (is_array($value)) { $value = implode('<br />', array_values($value)); } if($value){ $fieldattr=array('title' => $fields[$i]->getVar('field_title'), 'value' => $value); $fieldname=$fields[$i]->getVar('field_name'); $xoopsTpl->assign($fieldname, $fieldattr); } } }
2. open modules/profile/class/field.php and replace this
le="color: #000000"><?php function getUserVars() { return xoops_getmodulehandler('profile')->getUserVars(); } }
with this one
le="color: #000000"><?php function getUserVars() { return xoops_getmodulehandler('profile','profile')->getUserVars(); } }
3. Now you can refer to XOOPS user profile 2.3rc2 variables in your yogurt social networking 3.3 index template:
(modules/yogurt/templates/yogurt_index.html)
example if you created a field named age
put this in the yogurt index template
Age: <{$age.value}>
* make sure to set the permission for the field you created in profile module
* clear xoops_data cache
credit to shiva and demian