website - fix tracking for desktop downloads - didn't test it
This commit is contained in:
parent
af0646fad5
commit
3268ef04fb
@ -3,18 +3,18 @@
|
||||
include_once ( "userscript.php" );
|
||||
|
||||
|
||||
function iitcDesktopDownload ( $path )
|
||||
function iitcDesktopDownload ( $build )
|
||||
{
|
||||
$iitc_details = loadUserScriptHeader ( "$path/total-conversion-build.user.js" );
|
||||
$iitc_details = loadUserScriptHeader ( "$build/total-conversion-build.user.js" );
|
||||
$iitc_version = preg_replace ( '/^(\d+\.\d+\.\d+)\.(\d{8}\.\d{6})/', '\1<small class="muted">.\2</small>', $iitc_details['@version'] );
|
||||
|
||||
print "<p>IITC version $iitc_version</p>\n";
|
||||
|
||||
print "<a class=\"btn btn-large btn-primary\" onclick=\"if(track){track('desktop','iitc',$path);}\" href=\"$path/total-conversion-build.user.js\">Download</a>\n";
|
||||
print "<a class=\"btn btn-large btn-primary\" onclick=\"if(track){track('desktop','iitc','$build');}\" href=\"$build/total-conversion-build.user.js\">Download</a>\n";
|
||||
}
|
||||
|
||||
|
||||
function iitcDesktopPluginDownloadTable ( $path )
|
||||
function iitcDesktopPluginDownloadTable ( $build )
|
||||
{
|
||||
?>
|
||||
<table class="table table-condensed table-hover">
|
||||
@ -29,7 +29,7 @@ function iitcDesktopPluginDownloadTable ( $path )
|
||||
<tbody>
|
||||
|
||||
<?php
|
||||
foreach ( glob ( "$path/plugins/*.user.js" ) as $path )
|
||||
foreach ( glob ( "$build/plugins/*.user.js" ) as $path )
|
||||
{
|
||||
$basename = basename ( $path, ".user.js" );
|
||||
|
||||
@ -49,11 +49,7 @@ foreach ( glob ( "$path/plugins/*.user.js" ) as $path )
|
||||
print "<td>$name</td>";
|
||||
print "<td>$basename<br />$version</td>";
|
||||
print "<td>$description</td>";
|
||||
print "<td><a onclick=\"if(track){track('desktop','download','iitc-plugin-$basename');}\" href=\"$path\" class=\"btn btn-small btn-primary\">Download</a></td>";
|
||||
|
||||
# print "<a href=\"$path\">".$details['@name']."</a> <i>$name - version ".$details['@version']."</i>: <br/>\n";
|
||||
# print $details['@description'];
|
||||
|
||||
print "<td><a onclick=\"if(track){track('desktop','iitc-plugin-$basename','$build');}\" href=\"$path\" class=\"btn btn-small btn-primary\">Download</a></td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user