Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Hacks and Modifications

Post Reply
 
Thread Tools
  #1  
Old 08-27-2005, 03:12 PM
kicki Offline
forum loafer
 
Join Date: Aug 2005
Posts: 13
Counting calendar?

I would really like my calendar to show if there is more than one photo/day (I had different colours in my previous blog, blue for one photo, yellow for two and red for more than two). As far as I understand, all the calendar does today is check if there is posts or not on a certain day (true/false), I would need some sort of counting.... anyone have any tips?
Reply With Quote
  #2  
Old 08-28-2005, 05:03 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
Yeap it can be done quite simple. There must be only small modyfication of SQL statement and 1-2 lines more of code.

Putting it:

PHP Code:
$numb_of_imgs mysql_num_rows($query); 
after lines:

PHP Code:
$query mysql_query("select * from ".$pixelpost_db_prefix."pixelpost where (datetime like '$image_search%') and (datetime<='$cdate')"); 
will give you a number of photos for each day.

PS Dev Team:
While after this SQL statement is not necessary!

It will be enough:
PHP Code:
if($numb_of_imgs 0){
        
$dayimage "true";
        
$curr_image_id $img_id;

instead of:

PHP Code:
while(list($img_id$img_datetime$img_headline$img_body$img_image) = mysql_fetch_row($query)) {... 
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #3  
Old 08-28-2005, 05:08 PM
kicki Offline
forum loafer
 
Join Date: Aug 2005
Posts: 13
I figured as much, but how? (Well, I could probably figure it out myself, but SHOULD use my time for studies instead... =) )
Reply With Quote
  #4  
Old 08-28-2005, 05:20 PM
GeoS's Avatar
GeoS+ Offline
Team Pixelpost
 
Join Date: Apr 2005
Location: Warsaw, Poland
Posts: 3,613
Send a message via ICQ to GeoS Send a message via Skype™ to GeoS
Check update of my previous post.

Adding conditional statements you can change colors of any cell of table which do you like.
__________________
photoblog | portfolio | addons | Donate
Reply With Quote
  #5  
Old 08-28-2005, 06:05 PM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
study hard
I like to do that too.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #6  
Old 08-22-2007, 09:06 PM
kicki Offline
forum loafer
 
Join Date: Aug 2005
Posts: 13
Well, it only took me 2 years to find the time and energy to actually DO this mod!! :-D But I'm quite satisfied with it!

http://kicki.kanske.net/index.php?cu...showimage=1249

Blue = 1 pic
Yellow = 2pics
Red = more than 2pics
Green = 1 pic / hour (a Swedish photo project - members get two dates/month when they should take one photo every hour and post in their blog)
I was a bit lazy and defined all days with more than 9pics as 1pic/hour, since I never DO post that amount of pics if it's not one of those days...
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 10:37 AM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs