21
Shiva
Re: Yogurt and Smartprofile
  • 2008/7/28 12:43

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


Hi All,

I am using:
# XOOPS Version: XOOPS 2.30 alpya
# PHP Version: 5.2.6
# MySQL Version: 5.0.51a
# Smartprofile Mboyden version
# Yogurt 3.2

blackrx: You can set the link to the smartprofile edituser by updating the yogurt_index template - no code change required.

22
Shiva
Re: Yogurt and Smartprofile
  • 2008/7/28 12:46

  • Shiva

  • Quite a regular

  • Posts: 280

  • Since: 2006/7/9 1


BTW - Can anyone successfully access the contents of the downloaded template set (tar.gz).

I have tried everything but it just looks like the file is corrupt!

23
blackrx
Re: Yogurt and Smartprofile
  • 2008/7/29 11:53

  • blackrx

  • Quite a regular

  • Posts: 227

  • Since: 2008/2/5 1


thanks shiva.

for those of you who still have probem.. check the field visibilty permission in smartprofile admin

you jave to make it visible so the field can appear in the yogurt module

24
ericktot
Re: Yogurt and Smartprofile
  • 2008/7/29 16:46

  • ericktot

  • Just popping in

  • Posts: 6

  • Since: 2003/2/21


thanks to all, thanks Shiva, thanks demian with your explanation work fine now

Quote:

demian wrote:
I got this working with XOOPS 2.0181, Yogurt 3.2rc and smartprofile 1.0 (0fficial)

this is what i do based on shiva's instruction


1. Open yogurt/index.php

find this at the end on the file

/**
 * Closing the page
 */ 
include("../../footer.php");
?>


Before that line Add the following code

$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. open smartprofile/class/field.php and go to somewhere in line 341

replace this
function getUserVars() {
        return 
xoops_getmodulehandler('profile')->getUserVars();
    }
}

with this one
function getUserVars() {
        return 
xoops_getmodulehandler('profile','smartprofile')->getUserVars();
}
    }


3. Now you can refer to smartprofile variables in your yogurt social networking 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 smartprofile module
* clear templates_c and cache
* don't forget to change the link for the register.php in the login block to modules/smartprofile/register.php, and also redirect the yogurt/edituser.php or root/edituser.php to smartprofile/edituser.php
you can do this manually or by using htaccess
* also edit root/userinfo.php to make the yogurt userpage as the main userpage of your site:

Open userinfo.php in the root of your site, search at the very beggining of the file for
$uid intval($_GET['uid']);
if (
$uid <= 0) {
    
redirect_header('index.php'3_US_SELECTNG);
    exit();
}

Add after this the following lines:
header("Location:".XOOPS_URL."/modules/yogurt/index.php?uid=".$uid);
exit();


thank you shiva......

25
demian
Re: Yogurt and Smartprofile
  • 2008/7/29 17:50

  • demian

  • Quite a regular

  • Posts: 225

  • Since: 2008/4/29


glad it work for you...

but be warned smartprofile is still full of unfixed bugs

i'm waiting for profile module 2.3 by mboyden to be out

https://xoops.org/modules/newbb/viewtopic.php?topic_id=62414&viewmode=flat&order=ASC&type=&mode=0&start=0

26
btesec
Re: Yogurt and Smartprofile
  • 2008/8/1 17:27

  • btesec

  • Friend of XOOPS

  • Posts: 623

  • Since: 2007/2/20


Any updated release here. I got a hold of the uofficial release 3.3 it works good but has some errors with the Music uploader, file does not upload.

The Developers site is down also.


I get these errors:

Errors at bottom when at yogurt 3.3 at XOOPS 2.3.3 alpha

1
Warning: MyTextSanitizer::makeTboxData4Show is deprecated in file C:\AppServ\www\xoops233\class\module.textsanitizer.php on line 592

Warning: Invalid argument supplied for foreach() in file C:\AppServ\www\xoops233\modules\isearch\class\blacklist.php on line 95

Warning: MyTextSanitizer::makeTboxData4Show is deprecated in file C:\AppServ\www\xoops233\class\module.textsanitizer.php on line 592

27
Monika
Re: Yogurt and Smartprofile
  • 2008/12/20 0:59

  • Monika

  • Not too shy to talk

  • Posts: 103

  • Since: 2008/12/19


Someone explain this step please!

Quote:
* don't forget to change the link for the register.php in the login block to modules/smartprofile/register.php, and also redirect the yogurt/edituser.php or root/edituser.php to smartprofile/edituser.php


How to?

Login

Who's Online

352 user(s) are online (295 user(s) are browsing Support Forums)


Members: 0


Guests: 352


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