Jump to content


Coppermine as iframe in MKPortal


  • You cannot reply to this topic
3 replies to this topic

#1 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 14 September 2004 - 06:49 PM

How to display Coppermine inside MKPortal as an iframe

BACK UP YOUR FILES BEFORE YOU MODIFY THEM

If you want your iframe to resize you will need this free script from dynamicdrive.com. It is against the license for me to distribute the script but I will show you where to paste the script below.

Iframe SSI script II:
http://www.dynamicdr.../iframessi2.htm


Note: This is not a perfect solution. It does not work in Opera. It is important that you add a line such as "If the gallery does not display properly click here" or something to that effect. Otherwise there will be certain people who cannot see your gallery at all. I am still looking for a better way to display Coppermine inside MKPortal but this is the best I have come up with so far.





1) Install Coppermine
www.yoursite.com/gallery/


2) Create new MKPortal module directory:

/mkportal/modules/coppermine/


3) Create a new index.php for the module and upload it to your new /mkportal/modules/coppermine/ directory

/mkportal/modules/coppermine/index.php said:


if (!eregi("index.php", $_SERVER['PHP_SELF'])) { die ("Spiacente !! Non puoi accedere a questo file direttamente."); }

// if(!$ibforums->member['id']) {
// $message = "Solo gli utenti registrati possono accedere a questa sezione";
// $mklib->error_page($message);
// exit;
//}

$output = "


If the gallery does not display properly you may access it directly.


";

$mklib->printpage("1", "1", "Coppermine Gallery", $output);

?>



2) Edit tpl_main.php.
If you are using your forum skins: mkportal/templates/Forum_Skin/tpl_main.php

FIND:

Quote

    $tooltip_js
    {$pmk_js}


EOF;
}


ADD ABOVE:

Quote

<script type="text/javascript">

Paste the part of the Dynamicdrive Iframe SSI script II that belongs in the section of the page here...


Note: You can leave the iframe name as the default "myframe" but if you change it anywhere you must change it everywhere.


The URL of your gallery iframe page will be http://www.yoursite....?ind=coppermine


You may also want to edit the Coppermine template to eliminate the coppermine header. Remember to add a link back to "home" or "forum" for those people who have accessed coppermine directly so that they can get back to the rest of your site. You will want to make sure to add target="_top" to your anchor tags to break out of the frame if someone uses them when viewing the gallery in the iframe.

My demo:
http://www.visiblesoul.net/resources/mkpor...?ind=coppermine

-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard

#2 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 14 September 2004 - 06:50 PM

Coppermine goes Invisionboard mod:
http://mods.invision...ndex.php/f/1447

This mod will more closely integrate Coppermine with Invisionboard. It will even allow you to use the forum skins for Coppermine.


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard

#3 Wozzer

  • Members
  • 2 posts
  • United Kingdom

Posted 15 September 2004 - 08:15 AM

This mod seems to work really well.. Many thanks.
The only bit I am not sure about is where you say:
'You may also want to edit the Coppermine template to eliminate the coppermine header. Remember to add a link back to "home" or "forum" for those people who have accessed coppermine directly'

Can you give a bit of advice where I go to edit the Coppermine template.

#4 visiblesoul

  • Administrators
  • 551 posts
  • Location:Earth
  • Texas

Posted 15 September 2004 - 09:00 AM

Wozzup Wozzer...

If you look at my demo you'll see what I mean.

At the top you will see that I removed the Coppermine title and gallery description. At the bottom you will see that I added the navigation links "Portal | Forums". I removed the stuff at the top just so it would look better in the iframe but it's not necessary. I added the links at the bottom so that if someone is looking at the gallery outside of MKPortal they will have a way to navigate back to the portal.


The theme I use in the demo is "water_drop". I used the same theme in a client's installation and just modified the stylesheet to make it look like his board. You could use the Coppermine goes Invisionboard mod instead of creating a new Coppermine theme like I did.

You can edit any of the Coppemine themes pretty easily. There are only 3 template files.

template.html
theme.php
style.css


The gallery name and description are in this part. You could just comment them out or modify the top of the page however you like.

/themes/*/template.html said:



       

               
                     
                               

                               

                       
-=DKC=-


Please note that I offer free support on this forum in my free time. Depending on how much work I have backlogged it may take me a week or more to answer questions. I am not ignoring you. I answer everyone but please be patient. Thanks.

Disclaimer: All forum posts, including code examples, on this forum are offered for free in the hope that they will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Use code examples at your own risk.

"If at first you don't succeed, keep on suckin' til you do succeed." -Curly Howard





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users


                                       

{GAL_NAME}


                                       

{GAL_DESCRIPTION}





To add the bottom links I just edited the /themes/*/template.html file.

/themes/*/template.html said:

                       


                                        {ADMIN_MENU}

    {GALLERY}


   

Portal | Forums