ellen

a theme by Karen Blundell + TT4FN

 
Donations
Trovi utile e questo sito? Sostienilo.

Did you find useful this site? Help it.



Per saperne di più

Read more
 
Servizi
 
Cerca
Recherche dans ce site
 
Statistiche
Visite: 503824
 
Statistiche plus
Visite: 

statistiche
 
Calendario
Date: 25/11/2009
Heure: 10:02
« Novembre 2009 »
Lu Ma Me Je Ve Sa Di
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30
 
Login





Vous n’avez pas encore de compte??
Enregistrez Vous!
Lost password
Choose your language:
deutsch english español français italiano português
 
Utenti
People on-line:     
admins 0 administrators
users 0 users
guests 8 guests
 
Sondaggio
Temi 2009: Vota il tuo preferito










Votes: 12 | Commentaires: 0

Integrare il form di ricerca nella testata di un sito fatto con Flatnuke

How_to.pngdi Alfredo Cosco

A me, il blocco "Cerca" di Flatnuke non è mai piaciuto.
Per carità, è giusto renderlo così com'è nel CMS in forma bruta, ma poi, messo un sito in produzione, quel blocco rappresenta un sacco di spazio sprecato.
Molti template di freccsstemplates.org, ad esempio, inseriscono il form nella testata oppure in linea con il menù orizzontale.
Vediamo come ottenere lo stesso effetto con Flatnuke



1) creiamo un file php vuoto in include/phpfunctions/ con un nome a piacere, ad esempio myfunctions.php

2) copiamo questa funzione nel file:

function small_search_form()
{
// configuration
$search_plugins_dir = "include/search/";
$GLOBALS['search_plugins_dir'] = $search_plugins_dir;
$search_section = "none_Search";

?>
<form action="index.php?mod=<?=$search_section?>" method="post">
<input type="hidden" name="method" value="AND" />
<input type="hidden" name="mod" value="<?=$search_section?>" />
<input type="hidden" name="where" value="allsite" />
<input type="submit" value="Submit" />
<input type="text" name="find" size="10" id="text" />
<a href="index.php?mod=<?=$search_section?>" title="<?=_GOTOSECTION?>: <?=_CERCA?>"><?=_ADVSEARCH?></a>
</form><?
}
/*---end---*/

3) aggiungiamo un ID per il form nel nostro style.css del tema per formattare il tutto

#searchform{
}
#searchform form{
}

#searchform a:link{
}

4) aggiungiamo la chiamata alla funzione nel file structure.php del tema dove più ci aggrada

<div id="tema" >

<!-- TOP -->

<div id="topmenu">
<div id="topleft">
<h1><a href="#">Il mio sito</a></h1>

<div id="searchform">Cerca nel Sito:<? small_search_form();?></div>

</div>

<div id="topright"></div>

</div>
....

5) formattare a piacere e servire ben caldo
Transmis Vendredi 09 Octobre 2009 - 00:42 (Lu 389 fois)
Comment Commentaires? Print Imprimer



Derniers articles sur cet argument

Read Integrare il form di LOGIN nella testata di un sito fatto con Flatnuke (19/10/2009 - 18:31) Lu 426 fois
Read Icone liquide in Archivio news (18/10/2009 - 18:01) Lu 298 fois
Read Integrare il form di ricerca nella testata di un sito fatto con Flatnuke (09/10/2009 - 00:42) Lu 389 fois
Read Creare una Cover page con flatnuke (06/08/2009 - 16:33) Lu 986 fois

Tous les articles sur cet argument
How_to.png