php forum
php mysql forum
php mysql smarty
 
Page 2 of 2 < 1 2
Topic Options
#244633 - 11/01/03 11:20 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: sf49rminer]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
I am getting that parse error on line 92 like the guy above... I dont see where anything is missing. <br /> <br />error: Parse error: parse error in /home/tampains/public_html/ubbthreads/bannerad.php on line 92 <br /> <br /> <br />Here is what I have: <br /> <br />80 // If we found the banner, we'll send the output <br />81 // otherwise there just won't be a box. <br />82 if ($Banner) { <br />83 echo <<<BANNER <br />84 $tbopen <br />85 <tr> <br />86 <td align="center" class="darktable"> <br />87 <b>Support Our Site - $Title</b> <br />88 </td> <br />89 </tr> <br />90 <td align="center" class="lighttable"> <br />91 $Banner <br />92 </td> <br />93 </tr> <br />94 $tbclose <br />95 <br /> <br />96 BANNER; <br />97 } <br /> <br /> <br />My board keyword and config variable are set correctly. <br /> <br />Any idea? <br /> <br />Update: Actually no matter what changes I make or whatever I still get the same error. I dont know what's up.


Edited by TampaInsider (11/01/03 11:48 PM)

Top
#244634 - 11/02/03 12:09 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: scot]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Some servers seem to not like HTML inside the echo statements like that. Try this:<br /><br />80 // If we found the banner, we'll send the output<br />81 // otherwise there just won't be a box.<br />82 if ($Banner) {<br />83 echo "<br />84 $tbopen<br />85 <tr><br />86 <td align=\"center\" class=\"darktable\"><br />87 <b>Support Our Site - $Title</b><br />88 </td><br />89 </tr><br />90 <td align=\"center\" class=\"lighttable\"><br />91 $Banner<br />92 </td><br />93 </tr><br />94 $tbclose<br />95 <br /><br />96 ";<br />97 }<br /><br /><br />Note the change in the echo statements and that a \ was added before each quote mark. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244635 - 11/02/03 12:20 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
Great, that worked just fine.

Top
#244636 - 11/02/03 12:28 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: scot]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Cool.... for some people it needs to be above. Very odd. <img src="http://www.ubbdev.com/forum/images/graemlins/crazy.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244637 - 11/02/03 12:34 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
That's why we have you around <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" /> <br /><br />I bought a couple of PHP books... I am taking a contract job in Iraq soon and will have plenty of time to hone my PHP skills while I'm there.
_________________________
Always looking for that next great thing...

My site: www.iraqiinsider.com

Top
#244638 - 11/02/03 11:47 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
TheInsider Offline
Journeyman

Registered: 03/16/03
Posts: 124
Loc: Baghdad, Iraq
I took your Mod and instead of putting the display in the ubbt.inc.php file I put it into the header.php include file. This way it shows up on the top right of my screen where I have blank space anyways.<br /><br />Here is what my /includes/header.php file looks like for anyone else interested. I did change some table properties in the header.php and in the Mod to get this how I wanted it to look. I took out the table properties in the Mod all together since it was going into a table already. <br /><br />You can look on my website to see how it looks.<br /><br />
Code:
  <br />&lt;table border="0" cellpadding="1" cellspacing="0" width="95%" class="tablesurround" align="center"&gt; <br />&lt;tr&gt; <br />&lt;td align="center"&gt; <br />&lt;table border="0" cellpadding="1" cellspacing="0" width="100%" class="tableborders" align="center"&gt; <br />&lt;tr&gt; <br />&lt;td align="center"&gt; <br />&lt;table border="0" cellpadding="0" cellspacing="0" width="70%" align="left"&gt; <br />&lt;tr&gt; <br />&lt;img src="http://www.tampainsider.com/images/tampains_logo.gif"&gt;<br />&lt;/tr&gt; <br /><br />&lt;table border="0" cellpadding="0" cellspacing="0" width="30%"&gt;<br />&lt;tr valign="middle"&gt;<br /><br />&lt;?<br />	$boardkeyword = "banners";<br />	<br /><br />// -----------------------------------------------<br />// End of variables - do not edit below this line<br /><br /><br /><br />// ---------------<br />// Lets pull a random banner ad - by JoshPet<br /><br />	if ($config['banners']) {<br />		$query = "<br />			SELECT B_Subject,B_Body<br />			FROM {$config['tbprefix']}Posts<br />			WHERE B_Board = '$boardkeyword'<br />			AND B_Number = {$config['banners']}<br />		";<br />	}<br />	else {<br />		$query = "<br />			SELECT COUNT(*)<br />			FROM {$config['tbprefix']}Posts<br />			WHERE B_Board = '$boardkeyword'<br />		";<br />		$sth = $dbh -&gt; do_query($query);<br />	   list($totalcount) = $dbh -&gt; fetch_array($sth);<br />   	   $dbh -&gt; finish_sth($sth);<br /><br />		$RandNumber = 0;<br />		if ($totalcount &gt; 1) {<br />			$RandNumber = rand(0,($totalcount -1));<br />		}			<br /><br />		$query = "<br />			SELECT B_Subject,B_Body<br />			FROM {$config['tbprefix']}Posts<br />			WHERE B_Board = '$boardkeyword'<br />			LIMIT $RandNumber,1<br />		";<br />	}<br />		$sth = $dbh -&gt; do_query($query);<br />		list ($Title,$Banner)= $dbh -&gt; fetch_array($sth);<br />		$dbh -&gt; finish_sth($sth);<br /><br />    $html = new html;<br />    list($tbopen,$tbclose) = $this -&gt; table_wrapper();<br /><br />// If we found the banner, we'll send the output<br />// otherwise there just won't be a box.<br />if ($Banner) {<br />echo "<br />&lt;b&gt;&lt;font color=\"blue\"&gt;&lt;u&gt;Did You Know...&lt;/u&gt; - &lt;i&gt;$Banner&lt;/i&gt;&lt;/b&gt;&lt;/font&gt;<br />";<br />}<br />?&gt;<br />&lt;/tr&gt;<br />&lt;/table&gt;<br />
<br /><br />Thanks for the great Mod Josh.
_________________________
Always looking for that next great thing...

My site: www.iraqiinsider.com

Top
#244639 - 01/29/04 04:50 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: scot]
Gregori Offline
Member

Registered: 09/14/02
Posts: 157
Will this rotator work with 6.4.1? Anyone tested it?

Top
#244640 - 01/29/04 05:48 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: tubedogg_dup1]
JoshPet Offline
I type Like navaho

Registered: 11/29/01
Posts: 11330
Loc: Charlotte, NC
Yes,<br /><br />I'm using it on several 6.4 installs. Not sure if the instructions work word for word, but it should be fine. <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />
_________________________
Joshua Pettit
www.JoshuaPettit.com
My abilities are for hire.

Top
#244641 - 05/20/04 09:24 AM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Daine]
monkeyra Offline
Junior Member

Registered: 06/28/01
Posts: 363
Loc: uk
thought i'd try this hack again, looks like i needed that little amendment at the end as well, works ok now, on 6.4 <img src="http://www.ubbdev.com/forum/images/graemlins/smile.gif" alt="" />

Top
#244642 - 03/15/05 06:22 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: sf49rminer]
Earpman Offline
Lurker

Registered: 06/04/03
Posts: 1
Will this work on version 6.5b4?<br /><br />I am having trouble finding the config file to edit, doesn't look like you can edit it in the new control panel.<br /><br />Ron

Top
#244643 - 07/11/05 04:04 PM Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 [Re: Stub]
J.C. Offline
Addict

Registered: 08/11/00
Posts: 1551
Will this work on 6.5.1.1 ?
_________________________
- Groupee Moderator
- Custom Web Development
http://www.JCSWebDev.com

Top
Page 2 of 2 < 1 2


Moderator:  Ian_W 
Who's Online
0 registered (), 26 Guests and 8 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Forum 'Trader Ratings'.
by blaaskaak
11/20/08 08:27 AM
Problems reading a lot of old posts here
by Ruben Rocha
11/18/08 04:33 PM
PhotoPost BB Code Popup
by Iann128
11/15/08 01:24 PM
Customization needed
by Gizmo
11/12/08 12:28 PM
Team UBBDev Rides Again!
by AllenAyres
11/11/08 02:16 PM
Active Topics.
by AllenAyres
11/11/08 02:13 PM
Looking for a simple upload script
by AllenAyres
11/11/08 02:12 PM
New Mods
Forum 'Trader Ratings'.
by McLemore
11/19/08 02:14 PM
[7.4] Keep log of custom title changes
by blaaskaak
10/27/08 07:51 AM
User Authentication Class
by
01/19/07 02:59 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
PhotoPost BB Code Popup
by
11/06/06 05:43 PM
Newest Members
Begbie, cenk, MATTO, DougMMcts, tim Anderson
13361 Registered Users
Top Posters
AllenAyres 25448
JoshPet 11330
Rick 8372
LK 7396
Lord Dexter 6503
Greg Hard 5533
Charles Capps 5438

 

 

 
fusionbb message board php hacks