Page 1 of 1

Can{PHP:my_external.php}be executed after a link is clicked?

Posted: Wed 3. Dec 2003, 18:15
by Bijan Hemati
Lets say I have an article or content with some text and some links in it. Is there anyway to execute {PHP:my_external.php} tag, when a link is clicked within that article?

I know you can embed a {PHP:my_external.php} in an article. And when the article is accessed, it automatically opens an external file within the table. But I'm looking for a way to cause the execution of {PHP:my_external.php} command, only after a link or button is clicked within an article.

I have found a workaround for that, but I don't like the look of it.
Here is what I did. I created a few articles with embedded {PHP:my_external.php} tag in each one, calling different external files. Now when the menu item (category) is selected, a page shows all the articles in a list form (many links). And when a link (article) is clicked on, the article opens (which in-turn executes the external file) and now I have my external file showing within that article, as if I had created that file in the article. (kind of like having frames)

Bijan

Posted: Fri 10. Sep 2004, 15:17
by MatthiasH
I have such a problem too.
I want to include an external content, not only one PHP file but a browsable structure (with own CSS).
I created an article with the "external content" template. The startup page is displayed (incomplete) but the (relative) links aren't usable because phpwcms looks for them in it's own root.
How can I fix this? Replace all links in the external PHP files??
Thanx in advance for an answer. :)

Edit:
I have it, an iframe is a solution: http://www.phpwcms.de/forum/viewtopic.php?t=2908
Great! :D