alanze Advanced Cheater Reputation: 3
Joined: 03 Oct 2012 Posts: 50
|
Posted: Wed Apr 29, 2015 6:22 pm Post subject: |
|
|
I don't know any lua to handle html code. But there are alternatives:
The first one would be to start the local browser, use this lua code:
Code: |
function fbPluginDialog()
shellExecute("http://yourwebsite.com/fbpluginpage.html")
end
|
The second one would be to add a .hta file to your trainer (as extra file), alongside with this lua code:
Code: |
function fbPluginDialog()
shellExecute("fbplugin.hta")
end
|
Now create a (like)button in your trainer and change it's "OnClick" event to "fbPluginDialog()".
I recommend the second method, note: hta files works only on windows platforms.
Here is a sample hta code (with xmlns and meta properties already adapted for fb plugins)
Code: |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
xmlns:og="http://ogp.me/ns#"
xmlns:fb="http://www.facebook.com/2008/fbml">
<head><title> Trainer facebook plugin dialog</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
<meta property="fb:admins" content="YOUR-ADMIN-ID"/>
<meta property="fb:app_id" content="YOUR-APP-ID" />
<meta property="og:type" content="trainer" />
<meta property="og:title" content="Trainer Title" />
<meta property="og:description" content="Trainer description" />
<meta property="og:url" content="YOUR-SITE-URL" />
<meta property="og:image" content="FULL-IMAGE -URL" />
<!-- this image will appear when someone Likes your page
and it’s added to their personal profile stream -->
<hta:application applicationname="trainer name" singleinstance="yes"
border="dialog" maximizebutton="no" scroll="no" icon="#">
<script type="text/javascript">
window.resizeTo(380,180);
window.moveTo((screen.width-380)/2 , (screen.height-180)/2);
</script>
<style type="text/css">
body {background:#e5e2e2; margin-top:20px; margin-left:11px;
cursor:default; font-size:16px; font-family:"Times New Roman"}
</style></head>
<body><div>
All your html stuffs here, <br />
fb plugin initialisation scripts (in javascript), <br />
fb related containers (div -s), <br />
just like on any site without php, <br />
then facebook generates the Social Plugin code for you.
</div></body></html>
|
Just copy / paste this code in notepad and save as fbplugin.hta
Now double-click to test it. If you like it then open it with any text editor
and start adding your html code.
If you want a custom titlebar icon for hta:
When the hta is finished use this command at cmd: copy /b icofile.ico + fbplugin.hta final.hta
Or change icon="#" inside hta to a full url: icon="http://yourwebsite.com/fblike.ico"
|
|