Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Addons

Post Reply
 
Thread Tools
  #1  
Old 04-18-2005, 02:27 AM
ddunlop Offline
forum loafer
 
Join Date: Apr 2005
Location: www.imagenoise.com
Posts: 2
weighted archives

this is a plugin that was inspired by one for wordpress (okay mutch of the code is from it as well).

basically it takes the categories and makes the font larger the more posts are in that category.

check it out here: http://www.imagenoise.com/?x=warchives

the code is here: http://www.imagenoise.com/download/warchives.phps

save that file into your addons director as warchives.php or somthing (as long as it ends with .php)

the tag is: <PIXELPOST_WARCHIVES>

i know this is foreign to most of you but you can pass parameters to it via the template the parameters are:

smallest: default 8
largest: default 24
unit: default pt

so <PIXELPOST_WARCHIVES smallest="3" largest="64" unit="pt"> should work as well
Reply With Quote
  #2  
Old 04-18-2005, 10:01 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
please signup as a developer and upload your addon here too. (form pixelpost.org page)
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #3  
Old 07-22-2005, 09:36 AM
speakerscorner Offline
forum loafer
 
Join Date: Jun 2005
Posts: 2
weighted archives don't work

This addon doesn't work on my pixelpost installation. It generates the following error:
error: select t1.name,t1.id,t2.count from pixelpost_categories as t1 inner join (select t11.cat_id,count(*) as count from pixelpost_catassoc t11 inner join pixelpost_pixelpost as t12 on t11.image_id = t12.id where datetime<='2005-07-22 11:34:15' GROUP BY t11.cat_id) as t2 on t1.id = t2.cat_id order by t1.name
Reply With Quote
  #4  
Old 07-22-2005, 12:20 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
what is PHP and mysql version
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #5  
Old 07-22-2005, 01:58 PM
speakerscorner Offline
forum loafer
 
Join Date: Jun 2005
Posts: 2
PHP, MySQL and Pixelpost verisions

Pixelpost Version
You are running version 1.4.2 of Pixelpost. Released 18 July 2005.
Latest pixelpost version: Check

Looking for help or want to give feedback, please step into pixelpost forum.
www.pixelpost.org/forum/

Host Information
PHP-version 4.3.3 (Pixelpost's min requirement: PHP version 4.3.0)

MySQL version 4.0.15 (Pixelpost's min requirement: MySQL 3.23.58)

GD-lib bundled (2.0.15 compatible) with JPEG support

Server software Apache/2.0.48 (Linux/SuSE)

EXIF Pixelpost is using exifer v1.5 for EXIF information.

Paths
Guessed imagepath: /srv/www/htdocs/web96/html/pixelpost/images/

Configured Imagepath /srv/www/htdocs/web96/html/pixelpost/images/

Image Directory: OK - Can we write to the directory? YES.

Thumbnails Directory: OK - Can we write to the directory? YES.

Language Directory: OK

Addons Directory: OK

Includes Directory: OK

Templates Directory: OK
Reply With Quote
  #6  
Old 08-28-2005, 04:57 PM
youngabi Offline
forum loafer
 
Join Date: Aug 2005
Posts: 1
me too, same error
Reply With Quote
  #7  
Old 08-29-2005, 11:20 AM
raminia's Avatar
raminia+ Offline
Team Pixelpost
 
Join Date: Jan 2005
Location: FL, US
Posts: 3,706
Send a message via Yahoo to raminia
that's due to old mysql version that does not understand the inner join statement.
as someone to write a slecte statement instead.
__________________
Photoblog: http://pblog.raminia.com Powered by Pixelpost 1.7
Reply With Quote
  #8  
Old 10-31-2005, 01:05 PM
nandop Offline
forum loafer
 
Join Date: Oct 2005
Posts: 1
fix warchives?

hello,

i'm in need of that sql fix too. please, if anyone knows how to fix it, i'd appreciate. a link, a fix, a tutorial, anything.

thanks-

n
Reply With Quote
  #9  
Old 01-12-2006, 03:42 PM
photovernacular Offline
forum loafer
 
Join Date: Jan 2006
Posts: 6
I tried ddunlop's addon and had the same problem as others have reported in this thread. As someone has mentioned, part of the inner join syntax is not supported in v4.xxx of MySQL, although I couldn't quite work out which bit was causing the problem!

I wrote new SQL that simplifies the query - in fact it does away with joins altogether, which the DB is likely to be quite happy about! Here's the SQL you need to replace:

Quote:
SELECT cg.name, ca.cat_id, count( * ) count
FROM pv_categories cg, pv_catassoc ca, pv_pixelpost pp
WHERE ca.image_id = pp.id
AND pp.datetime <= '2006-01-12 14:34:42'
AND cg.id = ca.cat_id
GROUP BY cg.name, ca.cat_id
ORDER BY cg.name
LIMIT 0 , 30
and here's the PHP code - find and replace this line in warchive.php:

PHP Code:
$query = ("SELECT cg.name, ca.cat_id, count( * ) count FROM {$pixelpost_db_prefix}categories cg, {$pixelpost_db_prefix}catassoc ca, {$pixelpost_db_prefix}pixelpost pp WHERE ca.image_id = pp.id AND pp.datetime <= '$datetime' AND cg.id = ca.cat_id GROUP BY cg.name, ca.cat_id ORDER BY cg.name"); 
Enjoy,
-Tim

http://photovernacular.net/

Last edited by photovernacular; 01-15-2006 at 08:18 AM.
Reply With Quote
  #10  
Old 02-22-2006, 09:51 AM
magnuskock Offline
forum loafer
 
Join Date: Nov 2005
Posts: 7
exclude categories?

Hi, I was just thinking about something;

is it possible to exclude categories in this addon? I would like to choose wich categories were being displayed as "weighted".

that would be cool!
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 07:55 AM.

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