Recent Topics

I have two questions

Started by on Mar 24, 2005 – Contents updated: Mar 24, 2005

Mar 24, 2005 14:55    

I'm am very new to programming and coding and if these are answered somewhere else just let me know and I'll find them.

1. how do I put google adsense code on my sidebar so that it is there no matter what post people are reading?

2. what are static pages?

thanks
Darrin F. Coe, MA

Mar 24, 2005 16:34

I don't know the answer to the Google ads, but I can tell you that static pages can be used for your About page. It's just a page where the content doesn't change.

Mar 24, 2005 16:35

To keep Google Adsense on your sidebar, I think you would probably need to alter all the templates in the skins folder, probably the _main.php files. Alternatively, just alter one and don't allow users to change it.
I believe a static page is essentially one that does not have ? in the URL. If you notice, most php scripts (including this forum script) have a ? somewhere in the url, and some search engines can have problems with that type of page

Mar 25, 2005 16:27

thanks for the reponses, just to follow up then:

1. is there instruction in the b2evo manual on creating static pages and

2. if they are pages that don't change could you then use them to place advertising on?

thanks
Stay Strong
Darrin F. Coe, MA

Mar 26, 2005 14:07

Darrin,

The concept behind static pages: Each time a visitor requests a page, they're hitting on the PHP code, which, in turn, makes requests of the database, generating a HTML page that is presented to the visitor (a dynamic page). IF you have a site that has LOTS of visitors (I mean LOTS), this can place a high demand on the server & database, as the server needs to do this for EVERY request and if there's lots of overlapping requests ... they might have to wait till the person before them is served. Kinda like - take a number. :)

Generating static pages removes the PHP code and database from the loop, presenting a normal HTML page that is already fully formed (which is much easier, much "faster").

Content on a static page CAN change, simply by updating your entry and then generating a NEW static page to replace the old one.

There's nothing you can do with a static page that cannot be done with a dynamic page. In the end, the HTML is the same ... one is simple generated "on-the-fly" and the other is 'pre-formed'.

If you want ads, simply add the code to your existing sidebar (in your _main.php file) and whenever your sidebar is visible, so will be your ads - static OR dynamic.

Unless your site has HUGE amounts of traffic, I'd recommend sticking with dynamically-generated pages. That's the whole joy of a mySQL-driven blogging system. No need to worry about updating a variety of static pages ... just update the dynamic database and gen up-to-date pages each and every time.

Hope this helps. ;)


Form is loading...

CMS + forums – This forum is powered by b2evolution CMS, a complete engine for your website.