TinyPortal

Development => Support => Topic started by: EG on April 02, 2007, 12:48:38 PM

Title: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 02, 2007, 12:48:38 PM
and wont display the article anymore.... (on my forum)

it always used to...

this is the Menu -> article link:

      include("http://www.ageofthering.com/tp/tolkien/index.php");

and this is the php file:

<link rel="stylesheet" href="../css/mainsite.css" type="text/css">
      <!-- main text here -->

      <FONT SIZE=2>
      <BR>
        The Tolkien Frequently Asked Questions List (FAQ) is the first of
        two informational files on J.R.R. Tolkien and his writings, the other
        being the Less Frequently Asked Questions List (LessFAQ).  The division
        of questions follows several general criteria.
        <BR><BR>
        The FAQ leans towards
        questions of interest to people who have read only The Lord of the
        Rings and The Hobbit, together with most questions on Tolkien himself
        and on topics which seem fundamental to his worldview (his linguistic
        games in particular).
        <BR><BR>
        The LessFAQ contains questions of a more obscure
        nature, most questions arising from posthumous works, and in general
        aspects of the nature and history of Middle-earth which are important
        but tangential to The Lord of the Rings.  There is also an element of
        personal arbitrariness.
        <BR><BR>
        All available sources have been used for both
        lists.  Criticisms, corrections, and suggestions are of course welcome.
        Articles compiled by <A HREF="MAILTO:loos@hudce.harvard.edu">William D.B. Loos</A><BR><BR>

        1. <A HREF="/tolkien/faq1.php" TARGET="_top"><font color="#FF0000">FAQ part 1 </font></A><BR>
          Summary: Frequenty Asked Questions about the author J.R.R. Tolkien:
          questions commonly raised by the first reading of The Hobbit
          or The Lord of the Rings; details of the background mythology
          and invented history which relate directly to the stories;
          biographical matters.<BR><BR>

        2. <A HREF="/tolkien/faq2.php" TARGET="_top"><font color="#FF0000">FAQ part 2 </font></A><BR>
          Summary: Continuation of the above.<BR><BR>

        3. <A HREF="/tolkien/lessfaq.php" TARGET="_top"><font color="#FF0000">Less FAQ</font></A><BR>
          Summary: Less Frequenty Asked Questions about the author J.R.R. Tolkien:
          questions on his lesser known works; questions on deeper and/or
          more obscure details of the invented history, background mythology
          and matters philological and theological.
      <BR>
      </FONT>
      <!-- end main text -->



Any ideas why it wont display now ?
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: Resident Geek on April 02, 2007, 02:10:33 PM
You are using HTML not php.

Start your file with


<?php
echo'

//Your Text Here

'
;
?>



This will make it run as HTML inside of PHP. Try that.
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: IchBin on April 02, 2007, 02:20:23 PM
Actually to make it easier on you instead of turning it into PHP code, just change the file name to html and include the file with PHP.

But either of our tips should work. :)
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 02, 2007, 02:36:54 PM
ok thanks for that... but why doesnt it work now, when it always used to ?  thats what I dont get..

Plus, if I change it to an html file, will it pick up the css ?
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: IchBin on April 02, 2007, 02:53:13 PM
Well you must have done something different. HTML and CSS in one file is the way it should be. As you posted, you can include the file. But if its an HTML/CSS file then you would include it with its name and not a PHP name.
include('path/to/file.html');

If its a file with any PHP code in it, the file must be named file.php (php extension is required). Then you include it the same way with the proper file name.
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 02, 2007, 03:03:07 PM
hmmmm thanks...

I will change the files, sadly there are lots...

but actually, I havent changed anything other than update TP about 2 months ago..... I havent touched the files themselves for about 10 months. :-\
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 04, 2007, 07:52:22 PM
ok so now im really confused... I think that something has been switched on or off... probably by me!

I changed the welcome.php file to have the <?php
echo'
and '; ?> stuff in it

The article link says

Ã,  Ã,  include("http://www.ageofthering.com/tp/welcome.php");

and it runs just fine on its own

http://www.ageofthering.com/tp/welcome.php

but when I click on it in the forum (under the TP left menu) I still get the only options as


[Edit article] [Edit options]Ã, 


If you goto my forum, you'll see what I mean

www.ageofthering.com/forum
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: IchBin on April 04, 2007, 07:57:12 PM
I don't think you can include URL's. You have to put the path to the file name. include('/path/to/filename.php')
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 04, 2007, 10:04:36 PM
seriously... I can try to change it.. but up until a few weeks ago, it worked!Ã,  Its worked for months...Ã,  something else must have changed :-\

I mean if all those errors, php v html thing... paths etc were wrong, then surely it would throw up a "cant find file error" or something similar...

for it to be redirected to "edit article"  then that must mean there is something else wrong ?  doesnt it ?
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: bloc on April 04, 2007, 10:47:07 PM
In earlier versions html could be added to the title, but not anymore.

Is the title that include link?
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 04, 2007, 11:26:14 PM
the Title of the article is :Welcome to the Age of the Ring, a Lord of the Rings fansite

and the contents of the article are:
     include("http://www.ageofthering.com/tp/welcome.php");


thats all :-\

In the Menu Manager

Pos         Title                  Type              Item
10           Welcome           Article             Welcome to the Age of the Ring, a Lord of the Rings fansite
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: bloc on April 04, 2007, 11:43:52 PM
And its a php article?
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 05, 2007, 01:07:41 AM
yes
Title: Re: When I click on a item in the Contents it goes straight to edit :(
Post by: EG on April 15, 2007, 07:51:16 AM
Quote from: IchBinâ„¢ on April 04, 2007, 07:57:12 PM
I don't think you can include URL's. You have to put the path to the file name. include('/path/to/filename.php')

thanks IchBin..

in the end thats all I had to do!Ã,  replace the http://www.ageofthering.com with ..

didnt have to change anything else at all!Ã,  How wierd!