News:

SMF 2.1.6 has been released! Take it for a spin! Read more.

Main Menu

Bridging Coppermine 1.4.10 with SMF 1.1.1

Started by mrgiffy2000, February 05, 2007, 05:28:19 PM

Previous topic - Next topic

mrgiffy2000

I have started a new thread for this because I am having trouble getting all the info in one place and in a clear easy to follow order. I appreciate all the work everyone has done to make this bridge work and I hope you will be able to help me.
So I am using Coppermine 1.4.10 and SMF 1.1.1. My goal is to have users loginto the forum, then provide a link that will take them to the gallery without any additional logging in. It is difficult for me to site one particular error as being my problem as I have tried several suggestions and come up with several different problems. In general the most common problem was that I would click my Gallery button and would be taken to a login screen in SMF. I would then login and be returned to the forum home. This was an endless loop. On another occasion I managed to get it so that when I hit the gallery button I would simply be returned to the forum home. Here are the steps I followed as well as some links.
http://www.simplemachines.org/community/index.php?topic=113488.0


QuoteStep 1:
Have both SMF and Coppermine in the same database. In my case SMF uses a forum_ prefix and Coppermine a cpg135_ prefix.

Step 2:
Use the Coppermine Bridge Manager to bridge the two. See this PDF for a step by step description with screenshots.

Step 3:
Create a file called Coppermine.php and save it to your SOURCES directory in the SMF directory on your webserver.

<?php

if (!defined('SMF'))
die('Hacking attempt...');

function
Coppermine()
{
global $context, $mbname, $txt;

//Load the main msn template
loadtemplate('Coppermine');

//Load the main msn template
$context['sub_template']  = 'main';

}
?>


QuoteStep 4:
Create a file called Coppermine.template.php in your theme directory (I am currently using the default theme but I have tried with other ones).

<?php

function template_main()
{
global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings;

echo
' <center><iframe width="900" height="800" src="http://www.middlesexminiclub.co.uk/gallery"></iframe></center>';

}
?>


QuoteStep 5:
In your index.template.php add this to where you want the button/link to the gallery to appear.

/ The Coppermine Gallery
echo ($current_action == 'Coppermine' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'Coppermine' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=Coppermine">Gallery</a>
</td>' , $current_action == 'Coppermine' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


QuoteIn my case, I looked for this

// The [calendar]!
if ($context['allow_calendar'])
echo ($current_action == 'calendar' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '">&nbsp;</td>' : '' , '
<td valign="top" class="maintab_' , $current_action == 'calendar' ? 'active_back' : 'back' , '">
<a href="', $scripturl, '?action=calendar">' , $txt['calendar24'] , '</a>
</td>' , $current_action == 'calendar' ? '<td class="maintab_active_' . $last . '">&nbsp;</td>' : '';


Quoteand added the Coppermine bit just below it.



Further on in the topic, many addendums were made, each of which I tried with no luck.

Here is a second thread on the subject.   http://www.simplemachines.org/community/index.php?topic=111988.msg718397#msg718397

I also had no luck with these suggestions.
I am wondering if maybe none of this was meant to work with my current versions of CMG and SMF?
Any help would be appreciated, I am just so lost. ::)
BTW this is my site. I have the integration turned off because it made the forum mostly unusable. hxxp:www.deadlinetv.net/smf [nonactive]
Also I do have both gallery and forum in the same database.

chep

#1
I only did the first two steps. Which is called a "bridge". Mine is working just fine using the coppermine bridge.

It's not clear what that thread means by "integrate". There is a distinction which must be different though...

I suggest that you use the bridge and forget about the integrate steps.  Because it doesnt sound like that's you want. Whatever "integrate" is.

mrgiffy2000

I think it just adds the gallery into your forum pages so it is like you never left the forum. So you are saying that the logins and everthing else work with just the first 2 steps?

chep

Yes. All of the logins happen via the SMF Forum.

When you try to login via coppermine it redirects you to the SMF Login.

Advertisement: