phpBB Italia chiude!
phpBB Italia ringrazia tutti gli utenti che hanno dato fiducia al nostro progetto per ben 9 anni, e che, grazie al grande lavoro fatto da tutto lo Staff (rigorosamente a titolo gratuito), hanno portato il portale a diventare il principale punto di riferimento italiano alla piattaforma phpBB.

Purtroppo, causa motivi personali, non ho più modo di gestirlo e portarlo avanti. Il forum viene ora posto in uno stato di sola lettura, nonché un archivio storico per permettere a chiunque di fruire di tutte le discussioni trattate.

Il nuovo portale di assistenza per l'Italia di phpBB diventa phpBB-Store.it, cui ringrazio per aver deciso di portare avanti questo grande progetto.

Grazie ancora,
Carlo - Amministratore di phpBB Italia

Header random

Supporto stili in generale.
Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Header random

Messaggio da Haku » 05/12/2010, 20:14

Ok,seguito la guida => http://www.phpbb.it/faq/7-faq-stili/25- ... ine-random,
ma non mi si vedono i banner :/
Ho ricontrollato,e le due modifiche ai file sono correttissimi (sono semplici) ma per curiosità (magari ho comunque sbagliato) ho modificato il pezzo in cui dice:
Modifica NUMERO-DELLE-IMMAGINI con il mumero massimo di immagini create.
in questo modo no?

Codice: Seleziona tutto

'{RANDOM_HEADER}'           => mt_rand(1, 4)
(ho 4 banner tutti con estensione uguale)
Svuotate le cache ovunque.
Io avavo poi come link per il banner nel css questo:
background: url(link);

Ho provato anche a metterlo come:
background-image: url(link);

Ma nulla ugualmente.

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Header random

Messaggio da Micogian » 05/12/2010, 21:49

Avevo già trattato un argomento del genere, sia per un logo o un banner è la stessa cosa: http://www.phpbbitalia.net/forum/suppor ... dom#p16253

Avatar utente
Barrnet
Leader Moderatori
Leader Moderatori
Messaggi: 3124
Iscritto il: 04/07/2010, 23:31
Sesso: Maschio
Versione: 3.0.10
Server: UNIX/Linux
PHP: 5.3.10
Database: MySQL 5.1.61-community-log
Contatta:

Re: Header random

Messaggio da Barrnet » 05/12/2010, 22:42

È la guida in italiano che è sbagliata :D usa quella in inglese :)

Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Header random

Messaggio da Haku » 06/12/2010, 0:33

Bingo,ma se io gestisco il banner tramite css perchè nell'oveall ho eliminato le opzioni,cosa devo inserire?

@Barnnet: la guida in inglese,non ti fa fare le stesse cose?Credo di si,ma io gestisco tramite css,non tramite l'overall.

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Header random

Messaggio da Micogian » 06/12/2010, 1:00

Nell' overall_header non serve l'opzione perchè la variabile è dichiarata prima, nel file php.
E' il file php che sceglie il banner e assegna alla variabile l'immagine corrispondente.
Ovvio che poi alla variabile deve corrispondere il banner da visualizzare e quindi non va bene nel css.
Si potrebbe anche fare 4 diverse "class", una per immagine ma poi ci vuole sempre la condizione che sceglie quale usare, ma più semplicemente si potrebbe assegnare tramite una variabile,il valore della "class" da usare.
In pratica il file php sceglie quale bannere usare e qual'è la "class" corrispondente che viene passata al Template.

Io trovo più semplice la mia idea, il random viene fatto da php che stabilisce quale banner visualizzare e la variabile passata al Template ha sempre lo stesso nome, solo che cambiano le immagini.
Le tre foto al centro della mia Home Page funzionano in questo modo: ci sono 5 immagini selezionate i cui dati sono memorizzati in un semplice file di testo e il sistema Random ne sceglie 3 con ordine casuale.

Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Header random

Messaggio da Haku » 06/12/2010, 1:07

A sto punto dovrei stravolgere un pò di cose,cosa che non vorrei far perchè una soluzione penso la si trovi (magari segnalate a phpbb.it che la guida non funziona).

Magari se capissi cosa non va nella guida,potrei correggere...il fatto è che non visualizza le immagini,e aggirare le cose in altro modo,dopo che mi sono fatto il mazzo per impostare dimesioni fisse e modifiche,non voglio ritoglierle e aver fatto così un lavoro a vuoto.

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Header random

Messaggio da Micogian » 06/12/2010, 9:06

Si certo, ma penso che la mia soluzione sia molto semplice e funzionale, poi ognuno fa quello che crede opportuno.

EDIT:
comunque bisognerebbe guardare l'insieme dei file modificati perchè a volte basta un piccolo errore che php non funziona.
Ad esempio tu hai inserito la riga di codice

Codice: Seleziona tutto

'{RANDOM_HEADER}'           => mt_rand(1, 4)
ora, se questa è l'ultima dell'array può anche essere corretta, se non è l'ultima manca la virgola alla fine della riga.
Per lo stesso motivo nella guida viene indicato di sostituire

Codice: Seleziona tutto

'{S_USER_LANG}' => $user['user_lang']
con

Codice: Seleziona tutto

'{S_USER_LANG}' => $user['user_lang'],
'{RANDOM_HEADER}' => mt_rand(1, NUMERO-DELLE-IMMAGINI)
L'ultima riga può stare senza virgola ma non la penultima, bisogna vedere se è stata messa, io non ho notato errori nella Guida.
La funzione si basa sul comando php mt_rand(min,max) che fornisce un numero casuale tra min e max, ma poi devono esistere i file header_random_{RANDOM_HEADER}.ESTENSIONE

Il problema è che tu hai messo l'immagine nel css e quindi non puoi vedere nel codice sorgente della pagina se viene inserito il nome del file corretto.
Potresti però aggiungere all'overall_header l'immagine con

Codice: Seleziona tutto

<img src="{T_THEME_PATH}/images/header_random_{RANDOM_HEADER}.ESTENSIONE">
Per lo meno vedi cosa viene fuori.

Avatar utente
Haku
Utente
Utente
Messaggi: 2529
Iscritto il: 22/09/2009, 22:36
Sesso: Maschio
Versione: 3.0.9
Server: UNIX/Linux
Contatta:

Re: Header random

Messaggio da Haku » 06/12/2010, 20:10

Alura,i file sono corretti (guardando le modifiche avevo notato infatti che dovevo già stare attento alle virgole :P)

Codice: Seleziona tutto

		'T_STYLESHEET_NAME'		=> $user->theme['theme_name'],
		'RANDOM_HEADER'         => mt_rand(1, 4),
e

Codice: Seleziona tutto

		'{S_USER_LANG}'				=> $user['user_lang'],
		'{RANDOM_HEADER}'           => mt_rand(1, 4)
	);
Poi nel css ho questo:

Codice: Seleziona tutto

#wrapheader {
   min-width: 900px;
   width: 900px;
   min-height:150px;
   height: 150px;
   height: auto !important;
   background: url(http://www.rpgmkr.net/forum/styles/rpgmkr/theme/images/bannerrpgmkrnatalizio.png) #b3c7d7;
   /* Bordo a41b2f11111 */
   background-repeat: no-repeat;
   padding: 0;
   margin: 0 auto;
}
Ora,per fare la prova nell'overall,cosa devo fare precisamente?Purtroppo dentro a quel file ho perso un pò il filo dato che poi ho gestito tutto tramite css...

Codice: Seleziona tutto

<!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" dir="{S_CONTENT_DIRECTION}" lang="{S_USER_LANG}" xml:lang="{S_USER_LANG}">
<head>
<link rel="shortcut icon" href="http://rpgmkr.net/forum/folder.ico" type="image/icon" />
{SEO_BASE_HREF}

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" />
<title>{PAGE_TITLE}<!-- IF S_IN_MCP --> &bull; {L_MCP}<!-- ELSEIF S_IN_UCP --> &bull; {L_UCP}<!-- ENDIF --></title>
<meta http-equiv="content-language" content="{S_USER_LANG}" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="imagetoolbar" content="no" />
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7; IE=EmulateIE9" />
{META_TAG}
{META}
<!-- BEGIN gym_rsslinks -->
<link rel="alternate" type="application/rss+xml" title="{gym_rsslinks.TITLE}" href="{gym_rsslinks.URL}" />
<!-- END gym_rsslinks -->

<!-- IF S_ENABLE_FEEDS -->
<!-- IF S_ENABLE_FEEDS_OVERALL --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {SITENAME}" href="{U_FEED}" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_NEWS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_NEWS}" href="{U_FEED}?mode=news" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_FORUMS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_ALL_FORUMS}" href="{U_FEED}?mode=forums" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPICS --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_NEW}" href="{U_FEED}?mode=topics" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPICS_ACTIVE --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FEED_TOPICS_ACTIVE}" href="{U_FEED}?mode=topics_active" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_FORUM and S_FORUM_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_FORUM} - {FORUM_NAME}" href="{U_FEED}?f={S_FORUM_ID}" /><!-- ENDIF -->
<!-- IF S_ENABLE_FEEDS_TOPIC and S_TOPIC_ID --><link rel="alternate" type="application/atom+xml" title="{L_FEED} - {L_TOPIC} - {TOPIC_TITLE}" href="{U_FEED}?f={S_FORUM_ID}&t={S_TOPIC_ID}" /><!-- ENDIF -->
<!-- ENDIF -->

<link rel="stylesheet" href="{T_STYLESHEET_LINK}" type="text/css" />
<!-- MODIFICA JQUERY PHPBBCODES -->
    <style type="text/css">

    div.jGrowl {
       padding:          10px;
       z-index:          9999;
    }

    /** Special IE6 Style Positioning **/
    div.ie6 {
       position:          absolute;
    }

    div.ie6.top-right {
       right:             auto;
       bottom:          auto;
       left:             expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
         top:             expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    }

    div.ie6.top-left {
       left:             expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
       top:             expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    }

    div.ie6.bottom-right {
       left:             expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
       top:             expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    }

    div.ie6.bottom-left {
       left:             expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
       top:             expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
    }

    div.ie6.center {
       left:             expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' );
       top:             expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' );
       width:             100%;
    }

    /** Normal Style Positions **/
    body > div.jGrowl {
       position:         fixed;
    }

    body > div.jGrowl.top-left {
       left:             0px;
       top:             0px;
    }

    body > div.jGrowl.top-right {
       right:             0px;
       top:             0px;
    }

    body > div.jGrowl.bottom-left {
       left:             0px;
       bottom:            0px;
    }

    body > div.jGrowl.bottom-right {
       right:             0px;
       bottom:          0px;
    }

    body > div.jGrowl.center {
       top:             0px;
       width:             50%;
       left:             25%;
    }

    /** Cross Browser Styling **/
    div.center div.jGrowl-notification, div.center div.jGrowl-closer {
       margin-left:       auto;
       margin-right:       auto;
    }

    div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer {
       background-color:       #000;
       color:                #fff;
       opacity:             .85;
       filter:             alpha(opacity = 85);
       zoom:                1;
       width:                235px;
       padding:             10px;
       margin-top:          5px;
       margin-bottom:          5px;
       font-family:          Tahoma, Arial, Helvetica, sans-serif;
       font-size:             12px;
       text-align:          left;
       display:             none;
       -moz-border-radius:    5px;
       -webkit-border-radius:   5px;
    }

    div.jGrowl div.jGrowl-notification {
       min-height:          40px;
    }

    div.jGrowl div.jGrowl-notification div.header {
       font-weight:          bold;
       font-size:            10px;
    }

    div.jGrowl div.jGrowl-notification div.close {
       float:                right;
       font-weight:          bold;
       font-size:             12px;
       cursor:               pointer;
    }

    div.jGrowl div.jGrowl-closer {
       height:             15px;
       padding-top:          4px;
       padding-bottom:       4px;
       cursor:             pointer;
       font-size:            11px;
       font-weight:          bold;
       text-align:          center;
    }

    </style>
      <script type="text/javascript" src="{ROOTPATH}images/jgrowl/jquery-1.3.2.js"></script>
    <script type="text/javascript" src="{ROOTPATH}images/jgrowl/jquery.ui.all.js"></script>
    <script type="text/javascript" src="{ROOTPATH}images/jgrowl/jquery.jgrowl.js"></script>
<!-- FINE MODIFICA -->

<!-- IF UA_GREY_STAR_SRC -->
<!-- INCLUDE kb/rating_js.html -->
<!-- ENDIF -->
<script type="text/javascript">
// <![CDATA[
<!-- IF S_USER_PM_POPUP -->
	if ({S_NEW_PM})
	{
		popup('{UA_POPUP_PM}', 400, 225, '_phpbbprivmsg');
	}
<!-- ENDIF -->

function popup(url, width, height, name)
{
	if (!name)
	{
		name = '_popup';
	}

	window.open(url.replace(/&/g, '&'), name, 'height=' + height + ',resizable=yes,scrollbars=yes,width=' + width);
	return false;
}

// www.phpBB-SEO.com SEO TOOLKIT BEGIN
function jumpto() {
	var page = prompt('{LA_JUMP_PAGE}:', '{ON_PAGE}');
	var per_page = '{PER_PAGE}';
	var base_url = '{A_BASE_URL}';
	var seo_delim_start = '{SEO_START_DELIM}';
	var seo_static_pagination = '{SEO_SATIC_PAGE}';
	var seo_ext_pagination = '{SEO_EXT_PAGE}';
	if (page !== null && !isNaN(page) && page == Math.floor(page) && page > 0) {
		var seo_page = (page - 1) * perpage;
		var anchor = '';
		var anchor_parts = base_url.split('#');
		if ( anchor_parts[1] ) {
			base_url = anchor_parts[0];
			anchor = '#' + anchor_parts[1];
		}
		if ( base_url.indexOf('?') >= 0 ) {
			document.location.href = base_url.replace(/&/g, '&') + '&start=' + seo_page + anchor;
		} else if ( seo_page > 0 ) {
			var seo_type1 = base_url.match(/\.[a-z0-9]+$/i);
			if (seo_type1 !== null) {
				document.location.href = base_url.replace(/\.[a-z0-9]+$/i, '') + seo_delim_start + seo_page + seo_type1 + anchor;
			}
			var seo_type2 = base_url.match(/\/$/);
			if (seo_type2 !== null) {
				document.location.href = base_url + seo_static_pagination + seo_page + seo_ext_pagination + anchor;
			}
		} else {
			document.location.href = base_url + anchor;
		}
	}
}
var seo_external = {SEO_EXTERNAL};
var seo_external_sub = {SEO_EXTERNAL_SUB};
var seo_ext_classes = {SEO_EXT_CLASSES};
var seo_hashfix = {SEO_HASHFIX};
/**
*  phpbb_seo_href()
*  Fixes href="#something" links with virtual directories
*  Optionally open external or marked with a css class links in a new window
*  in a XHTML 1.x compliant way.
*/
function phpbb_seo_href() {
	var current_domain = document.domain.toLowerCase();
	if (!current_domain || !document.getElementsByTagName) return;
	if (seo_external_sub && current_domain.indexOf('.') >= 0) {
		current_domain = current_domain.replace(new RegExp(/^[a-z0-9_-]+\.([a-z0-9_-]+\.([a-z]{2,6}|[a-z]{2,3}\.[a-z]{2,3}))$/i), '$1');
	}
	if (seo_ext_classes) {
		var extclass = new RegExp("(^|\s)(" + seo_ext_classes + ")(\s|$)");
	}
	if (seo_hashfix) {
		var basehref = document.getElementsByTagName('base')[0];
		if (basehref) {
			basehref = basehref.href;
			var hashtest = new RegExp("^(" + basehref + "|)#[a-z0-9_-]+$");
			var current_href = document.location.href.replace(/#[a-z0-9_-]+$/i, "");
		} else {
			seo_hashfix = false;
		}
	}
	var hrefels = document.getElementsByTagName("a");
	var hrefelslen = hrefels.length;
	for (var i = 0; i < hrefelslen; i++) {
		var el = hrefels[i];
		var hrefinner = el.innerHTML.toLowerCase();
		if (el.onclick || (el.href == '') || (el.href.indexOf('javascript') >=0 ) || (hrefinner.indexOf('<a') >= 0) ) {
			continue;
		}
		if (seo_hashfix && el.hash && hashtest.test(el.href)) {
			el.href = current_href + el.hash;
		}
		if (seo_external) {
			if ((el.href.indexOf(current_domain) >= 0) && !(seo_ext_classes && extclass.test(el.className))) {
				continue;
			}
			el.onclick = function () { window.open(this.href); return false; };
		}
	}
}
window.onload = function() {
	if (seo_external || seo_hashfix) {
		phpbb_seo_href();
	}
	// here you can add other window.onload events
}
// www.phpBB-SEO.com SEO TOOLKIT END

/**
* Find a member
*/
function find_username(url)
{
	popup(url, 760, 570, '_usersearch');
	return false;
}

/**
* Mark/unmark checklist
* id = ID of parent container, name = name prefix, state = state [true/false]
*/
function marklist(id, name, state)
{
	var parent = document.getElementById(id);
	if (!parent)
	{
		eval('parent = document.' + id);
	}

	if (!parent)
	{
		return;
	}

	var rb = parent.getElementsByTagName('input');
	
	for (var r = 0; r < rb.length; r++)
	{
		if (rb[r].name.substr(0, name.length) == name)
		{
			rb[r].checked = state;
		}
	}
}

<!-- IF ._file -->

	/**
	* Play quicktime file by determining it's width/height
	* from the displayed rectangle area
	*
	* Only defined if there is a file block present.
	*/
	function play_qt_file(obj)
	{
		var rectangle = obj.GetRectangle();

		if (rectangle)
		{
			rectangle = rectangle.split(',')
			var x1 = parseInt(rectangle[0]);
			var x2 = parseInt(rectangle[2]);
			var y1 = parseInt(rectangle[1]);
			var y2 = parseInt(rectangle[3]);

			var width = (x1 < 0) ? (x1 * -1) + x2 : x2 - x1;
			var height = (y1 < 0) ? (y1 * -1) + y2 : y2 - y1;
		}
		else
		{
			var width = 200;
			var height = 0;
		}

		obj.width = width;
		obj.height = height + 16;

		obj.SetControllerVisible(true);

		obj.Play();
	}
<!-- ENDIF -->

// ]]>
</script>
<!-- collpase categories MOD -->
<script type="text/javascript" src="{ROOT_PATH}js/coll_script.js"></script>
<!-- collpase categories MOD -->
<!-- INCLUDE gallery/plugins_header.html -->
<!-- MODIFICA JQUERY PHPBBCODES -->
    <script type="text/javascript">

          // In case you don't have firebug...
          if (!window.console || !console.firebug) {
             var names = ["log", "debug", "info", "warn", "error", "assert", "dir", "dirxml", "group", "groupEnd", "time", "timeEnd", "count", "trace", "profile", "profileEnd"];
             window.console = {};
             for (var i = 0; i < names.length; ++i) window.console[names[i]] = function() {};
          }

          (function($){

             $(document).ready(function(){

                // This value can be true, false or a function to be used as a callback when the closer is clciked
                $.jGrowl.defaults.closer = function() {
                   console.log("Closing everything!", this);
                };
                
                // A callback for logging notifications.
                $.jGrowl.defaults.log = function(e,m,o) {
                   $('#logs').append("<div><strong>#" + $(e).attr('id') + "</strong> <em>" + (new Date()).getTime() + "</em>: " + m + " (" + o.theme + ")</div>")
                }            
                <!-- IF S_DISPLAY_PM and (S_USER_NEW_PRIVMSG or S_USER_UNREAD_PRIVMSG) -->
                $.jGrowl("Hai {PRIVATE_MESSAGE_INFO}<!-- IF PRIVATE_MESSAGE_INFO_UNREAD --> e {PRIVATE_MESSAGE_INFO_UNREAD}<!-- ENDIF -->.", { header: 'Ciao {S_USERNAME}', sticky: true, });
                <!-- ENDIF -->
                
                <!-- IF not S_IS_BOT and not S_USER_LOGGED_IN -->
                $.jGrowl("Benvenuto su {SITENAME} - Se sei un Utente Registrato, esegui il Log-In, altrimenti Registrati sul Forum.", { header: 'Benvenuto Visitatore', sticky: true, });
                <!-- ENDIF -->
             });
          })(jQuery);

          </script>
<!-- FINE MODIFICA -->
</head>
<!-- Esolitos -->
<div class="wrapp_all">
<!-- And Esolitos -->
<body class="{S_CONTENT_DIRECTION}">
<!-- Barra Header UP -->
<div style="position: absolute; top: 0; left: 0; right: 0; z-index: 99999; height: 28px; width: 900px; margin: 0 auto; text-align: center; vertical-align: middle; color: black;"> 

<a href="http://www.rpgmkr.net/forum/chat" style="vertical-align: middle; color: #fff; padding: 25px 10px 0px 10px; margin: 0;"><img src="http://img221.imageshack.us/img221/736/network.png" alt="RMRK Network"></img></a>
<a href="https://www.netsons.com/" style="vertical-align: middle; color: #000000; padding: 20px 10px 0px 10px; margin: 0;"><img src="http://xiradorn.it/forum/styles/prosilver_se/theme/images/icon_bump.gif" alt="Hosted by Netsons.com"></img>Hosted by Netsons.com</a>
<a href="http://www.play-asia.com/paOS-13-71-7s-49-en-70-22a2.html" style="vertical-align: middle; color: #000000; padding: 20px 10px 0px 10px; margin: 0;"><img src="http://www.rpgmakervx.com/images/shop.gif" alt="Acquista Rpg Maker XP ora!"></img>Acquista Rpg Maker XP ora!</a>
<a href="http://www.play-asia.com/paOS-13-71-7s-49-en-15-rpg%20maker%20vx-70-2b0a.html" style="vertical-align: middle; color: #000000; padding: 20px 10px 0px 10px; margin: 0;"><img src="http://www.rpgmakervx.com/images/shop.gif" alt="Acquista Rpg Maker VX ora!"></img>Acquista Rpg Maker VX ora!</a>
<a href="http://www.rpgmakerweb.com/" style="vertical-align: middle; color: #000000; padding: 20px 10px 0px 10px; margin: 0;"><img src="http://www.rpgmakervx.com/images/bookmark_icon.gif" alt="Sito Ufficiale Rpg Maker"></img>Sito Ufficiale Rpg Maker</a>
</div>
<!-- Fine Barra Header -->

<a name="top"></a>
<table class="bodyline" width="100%" cellspacing="0" cellpadding="0" border="0">
    <tr>
	    <td style="padding: 0px;">

<div id="wrapheader" style="position: relative;">
<!-- header_cliccabile_START -->
<a href="{U_INDEX}"  style="width: 100%; height: 100%; display: block; position: absolute;">&nbsp;</a>
<!-- header_cliccabile_END -->
		<table class="topbkg" width="100%" cellspacing="0">
		    <tr>

			</tr>
		</table>
	</div>

	<!--CANC-->
	<div id="xnavbar_navbar">
		<table width="918px" min-width="918px" cellspacing="0">
		<tr>
			<td width="15" id="left">&nbsp;</td>
			<td id="active"><a href="http://rpgmkr.net/forum/portal.php">Portale</a></td>
			<td><a href="http://rpgmkr.net/forum/regolamento-t2.html">Regolamento</a></td>
			<td><a href="http://www.rpgmkr.net/forum/rivista_mkr.php">Rivista MKR</a></td>
<!-- IF S_USER_LOGGED_IN -->
<td><a href="#" onclick="window.open('http://www.rpgmkr.net/forum/chat/', 'Chat RpgMkr.net', 'screenX='+(screen.width-800)/2+',screenY='+(screen.height-600)/2+',width=800,height=600,resizable=yes');">Chat RMK ({CHAT_USERS_ONLINE})</a></td>
<!-- ENDIF -->
<td><a href="http://www.rpgmkr.net/forum/games.php">Giochi</a></td>
			<td colspan="2"></td>
                        <td id="search_box">
				<form action="/forum/search.php" id="cse-search-box">
					<fieldset>
						<input type="text" name="keywords" maxlength="128" value="<!-- IF SEARCH_WORDS-->{SEARCH_WORDS}<!-- ELSE -->{L_SEARCH_MINI}<!-- ENDIF -->" 
onclick="if(this.value=='{LA_SEARCH_MINI}')this.value='';" onblur="if(this.value=='')this.value='{LA_SEARCH_MINI}';" />
					</fieldset>
				</form>
			</td>
			<td width="15" id="right">&nbsp;</td>
		</tr>
		</table>
	</div><br />

          <table id="xnavbar_navbar" style="margin-top: 0px;" width="918px" min-width="918px" cellspacing="0">
             <tr>
                <td><a href="http://www.rpgmkr.net/forum/animefacemaker.php"><span>Anime Face Maker</span></a></td>
                <td><a href="http://www.rpgmkr.net/forum/facemaker.php"><span>Face Maker</span></a></td>
                <td><a href="http://www.rpgmkr.net/forum/charamakerxp.php"><span>Chara Maker XP</span></a></td>
                <td><a href="http://www.rpgmkr.net/forum/generatore_di_nomi.php"><span>Generatore di Nomi</span></a></td>
                <td><a href="http://www.rpgmkr.net/forum/palettecolori.php"><span>Palette Colori</span></a></td>
             </tr>
          </table>
<!--CANCEND-->

<div id="wrapcentre">
<table class="tablebg" cellspacing="1"  width="100%">
<tr>
<td class="row1" height="50px" width="73%">
<p class="breadcrumbs">
<a href="{U_INDEX}"><img class="inlineimg" border="0" src="{T_THEME_PATH}/images/folder.gif"  alt="" />&nbsp;<strong>{L_INDEX}</strong></a>
<!-- BEGIN navlinks --><strong> &#187;</strong>&nbsp;<a href="{navlinks.U_VIEW_FORUM}">{navlinks.FORUM_NAME}</a><!-- END navlinks -->
<br /><!-- IF TOPIC_TITLE --><!-- IF U_VIEW_TOPIC --><img class="inlineimg" border="0" src="{T_THEME_PATH}/images/folder2.gif" alt="" />&nbsp;<strong style="color:black!important;">{TOPIC_TITLE}</strong><!-- ENDIF --><!-- ENDIF --></p>

<div align="center"> <p><!-- IF U_RESTORE_PERMISSIONS --> &nbsp;<a href="{U_RESTORE_PERMISSIONS}">{L_RESTORE_PERMISSIONS}</a><!-- ENDIF -->
				<!-- IF S_BOARD_DISABLED and S_USER_LOGGED_IN --> &nbsp;<span style="color: red;">{L_BOARD_DISABLED}</span><!-- ENDIF --></p></div>
			</td>
<td class="row2" height="50px" width="27%"> <!-- INCLUDE menu1.html --></td></tr>
</table>
<!-- INCLUDE menu2.html --><br />
<!-- Modifica Selezione Host -->
<hr><br />
<center><!-- INCLUDE selectorhost_body.html --></center><br />
<hr>
<!-- Fine Modifica Host -->
    <br style="clear: both;" />
    <!-- INCLUDE breadcrumbs.html -->
    <br />

Avatar utente
Micogian
Leader Programmatori
Leader Programmatori
Messaggi: 3704
Iscritto il: 07/01/2010, 8:51
Versione: 3.2.0
Server: UNIX/Linux
PHP: 5.4.36
Database: MySQL 5.1.70-log
Località: Udine
Contatta:

Re: Header random

Messaggio da Micogian » 06/12/2010, 20:38

A parte qualche dubbio se ci vada una sola o due parentesi tonde di chiusura (dipende da come inizia l'array) di questo codice:

Codice: Seleziona tutto

      '{S_USER_LANG}'            => $user['user_lang'],
      '{RANDOM_HEADER}'           => mt_rand(1, 4)
   );
l'errore è macroscopico: se tu usi mt_rand(1,4) per ricavare un numero a caso, poi il numero da qualche parte lo devi usare.
La Guida è chiara; devi creare 4 immagini con lo stesso nome differenziate solo dal numero, cioè banner_1.png, banner_2.png, ecc. o come cavolo vuoi ma devono essere uguali.
Nel CSS devi mettere

Codice: Seleziona tutto

   background: url({T_THEME_PATH}/images/banner_{RANDOM_HEADER}.png) #b3c7d7;
A questo punto il banner visualizzato sarà quello relativo al numero rappresentato da {RANDOM_HEADER}
Altrimenti come fa a trovare il file bannerrpgmkrnatalizio.png ?
Fermo restando che i file li devi mettere nella cartella "images" del theme.

Avatar utente
Carlo
Amministratore
Amministratore
Messaggi: 9957
Iscritto il: 19/04/2009, 10:24
Sesso: Maschio
Versione: 3.2.0
Server: UNIX/Linux
PHP: 7.1.0
Database: MySQL(i) 10.0.27-MariaDB-cll-lve
Località: Puglia
Contatta:

Re: Header random

Messaggio da Carlo » 06/12/2010, 23:23

Questa MOD non fa al caso tuo?
MODs | Stili | Traduzioni MOD
Ogni MP contenente una richiesta di supporto verrà ignorato.

Rispondi

Torna a “Supporto stili”

Chi c’è in linea

Visitano il forum: Nessuno e 35 ospiti