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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,972
  • Latest: Lineo
Stats
  • Total Posts: 196,105
  • Total Topics: 21,345
  • Online today: 1,072
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 278
  • Total: 278

Inject html file(s)

Started by fenris_w0lf, January 24, 2006, 09:57:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

feline

Quote from: fenris_w0lf on January 25, 2006, 12:21:14 PM
<a href="index.php?action=chat">Chat here!</a>
<a href="index.php?page=10">Chat statistics</a>
<a href="index.php?page=13">Who's online now?</a>


is that in a php block?
by this .. you must that enclose in


echo ' ... your code ..
         ... more ..
       ';


and the links ..

in php normly is to use $scripturl
so like

global $scripturl;

echo '<a href="' . $scripturl . '?action=chat">';


Fel

fenris_w0lf

Thanks Feline for the effort!!

The three lines is in a html block not php.

fenris_w0lf

nah...I'm lost, could this be some sort of bug or something ?

fenris_w0lf

#23
iframes arent really accepted as a php article now is it ? :(

well...atleast I learned something...

:D

...weird it works for one article, but not the next..the articles were identical except - as mentioned - the iframe id ???

eldacar

The simplest way would be to do something like echo file_get_contents(url);

You can do that for any file anywhere.

fenris_w0lf

#25
Thanks for that tip eldacar :)

edit: The parse error problem I was partly using non-php code in php articles and partly due to not removing the "<?php" and "?>"

*blush*

AmphetaMarinE

Try this inside a php block fenris_wolf
echo '<a href="index.php?action=chat">Chat here!</a><br />
<a href="index.php?page=10">Chat statistics</a><br />
<a href="index.php?page=13">Who\'s online now?</a>';

fenris_w0lf

The problem never was this html block:

<a href="index.php?action=chat">Chat here!</a>
<a href="index.php?page=10">Chat statistics</a>
<a href="index.php?page=17">Who's online now?</a>


It works just fine. The problem was the articles (page10 and page17 that is linked in the html block above.

Its working fine now. The problem was that I had php articles and used the "<?php" and the ending "?>" - without them it works fine.

AmphetaMarinE

Ahhh ok...
Trust me to misunderstand it like the big ol dumbum i am..... :P

This website is proudly hosted on Crocweb Cloud Website Hosting.