Author |
Message |
mike63740
Worker
Joined: Jun 21, 2010
Posts: 102
|
Posted:
Wed Mar 07, 2012 12:54 am |
|
How can I display a 728x90 banner ad? I will be using JavaScript or HTML code.
The advertising module is active. I created a test banner using html, but nothing show in the header.
Thanks. |
Last edited by mike63740 on Fri Mar 09, 2012 10:33 pm; edited 1 time in total |
|
|
|
nuken
RavenNuke(tm) Development Team
Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina
|
Posted:
Wed Mar 07, 2012 7:14 am |
|
|
|
|
eldorado
Involved
Joined: Sep 10, 2008
Posts: 424
Location: France,Translator
|
Posted:
Wed Mar 07, 2012 8:15 am |
|
Well , i don't know if html banner works with advertising.... try flash or image format
Perhaps , html5 will work with some tweakings |
_________________ United-holy-dragons.net (My RN site)- Rejekz(cod4 clan) - gamerslounge |
|
|
|
fkelly
Former Moderator in Good Standing
Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY
|
Posted:
Wed Mar 07, 2012 10:37 am |
|
HTML banner works with the themes distributed with RN. Besides answering Nuken's question ... what theme are you using, also check the position you assigned to the ad and make sure you have activated the ad. Also, what RN version are you using? |
|
|
|
|
mike63740
|
Posted:
Wed Mar 07, 2012 3:55 pm |
|
This is my setup:
* Theme: Fisubice
* RavenNuke: 2.50.00
* XAMPP: 1.7.7
* Windows XP Home SP3
I have the option to use JavaScript, Flash or HTML codes. Which would work best with RavenNuke 2.50.00?
Current Ad
Position Name: Page Header
Position Number: 1 |
|
|
|
|
fkelly
|
Posted:
Wed Mar 07, 2012 6:25 pm |
|
I use html ads on my site. You can insert an image and use that image as a link to an external site (usually the advertisers) right inside the HTML code. If your ad isn't showing try changing the position number to 0. The code in theme.php for fisubice does an ads(0) call to the ads function in mainfile and having position set to 1 may be why it is not showing. |
|
|
|
|
mike63740
|
Posted:
Wed Mar 07, 2012 7:52 pm |
|
theme.php
74 if ($banners == 1) {
75 echo ads(0);
When I changed line74 to 0, the text code appears above the header, not an image. I changed the position to 0 as well.
Can I insert the banner code directly into the header? I would deactivate the Advertising Module. |
|
|
|
|
fkelly
|
Posted:
Wed Mar 07, 2012 8:50 pm |
|
Line 74, the value of $banners is set by the "Banners Options" section of Preferences in the ACP (Administrative Control Panel). It means that you have activated banners (and thus Advertising) on your site. So, leave line 74 at $banners = 1. Then change position of the ad you are setting up to 0.
It's theoretically possible to put the banner code in the header of course but then you'd need to make code modifications in every theme on your site and deal with modifying the code again when their is a RN update. Better to get the Advertising Module to do what it is designed for. It works ... I run ads all the time on my Bike Club site as do many other RN sites. |
|
|
|
|
mike63740
|
Posted:
Wed Mar 07, 2012 10:28 pm |
|
I made all changes you asked, but still nothing is showing. Text code above banner is gone.
I will stick to the Advertising Module until it works. I am sure there is something I'm doing wrong.
Thanks for the good advice. |
|
|
|
|
mike63740
|
Posted:
Wed Mar 07, 2012 10:43 pm |
|
I made some very good progress. I'm using the html codes, along with placing the code in the editor correct mode. My bad!
Now I can see the 728x90 banner image. It looks good. I see one in the edit box and a duplicate one above the box.
Nothing in the header yet. |
|
|
|
|
mike63740
|
Posted:
Wed Mar 07, 2012 11:10 pm |
|
Current overall settings
theme.php
if ($banners == 1) {
$showbanners= ads(0);
}
Current Ads Positions
Position Name: Page Top
Position Number: 0
Assigned Ads: 1
Nothing show in header yet. |
|
|
|
|
mike63740
|
Posted:
Wed Mar 07, 2012 11:26 pm |
|
fkelly wrote: | Line 74, the value of $banners is set by the "Banners Options" section of Preferences in the ACP (Administrative Control Panel). It means that you have activated banners (and thus Advertising) on your site. So, leave line 74 at $banners = 1. |
If I change,
if ($banners == 1) {
$showbanners= ads(0);
}
to this,
if ($banners == 0) {
$showbanners= ads(0);
}
the banner shows in the header.
In the meantime I'm leaving it the way you ask. Most likely I am doing something else wrong. |
|
|
|
|
fkelly
|
Posted:
Thu Mar 08, 2012 10:13 am |
|
Did you check Preferences in the ACP and see if you have banners turned on? When you say if($banners == 1) you are essentially saying if banners are turned on. When you say if($banners == 0) you are saying if banners are turned off. 1 is the same as "true" and 0 is the same as "false".
Singing, "what kind of bool am I" ... |
|
|
|
|
mike63740
|
Posted:
Thu Mar 08, 2012 10:51 am |
|
Web Site Configuration
Banners Options
before,
Activate Banners in your site? No
after,
Activate Banners in your site? Yes
It works. Thank you.
One other matter is the RavenNuke logo(352x50px) pushes the 728x90 banner into the margin area, far right. I would like to replace RN logo with a 118x52px logo. This will give the 728x90 banner more space, and keep it out of the margin area.
I know I could just replace the /themes/fisubice/images/logo.gif by over writing the logo.gif file with the 118x52 logo file. I would keep the same filename and file location. Is there an easier or better way to swap the logos?
Thanks again. |
|
|
|
|
fkelly
|
Posted:
Thu Mar 08, 2012 10:57 am |
|
There is a file "header.html" in your themes/fisubice directory that contains a reference (line to the logo.gif file. You can put a "mylogo" (or whatever name) in the same directory and change the reference to point to that. Or you can just overwrite the logo.gif file with your own. Same difference really. Just remember that similar changes need to be made for all themes that are used on your site ... but fisubice is the only theme using html files now ... the rest of the changes will have to be made in theme.php files. |
|
|
|
|
mike63740
|
Posted:
Thu Mar 08, 2012 11:12 am |
|
fkelly wrote: | There is a file "header.html" in your themes/fisubice directory that contains a reference (line to the logo.gif file. You can put a "mylogo" (or whatever name) in the same directory and change the reference to point to that. |
I prefer this way. Everything looks good. Thanks. |
|
|
|
|
jlajax
Ardent RavenCMS Supporter
Joined: Oct 12, 2006
Posts: 244
Location: Jacksonville, Florida
|
Posted:
Thu Oct 11, 2012 10:40 am |
|
What I really love about this site is with a little bit of effort one can learn something and fix things on their own.
|
|
|
|
|
|