Quote:
Originally posted by HappyPike
Can this hack be use to hide or show certain features such as avatars depending on current server load? If yes, what's the conditionals for that?
|
As it is, no.
But if you can add another hack which will assign the server load (or anything you like) to a global variable (like in global.php) then yes it can. After you assign the variable value, you should edit postbit template and find the avatar variable (was it $post[avatar] ?) and replace it with this code:
PHP Code:
[[($yourvariable<x)]]
$post[avatar]
[[/($yourvariable<x)]]
Now avatars would be displayed only when $yourvariable is less than x.
EDIT: BTW. do not forget that this may not help much since the template modifications is just about the visual design. That is, your db would be still queried for the avatar in this example but just not displayed to the end user inside your template. So it wouldnt help decreasing server load much.. just the bandwidth maybe