Skip to Content Skip to Menu

connection with sobi2

  • origonett
  • origonett
  • OFFLINE
  • Posts: 1
  • Thanks: 0
  • Karma: 0
14 years 6 months ago #128217 by origonett
connection with sobi2 was created by origonett
okey.. I've tried to search in different forums and can't find an answer.
I'm using Sobi2 with my community. Its genius. And also the plugin that allows you to list up what each user had published.

So here's my problem:
How can I make a Sobi2 entry automatically create a link back to the authors cbprofile?

Thanks for any help!

Please Log in or Create an account to join the conversation.

  • nant
  • nant
  • OFFLINE
  • Posts: 12339
  • Thanks: 1467
  • Karma: 877
14 years 6 months ago #128251 by nant
Replied by nant on topic Re:connection with sobi2
origonett wrote:

okey.. I've tried to search in different forums and can't find an answer.
I'm using Sobi2 with my community. Its genius. And also the plugin that allows you to list up what each user had published.

So here's my problem:
How can I make a Sobi2 entry automatically create a link back to the authors cbprofile?

Thanks for any help!


This is more of a question for SOBI support forums since it sounds like it might involve SOBI modifications.

Please Log in or Create an account to join the conversation.

14 years 5 months ago #131902 by Inprogress
Replied by Inprogress on topic Re:connection with sobi2
Hey there.

When you say you are using SOBI2, could you give me a link to your site (just want to visit site, not backend)? Also, you ask about the auto link to profile, are you already using SOBI with CB, or do you want to?

I'm asking cause I need a CCK of some sort (currently looking at Form2Content) but also need the user profile page, plus the list of user specific content in a list.

I have tried jSeBlod, K2, FlexiContent, Resources, not I'm gonna see about using a few extensions since non of the CCKs provide me with all I need, and some don't integrate with other extensions.

So here I am seeing about the profile bits I need with CB. Form2Content allows me the extra fields. But I need to tie them together still by being able to search withing a category according to user fields (location fields).

Thanks and all the best.

Please Log in or Create an account to join the conversation.

14 years 5 months ago #132310 by norfolkandway
Replied by norfolkandway on topic Re:connection with sobi2
Hi

I added this code to my Sobi2 details template



View Profile -
<?php echo HTML_SOBI::userCBHref( $mySobi );?></br>

This works for me.

Would like to know a bit more php so that I could display the link as a button/image so If anyone finds this useful and could tell me how I would be thankfull to you

I hope this helps you

What one man can do, So can another.

Please Log in or Create an account to join the conversation.

  • liypfhe1
  • liypfhe1
  • OFFLINE
  • Posts: 3
  • Thanks: 0
  • Karma: 0
14 years 5 months ago #132874 by liypfhe1
Replied by liypfhe1 on topic Re:connection with sobi2
i would like to have the similar code which show whether the user is online so i can put it in my sobi profile template.

[code:1]


<?php
$config =& sobi2Config::getInstance();
$db =& $config->getDb();

$db->setQuery( "SELECT COUNT(*) FROM #__session WHERE userid = {$mySobi->owner} AND guest = 0" );
$online = $db->loadResult();
if ( $db->getErrorNum() ) {
trigger_error( "DB reports: ".$db->stderr(), E_USER_WARNING );
}
// now You can just write the word:
echo $online ? "Online" : "Offline";

// or try it with image
$imgOff = "/images/offline.png";
$imgOnl = "/images/online.png";
echo $online ? "<img src=\"{$imgOnl}\" alt=\"User is currently online\"/>" : "<img src=\"{$imgOff}\" alt=\"User is currently offline\"/>";
?>
[/code:1]

but it didnt work

Please Log in or Create an account to join the conversation.

  • kenlyle
  • kenlyle
  • OFFLINE
  • Posts: 43
  • Thanks: 1
  • Karma: 3
14 years 4 months ago #135358 by kenlyle
Replied by kenlyle on topic Re:connection with sobi2
That was VERY helpful, norfolkandway, Thanks!

I found that the code you provided can be inserted in place of the name field, very handy.

Ken

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum