Le site des utilisateurs francophones de FluxBB.
Vous n'êtes pas identifié(e).
Pages : 1
Bonjour a tous,
voilà, j'ai voulu mettre un slider (nivo-slider) sur mon forum. J'ai trouvé un sujet qui traité cette question dans cette section.
J'ai suivi cette methode :
Reprenons depuis le début.
Je part du principe que tu souhaites l'intégrer après l'header et avant les forums (annonce comprise).http://img11.hostingpics.net/thumbs/mini_709580integrationnivosliderfluxbb.jpg
1 - Tu vas créer un dossier "nivo-slider" à la racine de ton forum.
2 - Tu vas mettre dans ce dossier :
les dossiers "images" et "scripts" (qui se trouvent dans le dossier demo de l'archive) + le fichier "style.css"
+ le dossier "themes" et les fichiers "jquery.nivo.slider.pack.js" + "nivo-slider.css" (qui se trouvent à la racine de l'archive).3 - Aller dans le dossier include/template et éditer le fichier "main.tpl" de la manière suivante :
(tu peux faire un copier/coller du code ci-dessous si tu n'as jamais modifier celui-ci auparavant)<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<pun_language>" lang="<pun_language>" dir="<pun_content_direction>"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" href="nivo-slider/themes/default/default.css" type="text/css" media="screen" /> <link rel="stylesheet" href="nivo-slider/themes/pascal/pascal.css" type="text/css" media="screen" /> <link rel="stylesheet" href="nivo-slider/themes/orman/orman.css" type="text/css" media="screen" /> <link rel="stylesheet" href="nivo-slider/nivo-slider.css" type="text/css" media="screen" /> <link rel="stylesheet" href="nivo-slider/style.css" type="text/css" media="screen" /> <pun_head> </head> <body> <div id="pun<pun_page>" class="pun"> <div class="top-box"><div><!-- Top Corners --></div></div> <div class="punwrap"> <div id="brdheader" class="block"> <div class="box"> <div id="brdtitle" class="inbox"> <pun_title> <pun_desc> </div> <pun_navlinks> <pun_status> </div> </div> <!-- Début de nivo-slider --> <div id="wrapper"> <div class="slider-wrapper theme-orman"> <div class="ribbon"></div> <div id="slider" class="nivoSlider"> <img src="nivo-slider/images/toystory.jpg" alt="" /> <a href="http://dev7studios.com"><img src="nivo-slider/images/up.jpg" alt="" title="This is an example of a caption" /></a> <img src="nivo-slider/images/walle.jpg" alt="" /> <img src="nivo-slider/images/nemo.jpg" alt="" title="#htmlcaption" /> </div> <div id="htmlcaption" class="nivo-html-caption"> <strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>. </div> </div> </div> <script type="text/javascript" src="nivo-slider/scripts/jquery-1.6.1.min.js"></script> <script type="text/javascript" src="nivo-slider/jquery.nivo.slider.pack.js"></script> <script type="text/javascript"> $(window).load(function() { $('#slider').nivoSlider(); }); </script> <!-- Fin de nivo-slider --> <pun_announcement> <div id="brdmain"> <pun_main> </div> <pun_footer> </div> <div class="end-box"><div><!-- Bottom corners --></div></div> </div> </body> </html>* une fois tout ceci fait ton slider sera dispo, il te restera plus qu'a peaufiner les css, notamment en enlevant les doublons inutile (html, body ect...) et garder les class &co utiles
comme par exemple dans "style.css" :.theme-default #slider { margin:100px auto 0 auto; width:618px; /* Make sure your images are the same size */ height:246px; /* Make sure your images are the same size */ } .theme-pascal.slider-wrapper, .theme-orman.slider-wrapper { margin-top:150px; }ainsi que les réglages du slider en se fiant à la doc.
Cependant, rien ne s'affiche sur mon forum 
J'aurai donc besoin de votre aide pour régler le probleme svp 
Voici l'adresse de mon forum : cassy.franceserv.com
Merci d'avance pour votre aide precieuse 
Hors ligne
Désolé mais Franceserv a subit de grosses difficultés ces derniers jours, ce qui explique que vous n'ayez pas pu avoir acces a mon forum mais cela semble resolu 
Le forum est de nouveau en ligne et n'attend qu'un petit peu d'aide de votre part afficher son nouveau slider 
Dernière modification par bibis57 (09-09-2012 21:20:18)
Hors ligne
Il semblerait qu'il te manque Jquery sur ton forum, Firebug me renvoi les erreurs suivantes :
ReferenceError: jQuery is not defined
$(window).load(function() {
ReferenceError: $ is not defined
$(window).load(function() {
Nous ne faisons pas le travail à votre place mais nous prenons le temps de vous montrer le chemin. Merci de lire ce que l'on vous dit et de réfléchir avant de re-demander une explication.
Hors ligne
ok merci, j'ai effectivement aussi ces erreurs mais j'avais telechargé nivo-slider avec jquery plugin donc je devrais avoir jquery sur le forum. (il y a src="nivo-slider/scripts/jquery-1.6.1.min.js" et src="nivo-slider/jquery.nivo.slider.pack.js")
Désolé, ca fait pas longtemps que je me suis lancé et mes connaissances sont loin d etre suffisantes pour me permettre de comprendre comment resoudre ce probleme.
J'ai beau chercher mais je ne vois pas ce qu il faut que je fasse, j'ai donc besoin d'un peu plus d'aide svp.
Merci d avance 
Hors ligne
Comme j'en avais marre des bugs de franceserv, j'ai pris un autre hebergement. Nouveau lien vers mon forum : evolutiongraph.fr
J'ai essayé de réinstaller le slider et rebelotte, toujours les memes erreurs de firebug concernant jquery. Par contre maintenant, j'ai bien les images d'exemples qui s'affiche mais sans le slider (elles sont les unes en dessous des autres
)
Quelqu'un pour un petit peu d'aide ? svp 
Edit : Et ben apres des heures de recherche et d'essais multiples, j'ai enfin fini par comprendre. En fait, c'est le fichier include/template/main.tpl que j'avais copié sur la methode que j'ai cité précédement qui etait bourré d'erreurs vu qu'ils etaient fait pour la config de quelqu'un d'autres.
Par contre, je voudrais que ce slider ne s'affiche que sur la page d'accueil et non pas dans tous les forums. Que devrais je faire pour modifier ca ?
Dernière modification par bibis57 (13-09-2012 02:14:55)
Hors ligne
Salut!
On pourrait faire autrement, mais je te conseille de déplacer le bout de code du slider actuellement présent dans le fichier tpl dans ton header.php, juste avant
// START SUBST - <pun_announcement>
if ($pun_user['g_read_board'] == '1' && $pun_config['o_announcement'] == '1')
{comme ceci
?>
<!-- Début de nivo-slider -->
<div id="wrapper">
<div class="slider-wrapper theme-orman">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<img src="nivo-slider/images/toystory.jpg" alt="" />
<a href="http://dev7studios.com"><img src="nivo-slider/images/up.jpg" alt="" title="This is an example of a caption" /></a>
<img src="nivo-slider/images/walle.jpg" alt="" />
<img src="nivo-slider/images/nemo.jpg" alt="" title="#htmlcaption" />
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
</div>
</div>
<script type="text/javascript" src="nivo-slider/scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="nivo-slider/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<!-- Fin de nivo-slider -->
<?php
// START SUBST - <pun_announcement>
if ($pun_user['g_read_board'] == '1' && $pun_config['o_announcement'] == '1')
{
ob_start();De fait, on va pouvoir rajouter une vérification en PHP (chose impossible à faire directement dans le tpl, à moins de passer par <pun_include>, mais je trouve que c'est plus simple ainsi):
if (basename($_SERVER['PHP_SELF']) == 'index.php')On aura donc:
// Slider si nous sommes sur l'index
if (basename($_SERVER['PHP_SELF']) == 'index.php')
{
?>
<!-- Début de nivo-slider -->
<div id="wrapper">
<div class="slider-wrapper theme-orman">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<img src="nivo-slider/images/toystory.jpg" alt="" />
<a href="http://dev7studios.com"><img src="nivo-slider/images/up.jpg" alt="" title="This is an example of a caption" /></a>
<img src="nivo-slider/images/walle.jpg" alt="" />
<img src="nivo-slider/images/nemo.jpg" alt="" title="#htmlcaption" />
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
</div>
</div>
<script type="text/javascript" src="nivo-slider/scripts/jquery-1.6.1.min.js"></script>
<script type="text/javascript" src="nivo-slider/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<!-- Fin de nivo-slider -->
<?php
}
// START SUBST - <pun_announcement>
if ($pun_user['g_read_board'] == '1' && $pun_config['o_announcement'] == '1')
{
ob_start();Hors ligne
Tout d'abord, merci beaucoup adaur, j'ai utilisé ta démarche et effectivement le slider n'est plus que sur la page d'index 
Juste 2 petites questions :
- dois je laisser le bout de code du slider dans le main.tpl ou dois je le supprimer entierement pour le laisser seulement dans le header.php ? (a priori, je dirais qu'il faut le virer mais bon je prefere demander
)
- avec ta demarche mon slider a été déplacé sur la page index. Il etait entre la banniere et les 5 derniers topics alors que maintenant il est tout en haut de la page, avant ma banniere. Que dois je faire pour le replacer a sa position d'origine (entre la banniere et les 5 derniers topics)?
Voici mon main.tpl :
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<pun_language>" lang="<pun_language>" dir="<pun_content_direction>">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="nivo-slider/themes/dark/dark.css" type="text/css" media="screen" />
<link rel="stylesheet" href="nivo-slider/nivo-slider.css" type="text/css" media="screen" />
<link rel="stylesheet" href="nivo-slider/style.css" type="text/css" media="screen" />
<pun_head>
</head>
<body>
<div id="pun<pun_page>" class="pun">
<div class="top-box"><div><!-- Top Corners --></div></div>
<div class="punwrap">
<div id="brdheader" class="block">
<div class="box">
<div id="brdtitle" class="inbox">
<pun_title>
<pun_desc>
</div>
<pun_navlinks>
<pun_status>
</div>
</div>
<pun_announcement>
<div id="brdmain">
<pun_main>
</div>
<pun_footer>
</div>
<div class="end-box"><div><!-- Bottom corners --></div></div>
</div>
</body>
</html>et mon header.php :
<?php
/**
* Copyright (C) 2008-2011 FluxBB
* based on code by Rickard Andersson copyright (C) 2002-2008 PunBB
* License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
*/
// Make sure no one attempts to run this script "directly"
if (!defined('PUN'))
exit;
// Send no-cache headers
header('Expires: Thu, 21 Jul 1977 07:30:00 GMT'); // When yours truly first set eyes on this world! :)
header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
header('Cache-Control: post-check=0, pre-check=0', false);
header('Pragma: no-cache'); // For HTTP/1.0 compatibility
// Send the Content-type header in case the web server is setup to send something else
header('Content-type: text/html; charset=utf-8');
// Load the template
if (defined('PUN_ADMIN_CONSOLE'))
$tpl_file = 'admin.tpl';
else if (defined('PUN_HELP'))
$tpl_file = 'help.tpl';
else
$tpl_file = 'main.tpl';
if (file_exists(PUN_ROOT.'style/'.$pun_user['style'].'/'.$tpl_file))
{
$tpl_file = PUN_ROOT.'style/'.$pun_user['style'].'/'.$tpl_file;
$tpl_inc_dir = PUN_ROOT.'style/'.$pun_user['style'].'/';
}
else
{
$tpl_file = PUN_ROOT.'include/template/'.$tpl_file;
$tpl_inc_dir = PUN_ROOT.'include/user/';
}
$tpl_main = file_get_contents($tpl_file);
// START SUBST - <pun_include "*">
preg_match_all('%<pun_include "([^/\\\\]*?)\.(php[45]?|inc|html?|txt)">%i', $tpl_main, $pun_includes, PREG_SET_ORDER);
foreach ($pun_includes as $cur_include)
{
ob_start();
// Allow for overriding user includes, too.
if (file_exists($tpl_inc_dir.$cur_include[1].'.'.$cur_include[2]))
require $tpl_inc_dir.$cur_include[1].'.'.$cur_include[2];
else if (file_exists(PUN_ROOT.'include/user/'.$cur_include[1].'.'.$cur_include[2]))
require PUN_ROOT.'include/user/'.$cur_include[1].'.'.$cur_include[2];
else
error(sprintf($lang_common['Pun include error'], htmlspecialchars($cur_include[0]), basename($tpl_file)));
$tpl_temp = ob_get_contents();
$tpl_main = str_replace($cur_include[0], $tpl_temp, $tpl_main);
ob_end_clean();
}
// END SUBST - <pun_include "*">
// START SUBST - <pun_language>
$tpl_main = str_replace('<pun_language>', $lang_common['lang_identifier'], $tpl_main);
// END SUBST - <pun_language>
// START SUBST - <pun_content_direction>
$tpl_main = str_replace('<pun_content_direction>', $lang_common['lang_direction'], $tpl_main);
// END SUBST - <pun_content_direction>
// START SUBST - <pun_head>
ob_start();
// Define $p if its not set to avoid a PHP notice
$p = isset($p) ? $p : null;
// Is this a page that we want search index spiders to index?
if (!defined('PUN_ALLOW_INDEX'))
echo '<meta name="ROBOTS" content="NOINDEX, FOLLOW" />'."\n";
?>
<title><?php echo generate_page_title($page_title, $p) ?></title>
<link rel="stylesheet" type="text/css" href="style/<?php echo $pun_user['style'].'.css' ?>" />
<link rel="stylesheet" type="text/css" href="chat/css/shoutbox.css" />
<?php
if (defined('PUN_ADMIN_CONSOLE'))
{
if (file_exists(PUN_ROOT.'style/'.$pun_user['style'].'/base_admin.css'))
echo '<link rel="stylesheet" type="text/css" href="style/'.$pun_user['style'].'/base_admin.css" />'."\n";
else
echo '<link rel="stylesheet" type="text/css" href="style/imports/base_admin.css" />'."\n";
}
if (isset($required_fields))
{
// Output JavaScript to validate form (make sure required fields are filled out)
?>
<script type="text/javascript">
/* <![CDATA[ */
function process_form(the_form)
{
var element_names = {
<?php
// Output a JavaScript object with localised field names
$tpl_temp = count($required_fields);
foreach ($required_fields as $elem_orig => $elem_trans)
{
echo "\t\t\"".$elem_orig.'": "'.addslashes(str_replace(' ', ' ', $elem_trans));
if (--$tpl_temp) echo "\",\n";
else echo "\"\n\t};\n";
}
?>
if (document.all || document.getElementById)
{
for (var i = 0; i < the_form.length; ++i)
{
var elem = the_form.elements[i];
if (elem.name && (/^req_/.test(elem.name)))
{
if (!elem.value && elem.type && (/^(?:text(?:area)?|password|file)$/i.test(elem.type)))
{
alert('"' + element_names[elem.name] + '" <?php echo $lang_common['required field'] ?>');
elem.focus();
return false;
}
}
}
}
return true;
}
/* ]]> */
</script>
<?php
}
require PUN_ROOT.'plugins/apms/header_add3.php';
// JavaScript tricks for IE6 and older
echo '<!--[if lte IE 6]><script type="text/javascript" src="style/imports/minmax.js"></script><![endif]-->'."\n";
$page_head['colorize_groups'] = '<style type="text/css">'.$GLOBALS['pun_colorize_groups']['style'].'</style>'; // need $GLOBALS for message function
if (isset($page_head))
echo implode("\n", $page_head)."\n";
$tpl_temp = trim(ob_get_contents());
$tpl_main = str_replace('<pun_head>', $tpl_temp, $tpl_main);
ob_end_clean();
// END SUBST - <pun_head>
// START SUBST - <body>
if (isset($focus_element))
{
$tpl_main = str_replace('<body onload="', '<body onload="document.getElementById(\''.$focus_element[0].'\').elements[\''.$focus_element[1].'\'].focus();', $tpl_main);
$tpl_main = str_replace('<body>', '<body onload="document.getElementById(\''.$focus_element[0].'\').elements[\''.$focus_element[1].'\'].focus()">', $tpl_main);
}
// END SUBST - <body>
// START SUBST - <pun_page>
$tpl_main = str_replace('<pun_page>', htmlspecialchars(basename($_SERVER['PHP_SELF'], '.php')), $tpl_main);
// END SUBST - <pun_page>
// START SUBST - <pun_title>
$tpl_main = str_replace('<pun_title>', '<h1><a href="index.php">'.pun_htmlspecialchars($pun_config['o_board_title']).'</a></h1>', $tpl_main);
// END SUBST - <pun_title>
// START SUBST - <pun_desc>
$tpl_main = str_replace('<pun_desc>', '<div id="brddesc">'.$pun_config['o_board_desc'].'</div>', $tpl_main);
// END SUBST - <pun_desc>
// START SUBST - <pun_navlinks>
$links = array();
// Index should always be displayed
$links[] = '<li id="navindex"'.((PUN_ACTIVE_PAGE == 'index') ? ' class="isactive"' : '').'><a href="index.php">'.$lang_common['Index'].'</a></li>';
if ($pun_user['g_read_board'] == '1' && $pun_user['g_view_users'] == '1')
$links[] = '<li id="navuserlist"'.((PUN_ACTIVE_PAGE == 'userlist') ? ' class="isactive"' : '').'><a href="userlist.php">'.$lang_common['User list'].'</a></li>';
if ($pun_config['o_rules'] == '1' && (!$pun_user['is_guest'] || $pun_user['g_read_board'] == '1' || $pun_config['o_regs_allow'] == '1'))
$links[] = '<li id="navrules"'.((PUN_ACTIVE_PAGE == 'rules') ? ' class="isactive"' : '').'><a href="misc.php?action=rules">'.$lang_common['Rules'].'</a></li>';
if ($pun_user['g_read_board'] == '1' && $pun_user['g_search'] == '1')
$links[] = '<li id="navsearch"'.((PUN_ACTIVE_PAGE == 'search') ? ' class="isactive"' : '').'><a href="search.php">'.$lang_common['Search'].'</a></li>';
if ($pun_user['is_guest'])
{
$links[] = '<li id="navregister"'.((PUN_ACTIVE_PAGE == 'register') ? ' class="isactive"' : '').'><a href="register.php">'.$lang_common['Register'].'</a></li>';
$links[] = '<li id="navlogin"'.((PUN_ACTIVE_PAGE == 'login') ? ' class="isactive"' : '').'><a href="login.php">'.$lang_common['Login'].'</a></li>';
}
else
{
$links[] = '<li id="navprofile"'.((PUN_ACTIVE_PAGE == 'profile') ? ' class="isactive"' : '').'><a href="profile.php?id='.$pun_user['id'].'">'.$lang_common['Profile'].'</a></li>';
$links[] = '<li id="partenaires"'.((PUN_ACTIVE_PAGE == 'partenaires') ? ' class="isactive"' : '').'><a href="partenaires.php">'.$lang_common['Partenaires'].'</a></li>';
require PUN_ROOT.'plugins/apms/header_add2.php';
if ($pun_user['is_admmod'])
$links[] = '<li id="navadmin"'.((PUN_ACTIVE_PAGE == 'admin') ? ' class="isactive"' : '').'><a href="admin_index.php">'.$lang_common['Admin'].'</a></li>';
$links[] = '<li id="navlogout"><a href="login.php?action=out&id='.$pun_user['id'].'&csrf_token='.pun_hash($pun_user['id'].pun_hash(get_remote_address())).'">'.$lang_common['Logout'].'</a></li>';
}
// Are there any additional navlinks we should insert into the array before imploding it?
if ($pun_user['g_read_board'] == '1' && $pun_config['o_additional_navlinks'] != '')
{
if (preg_match_all('%([0-9]+)\s*=\s*(.*?)\n%s', $pun_config['o_additional_navlinks']."\n", $extra_links))
{
// Insert any additional links into the $links array (at the correct index)
$num_links = count($extra_links[1]);
for ($i = 0; $i < $num_links; ++$i)
array_splice($links, $extra_links[1][$i], 0, array('<li id="navextra'.($i + 1).'">'.$extra_links[2][$i].'</li>'));
}
}
$tpl_temp = '<div id="brdmenu" class="inbox">'."\n\t\t\t".'<ul>'."\n\t\t\t\t".implode("\n\t\t\t\t", $links)."\n\t\t\t".'</ul>'."\n\t\t".'</div>';
$tpl_main = str_replace('<pun_navlinks>', $tpl_temp, $tpl_main);
// END SUBST - <pun_navlinks>
// START SUBST - <pun_status>
$page_statusinfo = $page_topicsearches = array();
if ($pun_user['is_guest'])
$page_statusinfo = '<p class="conl">'.$lang_common['Not logged in'].'</p>';
else
{
$page_statusinfo[] = '<li><span>'.$lang_common['Logged in as'].' <strong>'.pun_htmlspecialchars($pun_user['username']).'</strong></span></li>';
$page_statusinfo[] = '<li><span>'.sprintf($lang_common['Last visit'], format_time($pun_user['last_visit'])).'</span></li>';
if ($pun_user['is_admmod'])
{
if ($pun_config['o_report_method'] == '0' || $pun_config['o_report_method'] == '2')
{
$result_header = $db->query('SELECT 1 FROM '.$db->prefix.'reports WHERE zapped IS NULL') or error('Unable to fetch reports info', __FILE__, __LINE__, $db->error());
if ($db->result($result_header))
$page_statusinfo[] = '<li class="reportlink"><span><strong><a href="admin_reports.php">'.$lang_common['New reports'].'</a></strong></span></li>';
}
if ($pun_config['o_maintenance'] == '1')
$page_statusinfo[] = '<li class="maintenancelink"><span><strong><a href="admin_options.php#maintenance">'.$lang_common['Maintenance mode enabled'].'</a></strong></span></li>';
}
require PUN_ROOT.'plugins/apms/header_add1.php';
if ($pun_user['g_read_board'] == '1' && $pun_user['g_search'] == '1')
{
$page_topicsearches[] = '<a href="search.php?action=show_replies" title="'.$lang_common['Show posted topics'].'">'.$lang_common['Posted topics'].'</a>';
$page_topicsearches[] = '<a href="search.php?action=show_new" title="'.$lang_common['Show new posts'].'">'.$lang_common['New posts header'].'</a>';
}
}
// Quick searches
if ($pun_user['g_read_board'] == '1' && $pun_user['g_search'] == '1')
{
$page_topicsearches[] = '<a href="search.php?action=show_recent" title="'.$lang_common['Show active topics'].'">'.$lang_common['Active topics'].'</a>';
$page_topicsearches[] = '<a href="search.php?action=show_unanswered" title="'.$lang_common['Show unanswered topics'].'">'.$lang_common['Unanswered topics'].'</a>';
}
// Generate all that jazz
$tpl_temp = '<div id="brdwelcome" class="inbox">';
// The status information
if (is_array($page_statusinfo))
{
$tpl_temp .= "\n\t\t\t".'<ul class="conl">';
$tpl_temp .= "\n\t\t\t\t".implode("\n\t\t\t\t", $page_statusinfo);
$tpl_temp .= "\n\t\t\t".'</ul>';
}
else
$tpl_temp .= "\n\t\t\t".$page_statusinfo;
// Generate quicklinks
if (!empty($page_topicsearches))
{
$tpl_temp .= "\n\t\t\t".'<ul class="conr">';
$tpl_temp .= "\n\t\t\t\t".'<li><span>'.$lang_common['Topic searches'].' '.implode(' | ', $page_topicsearches).'</span></li>';
$tpl_temp .= "\n\t\t\t".'</ul>';
}
$tpl_temp .= "\n\t\t\t".'<div class="clearer"></div>'."\n\t\t".'</div>';
$tpl_main = str_replace('<pun_status>', $tpl_temp, $tpl_main);
// END SUBST - <pun_status>
// Slider si nous sommes sur l'index
if (basename($_SERVER['PHP_SELF']) == 'index.php')
{
?>
<!-- Début de nivo-slider -->
<div id="wrapper">
<div class="slider-wrapper theme-dark">
<div class="ribbon"></div>
<div id="slider" class="nivoSlider">
<img src="nivo-slider/images/essai1.png" alt="" />
<a href="http://dev7studios.com"><img src="nivo-slider/images/essai4.png" alt="" title="This is an example of a caption" /></a>
<img src="nivo-slider/images/essai2.png" alt="" />
<img src="nivo-slider/images/essai.png" alt="" />
<img src="nivo-slider/images/essai3.png" alt="" title="#htmlcaption" />
</div>
<div id="htmlcaption" class="nivo-html-caption">
<strong>This</strong> is an example of a <em>HTML</em> caption with <a href="#">a link</a>.
</div>
</div>
</div>
<script type="text/javascript" src="nivo-slider/scripts/jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="nivo-slider/jquery.nivo.slider.pack.js"></script>
<script type="text/javascript">
$(window).load(function() {
$('#slider').nivoSlider();
});
</script>
<!-- Fin de nivo-slider -->
<?php
}
// START SUBST - <pun_announcement>
if ($pun_user['g_read_board'] == '1' && $pun_config['o_announcement'] == '1')
{
ob_start();
?>
<div id="announce" class="block">
<div class="hd"><h2><span><?php echo $lang_common['Announcement'] ?></span></h2></div>
<div class="box">
<div id="announce-block" class="inbox">
<div class="usercontent"><?php echo $pun_config['o_announcement_message'] ?></div>
</div>
</div>
</div>
<?php
$tpl_temp = trim(ob_get_contents());
$tpl_main = str_replace('<pun_announcement>', $tpl_temp, $tpl_main);
ob_end_clean();
}
else
$tpl_main = str_replace('<pun_announcement>', '', $tpl_main);
// END SUBST - <pun_announcement>
// START SUBST - <pun_main>
ob_start();
define('PUN_HEADER', 1);Dernière modification par bibis57 (13-09-2012 15:54:36)
Hors ligne
- dois je laisser le bout de code du slider dans le main.tpl [...]
Non, supprime le 
- avec ta demarche mon slider a été déplacé sur la page index. Il etait entre la banniere et les 5 derniers topics alors que maintenant il est tout en haut de la page, avant ma banniere. Que dois je faire pour le replacer a sa position d'origine (entre la banniere et les 5 derniers topics)?
Ah! Dans ce cas excuse moi, mais la modification du header.php n'est plus nécessaire 
Il faut que tu mettes le code du slider juste après le code des dernières discussions dans l'index.php (poste le éventuellement pour qu'on regarde si tu ne vois pas - sur pastebin.com c'est mieux
)
Dernière modification par adaur (13-09-2012 17:50:04)
Hors ligne
comme tu l'as dans mon main.tpl, j'ai viré la partie dans le body mais je dois viré aussi la partie dans le head ou je la laisse ?
Bon, alors si je comprends bien, je vire ce que j'ai copié dans le header.php et je le met dans l'index.php derriere le code des dernieres discutions. j'ai regardé mais pour pas faire de connerie, je prefere te montrer.
J'ai posté mon index.php sur pastbin.com. voici le lien : http://pastebin.com/aK02W5Pm
Merci de ta precieuse aide 
Edit : Te casse pas la tete, j'ai essayé et j'ai trouvé comme un grand grace a ton aide
Me reste plus qu'a modifier le css pour bien placer le slider (il est pas centré
) Sinon, tout roule, il est bien entre ma banniere et les 5 derniers topics et ne s'affiche plus que sur l'index. Donc un grand merci à toi pour ta precieuse aide 
Je passe en réglé 
Dernière modification par bibis57 (13-09-2012 19:31:19)
Hors ligne
Pages : 1