Author |
Topic  |
MarcelG
Retired Support Moderator
    
Netherlands
2625 Posts |
|
pdrg
Support Moderator
    
United Kingdom
2897 Posts |
Posted - 13 October 2005 : 04:29:18
|
Woohoo! |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 13 October 2005 : 05:42:10
|
It was very easy to get the UserID and point http://www.site.com/username to http://www.site.com/pop_profile.asp?mode=display&id=" & UserID & " and tadaaa.. all users have their own little page on the world wide web. Now all I have to do is expand the use of the profiles (work is already in progress...) with their own blog/photo album and so on.
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
eauxvives
Junior Member
 
Bhutan
145 Posts |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 09 January 2006 : 03:26:02
|
I wanted it to show www.site.com/username also, but never got the time to look into it further, let me know if you find a way to do this =)
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
eauxvives
Junior Member
 
Bhutan
145 Posts |
Posted - 10 January 2006 : 11:05:53
|
you could always use a frame, but that's a chicken way of doing it: i.e. instead of quote: Response.Redirect "/forum/pop_profile.asp?mode=display&id=" & member_ID
use quote:
response.write "<html><head><title>"&m_name&"</title></head>"& vbNewLine & _ "<frameset rows=""0,*"" frameborder=""NO"" border=""0"" framespacing=""0"">" & vbNewLine & _ "<frame name=""topFrame"" scrolling=""NO"" noresize>"& vbNewLine & _ "<frame src=""/forum/pop_profile.asp?mode=display&id="&member_ID&" "" name=""mainFrame"">"& vbNewLine & _ "</frameset><noframes><body></body></noframes></html>"
But I don't like it either |
Edited by - eauxvives on 10 January 2006 11:07:05 |
 |
|
tribaliztic
Senior Member
   
Sweden
1532 Posts |
Posted - 11 January 2006 : 08:25:14
|
Nah, that's no solution I think =)
|
/Tribaliztic - www.gotlandrace.se -
|
 |
|
eauxvives
Junior Member
 
Bhutan
145 Posts |
Posted - 17 January 2006 : 09:44:55
|
I thought that one way would be to do an include statement but I did not find how to pass an asp parameter within an include statement ? ex <!--#INCLUDE FILE="pop_profile.asp?mode=display&id=<%member_ID%>"--> doesn't work...
|
Edited by - eauxvives on 17 January 2006 09:45:26 |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 17 January 2006 : 11:12:14
|
quote: Originally posted by eauxvives
I thought that one way would be to do an include statement but I did not find how to pass an asp parameter within an include statement ? ex <!--#INCLUDE FILE="pop_profile.asp?mode=display&id=<%member_ID%>"--> doesn't work...
Includes don't work like that. Maybe a look at Server.Execute or Server.Transfer might give you some ideas. |
 |
|
Nertz
Junior Member
 
Canada
341 Posts |
Posted - 17 January 2006 : 11:46:32
|
quote: Originally posted by eauxvives
I thought that one way would be to do an include statement but I did not find how to pass an asp parameter within an include statement ? ex <!--#INCLUDE FILE="pop_profile.asp?mode=display&id=<%member_ID%>"--> doesn't work...
not sure if this would work, but worth a try....
<!--#INCLUDE FILE="pop_profile.asp?mode=display&id=<%=member_ID%>"-->
--- or ----
<!--#INCLUDE FILE="pop_profile.asp?mode=display&id=<%Response.Write(member_ID)%>"-->
cheers Nat |
Sadly, most Family Court Judges wrongfully reward opportunistic gold diggers that use our children unjustly as "instruments" of power.
www.fathers-4-justice-canada.ca |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 17 January 2006 : 15:24:49
|
Includes don't work that way. They are processed before any scripts are run. Also, you can't pass any variables in the query string since all the statement does is grab the file and dump its contents into the location of the statement. (yes, that's a bit of an over-simplification.)
Server.Transfer and Server.Execute are probably your better bets. You can get the basics of them over at http://www.w3schools.com/asp/asp_ref_server.asp |
 |
|
eauxvives
Junior Member
 
Bhutan
145 Posts |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 25 January 2006 : 08:43:14
|
I knew about not being able to pass variables along in the query string, but I had thought that there were other ways around it.
If you wanted to cheat you could probably just use an iframe, but that will open up more problems than it solves...
I wonder if there isn't a way to use some of the AJAX techniques to jimmy something to gether...
Anyway, those are just a couple of random thoughts made before the first cup of coffee. Hope you find something that works. |
 |
|
ILLHILL
Junior Member
 
Netherlands
341 Posts |
Posted - 26 February 2006 : 16:55:25
|
Can anybody tell me how they got this to work?
This is the code I'm working with as I have collected from this topic:
quote: <!--#INCLUDE FILE="forum/config.asp"--> <% dim textlength, nonslashtext textlength = Len(Request.ServerVariables("QUERY_STRING")) nonslashtext = textlength - 36 strQString = (Right(Request.ServerVariables("QUERY_STRING"),nonslashtext))
If (Len(strQString)> 0) Then 'start the redirect script
Dim linkRec Dim link Dim hits Dim newUrl Set objConn = Server.CreateObject ("ADODB.Connection") Set linkRec = Server.CreateObject ("ADODB.Recordset") 'get current link link = strQString
'Open database objConn.Open strConnString
Set linkRec = objConn.Execute ("SELECT * FROM FORUM_MEMBERS WHERE M_NAME = "" & link & "";") if linkRec.BOF or linkRec.EOF then Set linkRec = Nothing objConn.Close Set objConn = Nothing Response.Buffer = True Response.Clear Response.Redirect("404_2.asp?=" & strQString) else 'link found, redirecting objConn.Execute "UPDATE FORUM_MEMBERS SET PAGE_HITS = PAGE_HITS + 1 WHERE M_NAME = " & link Set linkRec = Nothing objConn.Close Set objConn = Nothing Response.Buffer = True Response.Clear Response.Redirect "http://forum.mysite.com/pop_profile.asp?mode=display&id=" & strQString & "" end if end if
%>
The textlength part is not really clear to me. No matter which entry it redirects to the 404_2.asp page regardless.
Anybody willing to share how they got it to work?
Greets & thanks, Dominic |
CLPPR.com - All The News Only Seconds Away |
 |
|
AnonJr
Moderator
    
United States
5768 Posts |
Posted - 27 February 2006 : 06:10:33
|
probably because the 32 found in the nonslashtext line near the top is the length of the writer's URL. If yours is longer or shorter its probably cutting it off in the wrong place. Not sure if that's the only problem, but its a good place to start. |
 |
|
Topic  |
|