Fork me on GitHub

Rapport de message :*
 

Re: image aléatoire dans le header au chargement

Titre du sujet : Re: image aléatoire dans le header au chargement
par mistertiti sur 27/09/2011 21:18:09

Merci Kris pour ta réponse.

je suis allez sur google (mon ami) bien entendu après avoir visualisé les sujets sur xoops. J'ai bien aussi essayé pas mal de combinaisons (sans résultat).
mon réel problème n'est pas de chercher des codes sur internet mais plutôt de savoir ou les placer...

dans le fichier header.html :
<div id="xo-banner" class="<{$xoops_dirname}><{if $xoops_banner and $xoops_banner != '&nbsp;'}> commercial<{/if}>">
    <!-- 
logo and link homepage -->
    <
div id="xo-headerlogo"><a href="<{xoAppUrl /}>" title="<{$xoops_sitename}> - <{$xoops_slogan}>"><img src="<{xoImgUrl img/logo.png}>" alt="<{$xoops_sitename}>" /></a></div>
    <!-- 
rss feed link -->
    <{if 
$theme_view_rssheader}><{includeq file="$theme_name/xo_rssheader.html"}><{/if}>
    <!-- 
banner -->
    <{if 
$xoops_banner and $xoops_banner != '&nbsp;'}>
        <
div id="xo-headerbanner"><{$xoops_banner|smarty:nodefaults}></div>
    <{/if}>
</
div>


je ne vois pas quoi changer, ni ou rajouter...
dans le fichier théme.html idem:
<!DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Transitional//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd'>
<
html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<{$xoops_langcode}>" lang="<{$xoops_langcode}>">
<
head>
<!-- 
Theme name -->
    <{
assign var=theme_name value=$xoTheme->folderName}>
<!-- 
Directory html blocks files or additional html files by include -->
    <{
assign var=theme_name value=$xoTheme->folderName|cat:'/xotpl'}>
<!-- 
Directory html plugins files -->
    <{
assign var=theme_plugin value=$xoTheme->folderName|cat:'/xoplugins'}>
<!-- 
Directory html javascript files -->
    <{
assign var=theme_js value=$xoTheme->folderName|cat:'/js'}>

<{
php}>
/** If a module defines its own canvas template (located themes/themename/modules/dirname/xo_canvas.html), take it; otherwise the default canvas (themes/themename/xotpl/xo_canvas.html) is used. */
    
if(file_exists(XOOPS_ROOT_PATH."/themes/".$this->_tpl_vars["xoops_theme"]."/modules/".$this->_tpl_vars["xoops_dirname"]."/xo_canvas.html")) {
        
$this->assign("canvas_template"$this->_tpl_vars["xoops_theme"]."/modules/".$this->_tpl_vars["xoops_dirname"]."/xo_canvas.html");
    }else{
        
$this->assign("canvas_template"$this->_tpl_vars["xoops_theme"]."/xotpl/xo_canvas.html");
    }
/** Defined an extra SMARTY variable $xoops_themeurl, which is identical to $xoops_imageurl, for literal consistence only */
    
$this->assign("xoops_themeurl"$this->_tpl_vars["xoops_url"]."/themes/".$this->_tpl_vars["xoops_theme"]);
/** Defined an extra SMARTY variable $xoops_module_theme */
    
$this->assign("xoops_module_theme"$this->_tpl_vars["xoops_theme"]."/modules/".$this->_tpl_vars["xoops_dirname"]);
/** If a module has its own css (located themes/themename/modules/dirname/style.css), append it to $xoops_module_header */
    
if(file_exists(XOOPS_ROOT_PATH."/themes/".$this->_tpl_vars["xoops_theme"]."/modules/".$this->_tpl_vars["xoops_dirname"]."/style.css")) {
        
$this->assign("xoops_module_header"
        
$this->_tpl_vars["xoops_module_header"]."n".
        
"<link rel="stylesheet" type="text/css" media="screen,projection" href="".$this->_tpl_vars["xoops_themeurl"]."/modules/".$this->_tpl_vars["xoops_dirname"]."/style.css"/>n");
    }
/** Defined an extra SMARTY variable $modulename for display current module name defined by webmaster in xoops administration */
    
GLOBAL $xoopsModule
    
$modulename = (isset($xoopsModule) ? $xoopsModule->getVar('name') :'system');
    
$GLOBALS['xoopsTpl']->assign('modulename'$modulename); 
<{/
php}>
    
<{
includeq file="$canvas_template"}>


partout on parle de mettre des code dans un BODY et nul part sur Xoops on en vois un...

il y a bien ça aussi:
http://www.jscs.org/scripts30-JS.htm

mais ou le positionner???
dans mon style.css j'ai bien trouvé mon image:

#xo-banner { width:1000px; height:291px; margin:0;background:url(../img/header2.jpg) top no-repeat;}


mais ça résolu pas mon PB

Propulsé avec XOOPS | Graphisme adapté par Tatane, Grosdunord, Montuy337513

36 Personne(s) en ligne (28 Personne(s) connectée(s) sur Forum) | Utilisateur(s): 0 | Invité(s): 36 | Plus ...