1
edullin
Yogurt and Smartprofile
  • 2008/6/16 17:37

  • edullin

  • Just popping in

  • Posts: 3

  • Since: 2008/6/16


Anyway to make the 2 modules work together. (using customized field defined in smartprofile inside the Yogurt profile and the search.

Also, what's happening to the current project? No movement on the yogurt support page and the development activity on sourceforge is very small ... Even the marcello's site is out??

2
mariane
Re: Yogurt and Smartprofile
  • 2008/6/16 19:23

  • mariane

  • Theme Designer

  • Posts: 649

  • Since: 2008/1/11


hello, i merged yogurt and smart profile in some websites i built, see
http://www.zeitouny.com
http://www.dagpacollege.com
and i created a module to show members,it's a very hard job, but i like it a lot and im proud of it
the road of success is always under construction

3
Shiva
Re: Yogurt and Smartprofile
  • 2008/6/23 7:43

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


Any more info on how to merge will be much appreciated.

4
Shiva
Re: Yogurt and Smartprofile
  • 2008/6/23 23:06

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


I have successfully integrated smartprofiles and yogurt social networking together. This is how I did it:
1. Add the following code to yogurt/index.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','smartprofile')->getVisibleFields($groups, $thisUsergroups);

$profile_handler =& xoops_getmodulehandler('profile','smartprofile');
$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('fieldid'), $fieldids)) {
//echo "VAL0:".$value."

";
$value = $fields[$i]->getOutputValue($thisUser, $profile);
if (is_array($value)) {
$value = implode('
', 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. Edit the following code in /class/field.php like so:
function getUserVars() {
return xoops_getmodulehandler('profile','smartprofile')->getUserVars();

}

3. Now you can refer to smartprofile vars in your yogurt social networking index template like so:
<{$user_book.value}>
<{$.value}> e.g. <{$user_ICQ.value}>


5
trabis
Re: Yogurt and Smartprofile
  • 2008/6/23 23:13

  • trabis

  • Core Developer

  • Posts: 2269

  • Since: 2006/9/1 1


Very nice Shiva, thank you for sharing it!

6
edullin
Re: Yogurt and Smartprofile
  • 2008/6/28 15:29

  • edullin

  • Just popping in

  • Posts: 3

  • Since: 2008/6/16


Thanks so much Shiva for sharing
Which release of smart and yougurt are you using?

7
Shiva
Re: Yogurt and Smartprofile
  • 2008/6/28 15:51

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


Both latest versions.

8
edullin
Re: Yogurt and Smartprofile
  • 2008/7/2 21:18

  • edullin

  • Just popping in

  • Posts: 3

  • Since: 2008/6/16


Do you have a site to see how it works in live?
Thanks

9
laguna
Re: Yogurt and Smartprofile
  • 2008/7/19 21:29

  • laguna

  • Just popping in

  • Posts: 46

  • Since: 2004/10/9


Thanks for sharing! Great hack!
Hi amigos!!!

10
laguna
Re: Yogurt and Smartprofile
  • 2008/7/20 13:47

  • laguna

  • Just popping in

  • Posts: 46

  • Since: 2004/10/9


It does not work…

I use:

XOOPS 2.0.18.1
Smartprofile 1 Final
Yogurt 3.2
PHP Version 5.2.3
MySQL 5.0.45-community-nt

It could enclose a copy of modified templates/archives?

Thanks!
Hi amigos!!!

Login

Who's Online

396 user(s) are online (327 user(s) are browsing Support Forums)


Members: 0


Guests: 396


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits