Need some CB functions

18 years 2 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 to join the conversation.

18 years 2 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 to join the conversation.

18 years 2 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 to join the conversation.

18 years 2 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 to join the conversation.

18 years 2 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 to join the conversation.

18 years 2 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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.239 seconds

Facebook Twitter LinkedIn