Advanced search  

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]

Pages: 1 [2] 3 4 5 6 7   Go Down

Author Topic: CPMfetch for 1.5.6  (Read 324304 times)

0 Members and 1 Guest are viewing this topic.

Liinus

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: CPMfetch for 1.5.6
« Reply #20 on: September 21, 2010, 10:03:01 pm »

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??
Logged

Jeff Bailey

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 1322
  • Fishing relaxes me.
    • Bailey Family Co.
Re: CPMfetch for 1.5.6
« Reply #21 on: September 21, 2010, 10:22:13 pm »

it the code where it has a 1, 4 ... change it to a 3
http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html
Logged
Thinking is the hardest work there is, which is probably the reason why so few engage in it. - Henry Ford

Liinus

  • Coppermine newbie
  • Offline Offline
  • Posts: 3
Re: CPMfetch for 1.5.6
« Reply #22 on: September 21, 2010, 11:18:48 pm »

it the code where it has a 1, 4 ... change it to a 3
http://cpmfetch.fistfullofcode.com/docs/stable_basic/index.html

Thank you very much!!! this forum is the best =D :D :D
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: CPMfetch for 1.5.6
« Reply #23 on: November 07, 2010, 10:32:24 pm »

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

Code: [Select]
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,

Code: [Select]
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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

wutacrock

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 37
Re: CPMfetch for 1.5.6
« Reply #24 on: December 11, 2010, 08:33:05 am »

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.
Logged

johnhanna

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CPMfetch for 1.5.6
« Reply #25 on: December 28, 2010, 04:19:30 am »

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 )

Code: [Select]
'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

Code: [Select]
'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.
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: CPMfetch for 1.5.6
« Reply #26 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.
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

johnhanna

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CPMfetch for 1.5.6
« Reply #27 on: December 28, 2010, 06:28:58 pm »

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!  :)
Logged

lurkalot

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: CPMfetch for 1.5.6
« Reply #28 on: December 28, 2010, 06:59:16 pm »

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
Logged
Running SMF 2.1.4  / Tinyportal 3.0.0, bridged with Coppermine 1.6.25, plus cpmfetch 2.0.0

phill104

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 4885
    • Windsurf.me
Re: CPMfetch for 1.5.6
« Reply #29 on: December 28, 2010, 07:37:47 pm »

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
Logged
It is a mistake to think you can solve any major problems just with potatoes.

vuud

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CPMfetch for 1.5.6
« Reply #30 on: March 22, 2011, 02:04:23 am »


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.
Logged
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

  • Administrator
  • Coppermine addict
  • *****
  • Country: gb
  • Offline Offline
  • Gender: Male
  • Posts: 947
  • +Tinyportal Support team.
Re: CPMfetch for 1.5.6
« Reply #31 on: March 22, 2011, 08:28:14 am »

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

eris667

  • Coppermine novice
  • *
  • Country: us
  • Offline Offline
  • Gender: Male
  • Posts: 47
    • http://www.strm.us/cpg15x/index.php
Re: CPMfetch for 1.5.6
« Reply #32 on: July 08, 2011, 12:06:47 am »

macmiller

  • Contributor
  • Coppermine regular visitor
  • ***
  • Offline Offline
  • Posts: 80
Re: CPMfetch for 1.5.6
« Reply #33 on: July 19, 2011, 02:17:46 pm »

Quote
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.

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?
Logged

caddis

  • Coppermine newbie
  • Offline Offline
  • Posts: 4
Re: CPMfetch for 1.5.6
« Reply #34 on: September 04, 2011, 05:07:08 pm »

Hello,

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

cu
Rolf
Logged

vlado85

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: CPMfetch for 1.5.6
« Reply #35 on: December 11, 2011, 03:54:28 pm »

hm I have problem:

Quote
Unknown 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
Logged

vlado85

  • Coppermine newbie
  • Offline Offline
  • Posts: 19
Re: CPMfetch for 1.5.6
« Reply #36 on: December 11, 2011, 04:03:37 pm »

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
Logged

secret-charms

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: CPMfetch for 1.5.6
« Reply #37 on: June 08, 2012, 11:38:29 pm »

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. :/

Quote
Warning: 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.
Logged

Αndré

  • Administrator
  • Coppermine addict
  • *****
  • Country: de
  • Offline Offline
  • Gender: Male
  • Posts: 15764
Re: CPMfetch for 1.5.6
« Reply #38 on: June 14, 2012, 12:02:11 pm »

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

eita

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 28
Re: CPMfetch for 1.5.6
« Reply #39 on: June 25, 2012, 10:49:06 pm »

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? 

Code: [Select]
<?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.
Code: [Select]
<?php
  
include "./cpmfetch.php";
  
$objCpm = new cpm("./cpmfetch_config.php");
  
$objCpm->cpm_viewLastAddedMedia(1,4);
  
$objCpm->cpm_close();
?>

Code: [Select]
<?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?
Logged
Pages: 1 [2] 3 4 5 6 7   Go Up
 

Page created in 0.036 seconds with 20 queries.