View Full Version : weighted archives
ddunlop
04-18-2005, 02:27 AM
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
raminia
04-18-2005, 10:01 AM
please signup as a developer and upload your addon here too. (form pixelpost.org page)
speakerscorner
07-22-2005, 09:36 AM
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
raminia
07-22-2005, 12:20 PM
what is PHP and mysql version
speakerscorner
07-22-2005, 01:58 PM
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
youngabi
08-28-2005, 04:57 PM
me too, same error
raminia
08-29-2005, 11:20 AM
that's due to old mysql version that does not understand the inner join statement.
as someone to write a slecte statement instead.
nandop
10-31-2005, 01:05 PM
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
photovernacular
01-12-2006, 03:42 PM
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! :confused:
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:
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:
$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/
magnuskock
02-22-2006, 09:51 AM
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!
hooverfocus
03-15-2006, 01:45 AM
Nevermind, I really must be dumb... found out the problem and apparently solved it. So far it's working.
Hi there,
I installed PP about a week ago (everything working fine !), and found this addon which I thought would be a nice thing to throw in. Problem is, it doesn't work. I tried to make the above modifies but to no avail.
I'm fairly confident I have done something wrong somewhere, as I'm really a noob when it comes to SQL stuff and anything related to it, but for the life of me, even after a bit of basic reading, I still can't make it work, and I don't know what to do anymore.
I'm feeling rather dumb in asking this, but can anybody please make a sort of "step-by-step" guide (or anything equally clear and easy to follow) on how to make this addon work ?
Thanks a lot !
Btw, just in case, I'm running on the following config:
Pixelpost Version
You are running version 1.4.3 of Pixelpost. Released 21 November 2005.
Host Information
PHP-version 4.3.4 (Pixelpost's min requirement: PHP version 4.3.0)
MySQL version 4.0.24_Debian-10 (Pixelpost's min requirement: MySQL 3.23.58)
GD-lib bundled (2.0.15 compatible) with JPEG support
Server software Apache/1.3.33 (Unix) mod_ssl/2.8.22 OpenSSL/0.9.7d VDB/1.1.1
EXIF Pixelpost is using exifer v1.5 for EXIF information.
Hi there!
Which line(s) I have to change (insert,...) to display the categories in the alternative language if language is changed to alternative?
THX in advance,
Greetz Flea
Dennis
09-18-2007, 10:34 AM
None. done automatically.
I'm afraid not. Everything on my site is changed to alt lang but the warchives...
Dennis
09-18-2007, 10:57 AM
Ow right... warchives. :D
Prob solved! :)
If anyone wants to know how to fix:
Search in warchives.php for:
$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");
in line 31
and replace with:
if ($language_abr == $default_language_abr) $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");
else $query = ("SELECT cg.alt_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.alt_name, ca.cat_id ORDER BY cg.alt_name");
Greetz Flea
vBulletin® v3.7.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.