TinyPortal

Development => Support => Topic started by: shanhi on April 21, 2007, 02:14:15 AM

Title: which box should I use
Post by: shanhi on April 21, 2007, 02:14:15 AM
I have a code like this

<php? something>
<script>
........
</script>
</php>


which box should I put this code in.html/script or php?Thanks
Title: Re: which box should I use
Post by: Shadow on April 21, 2007, 03:07:43 AM
I tested the code out.  And I didn't see nothing...I use a scriptbox in tp....Like I said I didnt see nothing..
Title: Re: which box should I use
Post by: shanhi on April 21, 2007, 03:11:21 AM
Quote from: Shadow Queen on April 21, 2007, 03:07:43 AM
I tested the code out.  And I didn't see nothing...I use a scriptbox in tp....Like I said I didnt see nothing..
what do you mean by testing.I did not give you the code.That one is the general code.I am working on that code right now.
Title: Re: which box should I use
Post by: Shadow on April 21, 2007, 03:14:54 AM
Quote
which box should I put this code in.html/script or php?Thanks

And you ask us which box to use...We cant tell by the code....

After you done with the code try to use this type of box scriptbox or phpbox...
Title: Re: which box should I use
Post by: rebelrose on April 21, 2007, 06:02:04 AM
Neither, post the correct and complete code and we can help.
Title: Re: which box should I use
Post by: Lord Anubis on April 21, 2007, 06:21:07 AM
phpbox...

The code is obviously php without you putting the whole code...be careful though... you can mess things up if your code is incorrect, and the box is set to on, preview it before turning it on  ;)
Title: Re: which box should I use
Post by: Skhilled on April 21, 2007, 06:27:28 AM
That is correct. Any php code should go in a phpbox. ;)
Title: Re: which box should I use
Post by: Thurnok on April 21, 2007, 06:30:47 AM
If you are going to put php code in, there is only one choice, and that is a phpbox.

You must leave out the opening and closing php tags however.  Also, you will need to echo your javascript and/or html code that you are including with it.

Example:
phpbox code

// do not use <?php and ?> (opening and closing php tags)
$myvar = "some info";
// various php commands that follow
          .
          .
          .
// if you want to include javascript or html code, "echo" it using php echo command
echo '
<script type="text/javascript">
<!--
// some javascript code
var jarray = new Array();
var test = "Testing";
alert(test);
</script>
// -->

<!-- some HTML -->
<h1>Introducing</h1>
<h2><b>TinyPortal!!</b></h2>
';

Title: Re: which box should I use
Post by: rebelrose on April 21, 2007, 06:33:37 AM
exactly, because looking at what was posted it is hard to say if he/she was going for php or wanting to use script. Thurnok, you d'man ;)
Title: Re: which box should I use
Post by: Shadow on April 21, 2007, 06:35:25 AM
Thank you Rose

I have to agree with you about that one.  Its hard to tell what them going for but I put on my post for two type of block :)
Title: Re: which box should I use
Post by: Thurnok on April 21, 2007, 06:40:24 AM
heh.. there I go writing code in a post textarea again... left out a semicolon, so went back and edited for posterity sake!  :)
Title: Re: which box should I use
Post by: Shadow on April 21, 2007, 06:43:04 AM
hehe Sometimes that happen  ::)
Title: Re: which box should I use
Post by: Skhilled on April 22, 2007, 07:05:21 AM
Quote from: Thurnok on April 21, 2007, 06:30:47 AM
You must leave out the opening and closing php tags however.  Also, you will need to echo your javascript and/or html code that you are including with it.
After my last post it occurred to me later that I should have mentioned that. LOL
Title: Re: which box should I use
Post by: Shadow on April 22, 2007, 07:07:49 AM
But its kindly hard to tell what code he is using and kindly hard to tell him what type of box he can use...