Jump to content

Dynamic Content for Custom Links


Jaggl

Recommended Posts

You can do something like this:

url: /redirect.aspx?serviceid=%serviceid%

 

c:\program files\tcadmin control panel\web\redirect.aspx :

<%
If TCAdminSDK.Web.Session.IsAuthenticated() Then
 Dim service As New TCAdminSDK.Objects.Service
 service.ServiceID = Request.QueryString("serviceid")
 If service.Find() Then
   Response.Redirect(String.Format("http://{0}/{0}-{1}", service.ServerIP, service.ServerPort))
   End If
End If
%>

Link to comment
Share on other sites

when i set this in URL: void window.open('/redirect.aspx?serviceid=%serviceid%')

 

It dont work, i get an error

 

 

 

Serverfehler in der Anwendung '/'.

Die Ressource kann nicht gefunden werden.

Beschreibung: HTTP 404. Die gesuchte Ressource, oder eine ihrer Abhängigkeiten, wurde möglicherweise entfernt, umbenannt oder ist nicht verfügbar. Überprüfen Sie folgenden URL, und stellen Sie sicher, dass er richtig buchstabiert wurde.

 

Angeforderter URL: /Templates/Default/void window.open('/redirect.aspx

Link to comment
Share on other sites

  • 3 weeks later...

how can i use other Ports then the Server Port for the Costom links?

 

 

Normaly its:

 

 

<%
If TCAdminSDK.Web.Session.IsAuthenticated() Then
 Dim service As New TCAdminSDK.Objects.Service
 service.ServiceID = Request.QueryString("serviceid")
 If service.Find() Then
   Response.Redirect(String.Format("http://bf2tracker.com/webspec/index.php?addr={0}:{1}", service.ServerIP, service.ServerPort))
   End If
End If
%>

 

 

 

 

 

can't i use something like this:

 

 

<%
If TCAdminSDK.Web.Session.IsAuthenticated() Then
 Dim service As New TCAdminSDK.Objects.Service
 service.ServiceID = Request.QueryString("serviceid")
 If service.Find() Then
   Response.Redirect(String.Format("http://bf2tracker.com/webspec/index.php?addr={0}:{1}:{2}", service.ServerIP, service.ServerPort, service.QueryPort))
   End If
End If
%>

Link to comment
Share on other sites

  • 1 year later...

Nice stuff, Im using it for trackmania to enable TMWeb but i got a problem :

 

I set up aseco and fast as secondary applications and I put a filter so the TMWeb custom link is displayed only for Trackmania but its also displayed in the secondary applications and the link then doesnt work.

Is there a way to disabled a custom link for secondary applications or may i use a different link?

I tried to replace service.ServerIP by service.primaryServerIP or service.primary_ServerIP but it doesnt work

 

EDit : fixed, I edited the aseco/fast settings for game port expression > Server primary IP, works only for new created servers but not big deal.

Link to comment
Share on other sites

  • 1 year later...

sorry for activating an old thread but:

 

 

i use this for a Game Server Cusotm Link:

 

<%

If TCAdminSDK.Web.Session.IsAuthenticated() Then

Dim service As New TCAdminSDK.Objects.Service

service.ServiceID = Request.QueryString("serviceid")

If service.Find() Then

Response.Redirect(String.Format("http://{0}:{1}", service.ServerIP, service.ServerPort))

End If

End If

%>

 

 

and javascript: void window.open('/redirect_aao.aspx?serviceid=%serviceid%') in the Custom Link Settings.

 

 

 

how can i use this for my voiceservers? so that a windows open with dynamic port (the voice server port)

Link to comment
Share on other sites

sorry for activating an old thread but:

 

 

i use this for a Game Server Cusotm Link:

 

<%

If TCAdminSDK.Web.Session.IsAuthenticated() Then

Dim service As New TCAdminSDK.Objects.Service

service.ServiceID = Request.QueryString("serviceid")

If service.Find() Then

Response.Redirect(String.Format("http://{0}:{1}", service.ServerIP, service.ServerPort))

End If

End If

%>

 

 

and javascript: void window.open('/redirect_aao.aspx?serviceid=%serviceid%') in the Custom Link Settings.

 

 

 

how can i use this for my voiceservers? so that a windows open with dynamic port (the voice server port)

 

I'm just guessing here but maybe playing with vvoiceserver_home.aspx could do the trick? try it out and let me know :)

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Terms of Use