Previous Thread
Next Thread
Print Thread
Rate Thread
#253193 07/08/2003 2:43 PM
Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
How can I add this to a custom box, what I have is a file that is uploaded to my server, then a php script pulls data from it and inserts it where ever I want it on a normal html page.
I have to add this to a html page so it can find the data.
<?php
include "/var/www/html/vwsalltags.php";?>

Then I have a line like this The Current Temperature is <?=$zxv007;? which post the text "The Current Temperature is" and inserts the data .

Can I add something like this to a custom box ?


Thanks

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
Are you talking about an IIP custom box?

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Yes Dave sorry about that ...

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
That should be easy to do. Just edit one of the custombox*.php files, add include "/var/www/html/vwsalltags.php";, and use "The Current Temperature is $zxv007" as the custom text. You wouldn't use the <?php ?> or <? ?> brackets because it's already PHP.

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Thanks Dave that sounds too easy.. I appreciate your great product and your help.

Sponsored Links
Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
You're welcome, but it's not my product.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Wrong Dave Anyway here is a custom box with exactly what you want in it.

Attachments
88263-custombox6pal.txt (0 Bytes, 35 downloads)

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Sorry Wrong Dave, Oh well I still appreciate your help


Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Ok while I am on a roll, what about a java script, can it be included in a custombox too ?

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
It all depends on what your trying to do?

Javacode can be placed in a template box yes.

Sponsored Links
Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Its a applet that reads another text file that is uploaded and scrolls it accross the screen, weather bulletins stuff.

<center>
<APPLET CODE="ScrollItUp.class" ARCHIVE="ScrollItUp.jar" WIDTH="600" HEIGHT="112">
<PARAM NAME="bgcolor" VALUE="668899">
<PARAM NAME="outlinecolor" VALUE="000000">
<PARAM NAME="scrollbgcolor" VALUE="ff0000">
<PARAM NAME="fontcolor" VALUE="ffffff">
<PARAM NAME="hovercolor" VALUE="00ff00">
<PARAM NAME="linkcolor" VALUE="000000">
<PARAM NAME="fontface" VALUE="arial">
<PARAM NAME="fontstyle" VALUE="plain">
<PARAM NAME="fontbold" VALUE="on">
<PARAM NAME="fontsize" VALUE="14">
<PARAM NAME="textfile" VALUE="summary.txt">
<PARAM NAME="brakes" VALUE="55">
<PARAM NAME="margin" VALUE="5">
</APPLET>
</center>

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
try this

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
Chuck,

I tried it but got the following error,
Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /var/www/html/ubbthreads/pals/custombox3pal.php on line 32

Line 32 is <p align"center">


Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
Okay simple error try this box. The / are missing

Try this box instead
Attachments
88274-custombox5pal.txt (0 Bytes, 43 downloads)

Joined: Oct 2002
Posts: 108
Journeyman
Journeyman
Offline
Joined: Oct 2002
Posts: 108
same error Parse error: parse error, unexpected T_STRING, expecting ',' or ';' in /var/www/html/ubbthreads/pals/custombox3pal.php on line 31

Line 31 is <p align="center">

I also tried <p align="center">;

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
see post above with new box

Joined: Apr 2002
Posts: 1,768
Addict
Addict
Offline
Joined: Apr 2002
Posts: 1,768
You missed one of the \. You could also do echo <<<END, and then you wouldn't need to escape the quotes.

Joined: Apr 2001
Posts: 3,266
Member
Member
Offline
Joined: Apr 2001
Posts: 3,266
LOL yes I could do that as well and threat it like a template. Yeah I saw the missing / thanks. I guess I just wanted to do it the hard way.


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
isaac
isaac
California
Posts: 1,157
Joined: July 2001
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
WebGuy 2
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20240430)