Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Themes Issues
Author Message
p17blo
Regular
Regular



Joined: Jul 27, 2007
Posts: 77

PostPosted: Sun Jul 29, 2007 2:12 pm Reply with quote

I have been trying to sort out what I thought would be a simple banner issue only end up going round and round in circles. I hope someone can enlighten me as to what I might be doing wrong.

I currently have an unmodified fisubice theme installed on the latest stable RN release and I have activated the advertising module and my sample (Javascript based) banner works in the left ad black.

I want the banner actually to appear underneath the risubice header block (either just under or just over the top nav bar)

I have edited the header.html file and added right at the very bottom

Code:
<?php

echo ads (1);
?>


But no matter what the banner will not show. If I change the banner position from 1 to 0 in the ad module the banner appear at the very top of the page which is too high.

I have read numerous posts about changes needed making to theme.php and header.html and I have tried everything but nothing works other that what I have already stated above.

Can anyone give me some definitive advice on what needs to be changed.

The end result need to show my banner on every page of my site, hence the best place for it is within the header.

Thanks

Paul
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Aug 06, 2007 10:27 pm Reply with quote

p17blo, sorry that no-one posted a response as yet. Not sure how we missed this.

The fisubice theme.php is using eval() rather than include(), therefore, I don't think you can use the in-line PHP tags. I think you have to put a variable reference amongst the other HTML within the header.html and then within theme.php's themeheader() function add code to set that variable to ads(1).

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
p17blo







PostPosted: Tue Aug 07, 2007 1:53 am Reply with quote

Thank you for taking the time to respond.

I have worked around the issue just at the moment as I don't directly sell advertising I was able to put in some Javascript into the header file myself to enable my immediate goal. However, it would be nice to find out exactly what I would need to do to enable to advertising module in Raven Nuke

Paul
 
montego







PostPosted: Tue Aug 07, 2007 6:35 am Reply with quote

p17blo wrote:
it would be nice to find out exactly what I would need to do to enable to advertising module in Raven Nuke


Yep, and now you have a "hint" on where to take this next... If you run into any further problems, please do not hesitate to post back here. Good luck!

BTW, check out the advertising positions that I have set up on my site. Some page / header / footer level and others in blocks and a few embedded, just to give an idea that it IS possible to do this with RavenNuke.
 
Gremmie
Former Moderator in Good Standing



Joined: Apr 06, 2006
Posts: 2415
Location: Iowa, USA

PostPosted: Tue Aug 07, 2007 7:11 am Reply with quote

You would need to put an "echo ads(1);" in theme.php. If you open up theme.php for fisubice you will see an echo ads(0); for the header. It should be easy to figure out where to put it for the footer. If not, post back. Good luck.

_________________
GCalendar - An Event Calendar for PHP-Nuke
Member_Map - A Google Maps Nuke Module 
View user's profile Send private message
montego







PostPosted: Tue Aug 07, 2007 7:32 am Reply with quote

Gremmie, I don't believe that will work if he is wanting to embed the ad within header.html somewhere. Take a closer look at how fisubice is working with theme.php and header.html. it really depends upon where he wants the banner to show up, which I think is in the header and not at the very top.

In fact, in looking at the code again, I think we have a bug in what we're doing with $showbanners (it is not getting ads(1) assigned to it... I must have fixed this in my version and forgot to come back and correct in RN). Are you seeing the same thing?
 
Gremmie







PostPosted: Tue Aug 07, 2007 8:03 am Reply with quote

Sorry, I misunderstood what the OP wanted.
 
Darrell3831
Worker
Worker



Joined: Feb 18, 2004
Posts: 244

PostPosted: Tue Aug 07, 2007 3:45 pm Reply with quote

I'm interested in this thread as well.

To clarify, using the fisubice theme is the what were supposed to do?

in theme.php we change:

Code:
echo ads(0); 


to:

Code:
echo ads(1); 


Then uncomment this line:

Code:
// $showbanners = '<a href="banners.php?op=click&amp;bid=$bid" target="_blank"><img src="'.$imageurl.'" border="0" alt="'.$alttext.'" title="'.$alttext.'" /></a>&nbsp;';


Then we place this or something similar:

Code:
<td width="40%" style="background-image: url(themes/fisubice/images/cellpic_bkg.jpg)" height="110">$showbanners</td>


virtually anywhere we want the banner to appear, such as header.html.

Correct?

_________________
[ Only registered users can see links on this board! Get registered or login! ] 
View user's profile Send private message Visit poster's website
Gremmie







PostPosted: Tue Aug 07, 2007 6:15 pm Reply with quote

I think you are going to want to leave that existing $showbanners = line commented out, and instead, add this:

$showbanners = ads(1); // or 0 or whatever

Then, in header.html, you can already see there is a $showbanners placeholder.


Last edited by Gremmie on Tue Aug 07, 2007 8:09 pm; edited 1 time in total 
Darrell3831







PostPosted: Tue Aug 07, 2007 8:02 pm Reply with quote

Okay,
Thanks!
 
Susann
Moderator



Joined: Dec 19, 2004
Posts: 3191
Location: Germany:Moderator German NukeSentinel Support

PostPosted: Wed Dec 05, 2007 7:24 pm Reply with quote

Montego because you talked about the advertising positions I have set mine to a block at the bottom $showbanners = ads(3); and instead at the bottom its beneed my logo and the block is empty ?
 
View user's profile Send private message
montego







PostPosted: Thu Dec 06, 2007 10:23 am Reply with quote

In the case of a block, it would probably be more like this:

$content .= ads(3);

There may be some additional HTML that you need to add around it (not sure), but this should get the HTML for ad position 3 into the block.
 
NeapolitanWorld
Involved
Involved



Joined: Nov 06, 2005
Posts: 339
Location: Los Angeles, USA

PostPosted: Wed Dec 24, 2008 12:59 pm Reply with quote

Much like that first poster I spent a few hours trying to figure out the Advertising module. I managed to do a few things like add clients, positions etc. but I was not able to implement it on my themes. I can tell it's a great tool, however I just have not managed to fully understands how it works.

In the old 7.6 Nuke, banner adds would be added by usually adding: $showbanners in the /themes/ header.html file or where ever you wanted (footer etc).

As an example on the fisubice which comes with Raven
I see the same code $showbanners in /themes/header.html file. This is exactly where I'm trying to have my banner show, which is in montegos "Header" position as shown here: [ Only registered users can see links on this board! Get registered or login! ]

In fisubice /themes/ theme.php file there is a code "echo ads(0);" on line 144. Which I'm assuming takes care of this step:
Quote:
to use the position you must include the code: ads(position); in your theme file


My current adds positions are as follow:

Header 0 ( I have 1 Assigned add here which I'm trying to implement in the position I mentioned size 375 x 80)
Left Block 1
Center Down 2

When I activate my assigned banner in position (0) Header. It appears on position "Banner Top" in montegos page posted above Sad Sad Confused instead of the Header position. -Do I have to remove or edit anything from my html/header.php file?

-Do I have to add something to "$showbanners" in the fisubice/header.html code or -what am I missing. I feel like I need a Advertising Book For Dummies Neutral on this one! is there documentation on this somewhere or something on-line which explains the process?

Thanks in advance, and HAPPY HOLIDAY'S to everyone at Ravens
Razz

jc


Last edited by NeapolitanWorld on Sat Dec 27, 2008 2:22 pm; edited 2 times in total 
View user's profile Send private message
Guardian2003
Site Admin



Joined: Aug 28, 2003
Posts: 6799
Location: Ha Noi, Viet Nam

PostPosted: Wed Dec 24, 2008 3:23 pm Reply with quote

It depends ultimately on how you have configured the Advertising module.
As you can see in the Advertising administration area, you can assign different positions to a banner and the positions are assigned a number.
All you have to do the is echo ads(thenumber)
For example you might assign 'Banner Top (which is above the header) to '0' so to make a banner appear in that position
Code:
echo ads(0);


If you assign the Header banner to '1' you use
Code:
echo ads(1);


Just remember that different 'positions' have different widths and heights created for them (which you can do in the Advertising module area).
So if you have say, a Banner Top which is usually 760x80 or something it is probably too big to put in the header or in a block but let's say as an example you wanted to show two big banners, one at the very top ads(0) and one at the very bottom, you don't have to create another banner position you can still use ads(0) but put it in your footer.php

There is no manula that I know of. I did think of writing one as it would be useful but my Advertising module is not exactly the standard one - who knows though, I may have some time tomorrow to play.
 
View user's profile Send private message Send e-mail
NeapolitanWorld







PostPosted: Wed Dec 24, 2008 7:06 pm Reply with quote

Thanks John!

Thus far I'm able to use Banner Top, the block positions (center up, down, left etc) which is very easy. The only one that I don't get is the banner in the Header like how Ravens is displaying at this moment, but that's ok. I have plenty of positions to work with until I figure it out! LOL! My last question, where do you customize the advertising.html page (link of course with tego ShortLinks).

Best, thanks! and no worries on that manual... it's Christmas Smile

jc
 
Guardian2003







PostPosted: Thu Dec 25, 2008 4:06 am Reply with quote

modules/Advertising/index.php
 
montego







PostPosted: Fri Dec 26, 2008 11:17 am Reply with quote

NeapolitanWorld, it really does depend upon your theme. Do you have just a theme.php, or is there a header.html? If you have a header.html, most of the time it will use a variable name embedded within the HTML and you use the HTML/CSS to position it. You will have to assign your ads(#) to that variable within the themeheader().

If you do not have a header.html, most of the time (not always) you will have to modify the themeheader() function code to get the ads(#) HTML and echo it where you want it placed.
 
NeapolitanWorld







PostPosted: Fri Dec 26, 2008 12:51 pm Reply with quote

montego wrote:
NeapolitanWorld, it really does depend upon your theme. Do you have just a theme.php, or is there a header.html? If you have a header.html, most of the time it will use a variable name embedded within the HTML and you use the HTML/CSS to position it. You will have to assign your ads(#) to that variable within the themeheader().

If you do not have a header.html, most of the time (not always) you will have to modify the themeheader() function code to get the ads(#) HTML and echo it where you want it placed.


Most of my themes have both a theme.php and also a header.html file in the theme folder. I realized that RavenIce already has the Header position exactly where I wanted my banners.
I can use this to help me with other themes like fisubice which positions it in to Banners Top position instead of the header.

RavenIsce code include:

Quote:
function themeheader() {
global $db, $prefix, $banners, $sitename, $user, $admin, $admin_file, $nukeurl, $slogan;
if ($banners == 1) {
$numrows = $db->sql_numrows($db->sql_query('SELECT * FROM '.$prefix.'_banner WHERE active=\'1\''));


Quote:
if ($banners) {
echo '<div id="head_ad">';
echo ads(1);
echo '</div>';
};


I figure I need the two or one of the two in /fisubice/theme.php

Nice job on your banner program! I'm trying to implement a similar program on my site Very Happy

jc
 
montego







PostPosted: Sat Dec 27, 2008 10:15 am Reply with quote

If you are wanting to add this to fisubice, you have to modify the HTML in header.html to give you the structure that you need and then create a new variable, say maybe:

$banner_header

and place this in header.html where you want the ad HTML to show up.

Then, in theme.php, instead of this:

Code:


if ($banners) {
echo '<div id="head_ad">';
echo ads(1);
echo '</div>';
};


Try this instead:

Code:


if ($banners) {
   $banner_header = ads(1);
};


That should work as long as the code segment is above the line with the eval() in it.
 
NeapolitanWorld







PostPosted: Sat Dec 27, 2008 10:44 am Reply with quote

Thanks Montego your instructions worked exactly as advertised Very Happy
Also thanks for the editing on my other thread.

Regards,
jc
 
montego







PostPosted: Tue Dec 30, 2008 7:20 am Reply with quote

RavensScripts
 
themadhacker
Worker
Worker



Joined: May 30, 2006
Posts: 100

PostPosted: Sun Feb 22, 2009 8:09 pm Reply with quote

Sorry to bring up a rather old thread. But I have been searching and this is the closest I have come to my issue.

I cant get the banner to work where I want it to. I am using 2.2.x and the Karate theme, which doesnt have the header.html file...only php.

Not that I want to remove my "Top" banner...but where would I add a header banner in addition?

Code:


ads(2)


in here???

Code:


/************************************************************/
/* Function themeheader()                                   */
/*                                                          */
/* Control the header for your site. You need to define the */
/* BODY tag and in some part of the code call the blocks    */
/* function for left side with: blocks(left);               */
/************************************************************/

function themeheader() {
    global $user, $banners, $sitename, $slogan, $cookie, $prefix, $db, $anonymous;
    if ($user != '') {
      cookiedecode($user);
      $username = $cookie[1];
    }
    if (!isset($username)) {
        $username = '';
    }
    if (empty($username)) {
        $username = "$anonymous";
    }
    echo "<body bgcolor=\"#ffffff\" text=\"#000000\" link=\"#363636\" vlink=\"#363636\" alink=\"#d5ae83\">\n"
    ."<br />\n";
    if ($banners) {
echo ads(0);
    }
    echo "<br />\n"
    ."<table style='background-color:transparent;' cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\">\n"
    // ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
    ."<tr>\n"
    ."<td width=\"306\">\n"
    // ."<td bgcolor=\"#FFFFFF\" width=\"306\">\n" <----This iS BADDDDDD
    ."<a href=\"index.php\"><img src=\"themes/Karate/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\" /></a></td>\n"
    ."</tr>\n"
    ."</table><br />\n"
    ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
    ."<tr>\n"
    ."<td bgcolor=\"#F3E1AF\">\n"
    ."<img src=\"themes/Karate/images/tophighlight.gif\" /></td>\n"
    ."</tr>\n"
    ."</table>\n"
    ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#ffffff\">\n"
    ."<tr valign=\"middle\">\n"
    ."<td width=\"400\" bgcolor=\"#F3E1AF\" align=\"left\">\n"
    ."&nbsp;</td>\n"
    ."<td bgcolor=\"#F3E1AF\" align=\"center\">\n"
    ."<form action=\"search.html\" method=\"post\"><font class=\"content\" color=\"#000000\"><b>"._SEARCH." </b>\n"
    ."<input type=\"text\" name=\"query\" size=\"14\" /></font></form></td>\n"
    ."<td bgcolor=\"#F3E1AF\" align=\"center\">\n"
    ."<form action=\"modules.php?name=News&amp;new_topic\" method=\"post\"><font class=\"content\"><b>"._TOPICS." </b>\n";
    $toplist = $db->sql_query('select topicid, topictext from '.$prefix.'_topics order by topictext');
    echo "<select name=\"topic\" onchange='submit()'>\n"
    ."<option value=\"\">"._ALLTOPICS."</option>\n";
    if (!isset($sel)) $sel = '';
    if (!isset($topic)) $topic = '';
    while(list($topicid, $topics) = $db->sql_fetchrow($toplist)) {
    $topicid = intval($topicid);
    if ($topicid==$topic) { $sel = "selected "; }
    echo "<option $sel value=\"$topicid\" />$topics</option>\n";
    $sel = "";
    }
    echo "</select></font></form></td>\n"
    ."</tr></table>\n"
    ."<table cellpadding=\"0\" cellspacing=\"0\" width=\"750\" border=\"0\" align=\"center\" bgcolor=\"#fefefe\">\n"
    ."<tr>\n"
    ."<td bgcolor=\"#000000\" colspan=\"4\"><img src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=1 alt=\"\" border=\"0\" hspace=\"0\" /></td>\n"
    ."</tr>\n"
    ."<tr valign=\"middle\" bgcolor=\"#EFCE6B\">\n"
    ."<td width=\"15%\" nowrap=\"nowrap\"><font class=\"content\" color=\"#363636\">\n";
    if ($username == "$anonymous") {
    echo "&nbsp;&nbsp;<font color=\"#363636\"><a href=\"account.html\">"._LOGIN."</a></font>\n";
    } else {
    echo "&nbsp;&nbsp;"._HELLO." $username! &nbsp;&nbsp;<a href=\"modules.php?name=Your_Account&amp;op=logout\">logout</a>";
    }
    echo "</font></td>\n"
    ."<td align=\"center\" height=\"20\" width=\"60%\"><font class=\"content\">\n"
        ."&nbsp;\n"
        ."</td>\n"
        ."<td align=\"right\" width=\"25%\"><font class=\"content\">\n"
        ."<script type=\"text/javascript\">\n\n"
        ."<!--   // Array ofmonth Names\n"
        ."var monthNames = new Array( \"January\",\"February\",\"March\",\"April\",\"May\",\"June\",\"July\",\"August\",\"September\",\"October\",\"November\",\"December\");\n"
        ."var now = new Date();\n"
        ."thisYear = now.getYear();\n"
        ."if(thisYear < 1900) {thisYear += 1900}; // corrections if Y2K display problem\n"
        ."document.write(monthNames[now.getMonth()] + \" \" + now.getDate() + \", \" + thisYear);\n"
        ."// -->\n\n"
        ."</script></font></td>\n"
        ."<td>&nbsp;</td>\n"
        ."</tr>\n"
        ."<tr>\n"
        ."<td bgcolor=\"#000000\" colspan=\"4\"><img src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=\"1\" alt=\"\" border=\"0\" hspace=\"0\" /></td>\n"
        ."</tr>\n"
        ."</table>\n"
    ."<!-- FIN DEL TITULO -->\n"
    ."<table width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\">\n"
    ."<tr valign=\"top\">\n"
    ."<td bgcolor=\"#F3E1AF\"><img src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=\"3\" border=\"0\" alt=\"\" /></td>\n"
    ."</tr>\n"
    ."<tr valign=\"top\">\n"
    ."<td bgcolor=\"#ffffff\"><img src=\"themes/Karate/images/pixel.gif\" width=\"1\" height=\"5\" border=\"0\" alt=\"\" /></td>\n"
    ."</tr>\n"
    ."</table>\n"
;
    $public_msg = public_message();
        echo "$public_msg<br />";
    echo "<table width=\"750\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" bgcolor=\"#ffffff\" align=\"center\"><tr valign=\"top\">\n"
    ."<td bgcolor=\"#eeeeee\" width=\"150\" valign=\"top\">\n";
    blocks("left");
    echo "</td><td><img src=\"themes/Karate/images/pixel.gif\" width=\"15\" height=\"1\" border=\"0\" alt=\"\" /></td><td width=\"100%\">\n";
}
 
View user's profile Send private message
horrorcode
Involved
Involved



Joined: Jan 17, 2009
Posts: 272
Location: Missouri

PostPosted: Sun Feb 22, 2009 8:18 pm Reply with quote

Code:
    if ($banners) {

echo ads(0);
    }


Look for that, the codes already in there you probably just need to set an ad up.
 
View user's profile Send private message
horrorcode







PostPosted: Sun Feb 22, 2009 8:23 pm Reply with quote

Nevermind I see what your saying, you would need to setup another banner and add

Code:
echo ads(0);


replacing the 0 with the appropriate id, after this:

Code:
    ."<td width=\"306\">\n"

    // ."<td bgcolor=\"#FFFFFF\" width=\"306\">\n" <----This iS BADDDDDD
    ."<a href=\"index.php\"><img src=\"themes/Karate/images/logo.gif\" align=\"left\" alt=\""._WELCOMETO." $sitename\" border=\"0\" /></a></td>\n"


Might need to add another "td" section in there.
 
themadhacker







PostPosted: Sun Feb 22, 2009 8:26 pm Reply with quote

Yeah...I just want the banner to show to the right of my logo and not centered at the Top.

I would like to keep the TOP one in my Advertising module and save that to maybe use for special ads in the short term with programming the clients impressions.

But I would like to create a new one "ads(2)" and use that one to show directly to the right of site logo.

Everywhere I try to add it...it either doesnt show up or it breaks the site.

Thanks...I'll fiddle with what you gave above, but if you have anything else to add..feel free.

Smile
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> RN Themes Issues

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 ©