I want to have an adsense block appear at the top of everty content page, but i'm not sure where (how) to put it into the content.php file any help would be great if possible, i want to to sick it above the voting code... $params->def( 'pageclass_sfx', '' ); $params->def( 'item_title', 1 ); $params->def( 'url', 1 ); // if a popup item (e.g. print page) set popup param to correct value if ( $pop ) { $params->set( 'popup', 1 ); } // check if voting/rating enabled if ( $params->get( 'rating' ) ) { // voting query $query = "SELECT ROUND( v.rating_sum / v.rating_count ) AS rating, v.rating_count" . "\n FROM #__content AS a" . "\n LEFT JOIN #__content_rating AS v ON a.id = v.content_id" . "\n WHERE a.id = $row->id" ; $database->setQuery( $query ); $database->loadObject($voting); // add to $row info $row->rating = $voting->rating; $row->rating_count = $voting->rating_count; } if ( $params->get( 'section_link' ) || $params->get( 'category_link' ) ) { // loads the link for Section name if ( $params->get( 'section_link' ) || $params->get( 'category_link' ) ) { // pull values from mainframe $secLinkID = $mainframe->get( 'secID_'. $row->sectionid, -1 ); $secLinkURL = $mainframe->get( 'secURL_'. $row->sectionid );
Hey, easiest way to make it appear on every page is to edit your templates index file. You can slap anything you want in there and it'll show up on every page.(goto: Site>Template Manager>Site Templates and choose your template then "Edit HTML") Now be careful with that.. your adsense will show up on 404 and login/out etc. pages. Another way to do this (this is what I do)and select only the content pages is to create a new module and put your adsense code in the "Custom Output" box. Then Choose on the right what pages to put it on.(hold in CTRL and click to select individual pages) Hope that helps you out
There is no need to edit any files. You can use Joomlaspan adsense module. Install it, type your google id and then publish the module in any position you like.
If your simply worried about positioning.. it's all about your "Module Position" and the order in which you put them.. You can adjust all that from the module manager, but you will be stuck with the actual positioning your template puts things in unless you wish to edit the file that determines where these positions are. I can't remember which file that is off the top of my head either. For example your voting module could be put in several positions such as top, left, right, etc.. and the order that module is placed in that position is determined in the module manager as well..
... or you can use a adsense mambot to put your adsense code anywhere in the content. Link: http://extensions.joomla.org/component/option,com_mtree/task,viewlink/link_id,26/Itemid,35/
With "Joomlaspan adsense module", you can put adsense on any position easily. In fact ,one place is very important,that is between title and content.