[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now


joomla query

Posted on 2009-02-17
Medium Priority
Last Modified: 2012-06-27
i am new to this site..
and really i have learnt a lot from it...

i am working with a joomla programmer..
but we are stuck in between...
we are getting confused as to how to add advertisements at the top of the joomla site above header...

i hope some 1 can give me appropriate coding for that
Question by:pranav1andonly
  • 3
  • 3

Expert Comment

by:Luis Clara Fernandes
ID: 23658181
Only plugins could add entries to the header.  Look one of this plugins  and see how to do it.
I hope it helps.
Luis C. Fernandes

Author Comment

ID: 23659917
thnx clarafer i'l check it...
and then accept it as a solution :p

Author Comment

ID: 23659984
but this is a paid plugin..
can any 1 get me a free plugin...
Threat Trends for MSPs to Watch

See the findings.
Despite its humble beginnings, phishing has come a long way since those first crudely constructed emails. Today, phishing sites can appear and disappear in the length of a coffee break, and it takes more than a little know-how to keep your clients secure.


Expert Comment

by:Luis Clara Fernandes
ID: 23660184
I downloaded for you. But this is a plugin that could shows you how to add entries in your joomla header.

Expert Comment

by:Luis Clara Fernandes
ID: 23660248
I could upload php files, but there is the code your concerned

//Joomla restrict
defined( '_JEXEC' ) or die( 'Restricted access' );
//Get mainframe
$mainframe->registerEvent( 'onPrepareContent', 'pluginBWgoogleverifiedplugin' );
//Insert meta tag in header

Open in new window


Author Comment

ID: 23667631
hii clarafer..
thnx for helping..
but by using this code i am unable to add advertisement at the top of the site

Accepted Solution

joomlacode earned 375 total points
ID: 23697234
None of the previous comments apply. It sounds as though you wish to create a module position within the template. Once youve designated where this new position loads,  you can either publish to this position using an "ad" module, or simply use a custom html module containing your HTML.

In order to best clearly answer your question, I would need to know your Joomla version (J1.x and J1.5 version have different methods for loading modules) - your default template would also be helpful so we dont create a module which already exists.

There also exists different methods for hiding these modules when not in use, but if you intend on having this module (ad) display on all pages, that shouldnt be a concern.

Finally, there are parameters that allow you to set how you would like your modules to display, but keeping it simply, ill show you the minimalist methods

So in a nutshell:

1. Modify your active (default) template to include a new module position
2. Publish a module to this new position through the Joomla admin panel

Hope this helps point you in the right direction!
// Below is the standard method for creating modules within J1.5
<jdoc:include type="modules" name="your_new_module_position_name" style="xhtml" />
// Below is the standard method for creating modules within J1.x
<?php mosLoadModules ( 'your_new_module_position_name', -1); ?>

Open in new window


Featured Post


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses
Course of the Month19 days, 21 hours left to enroll

873 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question