Previous Thread
Next Thread
Print Thread
Hop To
Joined: Sep 2008
Posts: 4
N
natcon Offline OP
stranger
OP Offline
stranger
N
Joined: Sep 2008
Posts: 4
I am trying to put google ad words and other banner rotation script into a sidebar island on my UBB board and it is showing a syntax error. It was just up and there must be something I am not adding in that I should, to get it to show up. Can you help me?

Joined: Dec 2003
Posts: 6,347
Likes: 51
Offline
Joined: Dec 2003
Posts: 6,347
Likes: 51


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Sep 2008
Posts: 4
N
natcon Offline OP
stranger
OP Offline
stranger
N
Joined: Sep 2008
Posts: 4
I go to protal layout and there is a link to the sidebar that I named resources. I click on the link and it says this

Body
This should contain the PHP code or HTML for the custom box. $body contains the actual content that should be printed in the custom box.

Warning: Invalid PHP code that has syntax errors can result in breaking the entire portal

then in the box I have this

?><script type="text/javascript" src="http://www.1800banners.com/adserver/adserver3.js"></script>
<script type="text/javascript">
var varsarray=[];
varsarray[0]='40165';
if(!token) {var token='0'} else {var token=token+1;}
var loadtype='0';
var adtype='3';
var background_color='#F0F0F0';
var border_color='#000000';
var text_color='#060606';
var text_rollcolor='#0033FF';
var domain_color='#9F9F9F';
varsarray['interhours']='';
varsarray['interpages']='';
adserver_initialize(token,loadtype,adtype,background_color,border_color,text_color,text_rollcolor,domain_color,varsarray);
</script>

?>
?>
?>

after I submit it a new question mark with greater than sign appears at the bottom but nothing shows up, either that or it shows a syntax error like this

Parse error: syntax error, unexpected '<' in /WWW/docs/forums/cache_builders/custom/portal_box_1.php on line 2

Joined: Dec 2003
Posts: 6,347
Likes: 51
Offline
Joined: Dec 2003
Posts: 6,347
Likes: 51
All completely incorrect.
Go back and read the wiki link I provided.

Re-insert the default code and start over.

Last edited by Ruben; 02/29/2012 6:59 PM. Reason: Added Comment

Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Offline
Pooh-Bah
D
Joined: Jan 2004
Posts: 2,474
Likes: 3
The ?> should not be there.

Start by resetting your island to something like this...


Code
/* PHP CODE HERE, IF NECESSARY */
/* DO NOT CHANGE THE LINE BELOW */
$body = <<<EOF




EOF;
/* DO NOT CHANGE THE LINE ABOVE */




Now place your code between the two EOFs


(Although, many javascripts need to go in the page header.)

Joined: Dec 2003
Posts: 6,347
Likes: 51
Offline
Joined: Dec 2003
Posts: 6,347
Likes: 51
Also if you read
http://www.ubbwiki.com/wiki/view/79/custom-islands.html
it will tell you the same thing.
Then get rid of the incorrect php tags.
Like Driv stated ?


Blue Man Group
There is no such thing as stupid questions. Just stupid answers
Joined: Sep 2008
Posts: 4
N
natcon Offline OP
stranger
OP Offline
stranger
N
Joined: Sep 2008
Posts: 4
cool that worked. I could not get the link to open up, but I copied and pasted what you put and it worked fine. THANKS!

Joined: Sep 2008
Posts: 4
N
natcon Offline OP
stranger
OP Offline
stranger
N
Joined: Sep 2008
Posts: 4
I was wondering if you could look at my forums and tell me if there is any features that I am missing out on that would spruce it up

www.nationalcontractors.com/forums

Joined: Jul 2011
Posts: 22
C
stranger
Offline
stranger
C
Joined: Jul 2011
Posts: 22
Tried to get on just now to have a look, but no response - is the site down?

Joined: Jan 2004
Posts: 2,474
Likes: 3
D
Pooh-Bah
Offline
Pooh-Bah
D
Joined: Jan 2004
Posts: 2,474
Likes: 3
same here...

Joined: Sep 2010
Posts: 97
V
member
Offline
member
V
Joined: Sep 2010
Posts: 97
Great guide Ruben !!
I'm messing around with this for the first time. I have a picture on photobucket that I'm using as my portal island picture. I actually got it to show up on my website. Now... I want members to be able to click on the picture and have them directed to a specific website. Right now it just links them to the photobucket website showing my picture. Whats the best way to link to a specified website?
What would you do Ruben?

Joined: Jun 2006
Posts: 16,060
Likes: 69
UBB.threads Developer
Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,060
Likes: 69
Code
<a href="http://thesite.tld/linkedpage.php" target="_blank"><img src="http://thesite.tld/image.ext" alt="name describing photo" /></a>


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Do you need Forum Install or Upgrade Services?
Forums: A Gardeners Forum, Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!

Link Copied to Clipboard
ShoutChat
Comment Guidelines: Do post respectful and insightful comments. Don't flame, hate, spam.
Recent Topics
Gobal announcement replies.
by Ruben - 04/09/2021 1:46 PM
Strange parse error in faq.php
by Baldeagle - 04/06/2021 1:12 AM
Upgrading to 7.7.5: Error:
by BB - 04/02/2021 10:48 AM
Does UBB 7.7.5 support webp images
by Ruben - 03/27/2021 12:00 PM
Does UBB support webp image. For insert image
by Ruben - 03/27/2021 9:49 AM
Who's Online Now
1 members (JAISP), 46 guests, and 84 robots.
Key: Admin, Global Mod, Mod
Random Gallery Image
Latest Gallery Images
gallery test
gallery test
by Mors, September 23
Los Angeles
Los Angeles
by isaac, August 6
3D Creations
3D Creations
by JAISP, December 30
Artistic structures
Artistic structures
by isaac, August 29
Powered by UBB.threads™ PHP Forum Software 7.7.5