Page 1 of 1

php in seperate windows

Posted: Sun Feb 29, 2004 8:56 am
by redhair
I just came up with a simple idear, trash it if you like.

Say I am posting rather long code, which relies on other files I include to that file.

Now what I would like to do is post my code, and create a link under:

include(dirname(__FILE__)."/db_conn.php");

So when that is clicked in this forum, a new pop-up opens up with just the code of: db_conn.php

This would make the post shorter, easier readable.

(edit: or some extra fields in post-form, which will return in the message as links. Something like: "included files:")

Posted: Sun Feb 29, 2004 9:17 am
by d3ad1ysp0rk
what about a css overflow?

Posted: Sun Feb 29, 2004 10:28 am
by redhair
LiLpunkSkateR wrote:what about a css overflow?
ehh>?

Posted: Sun Feb 29, 2004 11:02 am
by redhair
It's just a thought...

Sometimes problems in a script are caused by the includes.
Say my script is 200 lines, with 5 includes.

How would you want to see it in the forum?

6 files as code in one message, or just 1 (say index.php) with seperate links to the 5 include files (code)...

Posted: Sun Feb 29, 2004 3:36 pm
by d3ad1ysp0rk
css overflow = mix between an iframe and a textarea..

Posted: Sun Feb 29, 2004 5:55 pm
by McGruff
We have no control over the content of external scripts.

Personally I don't believe people should be able to hijack members browsers to run scripts they did not request or would reasonably expect. At the very least, that's bad form.

In any case, if you can't outline the problem succinctly - showing just a few lines of relevant code - you're much less likely to get help.

Posted: Sun Feb 29, 2004 6:03 pm
by d3ad1ysp0rk
I think you misunderstood.. or I did. From my understanding the code would be just like it is now (when you wrap it in

Code: Select all

 tags), except in a pop up instead of crowding up the topic..

Posted: Sun Feb 29, 2004 7:39 pm
by redhair
LiLpunkSkateR wrote:I think you misunderstood.. or I did. From my understanding the code would be just like it is now (when you wrap it in

Code: Select all

 tags), except in a pop up instead of crowding up the topic..[/quote]
Exactly!

I'm sorry if I don't make myself clear enough, probably because I lack some English, since I'm just Dutch....and I like that.)

Anyway...

A seperate posting field for extra included files, is what I'm after.

This would be echood in the post as a separate block containing links to them (...which, when clicked opens a separate window, with just the code of the included code of the actual code.).

..if you catch my drift.