SMItalia Italian SMF Mods
22 Maggio 12, 23:11:07 *
Benvenuto, Visitatore. Per favore, effettua il login o registrati.
Hai perso la tua email di attivazione?

Login con username, password e lunghezza della sessione
News: SMItalia, la risposta Italiana a SMF
 
  Home   Forum   Help Login Registrati  
Pagine: [1] 2   Vai Giù
  Stampa  |  Bookmarks  
Autore Topic: Integrazione SMF Coppermine Gallery  (Letto 8326 volte)
0 Utenti e 1 Visitatore stanno guardando questo topic.
Ferodo
Sr. Member
****
Offline Offline

Sesso: Maschile
Posts: 423


Il Mago Del Freno


Guarda Profilo WWW
« il: 15 Novembre 07, 11:11:14 »

Questa guida spiega come integrare Coppermine all ' interno di SMF.


Creare un file chiamato  Gallery.php e inserirlo in  Sources/

Codice:
<?php
if (!defined('SMF'))
die(
'Hacking attempt...');

Function 
Gallery()
{

global  $txt$scripturl,  $db_prefix$context;
LoadTemplate('Gallery');
$context['page_title'] = "Gallery";
$context['linktree'][] = array(
'url' => $scripturl '?action=gallery',
'name' => $txt['gallery']
);

}

?>



Creare un nuovo file chiamato Gallery.template.php  e metterlo in Themes/tuotema/

Codice:
<?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" 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>'
;
}

?>


Aprite il file  index.php

 cercate :

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


Aggiungete sotto :

Codice:
'gallery' => array('Gallery.php', 'Gallery'),



Aprire il file Modification.italian  e aggiungere:

Codice:
// Gallery
$txt['gallery'] = 'Galleria';


Ora dovrete aggiungere un pulsante alla vostra index.template  richiamando l' azione  gallery





ATTENZIONE !

L' unico difetto per ora riscontrato è la pagina + grande del riquadro, io usando Tinyportal ho questo problema e l' ho risolto in parte modificando la larghezza delel tabelle nelle impostazioni di Coppermine.








« Ultima modifica: 25 Aprile 09, 17:34:31 da Darknico » Loggato

TigerRR
Jr. Member
**
Offline Offline

Sesso: Maschile
Posts: 84



Guarda Profilo WWW
« Risposta #1 il: 23 Novembre 07, 00:41:41 »

grazie ferodo...penso che mi sara' d'aiuto... Wink
Loggato
theluke
Jr. Member
**
Offline Offline

Sesso: Maschile
Posts: 95



Guarda Profilo WWW
« Risposta #2 il: 10 Dicembre 07, 21:03:41 »

perdona l'ignoranza, che vuol dire "Ora dovrete aggiungere un pulsante alla vostra index.template  richiamando l' azione  gallery"Huh?
In pratica cosa si dovrebbe fare?? Sad

Loggato
Ferodo
Sr. Member
****
Offline Offline

Sesso: Maschile
Posts: 423


Il Mago Del Freno


Guarda Profilo WWW
« Risposta #3 il: 10 Dicembre 07, 21:49:05 »

Vai nella index.template, in fondo trovi i button, ne prendi uno a caso ad esempio help button ,poi fai un copia e incolla,

come azione invece che ad esempio "help" metti "gallery"

Hai aggiunto un pulsante per la tua gallery Wink
Loggato

flavio.tv
Newbie
*
Offline Offline

Sesso: Maschile
Posts: 15


Guarda Profilo
« Risposta #4 il: 08 Gennaio 08, 10:20:14 »

Ottima modifica !

Grazie ! Smiley
Loggato
gianko82
Newbie
*
Offline Offline

Sesso: Maschile
Posts: 32


Guarda Profilo
« Risposta #5 il: 01 Aprile 08, 23:47:43 »

potete linkare qualche sito online dove gia' questo e' stato fatto e si puo' vedere il risultato?
grazie.
Loggato
Ferodo
Sr. Member
****
Offline Offline

Sesso: Maschile
Posts: 423


Il Mago Del Freno


Guarda Profilo WWW
« Risposta #6 il: 02 Aprile 08, 10:56:58 »

Sul mio la galleria è attiva, però devi registrarti...

www.x-riders.it

Comunque funziona benissimo  Wink
Loggato

gianko82
Newbie
*
Offline Offline

Sesso: Maschile
Posts: 32


Guarda Profilo
« Risposta #7 il: 06 Aprile 08, 13:09:56 »

hai un account guest?
Loggato
Ricsca
Jr. Member
**
Offline Offline

Sesso: Maschile
Posts: 54


Guarda Profilo
« Risposta #8 il: 14 Maggio 08, 12:12:20 »

Sai mica se è possibile integrare a smf e con queste tue modifiche una glleria che però risiete su un altro dominio?

Grazie 1000
Loggato
Ferodo
Sr. Member
****
Offline Offline

Sesso: Maschile
Posts: 423


Il Mago Del Freno


Guarda Profilo WWW
« Risposta #9 il: 14 Maggio 08, 12:26:50 »

Puoi metterla esterna volendo, per l integrazione bisognarebbe fare qualche prova perchè dirti così non ne sono molto sicuro
Loggato

Crisc
Newbie
*
Offline Offline

Sesso: Maschile
Posts: 31


Guarda Profilo
« Risposta #10 il: 27 Luglio 08, 17:14:56 »

Ciao

scusa ho seguito la tua guida sul mio forum (smf 1.1.5 e TP 0.95) ma non vedo il pulsante e non so come far funzionare la gallery ...

mi sai dire come mai? ^^

Ti ringrazio
Loggato
Ferodo
Sr. Member
****
Offline Offline

Sesso: Maschile
Posts: 423


Il Mago Del Freno


Guarda Profilo WWW
« Risposta #11 il: 27 Luglio 08, 18:11:19 »

Devi aprire la index.template e aggiungere un pulsante, c' è scritto se leggi bene in fondo  Wink
« Ultima modifica: 27 Luglio 08, 18:28:10 da Ferodo » Loggato

Crisc
Newbie
*
Offline Offline

Sesso: Maschile
Posts: 31


Guarda Profilo
« Risposta #12 il: 30 Luglio 08, 02:24:27 »

Ho creato il pulsante (avevo modificato solo il file di default e non quello del mio tema ^^'')

Però il pulsante si chiama help e mi fa aprire l'help (praticamente come non avessi cambiato in tutti i campi il nome help in gallery)

Inoltre ora i pulsanti non sono equidistanti, mi puoi aiutare? ^^
Loggato
Ferodo
Sr. Member
****
Offline Offline

Sesso: Maschile
Posts: 423


Il Mago Del Freno


Guarda Profilo WWW
« Risposta #13 il: 30 Luglio 08, 14:51:08 »

link al forum?
Loggato

Crisc
Newbie
*
Offline Offline

Sesso: Maschile
Posts: 31


Guarda Profilo
« Risposta #14 il: 30 Luglio 08, 17:24:30 »

link al forum?

http://forumavellamania.netsons.org/index.php

questo il link a coppermine
http://forumavellamania.netsons.org/cpg1418/

Al momento ho messo a commento il pulsante.

Loggato
Pagine: [1] 2   Vai Su
  Stampa  |  Bookmarks  
 
Salta a:  


+ Thread Correlati o Similari
Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines | TinyPortal v0.9.7 © Bloc XHTML 1.0 Valido! CSS Valido!

Tutti i contenuti di SMItalia sono pubblicati secondo la licenza di utilizzo di Creative Commons, salvo diverse indicazioni. Lo Staff non assume alcuna responsabilità nel caso di eventuali errori contenuti negli articoli o di errori in cui fosse incorso nella loro riproduzione sul sito. Tutte le pubblicazioni su SMItalia avvengono senza eventuali protezioni di brevetti d'invenzione; inoltre, i nomi coperti da eventuale marchio registrato vengono utilizzati senza tenerne conto.

Pagina creata in 0.105 secondi con 26 queries.| ServerUptime: 288 days, 0 hours, 40 minutes