TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,994
  • Total Topics: 21,325
  • Online today: 369
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 295
  • Total: 295

PHP Aid

Started by Inny, April 22, 2009, 09:55:37 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

JPDeni

QuoteOnly way i could make it work was with include

The include worked? What is the issue, then?

Inny

Include Method. (links broken)
Here

Here base url is the Article url. Somehow if its duable i wanna change base directory so the links work.

Iframe Method. (Working Fine but its iframe :()
Here

Normal Without TP
Here


Ianedres

Is the script (running from SMF/TP's directory) interpreting the $dirName improperly?

Can you refer to the location by way of relative links? Using '../' before the pathname to the files? That way, the script goes up one directory (presumably to the root) before moving over to the intended path?

JPDeni

It would have been very handy for you to have given us the information about what you were getting at the start. Then I could have told you that you will have to parse the links if you want to use them in an article. Obviously just printing them out doesn't do what you want it to do.

Inny

Attaching a small zip with the actual report.

raidreports directory is in my server root. Same as SMF if that matters.


P.S. Bad typo, instead of raidreports is raireports.

Ianedres

Several things...

1) directory changes each day, thus the article would need to automatically determine such and link accordingly.
2) base target needs to be set; used echo to output the ole' "base href" kludge.
3) links within the generated report link directly to file (i.e. the report script would have to be rewritten)

I handled #1 and #2 with your archived info by placing a directory as "/raidreports"  in the root. Fill in your domain in the first line...$yourdomain = 'http://www.yourdomain.com';

$numdate = date("dmy");

echo '<base href="' . $yourdomain . '/raidreports/' . $numdate . '/" > ';

include("../raidreports/{$numdate}/index.html");


Problem #3 will remain; it will display the first page in the article, but the links go directly to another page without TP...

Inny

#16
For each report i create a new article, forgot to mention that.

With the iframe script i was only changing the date.

Gonna give a go at the code you gave me and reply back.

Edit: Select Box is not working for me, but thats maybe because of PrettyUrls. Gonna try something with .htaccess.


This website is proudly hosted on Crocweb Cloud Website Hosting.