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

   Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 to Del.icio.us Add to del.icio.us
  Digg Re: Beta-[6.2-6.3] Banner Ad Rotator 1.0 Digg it
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 
Top Posters Last 30 Days
AllenAyres 13
Gizmo 10
sirdude 2
willing 2
S7ARBVCK 2
MattUK 1
Kevin H 1
Who's Online
0 Registered (), 26 Guests and 6 Spiders online.
Key: Admin, Global Mod, Mod
Shout Box

Latest Posts
Noob - need help, or a reality check!
by Gizmo
Today at 03:21 AM
Here I am! Rock me like a Hurricane!
by AllenAyres
09/02/08 03:05 PM
[7.x] Generic Page Outside of forum directory
by Gizmo
08/30/08 05:43 PM
Team UBBDev Rides Again!
by Gizmo
08/28/08 11:45 PM
Multiple Identity Detector
by MattUK
08/28/08 04:10 PM
[7.3.x] ubb.links
by AllenAyres
08/26/08 09:57 AM
Installing FlashChat with 7.3
by Gizmo
08/23/08 05:36 AM
New Mods
Installing FlashChat with 7.3
by Paug
08/23/08 12:14 AM
[7.3.x] ubb.links
by AllenAyres
06/20/08 11:50 PM
[7.2.1] - Naked shoutbox
by sirdude
08/17/07 10:36 PM
[7.x] Generic Page Outside of forum directory
by
01/14/07 10:58 PM
Multiple Identity Detector
by
12/30/06 06:39 PM
Newest Members
veedubb8, twentyseven, Claus1, welcomeback1, Paug
13327 Registered Users

 

 

 
fusionbb message board php hacks