Advanced search  

News:

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

Pages: [1]   Go Down

Author Topic: Photocols plugin  (Read 3758 times)

0 Members and 1 Guest are viewing this topic.

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Photocols plugin
« on: July 11, 2014, 02:45:01 pm »

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

« Last Edit: September 27, 2014, 10:33:14 am by mykee »
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1323
  • Fishing relaxes me.
    • Bailey Family Co.
Re: Photocols plugin
« Reply #1 on: July 11, 2014, 11:23:06 pm »

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

wilk

  • Translator
  • Coppermine novice
  • **
  • Country: pl
  • Offline Offline
  • Gender: Male
  • Posts: 46
  • Wilk Wilkowy
    • #QuizPL @ IRCnet
Re: Photocols plugin
« Reply #2 on: August 26, 2014, 07:56:03 pm »

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

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: Photocols plugin
« Reply #3 on: August 26, 2014, 08:33:17 pm »

Plugin use approved and video filter only, see this query (for random selection) from codebase.php:
Code: [Select]
$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.
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Photocols plugin
« Reply #4 on: August 27, 2014, 10:41:48 am »

Replacing
Code: [Select]
WHEREwith
Code: [Select]
$RESTRICTEDWHEREshould 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.
Logged

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: Photocols plugin
« Reply #5 on: August 27, 2014, 08:26:45 pm »

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

Line has changed too from this:
Code: [Select]
        $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:
Code: [Select]
        $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...:
Code: [Select]
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.
« Last Edit: August 27, 2014, 08:42:06 pm by mykee »
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15369
Re: Photocols plugin
« Reply #6 on: August 28, 2014, 09:00:14 am »

$RESTRICTEDWHERE is there on global line of course.

Additionally, add
Code: [Select]
get_meta_album_set();somewhere before the first use of $RESTRICTEDWHERE.
Logged

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: Photocols plugin
« Reply #7 on: August 31, 2014, 02:50:27 pm »

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

mykee

  • Contributor
  • Coppermine frequent poster
  • ***
  • Country: hu
  • Offline Offline
  • Gender: Male
  • Posts: 140
    • One moment from Hungary
Re: Photocols plugin
« Reply #8 on: September 27, 2014, 10:33:53 am »

Updated plugin for restricted mode. See first post for new versions.
Logged
My gallery and demo for AnythingSlider, Photocols and CollagePlus plugin: http://foto.acegem.hu/index.php
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 20 queries.