cpmFetch and mod_cpg (joomla module) cpmFetch and mod_cpg (joomla module)
 

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

cpmFetch and mod_cpg (joomla module)

Started by natrlhy, May 11, 2007, 09:31:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

natrlhy

Hello all,

I've been getting into Joomla and I am using a coppermine module called mod_cpg which can be found here:

http://joomlacode.org/gf/project/mod_cpg/frs/

I have a lot of private albums and I'm wondering how I can get this Joomla module to also display my private albums.

I've tried placing some code into this module, but I am not having any luck.

I'm running CPG 1.4.10, Joomla 1.0.12 and cpmfetch 2.0

I've tried modifying the areas I thought would work in the module, but the developer has mentioned this:

"Sorry, but the pictures are sent by cpmfetch, so the module only
displays the pictures cpmfetch can deliver."

I've tried modifying the cpmfetch_config.php line as follows:

// Consider non-public albums as displayable
$config_overrides['cfShowPrivate'] = 'true';


And I still do not see any images in the private albums.

I'm not sure where I need to place this:

$objCpm->cpm_unlock_private(true);

Many thanks!  ;)


natrlhy

Good news!

I tinkered around some more with the mod_cpg.php file for the Joomla module I am using and I have it working now with my Private Albums!

Here is the default code of the mod_cpg.php file:

include "$path/cpmfetch.php";
$objCpm = new cpm("$path/cpmfetch_config.php");
if ($mode==1)
        {

        $objCpm->cpm_viewLastAddedMedia($lines,$row);
        }
if ($mode==2)
        {

        $objCpm->cpm_viewRandomMediaFrom($source,$lines,$row);
        }
if ($mode==3)
        {

        $objCpm->cpm_viewRandomMostViewedMediaFrom($source,$lines,$row);
        }
$objCpm->cpm_close();


And here is what I had to modify in the mod_cpg.php file in order for it to display my Private Albums:

include "$path/cpmfetch.php";
$objCpm = new cpm("$path/cpmfetch_config.php");
if ($mode==1)
        {
        $objCpm->cpm_unlock_private(true);
        $objCpm->cpm_viewLastAddedMedia($lines,$row);
        }
if ($mode==2)
        {        $objCpm->cpm_unlock_private(true);
        $objCpm->cpm_viewRandomMediaFrom($source,$lines,$row);
        }
if ($mode==3)
        {
        $objCpm->cpm_unlock_private(true);
        $objCpm->cpm_viewRandomMostViewedMediaFrom($source,$lines,$row);
        }
$objCpm->cpm_close();


I've basically added a $objCpm->cpm_unlock_private(true); parameter ABOVE (above being the keyword here!) the other parameters. Once I did this, BAM! I now get the private albums seen to be seen from this Joomla module!

Hope this helps others!  :D

yell0wdart

Nice find!  Great joomla mod to work nicely w/ cpmfetch.  ;)

Still, my setup seems to hate that last $objCpm->cpm_close(); line of code.  Just gotta keep commenting it out, I suppose.  :P

viajero

Hi folks,

this option for nonpublic pictures is done with the latest version 1.1.1 of mod_ExtCoppermine - i just added it today
You will see, it has some additional features than mod_cpg. If one really needs all of them on the other hand - is another question. So that way you dont have to tinker around the code by yourself and can use the "already done" solution  ;)


download available at joomla.org: mod_extCoppermine
and directly:
direct Download mod_extCoppermine

greetings

André aka viajero  ;D

natrlhy

Hello André,

I am enjoying trying out your updated 1.1.1 mode_extCoppermine module for Joomla.

I am playing with the settings but I am getting this:

Notice: Undefined variable: id in /path/to/it/modules/mod_extcoppermine.php on line 151

Also, when I select the Show pictures from nonpublic albums to "Yes" it always reverts back to "No".

I'm really liking this module!

viajero

Hi Natrlhy

I am just testing again with the nonPublic option, this will be changed maybe today,
then you can redownload the file

But I cannot reproduce the fault in line 151, I need the parameters from the backend, do they come with a specific option or everytime ?

for specific questions and problems, please use my own little forum under www.der-reisende.de

saludos
André