Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Snitz Forums 2000 MOD-Group
 MOD Add-On Forum (W/O Code)
 How To Open Forum-Links In A Frame?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 11 August 2005 :  13:29:00  Show Profile  Reply with Quote
You know, the nice links you can add for your users which all
open in clean new windows?
I was thinking about how to not just open them in a new window,
but in a specif frame in that window, so that you can have
other frames for whatever ads or applications you want to load
in there.
So technically the link's url should be send to a page (Frames.asp)
where the url opens in an upper frame, while the bottom frame is
pre-programmed to load ads or whatever.
Anybody ever tried this?

Thanks, D<

CLPPR.com - All The News Only Seconds Away

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 12 August 2005 :  05:19:02  Show Profile  Reply with Quote
Ill', is it the "Cool Links" in their profile you want to open in this frame or all links they post in your forums?

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 13 August 2005 :  04:22:35  Show Profile  Reply with Quote
Hi Shaggy, I'm referring to the links on the default page, like how
the Snitz default page has a handfull of links near the bottom, including the
" 4GuysFromRolla ASP FAQ" link.<

CLPPR.com - All The News Only Seconds Away
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 August 2005 :  05:19:19  Show Profile  Reply with Quote
OK, first you'll need to create an ASP page for your frameset (frames.asp below). For the src of the frame where the page is displayed, you're going to be grabbing it from the querystring, form a variable called page. Next, you're going to have to make a couple of quick edits to default.asp. The line references below are for a clean copy of v3.4.05.

Find the following beginning on line 498:
if ForumFType = 0 then
	ChkIsNew(ForumLastPost)
else 
	Response.Write	"<a href=""" & ForumURL & """ target=""_blank"">" & getCurrentIcon(strIconUrl,"Visit " & chkString(ForumSubject,"display"),"hspace=""0""") & "</a>"
end if
And replace it with the following:
if ForumFType = 0 then
	ChkIsNew(ForumLastPost)
else
	Response.Write	"<a href=""" & ForumURL & """ onclick=""window.open('frames.asp?page='+this,'frames');return false;"">" & getCurrentIcon(strIconUrl,"Visit " & chkString(ForumSubject,"display"),"hspace=""0""") & "</a>"
end if

Then find the following beginning on line 510:
if ForumFType = 0 then
	Response.Write	"forum.asp?FORUM_ID=" & ForumID
else 
	Response.Write	ForumURL & """ target=""_blank"
end if
And replace it with the following:
if ForumFType = 0 then
	Response.Write	"forum.asp?FORUM_ID=" & ForumID
else 
	Response.Write	ForumURL & """ onclick=""window.open('frames.asp?page='+this,'frames');return false;"
end if
<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 15 August 2005 :  08:37:03  Show Profile  Reply with Quote
Great Shaggy! I will start on this in a couple of hours,
you mentioned this in your reply "(frames.asp below)"
Was it something you forgot to post or did I misunderstood it?

Greets & thanks<

CLPPR.com - All The News Only Seconds Away
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 15 August 2005 :  09:04:59  Show Profile  Reply with Quote
frames.asp was the name I gave to the ASP page you need to create containing your frameset. If you call it something different, you'll need to alter the code I provided to reflect that.

<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page

ILLHILL
Junior Member

Netherlands
341 Posts

Posted - 16 August 2005 :  07:10:14  Show Profile  Reply with Quote
Any idea how the frameset part will look in Frames.asp?
Cause I know it will have to pull the data from the string, but
I have no idea how to do this.<

CLPPR.com - All The News Only Seconds Away
Go to Top of Page

Shaggy
Support Moderator

Ireland
6780 Posts

Posted - 16 August 2005 :  07:42:54  Show Profile  Reply with Quote
It's up to you how you want to layout your frames. To grab the page from the querystring, you'll need something along the lines of:
response.write "<frame src="""&server.htmlencode(request.querystring("page")&""" [properties] />
<

Search is your friend
“I was having a mildly paranoid day, mostly due to the
fact that the mad priest lady from over the river had
taken to nailing weasels to my front door again.”
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.2 seconds. Powered By: Snitz Forums 2000 Version 3.4.07