Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x
Author Message
jlajax
Ardent RavenCMS Supporter



Joined: Oct 12, 2006
Posts: 244
Location: Jacksonville, Florida

PostPosted: Mon Sep 17, 2012 12:02 pm Reply with quote

Greetings good folks I am testing SimplyBlue and have noticed that while the advertising block appears as it should the content either displays at the very top of the page or between header02.png and content portions.

In Raven Ice the same thing happens as well as a display in the proper place.

The other themes all works as it should. I duplicated this in a production and test site.

RavensScripts
 
View user's profile Send private message
spasticdonkey
RavenNuke(tm) Development Team



Joined: Dec 02, 2006
Posts: 1693
Location: Texas, USA

PostPosted: Mon Sep 17, 2012 12:54 pm Reply with quote

Can you post a sample of the code your ad is using, or does it happen with all ad types (image)? Is there any CSS that is applied to, or effecting the ad itself?
 
View user's profile Send private message Visit poster's website
jlajax







PostPosted: Tue Sep 18, 2012 10:50 am Reply with quote

Here is what is in the test site. The test site is an out of the box installation of RavenNuke 2.5 The only changes I have made so far are replaceing graphics and altering colors in css files.

Is it a working here? Let’s see. Development site works or not work.

I inserted it using the java/html/ selection. In the production site there are a multitude of different format encompassing the full spectrum.
You can see the out of the box set up @ [ Only registered users can see links on this board! Get registered or login! ] the production site is [ Only registered users can see links on this board! Get registered or login! ] I use the advertising modules a lot in most of the clients sites I have.

RavensScripts RavensScripts
 
spasticdonkey







PostPosted: Tue Sep 18, 2012 7:57 pm Reply with quote

Hmm, that is some strange behavior. It looks like both the themes you mentioned use
ads(1);
For an inside the header ad....

Which is also the position used in the advertising block. There is a comment in the ad block that states that:
// Position "1" by default is for block advertising.

Which is incorrect. Appears there is no default position for block ads. You need to create it.
Page Top=0
Page Header=1


We should probably have a default position #2 for blocks, and use ads(2) within the block... but there may be a good reason why that wasn't done. Possibly overwriting a given site's custom positions?

fkelly would probably know better if this should be considered a bug or not. For you I would create a position #2 and edit the block to use that position. Hopefully that will take care of it Smile
 
fkelly
Former Moderator in Good Standing



Joined: Aug 30, 2005
Posts: 3312
Location: near Albany NY

PostPosted: Wed Sep 19, 2012 7:36 am Reply with quote

Good catch. This situation represents a bug or at least an inconsistency in our coding and instructions. You do know that there is documentation at:

http://rnwiki.ravennuke.com/wiki/RavenNuke2:Administering_the_Advertising_Module

In resolving this situation it is helpful to start with some basics. There is a MYSQL table named "banner_positions" (I'll dispense with prefix for this discussion). In it you define possible block positions on your system. By convention, the themeheader has always used block position 0. When you set up an ad in the banners table you assign it to one of the block positions you have already set up. In addition to position 0, which was used in themeheaders, by convention we have used position 1 for the advertising block.

There is a function named ads(n) in mainfile that is called to present an ad. The n represents the block position. So, if you call ads(0), mainfile will find all ads in the banners table that are assigned to position 0 and return the contents of them to the calling program. We usually use a variable named $adText and call ads like this:

$adText = ads(0);

It appears that in a recent iteration of Ravennuke we started making two calls to ads(n) in the themeheaders of Ravenice and SimplyBlue. First we call ads(0), then ads(1). The advertising block also calls ads(1).

So, Spastic's proposed solution should work for you. If you only want one ad in your header area just use position 0 for those. Don't put anything in position 1. Then create a position 2 and anything you want shown in the separate advertising block goes there. Edit block-advertising to do a call to:

$content = ads(2);

The block-advertising has the cryptic comment in it:

// Position "1" by default is for block advertising. You can change this from your admin panel

but really all you can do from the admin panel is create a new position and assign ads to that position. If we want to present two ads in the header we should probably rename position 1 to something like "header ad #2" and then reserve position 2 for the block-advertising. On the other hand, sites will have very different needs. You could easily want to have a block-advertising2.php and a block-advertising3 etc. to have different blocks with different block positions (different from advertising positions) displayed at different places on your site. So long as you change the call to ads(n) to reflect the ads you want to have in that block it should work fine.
 
View user's profile Send private message Visit poster's website
jlajax







PostPosted: Wed Sep 19, 2012 11:11 am Reply with quote

Yes indeed that worked. So I can extrapolate that I can create a block simply for news to address sizing issues on banners and display continuity. Cool something to play with. Thanks guys

RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts RavensScripts
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> RavenNuke(tm) v2.5x

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©