Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

Need some CB functions

  • aqsg
  • aqsg
  • OFFLINE
  • Posts: 29
  • Thanks: 0
  • Karma: 3
18 years 10 months ago #5004 by aqsg
Need some CB functions was created by aqsg
Can anyone provide me with the whole function that CB uses to synchronise the User databases so I can incorporate it into an installer?

Director/Solutions Architect of Australian Quality Solutions Group ( www.aqsg.com.au )
Founder of josCommunity ( www.joscommunity.com )
Founder of CCHSStudent ( www.cchsstudent.com )
Community Builder 3rd Party Developer
PAXXGallery Developer

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

  • JoomlaJoe
  • JoomlaJoe
  • OFFLINE
  • Posts: 12
  • Thanks: 0
  • Karma: 14
18 years 10 months ago #5078 by JoomlaJoe
Replied by JoomlaJoe on topic Re:Need some CB functions
[code:1]
function syncUsers() {
global $database, $my, $ueConfig;
$sql="INSERT IGNORE INTO #__comprofiler(id,user_id) SELECT id,id FROM #__users";
$database->setQuery($sql);
if (!$database->query()) {
print("<font color=red>SQL error" . $database->stderr(true)."</font><br />"«»);
} else {
print "<font color=green>Joomla/Mambo User Table and Joomla Community Builder User Table now in sync!</font>";
}
}
[/code:1]
You could also just call the syncUsers function, its in the admin.comprofiler.php file.

JoomlaJoe *The developer formally known as MamboJoe*
CB Core Team

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

  • aqsg
  • aqsg
  • OFFLINE
  • Posts: 29
  • Thanks: 0
  • Karma: 3
18 years 10 months ago #5340 by aqsg
Replied by aqsg on topic Re:Need some CB functions
Thank you for that.

We can't really call the function from the CB file because we are using the synchronise function in the josCommunity installer.

Once again, much appreciated

Director/Solutions Architect of Australian Quality Solutions Group ( www.aqsg.com.au )
Founder of josCommunity ( www.joscommunity.com )
Founder of CCHSStudent ( www.cchsstudent.com )
Community Builder 3rd Party Developer
PAXXGallery Developer

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

  • aqsg
  • aqsg
  • OFFLINE
  • Posts: 29
  • Thanks: 0
  • Karma: 3
18 years 10 months ago #5723 by aqsg
Replied by aqsg on topic Re:Need some CB functions
That function worked perfectly allowing us to knock off one of the steps in our post install procedures.

Next:

While creating an image gallery into the redesigned User Home Pages, I want the images that a user posts to be able to be approved by an administrator BEFORE they are posted to the site. CB has an excellent way of doing this for the User Avatar.

Is it possible to use this function to do the same for our User Home Pages component?

What would it require to implement this function in our component?

Thank you once again

Director/Solutions Architect of Australian Quality Solutions Group ( www.aqsg.com.au )
Founder of josCommunity ( www.joscommunity.com )
Founder of CCHSStudent ( www.cchsstudent.com )
Community Builder 3rd Party Developer
PAXXGallery Developer

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

  • beat
  • beat
  • OFFLINE
  • Posts: 2174
  • Thanks: 463
  • Karma: 352
18 years 10 months ago #5820 by beat
Replied by beat on topic Re:Need some CB functions
aqsg wrote:

That function worked perfectly allowing us to knock off one of the steps in our post install procedures.

Next:

While creating an image gallery into the redesigned User Home Pages, I want the images that a user posts to be able to be approved by an administrator BEFORE they are posted to the site. CB has an excellent way of doing this for the User Avatar.

Is it possible to use this function to do the same for our User Home Pages component?

What would it require to implement this function in our component?

Thank you once again


The avatar approval is a workflow which is implmented in CB for one avatar per user.

I guess your logic code would look quite different, even if the user-interface would be same.

We intend to develop further the workflows concept in the future, and provide a corresponding API for this. But right now it's only thoughts.

Beat - Community Builder Team Member

Before posting on forums: Read FAQ thoroughly -- Help us spend more time coding by helping others in this forum, many thanks :)
CB links: Our membership - CBSubs - Templates - Hosting - Forge - Send me a Private Message (PM) only for private/confidential info

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

  • aqsg
  • aqsg
  • OFFLINE
  • Posts: 29
  • Thanks: 0
  • Karma: 3
18 years 10 months ago #5826 by aqsg
Replied by aqsg on topic Re:Need some CB functions
I was sorta looking for a reference to where i could find the CB function so I could possibly use the framework or even develop an extension or plugin.

What CB file would i find it in?

Director/Solutions Architect of Australian Quality Solutions Group ( www.aqsg.com.au )
Founder of josCommunity ( www.joscommunity.com )
Founder of CCHSStudent ( www.cchsstudent.com )
Community Builder 3rd Party Developer
PAXXGallery Developer

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

Moderators: beatnantkrileon
Powered by Kunena Forum