// ANIMEAD LISTING EXPOSURE DISPLAY // Synthetic activity/exposure metric. Does not modify Osclass real view counters. if(!function_exists('zet_animead_exposure')) { function zet_animead_exposure($item_id = null, $pub_date = null) { $item_id = (int)($item_id !== null ? $item_id : osc_item_id()); $pub_date = ($pub_date !== null ? $pub_date : osc_item_pub_date()); $published = @strtotime($pub_date); if($published === false || $published <= 0) { $published = time(); } $age_seconds = max(0, time() - $published); $age_days = $age_seconds / 86400; // Stable per-listing variation: same listing always follows the same curve. $seed = abs(crc32('animead-exposure-' . $item_id)); $start = 56 + ($seed % 41); // 56..96 $daily_offset = 50 + (($seed >> 3) % 341); // 50..390 if($age_days < 5) { // Roughly 1k/day, but never exact 1000/2000/etc. $target = $start + ($age_days * 1000) + ($daily_offset * min(1, $age_days)); } else { // After ~5k, slow down to a stable 40..60/day for each listing. $slow_rate = 40 + (($seed >> 7) % 21); // 40..60/day $at_five_days = $start + 5000 + $daily_offset; $target = $at_five_days + (($age_days - 5) * $slow_rate); } return max($start, (int)floor($target)); } } Other Classes - Free Classified Ads | AnimeAd
People Online 0
Tools Tools Companies
Are you a professional seller? Create an account