News:

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

Main Menu

Photo Gallery....

Started by CERT, November 07, 2004, 03:43:10 PM

Previous topic - Next topic

CERT

Don't know if this is the right spot to post this so I appologize before hand.

I was wondering if there are any good Photo Galleries that are free for PHP that I could possibly use with SMF?

Thanks



Anguz

Cristián Lávaque http://cristianlavaque.com

CERT

Does Coppermine work well with SMF?

Would I be able to give access based on SMF user privledges?

Metho

Yes, there's an integration file for smf distributed with the coppermine package. Easy, too.

- Methonis
Joshua "Methonis" Frazer
Support Specialist
The Simple Machines Team

CERT

Thanks... what about themes.... do they have a gallery available to customize the look... I am really leaning towards using it but would like to make sure that it is going to work just right and such....

Oldiesmann

There are at least 10 themes or so that come with Coppermine, and I don't think it's that difficult to change the look, although their template system is different than SMF's.
Michael Eshom
Christian Metal Fans

pulpitfire

Can someone show me a site where they have succesfully integrated Coppermine into their forum, so I can see how it looks and works?

Ben_S

http://www.redandwhitekop.com/gallery/

A default installation just looks like a default coppermine installation, you still need to skin it to look like your forum etc.
Liverpool FC Forum with 14 million+ posts.

tranzndance

It depends on which theme from which application you want to use. If you like the default SMF skin, there is already a Coppermine theme to match. However, if you want to make the forum look like a Coppermine theme, that would take more work. That's something I just finished doing. I made my hxxp:takethu.com/forums/ [nonactive] match my hxxp:takethu.com/ [nonactive]. So it is possible to accomplish. It helps to have experience with theming, though.

kegobeer

I did the same thing - I made a Coppermine theme to match a SMF Halloween theme.  The theme engines are completely different, but it's worth the time and energy.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

snork13

i wrapped the forum around the gallery making a gallery.template file and adding the action to the index. example;


www.phantasyposters.org

-snork
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

kegobeer

That's a great look, Snork.  Care to post your gallery template file?
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

snork13

#12
Quote from: kegobeer on January 01, 2006, 06:13:10 PM
That's a great look, Snork.  Care to post your gallery template file?


sources/Gallery.php
<?php
if (!defined('SMF'))
die('Hacking attempt...');

function 
Gallery() {
// This is gonna be needed...
loadTemplate('Gallery');
}
?>


themes/???/Gallery.template.php
<?php
// Version: 1.1 RC2; Gallery

function template_main()
{
global $context$settings$options$txt$scripturl;

echo '
<script language="JavaScript" type="text/javascript"><!--
function checkAll(onOff)
{
for (var i = 0; i < document.searchform.elements.length; i++)
{
if (document.searchform.elements[i].name.substr(0, 3) == "brd")
document.searchform.elements[i].checked = onOff;
}
}
// --></script>
<form action="'
$scripturl'?action=search2" method="post" name="searchform" id="searchform">

 <script type="text/javascript"><!--

/***********************************************
* IFrame SSI script II- © Dynamic Drive DHTML code library (http://www.dynamicdrive.com)
* Visit DynamicDrive.com for hundreds of original DHTML scripts
* This notice must stay intact for legal use
***********************************************/

//Input the IDs of the IFRAMES you wish to dynamically resize to match its content height:
//Separate each ID with a comma. Examples: ["myframe1", "myframe2"] or ["myframe"] or [] for none:
var iframeids=["myframe"]

//Should script hide iframe from browsers that don\'t support this script (non IE5+/NS6+ browsers. Recommended):
var iframehide="yes"

var getFFVersion=navigator.userAgent.substring(navigator.userAgent.indexOf("Firefox")).split("/")[1]
var FFextraHeight=parseFloat(getFFVersion)>=0.1? 16 : 0 //extra height in px to add to iframe in FireFox 1.0+ browsers

function resizeCaller() {
var dyniframe=new Array()
for (i=0; i<iframeids.length; i++){
if (document.getElementById)
resizeIframe(iframeids[i])
//reveal iframe for lower end browsers? (see var above):
if ((document.all || document.getElementById) && iframehide=="no"){
var tempobj=document.all? document.all[iframeids[i]] : document.getElementById(iframeids[i])
tempobj.style.display="block"
}
}
}

function resizeIframe(frameid){
var currentfr=document.getElementById(frameid)
if (currentfr && !window.opera){
currentfr.style.display="block"
if (currentfr.contentDocument && currentfr.contentDocument.body.offsetHeight) //ns6 syntax
currentfr.height = currentfr.contentDocument.body.offsetHeight+FFextraHeight; 
else if (currentfr.Document && currentfr.Document.body.scrollHeight) //ie5+ syntax
currentfr.height = currentfr.Document.body.scrollHeight;
if (currentfr.addEventListener)
currentfr.addEventListener("load", readjustIframe, false)
else if (currentfr.attachEvent){
currentfr.detachEvent("onload", readjustIframe) // Bug fix line
currentfr.attachEvent("onload", readjustIframe)
}
}
}

function readjustIframe(loadevt) {
var crossevt=(window.event)? event : loadevt
var iframeroot=(crossevt.currentTarget)? crossevt.currentTarget : crossevt.srcElement
if (iframeroot)
resizeIframe(iframeroot.id);
}

function loadintoIframe(iframeid, url){
if (document.getElementById)
document.getElementById(iframeid).src=url
}

if (window.addEventListener)
window.addEventListener("load", resizeCaller, false)
else if (window.attachEvent)
window.attachEvent("onload", resizeCaller)
else
window.onload=resizeCaller

// --></script>

<table width="100%" border="0" cellspacing="0" cellpadding="4" align="center" class="tborder">
<tr class="titlebg">
<td>Gallery</td>
</tr><tr>
<td class="windowbg">'
;

// load the gallery
echo '<iframe id="myframe" src="http://www.???.com/gallery/index.php" scrolling="no" marginwidth="0" marginheight="0" frameborder="0" vspace="0" hspace="0" style="overflow:novisible; width:100%; display:none"></iframe>';

echo '
</td>
</tr>
</table>
</form>'
;
}

?>


change www.???.com to reflect your actual location, the template has a javascript that allows the iframe to open full, it's the best i could do. It similar to the FlashChat intergration and where i got the idea :)

i would also suggestion tweaking the gallery menu, and you'll want to add a link to the forum- themes/???/index.template.php

-snork
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Anguz

Quote from: snork13 on January 01, 2006, 04:49:49 PM
i wrapped the forum around the gallery making a gallery.template file and adding the action to the index.

Great idea.
Cristián Lávaque http://cristianlavaque.com

snork13

Quote from: Anguz on January 01, 2006, 07:29:37 PM
Quote from: snork13 on January 01, 2006, 04:49:49 PM
i wrapped the forum around the gallery making a gallery.template file and adding the action to the index.

Great idea.

i got the idea from someone else, i just tweaked it out ;D
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

kegobeer

Where did you put the custom action in index.php?  I've never messed around with custom actions before.
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

snork13

Quote from: kegobeer on January 01, 2006, 07:49:21 PM
Where did you put the custom action in index.php?  I've never messed around with custom actions before.


find:

'findmember' => array('Subs-Auth.php', 'JSMembers'),

after add;
'gallery' => array('Gallery.php', 'Gallery'),

-snork
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

kegobeer

Thanks.  Right after I asked I used the most sought after function - search.  ;D
"The truth of the matter is that you always know the right thing to do. The hard part is doing it." - Norman Schwarzkopf
Posting and you (Click "WATCH THIS MOVIE")

snork13

Quote from: kegobeer on January 01, 2006, 08:00:06 PM
Thanks.  Right after I asked I used the most sought after function - search.  ;D

LOL
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

snork13

i also updated my main site to 1.1rc2 and got another example working,

www.snork13.net/forum
Mods
Please DO NOT PM me with requests for individual support, but post your questions and concerns in the appropriate section of the forum where other users can benefit from them as well. Thank you.
I have been super busy as of late. Working on updates to all my modifications for 2.0.1

Advertisement: