MyBB Community Forums

Full Version: Coppermine Integration (So Close!)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
First of all, thanks for this forum and those who provide help.

I have installed MyBB on my website here.

http://www.thenewsjunkie.com/forum/

and Coppermine here

http://www.thenewsjunkie.com/gallery/

I have them successfully bridged.

Now, how do I pull the Coppermine content into the gallery?

And how can I integrate Coppermine functionality?

This is probably very obvious but I'm scratching my head. I'm fairly good with code so if someone can lead me in the right direction I can probably finish the job.

Thanks in advance.
What do you mean by pulling the coppermine content into the gallery? Do you mean from the gallery?

What sort of functionality are you wanting to integrate?
(2009-05-28, 07:44 AM)Tomm M Wrote: [ -> ]What do you mean by pulling the coppermine content into the gallery? Do you mean from the gallery?

What sort of functionality are you wanting to integrate?

Yes, I'm sorry, you're correct. I want to integrate the gallery content into the forum. Latest photos and albums...
Well you'd integrate it like all other things really - grabbing the information from the database and putting it on the pages.

For example, if you're building a plugin for this, you can hook into the member profile, and do something like this:

$query = $db->simple_select("coppermine_images", "*", "userid = '".$memprofile['uid']."'", array("limit" => 5, "limit_start" => 0, "order_dir" => "DESC", "order_by" => "upload_time");
while($user_images = $db->fetch_array($query))
{
     (variables and what not)
     eval("\$latest_images .= \"".$templates->get("member_latest_images")."\";");
}

...then fill the while loop with any variables you want to use in the templates and stuff. Fairly basic, and obviously doesn't follow the coppermine database schema, but hope you get the idea...!
(2009-05-28, 11:40 AM)Tomm M Wrote: [ -> ]Well you'd integrate it like all other things really - grabbing the information from the database and putting it on the pages.

For example, if you're building a plugin for this, you can hook into the member profile, and do something like this:

$query = $db->simple_select("coppermine_images", "*", "userid = '".$memprofile['uid']."'", array("limit" => 5, "limit_start" => 0, "order_dir" => "DESC", "order_by" => "upload_time");
while($user_images = $db->fetch_array($query))
{
     (variables and what not)
     eval("\$latest_images .= \"".$templates->get("member_latest_images")."\";");
}

...then fill the while loop with any variables you want to use in the templates and stuff. Fairly basic, and obviously doesn't follow the coppermine database schema, but hope you get the idea...!

Very helpful, thanks...

and if I want to integrate gallery content into the index page of the forum? Is it more complicated than grabbing code from the gallery index and tweaking it a bit, then tossing it in the forum index?
You'd have to look at hooking into the index, but I don't think it will be that complicated. I'm pretty sure this has already done before with Coppermine, so you might want to take a look around on the forums.

There's previous "bridges" with Coppermine that had this functionality, I think...

It's more complicated than grabbing code from Coppermine and dumping it though, I would imagine. I've never really used Coppermine, so I don't know how complicated it is...
(2009-05-28, 12:00 PM)Tomm M Wrote: [ -> ]You'd have to look at hooking into the index, but I don't think it will be that complicated. I'm pretty sure this has already done before with Coppermine, so you might want to take a look around on the forums.

There's previous "bridges" with Coppermine that had this functionality, I think...

It's more complicated than grabbing code from Coppermine and dumping it though, I would imagine. I've never really used Coppermine, so I don't know how complicated it is...

Maybe someone can throw me a bone here... I'm still having a rough go at this... what code would I have to add to my forum index...
http://www.thenewsjunkie.com/forum

to pull in the latest albums?

Then, ideally, those albums would open (when clicked) within the forum.

Sorry to be a pain...
Take a look at http://wiki.mybboard.net/index.php/MyBB_Plugin_Hooks. You will need to create a plug-in and use a hook.