dom 13 apr 08

Adsense Injector extension per BlogEngine.NET

Categorie: BlogEngine.NET · Extensions
Tags: , , , , ,
Technorati: View blog reactions

English version of this post

Adsense Injector 3D Package La decisione di inserire l'advertising di Google AdSense sulle pagine di questo sito ha di fatto sviluppato l'esigenza di un'estensione (o plugin) per BlogEngine.NET che potesse consentire un'agevole gestione degli annunci pubblicati insieme agli articoli. Se, infatti, da un lato, l'inserimento del codice Adsense all'interno delle porzioni statiche del template di pagina è un'operazione relativamente semplice (è sufficiente infatti copiare il codice nella posizione voluta), il discorso cambia completamente nel momento in cui si desiderano inserire degli annunci anche negli articoli o nelle pagine.

Inoltre potrebbe essere interessante scegliere il targeting pubblicitario, riservando ad esempio la visualizzazione dell'advertising solo a determinate categorie di visitatori, che potrebbero essere più interessate a quanto reclamizzato, proprio in virtù del fatto che magari giungono sulle pagine da un motore di ricerca, non avendo ancora piena consapevolezza dell'obiettivo del loro cercare.

In tal modo si potrebbe risparmiare la visione (ed il fastidio nonchè ingombro) degli annunci ai visitatori abituali o ai visitatori provenienti da altre fonti che non siano i motori di ricerca.

Proprio per questo motivo ho sviluppato Adsense Injector: probabilmente si tratta della prima (se non unica almeno per il momento) estensione per BlogEngine.NET che consente un'agevole nonchè personalizzabile inserimento degli annunci Adsense all'interno degli articoli pubblicati.

Aggiornamento del 5 maggio 2008: release 2.0

La release 2.0 aggiunge una serie di nuove funzionalità tra le quali spicca il supporto multi autore alla pubblicazione degli annunci e la modalità di posizionamento casuale dell'annuncio all'interno del testo.

Installazione

Scaricare l'archivio compresso AdsenseInjector.zip (2,47 kb) (rel: 2.0.0), quindi:

  1. Decomprimere il file
  2. Copiare il file AdsenseInjector.cs nella cartella /App_Code/Extensions/

Aggiornamento da una versione precedente

  1. Disattivare l'estensione dal pannello di controllo estensioni
  2. Rimuovere l'estensione dalla cartella /App_Code/Extensions/
  3. Rimuovere l'intera sezione

    <ManagedExtension Name="AdsenseInjector">
    ...
    </ManagedExtension>

    dal file extensions.xml presente nella cartella /App_Data/
  4. Copiare il nuovo file AdsenseInjector.cs nella cartella /App_Code/Extensions/
  5. Configurare l'estensione

Configurazione

Una volta terminata l'installazione, dal pannello di controllo dell'estensione è possibile inserire fino a 3 (tre) configurazioni differenti di annunci per ciascun autore (in realtà se ne possono inserire anche di più, ma il sistema di controllo ne pubblicherà sempre e comunque fino ad un massimo di 3, fra quelli attivi).

Per ciascuna configurazione si dovranno inserire (obbligatoriamente) i seguenti parametri:

  • Author: nome dell'autore a cui dovrà essere associata la definizione dell'annuncio. L'annuncio verrà pubblicato solo nei post dell'autore medesimo. Inserendo "forever", l'annuncio sarà pubblicato indipendentemente dall'autore del post.
    (questo parametro è presente dalla release 2.0)
  • Publisher ID: ovvero il relativo codice rilasciato da Google Adsense.
  • Description: descrizione dell'annuncio (se si lascia questo campo vuoto l'annuncio non verrà pubblicato e verrà considerato come inattivo).
  • ID Slot: il codice univoco associato da Google Adsense in fase di creazione e personalizzazione dell'annuncio.
  • Size (width): larghezza dell'annuncio (fare riferimento agli standard imposti).
  • Size (height): altezza dell'annuncio (fare riferimento agli standard imposti).
  • Style (code): codice CSS da associare all'annuncio per il suo corretto posizionamento.
  • Position: valorizzare con T (top) per posizionare l'annuncio all'inizio del post, con B (bottom) per posizionarlo alla fine e con C (center) per inserirlo all'interno del testo (la posizione viene calcolata dividendo per 2 il numero di paragrafi contenuti nel post). Con R (random), il posizionamento verrà effettuato casualmente o all'inizio, o alla fine o al centro.
    (quest'ultimo valore è disponibile dalla release 2.0)
  • Display: valorizzare con A (always) per mostrare sempre l'annuncio, con R (referrer) solo ai visitatori provenienti da referrer (inclusi i motori di ricerca) e con S (search) solo ai visitatori provenienti da motori di ricerca.
  • Insert: valorizzare con B (both) per mostrare l'annuncio sia nelle pagine che nei post, con P (post) solo nei post e con A (page) solo nelle pagine.

La visualizzazione dell'advertising viene automaticamente disattivata se l'autore (o amministratore) si è autenticato sul blog. (questa funzionalità è presente dalla release 2.0)

E' possibile escludere completamente l'inserimento di annunci pubblicitari dal singolo post (o pagina) semplicemente inserendo all'interno del testo (in una qualunque parte dello stesso) il tag(questa funzionalità è presente dalla release 2.0) :

[ noadsense ]

L'estensione inoltre racchiude ciascun post (o pagina) all'interno dei tag:

<!-- google_ad_section_start --> ... <!-- google_ad_section_end -->

per indicare con più precisione al crawler di Adsense quali sono i contenuti da contestualizzare per la scelta degli annunci.

Posizionamento degli annunci

Per posizionare correttamente l'annuncio all'interno del post è possibile valorizzare (ad esempio) il parametro Style, come segue:

  • Allineamento float a destra e spaziatura di 10 pixel per lato :
    float: left; padding: 10px
  • Allineamento al centro e spaziatura di 10 pixel in alto e 20 in basso:
    align: center; padding: 10px 0 20px
  • ecc. ecc.

Attenzione!

Questa estensione è rilasciata "così com'è" e si declina qualunque tipo di responsabilità derivante dal suo uso o abuso. Allo stesso modo si declina qualunque responsabilità derivante da eventuali operazioni di banning effettuate da Google in caso di uso illecito o sconsiderato della stessa.

Altre estensioni ...

Adsense Injector extension for BlogEngine.NET

Adsense Injector is the first (if not unique, at least for the moment) BlogEngine.NET extension that allows smooth and customizable ad insertion within Google Adsense of articles published.

Update on May 5, 2008: release 2.0

Release 2.0 adds a lot of new features including support for multiple author and random placement of ads in posts or pages.

Installation

Download the compressed file AdsenseInjector.zip (2,47 kb) (rel: 2.0.0), then:

  1. Extract files.
  2. Copy AdsenseInjector.cs into /App_Code/Extensions/ folder

Upgrading from an earlier version

  1. Turn off the extension from the control panel of blog
  2. Remove the extension's file from the folder /App_Code/Extensions/
  3. Remove the entire section

    <ManagedExtension Name="AdsenseInjector">
    ...
    </ManagedExtension>

    from file extensions.xml in /App_Data/ folder
  4. Copy the new file AdsenseInjector.cs into /App_Code/Extensions/ folder
  5. Setting the required extension's parameters

Configuration

From the extension control panel is possible to insert up to 3 different configurations of ads for each author (in fact you can pass even more, but the control system will always publish up to 3, among the actives).

The component is completely configurable valuing the following mandatory attributes :

  • Author: author's name that should be associated to the definition of the ad. Entering "forever", the announcement will be published independently from the author's post.
    ( This feature is only present in release 2.0)
  • Publisher ID: Publisher ID code issued by Google Adsense.
  • Description: Description (if you leave this field blank ad will not run and will be treated as inactive).
  • ID Slot: The ad unique code.
  • Size (width): Ad width (refer to the standards imposed)
  • Size (height): Ad height (refer to the standards imposed)
  • Style (code): CSS code for its proper positioning.
  • Position: T = top of post, B = bottom of post, C = middle of post. R = random position (Top, Middle or Bottom)
    ( Random position is only present in release 2.0)
  • Display: A = display always, R = display only to referrers (including search engines), S display only to search engines.
  • Insert: B = display in posts and pages, P = display only in posts, A = display only in pages

The display of advertising is automatically disabled if you are logged in. (This feature is only present in release 2.0)

If you do not want to show advertising in individual post or page, insert in the text the tag: (This feature is only present in release 2.0)

[ noadsense ]

The extension also encloses each post (or page) within tags:

<!-- google_ad_section_start --> ... <!-- google_ad_section_end -->

Style attributes examples:

  • Alignment float right and spacing of 10 pixels per side:
    Float: left; padding: 10px
  • Align the center and spacing of 10 pixels above and 20 below:
    Align: center; padding: 10px 0 20px

Attention!

This extension is granted "as is" and disclaims any liability arising from its use or abuse.

You can leave comments in English ...

More extensions ...

P.S.: I'm sorry for my poor english


Commenti

01.
Inviato il 13 apr 2008 alle 20.16 da notoriousxl
notoriousxl
Beh, complimenti... spero anche che questo plugin generi il meritato numero di backlink... Wink

02.
Inviato il 13 apr 2008 alle 20.23 da Cristiano
Cristiano
@ notoriousxl:
Grazie !
Sfortunatamente, essendo il mio sito relativamente poco frequentato, il "meritato numero di backlink" spesso è inferiore alle aspettative :-P
Ma va benissimo anche così: l'importante è contribuire per la community Smile
<< | < | > | >> | Rispondi | Quota

03.
Inviato il 13 apr 2008 alle 23.45 da notoriousxl
notoriousxl
@Cristiano: non c'è un portale che raccoglie le segnalazioni dei plugin scritti dagli utenti?
<< | < | > | >> | Rispondi | Quota

04.
Inviato il 14 apr 2008 alle 00.23 da Traffyk
Traffyk
Cristiano davvero un bel lavoro. Noto però, almeno da come ho potuto leggere dalle istruzioni, che non hai specificato la selezione tra angoli quadrati, semiarrotondati e molto arrotondati. Correggimi se sbaglio Laughing
<< | < | > | >> | Rispondi | Quota

05.
Inviato il 14 apr 2008 alle 09.00 da Cristiano
Cristiano
@ notoriousxl:
Si e No ... E' possibile segnalare le estensioni sul blog di BlogEngine.NET, ma viene aggiornato pochissimo e molto spesso le segnalazioni si perdono nel nulla.
Personalmente, segnalo le nuove estensioni direttamente ad un membro del team di sviluppo (con cui ho degli scambi epistolari elettronici Wink ).
Con il debutto della release 1.4 di BE si dovrebbe inaugurare anche un nuovo portale dedicato solo alla raccolta di plugin, estensioni, temi e widget ...

@ Traffyk:
Non sbagli: la funzionalità che tu segnali, però, non mi sembra che si possa impostare direttamente da codice Javascript, ma solo dal pannello di controllo Adsense.
Per questo motivo ho inserito la possibilità di poter indicare il codice Ad-Slot: così tutte le personalizzazioni l'utente se le imposta direttamente dal cruscotto dedicato(e non si corre il rischio di banning per scrittura di codice non conforme ...)
Wink
<< | < | > | >> | Rispondi | Quota

06.
Inviato il 14 apr 2008 alle 12.26 da Sanghino
Sanghino
Complimenti Cristiano, ottimo lavoro veramente.
Vorrei suggerirti una feature che a me farebbe veramente comodo, aggiungerei un parametro per poter scegliere se visualizzare il box adsense nei post, nelle pagine oppure in entrambi .... che ne dici ?
<< | < | > | >> | Rispondi | Quota

07.
Inviato il 14 apr 2008 alle 14.23 da Sanghino
Sanghino
Vadfo un po' OT dall'argomento del post .... vi è giunta notizia del bug relativamente a indirizzi di questo tipo:

http://domain.com/js.axd?path=/app_data/users.xml

Come vi avete posto rimedio (sempre che lo abbiate fatto ....) ? Io ho seguito il consiglio di togliere da HTTPHandlers la riga relativa a js.axd ....
Cosa ne pensate ?
<< | < | > | >> | Rispondi | Quota

08.
Inviato il 14 apr 2008 alle 16.07 da Cristiano
Cristiano
@ Sanghino:
In effetti, mi sono accorto solo in un secondo momento di avere omesso questa funzionalità.
Ho già provveduto alla modifica, per cui ti consiglio di scaricarti l'estensione aggiornata (il numero di versione è ora 1.3.1).
Ho anche aggiornato la sezione di descrizione delle proprietà nell'articolo.

Per quanto riguarda l'httphandler js.axd, serve unicamente alla compressione dei file javascript ed al loro relativo caching.
Io non la uso per cui non ho mai avuto problemi, comunque nella release di sviluppo di BE, il bug è stato eliminato.

Ad ogni modo ti consiglio di aprire un thread sul forum in merito alla questione Smile
<< | < | > | >> | Rispondi | Quota

09.
Inviato il 15 apr 2008 alle 14.49 da Traffyk
Traffyk
Cristiano puoi utilizzare i vecchi codici Adsense anzichè questi nuovi in modo tale da poterli personalizzare come meglio credi direttamente da codice Smile
<< | < | > | >> | Rispondi | Quota

10.
Inviato il 15 apr 2008 alle 15.55 da Cristiano
Cristiano
@ Traffyk:
Ci avevo pensato.
Ma poi ho preferito aderire ai nuovi standard consigliati da Google: già così il numero di parametri è abbastanza critico Wink
<< | < | > | >> | Rispondi | Quota

11.
Inviato il 16 apr 2008 alle 10.27 da mondoblog.it
pingback
Pingback from mondoblog.it

BlogEngine.NET: Personalizzare Gli Annunci AdSense Negli Articoli Con Adsense Injector | MondoBlog
<< | < | > | >> |

12.
Inviato il 06 lug 2008 alle 20.31 da Krish
Krish
Thanks, this is a great extension and also happy to know that you are updating it.
<< | < | > | >> | Rispondi | Quota

13.
Inviato il 08 lug 2008 alle 13.14 da Cristiano
Cristiano
@ Krish:
I'm working to simplify the parameters section of Adsense Injector with new extension model of BlogEngine.NET 1.4 Wink
<< | < | > | >> | Rispondi | Quota

14.
Inviato il 16 lug 2008 alle 17.42 da Productivity-Science
Productivity-Science
Is it working with BE 1.4.
I installed it but can't add a configuration - an error appears.
<< | < | > | >> | Rispondi | Quota

15.
Inviato il 16 lug 2008 alle 18.13 da Cristiano
Cristiano
@ Productivity-Science:
It 's strange. In my installation of BE 1.4, it works fine.
What is the error returned?
<< | < | > | >> | Rispondi | Quota

16.
Inviato il 30 lug 2008 alle 05.47 da Wayne
Wayne
Here's the start of the stack trace from 1.4:

[NullReferenceException: Object reference not set to an instance of an object.]
   ExtensionSettings.IsKeyValueExists(String newVal) +110
   User_controls_xmanager_Parameters.IsValidForm() +683
   User_controls_xmanager_Parameters.btnAdd_Click(Object sender, EventArgs e) +30
   System.Web.UI.WebControls.Button.OnClick(EventArgs e) +105

Hope to figure it out, I really want to use this extension!  Thanks for it!
<< | < | > | >> | Rispondi | Quota

17.
Inviato il 30 lug 2008 alle 07.50 da Wayne
Wayne
I was able to hack it around a bit locally and got it to work.  What I did was add in...

  <ManagedExtension Name="AdsenseInjector">
    <Version>2.0.0</Version>
    <Description>Inserts Adsense code at the beginning or end of posts or pages</Description>
    <Author>Cristiano Fino</Author>
    <AdminPage />
    <Enabled>true</Enabled>
    <Settings xsi:nil="true" />
  </ManagedExtension>

...into the extensions.xml.  Once the entry was in there, I was able to add my first set of properties for the AdSenseInjector through the extensions manager.  

Now that I had my properties set, the ad wasn't showing in a post (I only configured the ads for a post), so I then removed the ManagedExtension from the extensions.xml file, saved my web.config to reset the cache.   Bingo, ad displays and everything looks fine.

I'm no whiz on extensions, but it seems to me that there is something wrong with the install in 1.4.

My last remaining issue is now my 300x250 ad unit looks more like 275x500....not sure why yet.  My money is on Google and the new ad unit I just created for this, but if anyone has had this particular issue and knows a fix, I'd love to hear it.  I'm letting it bake overnight and see what it looks like in the morning.

Cheers!
<< | < | > | >> | Rispondi | Quota

18.
Inviato il 30 lug 2008 alle 11.00 da Cristiano
Cristiano
Wayne ha scritto:
...into the extensions.xml. Once the entry was in there, I was able to add my first set of properties for the AdSenseInjector through the extensions manager.
There is a compatibility problem with the new extension manager of Blogengine 1.4, but is easily solved.
Try to insert in \app_data\datastore\extensions\AdsenseInjector.xml this code (replacing the existing one):
<?xml version="1.0" encoding="utf-8" ?>
<ManagedExtension xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="AdsenseInjector">
<Version><a href="www.cristianofino.net/.../Version>  <Description>Inserts Adsense code at the beginning or end of posts or pages</Description>
<Author><a href="http://www.cristianofino.net">Cristiano Fino</a></Author>
<AdminPage />
<Enabled>true</Enabled>
<Settings>
<Index>0</Index>
<Name>AdsenseInjector</Name>
<Help>Inject Adsense Code in the posts and pages. All parameters are mandatory. The code can be added at the beginning, middle or end of the post (or page)</Help>
<Delimiter>44</Delimiter>
<Parameters>
<Name>ad_Author</Name>
<Label>Author (write "forever" to insert the ad always)</Label>
<MaxLength>50</MaxLength>
<Required>true</Required>
<KeyField>false</KeyField>
<Values>forever</Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
<Name>ad_PubID</Name>
<Label>Publisher ID</Label>
<MaxLength>50</MaxLength>
<Required>true</Required>
<KeyField>false</KeyField>
<Values>your publisher-id </Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
<Name>ad_Desc</Name>
<Label>Description</Label>
<MaxLength>200</MaxLength>
<Required>false</Required>
<KeyField>false</KeyField>
<Values>Your description banner</Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
<Name>ad_ID</Name>
<Label>ID Slot</Label>
<MaxLength>50</MaxLength>
<Required>true</Required>
<KeyField>true</KeyField>
<Values>your ID Slot </Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
<Name>ad_size_w</Name>
<Label>Size (width)</Label>
<MaxLength>4</MaxLength>
<Required>true</Required>
<KeyField>false</KeyField>
<Values>300</Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
<Name>ad_size_h</Name>
<Label>Size (height)</Label>
<MaxLength>4</MaxLength>
<Required>true</Required>
<KeyField>false</KeyField>
<Values>250</Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
<Name>ad_style</Name>
<Label>Style code</Label>
<MaxLength>500</MaxLength>
<Required>true</Required>
<KeyField>false</KeyField>
<Values>text-align: center; margin: 10px 0 20px 0;</Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
<Name>ad_position</Name>
<Label>Position ([T]op, [C]enter, [B]ottom, [R]andom)</Label>
<MaxLength>1</MaxLength>
<Required>true</Required>
<KeyField>false</KeyField>
<Values>T</Values>
<ParamType>String</ParamType>
<SelectedValue />
</Parameters>
<Parameters>
  <Name>ad_display</Name>
  <Label>Display ([A]lways, [R]eferrer, [S]earch engine)</Label>
  <MaxLength>1</MaxLength>
  <Required>true</Required>
  <KeyField>false</KeyField>
  <Values>A</Values>
  <ParamType>String</ParamType>
  <SelectedValue />
  </Parameters>
  <Parameters>
  <Name>ad_where</Name>
  <Label>Insert in [P]ost, P[A]ges, [B]oth</Label>
  <MaxLength>1</MaxLength>
  <Required>false</Required>
  <KeyField>false</KeyField>
  <Values>P</Values>
  <ParamType>String</ParamType>
  <SelectedValue />
  </Parameters>
  <KeyField>ad_ID</KeyField>
  <IsScalar>false</IsScalar>
  <Hidden>false</Hidden>
  <ShowAdd>true</ShowAdd>
  <ShowEdit>true</ShowEdit>
  <ShowDelete>true</ShowDelete>
  </Settings>
  <ShowSettings>true</ShowSettings>
  </ManagedExtension>

Don't miss to replace Publisher-ID, AD-Slot and AD-Description with your data!
Then save your web.config file to restart the application and clear the cache.

Best regards Wink
<< | < | > | >> | Rispondi | Quota

19.
Inviato il 30 lug 2008 alle 23.04 da Wayne
Wayne
Perfecto!  I'll try this tonight or over the weekend.  I'm still getting my head around the architecture, so I appreciate your quick response on this.  Thank you much!
<< | < | > | >> | Rispondi | Quota

20.
Inviato il 02 set 2008 alle 17.01 da Guilherme
Guilherme
  Hi! I have configure the adsense injector, but they aren´t showing anything...

    any sugestion? I´m using the blogengine 1.4.5.0

Thanks in advance!
<< | < | > | >> | Rispondi | Quota

21.
Inviato il 03 set 2008 alle 08.56 da Cristiano
Cristiano
@ Guilherme:
I need more info to solve the problem.
Have you correctly written your pub-id, or other parameters needed for the extension?
<< | < | > | >> | Rispondi | Quota

22.
Inviato il 04 set 2008 alle 17.32 da Guilherme
Guilherme
@ Cristiano:

Well...

    first time I had put: "pub-7736345241213733", but now I had tried: "7736345241213733" but still doesn´t workout...
    then I start to think in this way... than I remove the Coments from the Comments
  /* blogEngineExtension */ to  blogEngineExtension and Works Fine! Laughing
   Thanks for this extension....
   But One More Question... : How I configure to show like your blog, in one colum in first page?

   Thanks Again.... (if helps I have click in the google anoucments)
<< | < | > | >> | Rispondi | Quota

23.
Inviato il 14 set 2008 alle 07.34 da Shahid
Shahid
@ Guilherme:

Hi,
Thanx alot for this extension.
But I want to know that how to show the relevant adds according to the POST. At the moment It is just showing me some adds which are not according to my POST.
I have a post like "Best Exercise" but in Adds it is showing the Adds like C-level Programming etc..
<< | < | > | >> | Rispondi | Quota

24.
Inviato il 09 ott 2008 alle 03.39 da Juliet Choy
Juliet Choy
Hi Cristiano,

Thanks for creating this extension which is very useful.

I have installed the extension and found that the adsense show up sometimes, and sometimes it disappear, do you have any idea of what's wrong with my configuration.

Here is the blog:
www.rank-ad.com/.../...8f90e58d87e68e92e5908d.aspx

Sorry that it is in Chinese language. I think you can still see the location where I put the adsense, which is sometimes blank. Please kindly help and give some idea on how can I configure it correctly.

Also, am I able to configure it so that the adsense appear on the homepage (where the 10 most recent posts are showed)as well?

Thanks again for this great extension!
<< | < | > | >> | Rispondi | Quota

25.
Inviato il 09 ott 2008 alle 13.28 da Cristiano
Cristiano
Juliet Choy ha scritto:
I have installed the extension and found that the adsense show up sometimes, and sometimes it disappear, do you have any idea of what's wrong with my configuration
Don't worry, it's a problem of Adsense. Now, it seems to work fine Smile

For security reasons, has been disabled display ads on the home page.
Indeed, Google Adsense bans to show more than 3 ads per page.
If you show a banner for each post in home page, would certainly banned :-(
<< | < | > | >> | Rispondi | Quota

26.
Inviato il 09 ott 2008 alle 15.57 da Juliet Choy
Juliet Choy
@ Cristiano:

Thanks for your quick response!
Yes, it seems it is now working fine.
Thanks again :-D
<< | < | > | >> | Rispondi | Quota

27.
Inviato il 04 nov 2008 alle 10.28 da KM
KM
Hi,

I am using this extension here http://www.elevatesoftsolutions.in/default.aspx

But does not work

Please help me?
<< | < | > | >> | Rispondi | Quota

28.
Inviato il 04 nov 2008 alle 10.44 da Cristiano
Cristiano
@ KM:
The extension work fine.
The adsense code is corectly inserted in your posts (you can check it, reading the HTML source)

The problem is in your Adsense account:  you must wait a while before it is fully active Wink
<< | < | > | >> | Rispondi | Quota

29.
Inviato il 27 gen 2009 alle 22.30 da Jeffery
Jeffery
I'm having problems getting it  to work. I use sql server to hold my data, is the AdsenseInjector working ok with that?

Couldn't find AdsenseInjector.xml anywhere so I'm guessing that all that information is in the sql database.

Any help would be most appriciated.

BlogEngine 1.4.5

Thanks,

JefferyS
<< | < | > | >> | Rispondi | Quota

30.
Inviato il 27 gen 2009 alle 23.33 da Cristiano
Cristiano
@ Jeffery:
I think it should work correctly with SQL Provider, but I do not have the opportunity to test it :-(
However, using SQL Provider, the extensions are not registered in the XML file, but in database tables.

<< | < | > | >> | Rispondi | Quota

31.
Inviato il 03 feb 2009 alle 23.27 da Jeffery
Jeffery
@ Cristiano:

I think I have narrowed the problem down to this code.

            if ((e.Location == ServingLocation.SinglePage || e.Location == ServingLocation.SinglePost)
                && (!e.Body.Contains(_noAdsense)) && (!System.Threading.Thread.CurrentPrincipal.Identity.IsAuthenticated))


When watching the value for e.Location it always said "PostList". Never saw the location say SinglePage or SinglePost.

Is something in BlogEngine sending your code the wrong information?

Any suggestions for trouble-shooting this problem?

I also tried your other extension "CommentToolbar" and its working great.

Thanks,

JefferyS
<< | < | > | >> | Rispondi | Quota

32.
Inviato il 05 feb 2009 alle 10.30 da Cristiano
Cristiano
@ Jeffery:
You must watch the value of e.location when opening the post (or page).
If must read "PostList" only when you open the home page or use the search feature.
I don't know if the use of SQL Provider can modify the correct value of e.location :-(

<< | < | > | >> | Rispondi | Quota

33.
Inviato il 08 feb 2009 alle 01.00 da Jeffery
Jeffery
@ Cristiano:

Thanks for the help. It's working for the single posts. I guess I misunderstood how it was supposed to work.

Thanks,

JefferyS
<< | < | > | >> | Rispondi | Quota

34.
Inviato il 06 mar 2009 alle 12.14 da Roberto
Roberto
Hi Cristiano,
I am using your extension since a long time ago, but I'm not satisfied with the targeting of the ads.
I see that you surround the post wiithin <!-- google_ad_section_start --> and <!-- google_ad_section_end --> and that's a good thing.
But the post title is left out of this section and since usually it is enclosed in <h1> tag, it is very heavy from the point of view of targeting. So why not to include it in the section as well?
You can see this page, as an example:
blog.veleggiando.it/post/Maldive-Giravaru.aspx
As you can see, the ads are out of the context of the post (Maldives).
Have a good day and thank you for your great job!
Roberto

<< | < | > | >> | Rispondi | Quota

35.
Inviato il 06 mar 2009 alle 23.55 da Cristiano
Cristiano
@ Roberto:
The extension engine of BlogEngine.NET can not modify dinamically the title of the post but only its content :-(
So, if you want to enclose the H1 tag of the title into the meta tag google_ad_section, it's necessary to modify the theme (specifically PostView.ascx).

I'm Sorry, but this is the only way Wink

P.S.: ma perchè hai scritto il commento in inglese :-P
<< | < | > | >> | Rispondi | Quota

36.
Inviato il 27 mar 2009 alle 10.16 da Roberto
Roberto
@ Cristiano:
Ehehe, l'ho scritto in inglese perchè... pensavo che ti potesse essere più utile, no?
Un blog come il tuo, in lingua inglese acchiappa più lettori. O no?
Wink
Ciao
<< | < | > | >> | Rispondi | Quota

37.
Inviato il 27 mar 2009 alle 23.40 da Cristiano
Cristiano
@ Roberto:
... dovrebbe, ma in realtà non è proprio così. Diciamo che al momento "acchiappa" più spam :-D
Comunque per avere veramente successo dovrebbe essere scritto "unicamente" in inglese, ma purtroppo le mie risorse linguistiche sono un po' limitate.
<< | < | > | >> | Rispondi | Quota

38.
Inviato il 23 apr 2009 alle 10.56 da Marco
Marco
Potete postare un esempio di come configurare correttamente google ad sense?
grazie Smile
<< | < | > | >> | Rispondi | Quota

39.
Inviato il 23 apr 2009 alle 12.17 da Cristiano
Cristiano
@ Marco:
La tua richiesta va al di fuori di quanto trattato nell'articolo.

Ti consiglio di consultare il blog di Adsense e le risorse di Google dedicate alla sua configurazione Wink
<< | < | > | >> | Rispondi | Quota

40.
Inviato il 23 apr 2009 alle 12.35 da Marco
Marco
Mi sono spiegato male, uso gia google adsense volevo sapere cosa inserire correttamente in questi parametri:
■Publisher ID: ovvero il relativo codice rilasciato da Google Adsense.
La parte degli script? <script>

■ID Slot: il codice univoco associato da Google Adsense in fase di creazione e personalizzazione dell'annuncio.
Cioè?

grazie
<< | < | > | >> | Rispondi | Quota

41.
Inviato il 23 apr 2009 alle 23.04 da Cristiano
Cristiano
@ Marco:
1) Se già usi Google AdSense dovresti sapere cos'è il Publisher ID Tong
2) Lo script generato da Google non deve essere inserito, lo crea automaticamente l'estensione (altrimenti a cosa servirebbe ?)
3) l'ID Slot è il codice che viene attribuito al gruppo di annunci quando viene creato. Identifica univocamemente il gruppo.
<< | < | > | >> | Rispondi | Quota

42.
Inviato il 23 apr 2009 alle 23.07 da Marco
Marco
Ah, allora mi facevo pare inutili, Fantastico.
Complimenti
<< | < | > | >> | Rispondi | Quota

43.
Inviato il 21 giu 2009 alle 05.22 da BizTron
trackback
Adding new features to BlogEngine.NET

Adding new features to BlogEngine.NET
<< | < | > | >> |

44.
Inviato il 30 giu 2009 alle 10.19 da Advanced Technology
trackback
Monetizzare con il proprio blog

Monetizzare con il proprio blog
<< | < |

Aggiungi commento


(Visualizza la tua icona Gravatar)

biucitecode
  • Commento
  • Anteprima
Loading