Photocols plugin Photocols plugin
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

Photocols plugin

Started by mykee, July 11, 2014, 02:45:01 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mykee

With this plugin can use Photocols gallery on your Coppermine site. This very nice addon, and I modified original script too for more photos.  :)
I optimized this plugin for faster load, and can use thumbnails too. Can use all settings of this script (overlay, font size, rows, columns) by admin panel (see my scereenshot).

Demo on my photo site. :)

-------------------------
Update 1.x to 1.2:
- download PHC_Update_1.1_to_1.2.zip
- unpack it
- replace codebase.php and readme.txt in plugins/photocols folder

-------------------------
Changelog:

1.2:
fixed restriction mode in sql query

1.1:
add group policies parameter (thanks for wilk and André)

1.0:
Initial version

My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Jeff Bailey

Looks great! Thanks for your contributions!
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

wilk

Plugin looks good, however it completely ignores group policies.
PM me for Polish translations (new/update)

mykee

Plugin use approved and video filter only, see this query (for random selection) from codebase.php:
$photocols_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p LEFT JOIN {$CONFIG['TABLE_ALBUMS']} as a ON  a.aid = p.aid WHERE filename like '%.jpg'$orifilter AND approved = 'YES' AND filename not like 'youtube_%' $photocols_FORBIDDEN_SET $META_ALBUM_SET ORDER BY RAND() LIMIT $photocolslimit";

If you need, add more parameters too.
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Αndré

Replacing
WHERE
with
$RESTRICTEDWHERE
should fix the permission issue.

You maybe have to change the alias of the albums table to "r" instead of "a" if an SQL issue occurs.

mykee

#5
I changed WHERE to $RESTRICTEDWHERE, but I get a critical error.. :( What's my problem?

Line has changed too from this:
        $photocols_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p LEFT JOIN {$CONFIG['TABLE_ALBUMS']} as a ON  a.aid = p.aid WHERE filename like '%.jpg'$orifilter AND approved = 'YES' AND filename not like 'youtube_%' $photocols_FORBIDDEN_SET $META_ALBUM_SET ORDER BY RAND() LIMIT $photocolslimit";

to this:
        $photocols_query = "SELECT * FROM {$CONFIG['TABLE_PICTURES']} AS p LEFT JOIN {$CONFIG['TABLE_ALBUMS']} ON  {$CONFIG['TABLE_ALBUMS']}.aid = p.aid $RESTRICTEDWHERE filename like '%.jpg'$orifilter AND approved = 'YES' AND filename not like 'youtube_%' $photocols_FORBIDDEN_SET $META_ALBUM_SET ORDER BY RAND() LIMIT $photocolslimit";

result this, 'Where' nowhere...:
SELECT * FROM cpg1411_pictures AS p LEFT JOIN cpg1411_albums ON cpg1411_albums.aid = p.aid filename like '%.jpg' AND pwidth < pheight AND approved = 'YES' AND filename not like 'youtube_%' ORDER BY RAND() LIMIT 20

$RESTRICTEDWHERE is there on global line of course. I attached my modded file, include a print_r for sql comment debug.
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Αndré

Quote from: mykee on August 27, 2014, 08:26:45 PM
$RESTRICTEDWHERE is there on global line of course.

Additionally, add
get_meta_album_set();
somewhere before the first use of $RESTRICTEDWHERE.

mykee

Thanks for help, I updated codebase.php for group policies (I will update this for my other plugins soon)
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

mykee

Updated plugin for restricted mode. See first post for new versions.
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php