Welcome Guest ( Log In | Register)



2 Pages V  < 1 2  
Reply to this topicStart new topic
> Smf And Coppermine, something went worng so ive posted it again!
karlosantana
post Dec 10 2007, 09:17 PM
Post #11


Advanced Member
*******

Group: [HOSTED]
Posts: 126
Joined: 24-November 07
From: Wales(But I'm not a welsh farmer!)
Member No.: 53,645



IT WORKS!!!!!! love it! however if your doing it for the first time dont get cocy and start adding other things like i did and then screwed it up!
Go to the top of the page
 
+Quote Post
karlosantana
post Dec 20 2007, 11:25 PM
Post #12


Advanced Member
*******

Group: [HOSTED]
Posts: 126
Joined: 24-November 07
From: Wales(But I'm not a welsh farmer!)
Member No.: 53,645



IVE DONE IT!
Ok so i dissagree with daniel15 of smf I like handing people answers on silver plates if i can
So listen up

Step 1.
Put Both Coppermine and smf in the same MySQL database (DO NOT USE FANTASTICO use the webintstall that comes built into Coppermine and smf!)
In my case I put SMF into Forum_ prefix and Coppermine into Gallery_ prefix

Step 2.
Bridge the two (using Coppermine bridge manager)


Step 3.
Create a file called Coppermine.php (yes the capital "C" makes a difference!) save it in "sources" directory in SMF' intallation folder containing :-
CODE
<?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';

}
?>


Step 4.
Create a file called Coppermine.template.php In your theme (the one your using or want) im using default which makes it easier! It needs to contain
CODE
<?php

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

echo ' <center><iframe width="900" height="800" src="www.Yourwebsite.com"></iframe></center>';

}
?>


Step 5.
In your index.template.php file add this where you want your gallery to appear
CODE
// The Coppermine Gallery
    echo ($current_action == 'Coppermine' || $context['browser']['is_ie4']) ? '<td class="maintab_active_' . $first . '"> </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 . '"> </td>' : '';


Step 6.
In the index.php root look for this
QUOTE
'coppa' => array('Register.php', 'CoppaForm'),
After that add (on the next line)
CODE
'Coppermine' => array('Coppermine.php', 'Coppermine'),


That it all that i did and it worked
What did go wrong though

Well in step 6 if you look at this bit
QUOTE
Coppermine' => array...
people often change the capital "C" to a lower case it sometimes works but in my case it didn't!

QUOTE
Fatal error: smf_main() [function.require]: Failed opening required '/homepages/xx/xxxxxx/htdocs/scjb-test/Sources/Coppermine.php' (include_path='.:/usr/local/lib/php') in /homepages/xx/xxxxxx/htdocs/scjb-test/index.php on line 355


In the Coppermine.php file make sure there is no spaces in the file name!

[size="5"][/size]
Go to the top of the page
 
+Quote Post

2 Pages V  < 1 2
Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Wtf?! I Just Posted A Message!(3)
  2. About Coppermine...?(0)
  3. Remember The Topic I Posted About..(5)
  4. Coppermine error(0)
  5. How do I get this data automatically posted to my email?(2)
  6. -sorry posted in the wrong spot-(0)
  7. Nobody Posted About World Of Warcraft?(2)
  8. Uploading Pictures(7)
  9. Could Same Topics Be Posted In Trap17 & Astahost?(7)
  10. Vdo Posted Board(1)
  11. Free Domain .be(1)
  12. Delayed, But- Hello(6)
  13. Rate The Person Who Posted Before You(2)
  14. Coppermine Photo Gallery - Security Alert(1)
  15. Where Can I View All Of The Things I Posted, Subscribed?(2)
  1. Coppermine Photo Gallery [resolved](1)
  2. Coppermine Gallery Error(2)


 



- Lo-Fi Version Time is now: 21st November 2008 - 09:48 AM