PDA

View Full Version : HTML Guru Here


Dr Dollarz
Mon 1st May '00, 7:36am
If anyone has any HTML problems or just want the code to soemthing than post it here, I will probrably be able to help you.

cheeky
Thu 4th May '00, 11:26pm
Actually, you can pick my brains on either:-

* HTML
* Javascript

and especially
* Active Server Pages

no problem too hard.

someone
Fri 5th May '00, 4:21am
Let's say you have vBulletin setup on a website which uses frames (frameset rows="*,400,*"):

- topframe contains navigation
- middleframe contains vBulletin
- bottomframe contains a banner

Here's the problem: when a user discovers a cool topic which he wants to email to someone else, that 'someone else' will get the url from the middle frame.

As a board admin, I want ofcourse the top & bottom frame to be displayed as well, cause they contain valuable information & navigation.

Is there any way to do this? I know the easiest way is not to work with frames, but with headers|footers|layers or whatever, but WE WANT FRAMES :)

Any solutions for this guys. Maybe some kind of script that tells certain pages to be placed automaticle in a frametemplate???

cheeky
Fri 5th May '00, 4:51am
The redirect or reference URL must point to a file that takes that information and writes the new framing out to the browser.

I don't know how vBulletin works - but it is very simple to do. I'd imagine you just need to change the reference URL in the email to one of your own that configures the browser frames.

let me know how you get on.

someone
Fri 5th May '00, 5:13am
Do you have any links where this redirect or reference URL script is explained? Preferable cgi...

cheeky
Fri 5th May '00, 5:33am
no I don't! ;)
but I'll give you the basic skeleton.

this is the current URL that gets sent:-

http://www.vbulletin.com/forum/showthread.php?threadid=255

change it to:-

http://www.yoursite.com/forum/framehandler.asp?threadid=255

the "framehandler.asp" file simply:-

* picks up the querystring information
* stores it
* writes out the FRAMES format of your window

The middle frame has dynamic content referencing the "SHOWTHREAD" file with this query information.

I'm an ASP expert, not cgi!

<%
Dim myThread
myThread = request.querystring("threadid")
%>

<html>
<head>
</head>
<frameset frameborder=no border=0 rows='*,400,*' framespacing=0 framecolor="#000000">

<frame src="navigation.asp" border=0 marginwidth=0 marginheight=0 noresize scrolling="no">

<frame src='http://www.yoursite.com/forum/showthread.php?threadid=<%=myThread%>'> noresize scrolling="auto">

<frame src="clickbanners.asp" border=0 marginwidth=0 marginheight=0 noresize scrolling="no">

</frameset>

<noframes>Sorry, this site uses frames! If your browser does not support them click <a href='/noframesfilehandler.asp'>here</a></noframes>
</html>



note: this has not been tested, but should be pretty close to what you need.

someone
Fri 5th May '00, 5:43am
I'm sorry, our server is Unix based, so I can only use cgi & php... no asp. and since I'm a newbie in scripting....

cheeky
Fri 5th May '00, 7:06am
well, just simply replace the ASP part with the UNIX equivalent, whatever it is. I don't use UNIX so I don't know., but it must be pretty simple.

Dr.Dollarz should be able to complete the simple conversion of the request.querystring format for you, and you've practically got the rest already.

good luck.

Stallion
Fri 5th May '00, 1:52pm
create showframes.php:
------
<html>
<head>
</head>
<frameset frameborder=no border=0 rows='*,400,*' framespacing=0 framecolor="#000000">

<frame src="navigation.asp" border=0 marginwidth=0 marginheight=0 noresize scrolling="no">

<frame src='http://www.yoursite.com/forum/showthread.php?threadid=<? echo threadid; ?>'> noresize scrolling="auto">

<frame src="clickbanners.asp" border=0 marginwidth=0 marginheight=0 noresize scrolling="no">

</frameset>

<noframes>Sorry, this site uses frames! If your browser does not support them click <a href='/noframesfilehandler.asp'>here</a></noframes>
</html>
------
Just call it via showframes.php3?threadid=255

There's also another option where you can force your forums page to open up with the frame set around it...but that involves JavaScript.

someone
Fri 5th May '00, 5:17pm
Thanks a lot for the help guys....

I have found a javascript solution as well here:

http://www.irt.org/articles/js013/index.htm

someone
Sun 28th May '00, 5:11pm
Originally posted by Stallion
create showframes.php:
<frame src='http://www.yoursite.com/forum/showthread.php?threadid=<? echo threadid; ?>'> noresize scrolling="auto">



I just tested it out, but it looks like this part of the code doesn't return the treadID#, in fact this is what I get when I run the script:

<frame src='http://www.yoursite.com/forum/showthread.php?threadid=treadid' noresize scrolling="auto">



WHat do I have to do to fix this script?

Mike Sullivan
Sun 28th May '00, 9:52pm
Try making the little PHP part look like this:
<?php echo $threadid ?>

cheeky
Sun 28th May '00, 10:21pm
so that's what the PHP equivalent of ASP looks like.

the code here should solve "someone"'s problem.

cheers