Quote
$timer = array(
$year => "year",
$month => "month",
$day => "day",
$hour => "hour",
$minute => "minute",
$second => "second"
);
Quote
return "<abbr class='atooltip' data-toggle='tooltip' data-placement='top' title='".showdate('newsdate', $updated)."'/>$answer ".$unit.$s." ago</abbr>";
require_once "../../../../maincore.php";
require_once INFUSIONS."pro_download_panel/infusion_db.php";
if (isset($_GET['Ajax']) && ($_GET['Ajax'] == 'get_downloads')) {
$total = dbarray(dbquery("SELECT SUM(pdp_downloads) dl_count, COUNT(addon_id) FROM ".DB_PDP_DOWNLOADS." WHERE addon_status='0'"));
$total_count = $total['dl_count'];
echo $total_count;
}
// this is your code
$total = dbarray(dbquery("SELECT SUM(pdp_downloads) dl_count, COUNT(addon_id) FROM ".DB_PDP_DOWNLOADS." WHERE addon_status='0'"));
$total_count = $total['dl_count'];
$html .= atom_counter($total_count);
function atom_counter($number, $offset=false, $speed=false){
// lets go for 25%;
if (!$offset) {
$offset = ($number > 10000) ? floor($number*0.01) : floor($number*0.25);
}
if (!$speed) {
$speed = ($number > 10000) ? 3000 : 2000;
}
add_to_head("
<script src='".ASSETS."flipCounter/jquery.easing.1.3.js' type='text/javascript'/></script>\n
<script src='".ASSETS."flipCounter/jquery.flipCounter.1.2.pack.js' type='text/javascript'/></script>\n
<script src='".ASSETS."flipCounter/jshashtable.js' type='text/javascript'/></script>\n
");
$html = "<div id='counter'><input type='hidden' name='counter-value'/></div>\n";
// replace the most bottom line for main.uk site
// NON AJAX Version
//$('#counter').flipCounter('startAnimation', { number: $number-$offset, end_number:$number, formatNumberOptions: {format:'0###,###,###', locale:'GB'}, easing:jQuery.easing.easeInOutCubic, duration:$speed});
add_to_footer("
<script type='text/javascript'>
jQuery(document).ready(function($) {
$('#counter').flipCounter();
$('#counter').flipCounter({imagePath:'".ASSETS."flipCounter/flipCounter-medium.png'});
$('#counter').flipCounter('startAnimation', { number: $number-$offset, end_number:$number, formatNumberOptions: {format:'0###,###,###', locale:'GB'}, easing:jQuery.easing.easeInOutCubic, duration:$speed, onAnimationStopped:setUpdateTimer});
});
function setUpdateTimer() { setInterval(checkMoreDownloads, 6000); }
function checkMoreDownloads()
{
$.ajax({
url: '".ASSETS."flipCounter/download.ajax.php?Ajax=get_downloads',
success: function(data) {
if(typeof data !== 'undefined') {
if($('#counter').flipCounter('getNumber').toString() != data) {
$('#counter').flipCounter('startAnimation', {end_number:parseInt(data), duration:1000});
}
}
}
});
}
</script>
");
return $html;
}
$html .= "<section id='ad' style='padding:60px;'/>\n";
$html .= "<div class='container-fluid text-center'>\n";
$total_count = $total['download_count'] + $total_v['download_count'];
$html .= atom_counter($total_count);
$html .= "<h2>Is the number of times our Addons have been downloaded from our AddonDB</h2>\n";
//That is the number of downloads our Addons got so far.
$html .= "<h4>Get Started with the experience of enhancing your PHPFusion installation with our Addons</h4>";
$html .= "</div>\n";
$html .= "</section>\n";
return $html;
Unknown column 'pdp_downloads' in 'field list'
// this is your code
$total = dbarray(dbquery("SELECT SUM(dl_count) dl_count, COUNT(download_id) FROM ".DB_PDP_DOWNLOADS." WHERE dl_status='0'"));
$total_count = $total['dl_count'];
$html .= atom_counter($total_count);
$html .= "<section id='ad' style='padding:60px;'/>\n";
$html .= "<div class='container-fluid text-center'>\n";
$total_count = $total['download_count'] + $total_v['download_count'];
$html .= atom_counter($total_count);
$html .= "<h2>Is the number of times our Addons have been downloaded from our AddonDB</h2>\n";
//That is the number of downloads our Addons got so far.
$html .= "<h4>Get Started with the experience of enhancing your PHPFusion installation with our Addons</h4>";
$html .= "</div>\n";
$html .= "</section>\n";
return $html;
print_p(fieldgenerator(DB_PDP_DOWNLOADS));
[0] => Deutsch
[1] => download_id
[2] => cat_id
[3] => license_id
[4] => dl_name
[5] => dl_desc
[6] => dl_abstract
[7] => dl_copyright
[8] => lizenz_okay
[9] => lizenz_packet
[10] => lizenz_url
[11] => dl_count
[12] => user_id
[13] => hide_user
[14] => dl_ctime
[15] => dl_mtime
[16] => dl_homepage
[17] => dl_status
[18] => down
[19] => link_extern
[20] => version
[21] => dl_size
[22] => dl_pic
[23] => dl_broken_count
[24] => count_comments
[25] => count_votes
[26] => count_visitors
[27] => count_subscribers
[28] => avg_vote
[29] => max_pics
[30] => dir_files
[31] => dl_language
[32] => dl_passwort
[33] => dl_version
[34] => dl_fusion
[35] => dl_Info
[36] => dl_Change
Category Forum
Official releases [Themes]Labels
None yet
Statistics
0 participants
Notifications
You are not receiving notifications from this thread.
Related Questions