Oui, je pense qu'il veut dire ça.bilos a dit:c bien ca ?
bilos a dit:ah je comprends tu veux inclure Adsense
entre les posts d'un seul sujet
cad dans entre les réponses
c bien ca ?
//
// Okay, let's do the loop, yeah come on baby let's do the loop
// and it goes like this ...
//
for($i = 0; $i < $total_posts; $i++)
{
if ($i=="0") {
$adblock = $business;
} else {
$adblock = "";
}
$business = <<<EOM
<tr><td colspan=2 align=center>
Insère ton Google Adsense ici
</td></tr>
<tr><td class="spaceRow" colspan="2" height="1"><img
src="templates/subSilver/images/spacer.gif"
alt="" width="1" height="1" /></td>
</tr>
EOM;
$template->assign_block_vars('postrow', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'AD_BLOCK' => $adblock,
<!-- END postrow -->
{postrow.AD_BLOCK}
bilos a dit:Éditez VIEWTOPIC.PHP
Dans viewtopic.php dans le dossier parent phpBB à l’environ de la ligne 826, tu trouve:
Juste après ca commence la commande de looping entre les postsCode:// // Okay, let's do the loop, yeah come on baby let's do the loop // and it goes like this ... //
Tu met juste aprèsCode:for($i = 0; $i < $total_posts; $i++) {
En haut j’ai defini la variable $business ( tu peux choisir n’importe…)Code:if ($i=="0") { $adblock = $business; } else { $adblock = ""; }
Code:$business = <<<EOM <tr><td colspan=2 align=center>
Insère ton script qui fait appel à Adsense ici
La structure du tableau est importante :Code:</td></tr> <tr><td class="spaceRow" colspan="2" height="1"><img src="templates/subSilver/images/spacer.gif" alt="" width="1" height="1" /></td> </tr> EOM;
Le premier bloc définit ton code Adsense
Le second c’est pour un séparateur horizontal
Défile un peu à l’environ de la 1170 tu trouveras un bloc de déclaration des variables qui commence par :
Dans ce block, ajoute :Code:$template->assign_block_vars('postrow', array( 'ROW_COLOR' => '#' . $row_color, 'ROW_CLASS' => $row_class,
Enregistre le fichierCode:'AD_BLOCK' => $adblock,
VIEWTOPIC_BODY.TPL
Ouvre le dossier de ta template
On va éditer maintenant viewtopic_body.tpl
En bas au niveau de la ligne 61 tu trouve:
Juste au-dessus tu insère:Code:<!-- END postrow -->
Enregistre le fichier et c’est finiCode:{postrow.AD_BLOCK}
'ADSENSE' => sprintf($adsense),
$template->assign_vars(array(
Madrileño a dit:Bilos a résumé la solution sur le post :
https://www.webrankinfo.com/forum/topic ... htm#839662
Si vous avez une erreur après avoir vérifier la réponse,
vous pouvez ajouter une réponse sur le topic avec ce que vous ne comprenez pas.
Le lien était à titre d'information, pour une vérification du code et pour ceux qui n'avaient pas lu le topic.gauksque a dit:mais je sais qu'il a écrit la solution sur cette PAGE !!!!!!!!!!!!!!!!!!!!!! Grrrrrrrrrrrrrrrrrrrrrrrr
Parse error: syntax error, unexpected T_SL in /home/dounia/public_html/forum/viewtopic.php on line 847
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);
//
// Start initial var setup
//
$business = <<<EOM
<tr><td colspan=2 align=center bgcolor="#E6E6E6">
<script type="text/javascript"><!--
google_ad_client = "000000000000000";
google_ad_width = 728;
google_ad_height = 90;
google_ad_format = "728x90_as";
google_ad_type = "image";
................
.................
oogle_color_border = "FFFFFF";
google_color_bg = "FFFFFF";
google_color_link = "0000FF";
google_color_text = "000000";
google_color_url = "000099";
google_ui_features = "rc:6";
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</td></tr>
<tr><td class="spaceRow" colspan="2" height="1"><img
src="templates/subSilver/images/spacer.gif"
alt="" width="1" height="1" /></td>
</tr>
EOM;
➡️ Offre MyRankingMetrics ⬅️
pré-audit SEO gratuit avec RM Tech (+ avis d'expert)
coaching offert aux clients (avec Olivier Duffez ou Fabien Faceries)
Voir les détails ici