TinyPortal

Development => Support => Topic started by: jacci on July 09, 2007, 05:32:59 AM

Title: {SOLVED} articles: php vs html
Post by: jacci on July 09, 2007, 05:32:59 AM
Hi, am new to TP after being talked into installing it, and after an initially frustrating period, i am now TOTALLY converted and just love it!!!

It is the best mod I have ever seen, fabulous. I have managed to sort out the bulk of the stuff by myself but am having a little bit of difficulty with jsut one thing, and after days of bashing my head against the wall decidied i should just ask.

When making an article, if i want a normal html table, but with a php include, It seems i cannot simply put the

<?php include('path/myscript.php'); ?> into the html as i would normally

so i tried a php article and got the script to work fine. My proplem is though, i dont really know how to write php articles correctly and i just need a bit of help with a bit of snytax (at least i am assuming it is a syntax thing)

i have my code working in a php article like this

require('path/script.php');
echo '
<TABLE width="90%" border="1" bordercolor="#000000"><TBODY><TR><TD><P align="center">

     <P align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif">The <A href="http://www.pretendercentre.com/pretendergallery/index.php">PretenderCentre Gallery</A> is currently the home of  over 5700 peices of Pretender Art.<BR>
              </FONT><FONT face="Verdana, Arial, Helvetica, sans-serif"><BR>
              This includes icons/avatars, animations, wallpapers, screencaps, signatures and anything you can think of.</FONT></P>
      <P align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif">If you have any Pretender Art, we would love to host it at the PretenderCentre Gallery. If you have a lot of it, then the admin can batch add to save you tedious uploading. You can either create a private album to retain control over your own uploads, and they will live in the Centre files. If you want a category on the main page, then contact the admin, or drop a note here on the gallery board and we can set that up for you.</FONT></P>
    <P align="center"><FONT face="Verdana, Arial, Helvetica, sans-serif">Art in the Gallery is also showcases on Missing Pieces and the PretenderSIM.</FONT></P>
    <P align="center"> </P></TD></TR></TABLE>
<P align="center"> </P>
<P align="center"><BR>
</P>';


and that works fine. What i cant figure out is how to make that require work INSIDE the table without getting parse errors. Or even better, how to get the php include working in a html article.

thanks so much for any help or prods in the right direction here
jacci
Title: {Solved} Re: articles: php vs html
Post by: jacci on July 10, 2007, 08:29:15 AM
finally figured it out

just not used to writing in php and the basic syntax is still escaping me, but now it is all good!!