Difference between revisions of "MVC Templates"

Line 11: Line 11:
 
** Your custom template folder only needs to have the files that have been modified.
 
** Your custom template folder only needs to have the files that have been modified.
 
** If a file doesn't exist in your custom template it will use the file from the default template. Use the same directory structure as the Default template.
 
** If a file doesn't exist in your custom template it will use the file from the default template. Use the same directory structure as the Default template.
** You can safely ADD files to the default template folder but all the original files that have been edited will be overwritten when you update TCAdmin.
+
** You can safely ADD files to the default template folder but all the original files will be overwritten when you update TCAdmin.
 
** To translate MVC templates go to settings > languages > select the language > other components.
 
** To translate MVC templates go to settings > languages > select the language > other components.
 
<table><tr><td>[[File:MVCPreview1.png|800px]]</td><td>[[File:MVCPreview2.png|thumb]]</td></tr></table>
 
<table><tr><td>[[File:MVCPreview1.png|800px]]</td><td>[[File:MVCPreview2.png|thumb]]</td></tr></table>

Revision as of 15:40, 16 March 2019

Currently MVC templates are only supported on Windows. The MVC templates are currently in beta testing.

Features

  • The following features are configurable in the game settings:
    • Custom background images per game. Place the images in TCAdmin2\ControlPanel.MVC\Views\Default so they are used in all your custom themes.
    • Custom service home page template per game. (change whole layout of the service home page)
    • Custom status template per game. (change which information and ports are displayed)
    • Join URL
  • Responsive design.
  • Editable HTML templates.
    • Create a new theme in Settings > Themes. Set the type to MVC. A folder will be created in TCAdmin2\ControlPanel.MVC\Views where you can place your custom .cshtml and images.
    • Your custom template folder only needs to have the files that have been modified.
    • If a file doesn't exist in your custom template it will use the file from the default template. Use the same directory structure as the Default template.
    • You can safely ADD files to the default template folder but all the original files will be overwritten when you update TCAdmin.
    • To translate MVC templates go to settings > languages > select the language > other components.
MVCPreview1.png
MVCPreview2.png

Requirements

  • .NET 4.5 must be installed on your server. MVC templates will not work if you only have .NET 4.0 installed.
  • Install TCAdmin version 2.0.126.0 or greater.

Configure TCAdmin

  • Edit TCAdmin2\Monitor\TCAdminMonitor.exe.config. Add these lines under <appSettings> (update them if they already exist).
<add key="TCAdmin.Public.MVC" value="True" />
<add key="TCAdmin.Public.MVC.WebServicesPath" value="../ControlPanel.MVC" />
  • Restart the monitor service.

Update the WHMCS module (optional)

Make a backup of your /whmcs/modules/servers/tcadmin2_advanced/tcadmin2_advanced.php and replace it with this file. This module has the links updated to work with the MVC template format.

File:Tcadmin2 advanced mvc.zip

IIS configuration (optional)

Going back to the classic ASP.NET themes

If you want to go back to the classic ASP.NET themes:

  • Edit TCAdmin2\Monitor\TCAdminMonitor.exe.config and set the value of TCAdmin.Public.MVC to False
  • Restart the monitor.

Known Issues

  • Captcha is not implemented.
  • Reseller MVC templates and custom hostnames are not implemented.
Retrieved from "https://help.tcadmin.com/index.php?title=MVC_Templates&oldid=1596"