1
Tutorials / Re: [TUTORIAL] Own server messages in the alert box on login scr
« on: October 05, 2017, 06:22:03 am »
Necro post but you can do a lot more with SimpleHTML than thought of here, just need to format it correctly.
Note that img have to be outside of any text formatting and the src has to be part of the WoW Client. Colors and icons mid-text can be done just as with WoW API for escape sequencing since it gets converted to Lua basically in the end anyways, so those work.
Also seems that - while having "SERVERALERT:" inside the <html><body> on 3.3.5a works - later versions (only tested on Legion) require it to be outside of everything and the very first thing in the file.
Figured I'd put this here though since it's really the only topic on this content.
Code: [Select]
SERVERALERT:
<html><body>
<p>Here's a sample of what can be done in the server alert file.
</p>
<p>There's three different header styles:</p>
<br/>
<h1 align="center">This is header style 1</h1>
<h2 align="center">This is header style 2</h2>
<h3 align="center">This is header style 3 (like paragraph style)</h3>
<hr/>
<p align="left">Text can be aligned left,</p>
<p align="center">center,</p>
<p align="right">or to the right!</p>
<img src="Interface/Icons/Ability_Ambush" width="24" height="24" align="right"/>
<img src="Interface/Icons/INV_Misc_Coin_02" width="24" height="24" align="left"/>
<img src="Interface/Icons/INV_Misc_Coin_03" width="24" height="24" align="center"/>
<p>It is |cffff0000also|r |cffff00ffpossible|r to |cff8080ffcolorize|r |cff00ffffthe|r |cff00ff00text|r,</p>
<p>add icons |TInterface/Icons/INV_Misc_Coin_01:16:16:0:0:64:64:4:60:4:60|t to the middle of the text,</p>
<hr/>
<p>You can have links also: <a href="modcraft.io">This link takes you to modcraft</a></p>
</body></html>
Note that img have to be outside of any text formatting and the src has to be part of the WoW Client. Colors and icons mid-text can be done just as with WoW API for escape sequencing since it gets converted to Lua basically in the end anyways, so those work.
Also seems that - while having "SERVERALERT:" inside the <html><body> on 3.3.5a works - later versions (only tested on Legion) require it to be outside of everything and the very first thing in the file.
Figured I'd put this here though since it's really the only topic on this content.