[Résolu] Rentrer le code adsense au sein de coppermine

Consultez la formation à Google Analytics de WebRankInfo / Ranking Metrics

binocle
WRInaute discret
WRInaute discret
 
Messages: 164
Inscription: 12 Fév 2004

[Résolu] Rentrer le code adsense au sein de coppermine

Message le Mer Fév 02, 2005 11:54

Bonjour, j'au un petit problème avec le code adsense pour le rentrer dans un code php ...

voici le code php en question :

Code: Tout sélectionner
// HTML template for the image rating box
$template_image_rating = <<<EOT

        <tr>
                <td colspan="6" class="tableh2_compact"><b>{TITLE}</b> {VOTES}</td>
        </tr>
        <tr>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE0}" title="{RUBBISH}"><img src="images/rating0.gif" alt="{RUBBISH}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE1}" title="{POOR}"><img src="images/rating1.gif" alt="{POOR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE2}" title="{FAIR}"><img src="images/rating2.gif" alt="{FAIR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE3}" title="{GOOD}"><img src="images/rating3.gif" alt="{GOOD}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE4}" title="{EXCELLENT}"><img src="images/rating4.gif" alt="{EXCELLENT}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE5}" title="{GREAT}"><img src="images/rating5.gif" alt="{GREAT}" border="0" /><br /></a></td>
        </tr>

EOT;

// HTML template for the display of comments
$template_image_comments = <<<EOT

        <tr>
                <td>
                        <table width="100%" cellpadding="0" cellspacing="0">
                                <td class="tableh2_compact" nowrap>
                                        <b>{MSG_AUTHOR}</b>
<!-- BEGIN ipinfo -->


en fait, je voudrais inserer le code adsence au niveau de "html template for the display of comment",
mais quand je l'insère, ca désactive completement le code qui suit dans la page

exemple du code avec adsence:

Code: Tout sélectionner
HTML template for the image rating box
$template_image_rating = <<<EOT

        <tr>
                <td colspan="6" class="tableh2_compact"><b>{TITLE}</b> {VOTES}</td>
        </tr>
        <tr>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE0}" title="{RUBBISH}"><img src="images/rating0.gif" alt="{RUBBISH}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE1}" title="{POOR}"><img src="images/rating1.gif" alt="{POOR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE2}" title="{FAIR}"><img src="images/rating2.gif" alt="{FAIR}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE3}" title="{GOOD}"><img src="images/rating3.gif" alt="{GOOD}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE4}" title="{EXCELLENT}"><img src="images/rating4.gif" alt="{EXCELLENT}" border="0" /><br /></a></td>
                <td class="tableb_compact" width="17%" align="center"><a href="{RATE5}" title="{GREAT}"><img src="images/rating5.gif" alt="{GREAT}" border="0" /><br /></a></td>
        </tr>

EOT;

// HTML template for the display of comments
$template_image_comments = <<<EOT

        <tr><script type="text/javascript"><!--
google_ad_client = "pub-5021251884706330";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_channel ="";
google_color_border = "003366";
google_color_bg = "003366";
google_color_link = "FF6600";
google_color_url = "99CCFF";
google_color_text = "FFFFFF";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
                <td>
                        <table width="100%" cellpadding="0" cellspacing="0">
                  
                                <td class="tableh2_compact" nowrap>
                                        <b>{MSG_AUTHOR}</b>
<!-- BEGIN ipinfo -->
                                                                                 ({HDR_IP} [{RAW_IP}])
<!-- END ipinfo -->
                                </td>
                                <td class="tableh2_compact" align="right" width="100%">
<!-- BEGIN buttons -->
                                        <a href="javascript:;" onClick="blocking('cbody{MSG_ID}','', 'block'); blocking('cedit{MSG_ID}','', 'block'); return false;" title="{EDIT_TITLE}"><img src="images/edit.gif" border="0" align="absmiddle" ></a>
                                        <a href="delete.php?msg_id={MSG_ID}&what=comment"  onclick="return confirm('{CONFIRM_DELETE}');"><img src="images/delete.gif" border="0" align="absmiddle" ></a>
<!-- END buttons -->
                                </td>


Je comprend pas trop pourquoi, mais bon je m'y connais pas trop en PHP :wink:


Americas
WRInaute accro
WRInaute accro
 
Messages: 3380
Inscription: 24 Sep 2003

Message le Mer Fév 02, 2005 20:08

Dans mon fichier template.html j'ai rentré le code juste en dessous de ça :

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="top">{LANGUAGE_SELECT_FLAGS}</td></tr>
<tr> <td align="center" valign="top">{LANGUAGE_SELECT_LIST}
{THEME_SELECT_LIST}</td>
</tr>
</table>


Cherche ces lignes qui devraient se situer au milieu de la page... et ça devrait marcher :wink:

binocle
WRInaute discret
WRInaute discret
 
Messages: 164
Inscription: 12 Fév 2004

Message le Jeu Fév 03, 2005 11:35

Merci amméricas, mais j'arrive a rentrer le code dans la page template.htm, mais avec le template.htm, on peut soit le rentrer avant la gallerie soit apres

Mais je voudrais pouvoir le rentrer plus précisement dans la gallerie( dans la page template.php) pour pouvoir l'insérer dans le script (cad entre les photos et les commentaires par exemple)

:wink:


Americas
WRInaute accro
WRInaute accro
 
Messages: 3380
Inscription: 24 Sep 2003

Message le Jeu Fév 03, 2005 19:28

Bon... en bricolant un peu on arrive à placer le code où on veut sur le template.php si c'est ce que tuveux... pour le mettre entre la photo et les commentaires.

Code: Tout sélectionner
EOT;
// HTML template for intermediate image display
$template_display_picture = <<<EOT
        <tr>
                <td align="center" class="tableb" height="{CELL_HEIGHT}" style="white-space: nowrap; padding: 0px;">
                        <table cellspacing="2" cellpadding="0" class="imageborder">
                                <tr>
                                        <td align="center">
                                                {IMAGE}
                                                {ADMIN_MENU}
                                        </td>
                                </tr>
                        </table>


<!-- ton tableau adsense -->

<table><tr><td>
<div align="center">
<script type="text/javascript"><!--
google_ad_client = "pub-00000000000000000000";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_color_border = "FFCC00";
google_color_bg = "FFFFFF";
google_color_link = "000000";
google_color_url = "666666";
google_color_text = "333333";
//--></script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
<!-- Fin Google Adsense -->
</td></tr></table>
<!-- Fin du tableau adsense -->




<!-- BEGIN img_desc -->
                        <table cellpadding="0" cellspacing="0" class="img_caption_table">
<!-- BEGIN title -->
                                <tr>
                                        <th>
                                                {TITLE}
                                        </th>
                                </tr>
<!-- END title -->
<!-- BEGIN caption -->
                                <tr>
                                        <td>
                                                {CAPTION}
                                        </td>
                                </tr>
<!-- END caption -->
                        </table>
<!-- END img_desc -->
                </td>
        </tr>


J'ai essayé... ça marche.
Bon... j'ai retiré le code de mon template parce que ce n'est pas l'emplacement que je souhaite... mais ça fonctionne correctement :wink:

binocle
WRInaute discret
WRInaute discret
 
Messages: 164
Inscription: 12 Fév 2004

Message le Ven Fév 04, 2005 10:18

merci ca marche, je vais regarder si ca améliore les clicks de cette manières :wink:

transbenik
WRInaute discret
WRInaute discret
 
Messages: 75
Inscription: 25 Jan 2004

Message le Sam Fév 05, 2005 13:45

Je suis trés interéssé par ce topic et j'ai déjà appliqué vos propositions.

J'aimerais également mettre un bloc adsense dans la zone verte à gauche, sous le menu.

Quelqu'un pourrais-t-il m'aider, je suis un peu nul en php, meme carrément nul.

Merci.

le site : http://zachary.anquez.online.fr/photos/

binocle
WRInaute discret
WRInaute discret
 
Messages: 164
Inscription: 12 Fév 2004

Message le Sam Fév 05, 2005 17:53

pour toi c'est vachement plus simple que dans mon cas, car tout passe par la page template.htm (photos/themes/fruity/template.htm)

Tu édite ce fichier dans un logiciel (dreamweaver par exemple), le code n'étant pas tres simple, c'est plus facile)

Tu devrais voire groso modo la forme du template, et tu insère le code adsence dans la derniere cellule en bas a gauche (j'ai pas testé mais ca devrais marcher)

:wink:

transbenik
WRInaute discret
WRInaute discret
 
Messages: 75
Inscription: 25 Jan 2004

Message le Lun Fév 07, 2005 15:22

merci ca marche impec.


Si vous avez aimé cette discussion, partagez-la sur vos réseaux sociaux préférés :

Formation recommandée sur ce thème :

Formation Google Analytics : en 2 jours, apprenez comment exploiter l'essentiel des possibilités de l'outil de mesure d'audience de Google. Formation animée par les experts Google Analytics de Ranking Metrics.

Tous les détails sur le site Ranking Metrics : programme, prix, dates et lieux, inscription en ligne.

Lectures recommandées sur ce thème :



Qui est en ligne

Utilisateurs parcourant ce forum: Aucun utilisateur enregistré et 0 invités