CPMfetch for 1.5.6 - Page 2 CPMfetch for 1.5.6 - Page 2
 

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 for 1.5.6

Started by lurkalot, June 08, 2010, 11:35:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Liinus

Hi! thanks for this! I could install the CPM! thank you!!! Now I have a new problem!! http://chloebridgesdaily.fandeluxe.org/ this is my web! Check on the sidebar, it says "Ultimas Fotos" How can I make, to only view 3 images??

Jeff Bailey

Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Liinus


lurkalot

Anyone worked out how to get the "owners name" and "comment count" to work with 1.5.8?

I have cpmfetch working (as per 1st page of this topic) and pulling thumbs into a php block on my home page, but I've had to edit the code.  Now it shows image title, and number of views only.

This is the code I used with 1.4.27 which showed, Image title, Owner name, Number of views, and Number of comments


echo '<div id="cpmfetch">';chdir("../gallery/cpmfetch/");include "cpmfetch.php"; $objCpm = new cpm();$options = array("imageheight"=>"80","subtitle" => "<center>{{pTitle}} <br> <center> <FONT color=#1A5EFF size=2>Image By</FONT></STRONG> {{pOwner_name}} <br>{{pHits}} Views <center> <FONT color=#3399FF size=2>Comments</FONT></STRONG> {{pComCount}} </center>");$objCpm->cpm_viewLastAddedMedia(4,4,$options);$objCpm->cpm_close();chdir("../../");echo '<a href="http://cameracraniums.com/gallery/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more latest images</b></u></a>';
if ($context['user']['is_logged'])

if ($context['user']['is_logged'])
{
$thecat = 10000 + $context['user']['id'];
echo ' •
<a href="http://cameracraniums.com/gallery/index.php?cat='. $thecat .'" alt="My Gallery"><u><b>My Gallery</b></u></a>';
}


And this is what I use for 1.5.8,


echo '<div id="cpmfetch">';chdir("../gallery/cpmfetch/");include "cpmfetch.php"; $objCpm = new cpm();$options = array("subtitle" => "<center>{{pTitle}} <br>{{pHits}} Views <center> </center>");$objCpm->cpm_viewLastAddedMedia(4,4,$options);$objCpm->cpm_close();chdir("../../");echo '<a href="http://cameracraniums.com/gallery/thumbnails.php?album=lastup&cat=0?action=gallery"><u><b>View more latest images</b></u></a>';
if ($context['user']['is_logged'])

if ($context['user']['is_logged'])
{
$thecat = 10000 + $context['user']['id'];
echo ' •
<a href="http://cameracraniums.com/gallery/index.php?cat='. $thecat .'" alt="My Gallery"><u><b>My Gallery</b></u></a>';
}


Link in signature.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

wutacrock

I'm totally lost here. I just installed CPMfetch, but totally lost where to put these code you guys are posting. Right now it's not showing up on my gallery.

johnhanna

Quote from: Phill Luckhurst on June 08, 2010, 11:44:23 PM
Bear in mind that VUUD is working on a new improved version specifically for the 1.5.x line of Coppermine. This is what I am using now to continue using his excellent tool.

Open install.php and find the line  (around 61 )

'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

and replace with

'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

That is for the benefit of others who may need this tool. Once again you have neglected to post your link. Please try not to forget in future.

sorry, dumb question.... what install.php is it that needs to be modified. I looked at the install.php in the root of cpg but didn't see anything that remotely resembled this around line 61.  I also looked for install.php under modules/mod_cpmfetch.

Your assistance is greatly appreciated.

lurkalot

Download the cpmfetch plugin, and unzip it on your pc.  Inside you'll see a cpmfetch folder, inside that you'll see the install.php file.  That's the one you need to edit.  Then upload just that cpmfetch folder (with its contents) to your server in the coppermine directory.
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

johnhanna

Quote from: lurkalot on December 28, 2010, 10:57:37 AM
Download the cpmfetch plugin, and unzip it on your pc.  Inside you'll see a cpmfetch folder, inside that you'll see the install.php file.  That's the one you need to edit.  Then upload just that cpmfetch folder (with its contents) to your server in the coppermine directory.

Okay, I am missing something here.... I downloaded the CpmFetch Image Plugin from http://extensions.lhmr.org/index.php?option=com_rokdownloads&view=folder&Itemid=57. and extracted the files onto my hard drive as you instructed.  When I view the contents of the extracted files, I see a single folder named "cpmfetch.plugin", when I look inside that folder I am unable to find a file titled install.php anywhere.

Let me explain what I have setup and am trying to accomplish.  I have Joomla 1.5.20 installed for a website that I administer, I have been using CPG for a few years now and have just upgraded it to v 1.5.8.  I would like to be able to autimatically display a few of the most recent photos in a module on the site.  The site is located at http://nonamejustfriends.com/

Thank you for your help thus far!  :)

lurkalot

If you read the readme file in the module you downloaded you'll see that is is a module for joomla.  It says you also need the cpmfetch version 2.0 installed, and that's the plugin we're talking about in this thread.  ;)

You can find it attached at the bottom of this post.  http://forum.coppermine-gallery.net/index.php/topic,35450.0.html
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

phill104

Also, update your Coppermine and your Joomla as they are both a little behind.

As lurkalot already stated, get cpmfetch working first then the Joomla plugin will work. I have it running on one of my sites - www.windsurf.me.uk
It is a mistake to think you can solve any major problems just with potatoes.

vuud


Please note Fistfullofcode is down and shall remain that way.  I will be brining the cpmfetch site up on my new domain in the next few days.
Please post for help to the forum... PM me only if you are sending security related items (passwords, security problems, etc).

cpmFetch - Images, RSS feeds from CPG from outside CPG
New release notification signup also. 
See http://cpmfetch.fistfullofco

lurkalot

Cool, thanks Vuud. (big thumbs up smiley)
Running SMF 2.1.4  / Tinyportal 3.0.1, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0


macmiller

QuoteAnyone worked out how to get the "owners name" and "comment count" to work with 1.5.8?

I have cpmfetch working (as per 1st page of this topic) and pulling thumbs into a php block on my home page, but I've had to edit the code.  Now it shows image title, and number of views only.

I just downloaded and installed cpmfetch 2.0 and made the change to the install.php and it is working... but having the same problem has noted above owners name/comment count.  Anyone get this part working?

caddis

Hello,

it works fine for me, but can i center the Picture in a Block?

cu
Rolf

vlado85

hm I have problem:

QuoteUnknown column 'p.owner_name' in 'field list'

SELECT p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating, p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb, a.aid AS aAid, a.title AS aTitle, a.description AS aDescription, a.visibility as aVisibility, a.pos as aPos, a.category as aCategory, a.thumb as aThumb, a.keyword as aKeyword FROM cpg14x_pictures AS p LEFT JOIN cpg14x_albums AS a ON p.aid = a.aid LEFT JOIN cpg14x_categories AS c ON a.category = c.cid WHERE 1 AND p.approved='YES' AND ((a.visibility = 0 OR a.visibility IS NULL) AND (a.alb_password IS NULL OR a.alb_password = "")) ORDER BY p.ctime DESC LIMIT 0,4

Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home/mysite/public_html/cpg/cpmfetch/cpmfetch_dao.php on line 1260

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /home/mysite/public_html/cpg/cpmfetch/cpmfetch_dao.php on line 1264

I read this thread, but I dont know where is problem?

Mehdi bridge
Joomla 1.5.24
Coppermine 1.5.16
cpmfetch 2.0

vlado85

Ok now it is work.

I do this, open install.php,

and change line 61

Quote'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_name AS pOwner_name, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

to

Quote'cfSQLPictureSelect' => 'p.filepath AS pFilepath, p.filename AS pFilename, p.aid AS pAid, p.filesize AS pFilesize, p.title AS pTitle, p.caption AS pCaption, p.owner_id as pOwnerId, p.ctime AS pCtime, p.hits AS pHits, p.pid AS pPid, p.pic_rating AS pPic_Rating,  p.votes AS pVotes, p.pwidth AS pWidth, p.pheight AS pHeight, p.user1 as pUser1, p.user2 as pUser2, p.user3 as pUser3, p.user4 as pUser4, c.cid as cCid, c.name as cName, c.description as cDescription, c.pos as cPos, c.parent as cParent, c.thumb as cThumb',

It is work.

Thanks

secret-charms

The install went fine after I change the code in the install.php, but now I'm getting this:

These images were found and displayed by using the following PHP code:
Quote<?php
  include "./cpmfetch.php";
  $objCpm = new cpm("./cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>
Please note: Unless you are running this code from the same directory as the cpmfetch_config.php file, you need to alter that path so it can be found. The same goes for the include statement.

For example, if you want to add these images into your home page and your cpmfetch directory is inside your gallery directory (which is named gallery) it would look more like this:

Quote<?php
  include "./gallery/cpmfetch/cpmfetch.php";
  $objCpm = new cpm("./gallery/cpmfetch/cpmfetch_config.php");
  $objCpm->cpm_viewLastAddedMedia(1,4);
  $objCpm->cpm_close();
?>

So where do I change it so it's picking up images right. Cause my cpmfetch is the gallery folder like recommended. This is the warning I'm getting on the main page of my site under recent pictures (but the code in that file (line 44) is the same as the second code. So I'm confused. :/

QuoteWarning: include_once(./gallery/cpmfetch/cpmfetch.php) [function.include-once]: failed to open stream: No such file or directory in /home/candyswa/public_html/gallery/recentpix.php on line 44

Sorry if this is really dumb, I'm really new at this and I have no idea how my cmpfetch even got broke, it was original working.

Αndré

Use
<?php
  
include "./cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

eita

I wonder if someone can tell me the next step now in order to use cpmfetch. What I have:
*The coppermine gallery in http://mydomain/testgallery/
*An SMF board with Simple Portal at http://mydomain/smftest/
No bridging is done.

I have made the changes in cpmfetch>install.php according to the instruction in this thread, and uploaded the folder cpmfetch with all its content to the testgallery folder. Run the installer and pictures from the gallery was shown in a screen with installationrelated information, no errors.

But how to use it when I want to show the pictures in either the forum itself or a portal block? Most of all I want to use it in a portal block, and have tried to insert the different examples shown above in this thread in a custom block for php codes. I adjusted this to my folder name, maybe not to be done? 

<?php
  
include "./testgallery/cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./testgallery/cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


I also tried these two with no luck.
<?php
  
include "./cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


<?php
  
include "./cpmfetch/cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch/cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>


But maybe I need to do something very different or simply have missed some part of the instruction in the threads about cmpfetch? I am absolutely a newbie.

Any ideas, please?