Simple Machines Community Forum

SMF Support => Language Specific Support => Italiano (Italian) => Topic started by: Kenobis on January 15, 2017, 05:50:34 PM

Title: Banner pubblicitari su tema "apple"
Post by: Kenobis on January 15, 2017, 05:50:34 PM
Potete aiutarmi ad inserire un banner pubblicitario sul tema "apple" al centro sotto la barra del menù?

E' ovvio che su questo tema non funziona la Ad Management mod.

Grazie
Title: Re: Banner pubblicitari su tema "apple"
Post by: Darknico on January 16, 2017, 02:45:28 AM
Ciao!
È sempre utile anche linkare il tema in uso, ma immagino tu intenda questo:
http://custom.simplemachines.org/themes/index.php?lemma=2790

Quote from: Kenobis on January 15, 2017, 05:50:34 PM
E' ovvio che su questo tema non funziona la Ad Management mod.

Niente è ovvio, e poi, perchè dire così? Il tuo tema ha sia il file index.template, sia il file boardindex.template, che la mod va a toccare, basta semplicemente fare le modifiche a mano anche li perchè quelle porzioni di codice esistono ;)

dopo aver installato, modifica i seguenti file:

./Themes/[TEMAPPLE]/BoardIndex.template.php

cerca:
// Show some statistics if stat info is off.

aggiungi prima:

//Display ads on the board index
if (function_exists("show_boardAds"))
{
$ads = show_boardAds();
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}



cerca:
<tbody class="divider">
<tr>
<td colspan="4"></td>
</tr>
</tbody>';


aggiungi dopo:

echo '<tbody><tr><td colspan="4">';
//Display ads Between cats
if (function_exists("show_category"))
{
$ads = show_category($category['id']);
if(!empty($ads))
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
unset($ads);
}
echo ' </td></tr></tbody>';



./Themes/[TEMAPPLE]/Index.template.php

cerca:
echo '
<input type="hidden" name="hash_passwrd" value="" />
</form>';
}


aggiungi prima:

// Begin Ad  management Location - Welcome Area/User Information Box

if (function_exists("show_welcomeAds"))
{
$ads = show_welcomeAds();
if(!empty($ads))
{
echo '<td class="windowbg2">';
if($ads['type']==0)
echo $ads['content'];
else
eval($ads['content']);
echo '</td>';
}
unset($ads);
}

// End Ad  management Location - Welcome Area/User Information Box




e come per magia, funzionerà ;)

P.S. se ti serve la traduzione, la trovi qui:
http://www.italiansmf.net/forum/index.php?action=kb;area=article;cont=5