Categories > TinyButStrong general >

simple php include

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: upena
Date: 2009-01-14
Time: 01:07

simple php include

Hello

I am using a script called phpmotion for videos and it uses TBS.  I want to include on the index page another file - I will call it abc.php and place the output in the right column of the page.

I am not all that familiar with TBS and have tried to comprehend other posts about includes but it is all Greek to me.

What exactly do I need to add to the index.php page and the html page I want the php include to appear on.

Thanks in advance,

Larry
By: Skrol29
Date: 2009-01-14
Time: 01:11

Re: simple php include

Hi Upena,

What you need is the sub-template feature.
You have an example in line of what this feature can do, go to the Example section and choose Sub-templates.
By: upena
Date: 2009-01-14
Time: 01:19

Re: simple php include

Skrol29

I must be thick - I still don't get it

thanks anyhow
By: TomH
Date: 2009-01-14
Time: 12:44

Re: simple php include

The advice to "go to the Example section" - which is a link at the top menu of this page seems pretty easy to do.  Does that not help you?

The Subtemplates examples there provide actual working code.
By: upena
Date: 2009-01-14
Time: 15:23

Re: simple php include

TomH

I went to the examples and was lost

so - I went to the files for my site to see how another working plug-in was set up and copied it and changed the name of the php file

I put this in my index.html file

<!-- Begin TLA Block -->
<div class="tags-title">Some Tesxt</div>
  <div id="tags-block">
       <!--[var.tla_block;htmlconv=no;comm]-->
  </div><!-- End TLA Block -->   

and this in the index,php file

include_once ('tla.php');

Nothing displayed and it broke my template.
By: Trent
Date: 2009-01-16
Time: 20:46

Re: simple php include

Try the following below without the 'include_once('tla.php')' in your index file.

<!-- Begin TLA Block -->
<div class="tags-title">Some Tesxt</div>
  <div id="tags-block">
       [onload;file='tla.php']
  </div><!-- End TLA Block -->

When you view the examples, you can view the html source, the php source, the preview etc. by selecting the radio buttons on the left side.  Maybe that will help clear up the issues you were having with the examples.