How to turning classipress into a mac desktop app...sorta
Hey all!
Just wanted to share with the community my recent find to help out classipress
If you want to give users a more desktop feel to your app you can combine your classipress site with
Fluid App .
Fluid allows users to create an app from any webpage. Basically its just creating a single browser window that is fired by a custom dock icon. You can set the Dock icon, you an use badges on the icon to represent things, and you can even use growl notification.
To do this just simply download fluid open it and insert your url, and your icon. then distribute the file it gives you with Fluid to your users.
So far i have figured out how to create a custom badge on the icon that shows the number of ads posted today i.e.
sadly none today :/
to do this just add the following javascript to your site (footer.php) itself
Code:
window.fluid.dockBadge = "<?php
$today = date("Y-m-d H:i:s"); //Today's date
$daysago = date("Y-m-d H:i:s",strtotime(date('Y-m-j H:i:s')) - (1 * 24 * 60 * 60)); //Today - 1 day
$numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish' AND post_date BETWEEN '$daysago' AND '$today'");
if ($numposts >0) {
echo $numposts.' posts published today';
} else {
echo "0";
}
?>";
I have yet to get growl notification working, and if anyone does would love for you to share it
Hope everyones site finds an awesome home on the desktop!
-BA