News: Welcome to the TinyPortal Support site.

Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media
Welcome, Guest. Please login or register.
Did you miss your activation email?

December 10, 2019, 06:17:22 PM

Login with username, password and session length

Recent

Members
Stats
  • Total Posts: 189279
  • Total Topics: 20775
  • Online Today: 386
  • Online Ever: 629
  • (November 08, 2018, 01:36:54 PM)
Users Online
Users: 0
Guests: 44
Total: 44

Author Topic: {SOLVED} articles: php vs html  (Read 2181 times)

0 Members and 1 Guest are viewing this topic.

jacci

  • Guest
{SOLVED} articles: php vs html
« on: July 08, 2007, 10:32:59 PM »
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

Code: [Select]
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
« Last Edit: July 10, 2007, 01:30:00 AM by jacci »

jacci

  • Guest
{Solved} Re: articles: php vs html
« Reply #1 on: July 10, 2007, 01: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!!