CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 48 CpmFetch 1.4 On... Displaying data and images from CPG on your website - Page 48
 

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 1.4 On... Displaying data and images from CPG on your website

Started by vuud, July 08, 2005, 06:43:10 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

vuud

Quote from: stuarta on July 26, 2006, 06:23:36 PM
ok pm'd u.

Your bridged with something.  It's a well known problem.  Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.

There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info. 

Or

Create the same number of users in your cpg forum that you have in the other forum

Or

wait an indeterminant amount of time for me to start sorting out how to handle this in the next next version.

One of those, but that is definately your problem.
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

stuarta

ok I've turned off the bridge and it appears to be working.

One last thing, how can I fix the depth of the tables.  At the moment it's pulling out 4 images, but depth depends on how many lines of text is there.  I could possibly just fix the table depth to a certain pixel in Dreamweaver
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 27, 2006, 02:57:33 PM
ok I've turned off the bridge and it appears to be working.

One last thing, how can I fix the depth of the tables.  At the moment it's pulling out 4 images, but depth depends on how many lines of text is there.  I could possibly just fix the table depth to a certain pixel in Dreamweaver

No idea on this one... there is no provision to truncate the text or anything.  Sorry
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

stuarta

Comptia A+ / Network + certified

stuarta

Your bridged with something.  It's a well known problem.  Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.

There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info. 

Or

Create the same number of users in your cpg forum that you have in the other forum


Ok everything done now, just looking at solving this problem.  I've rebridged and getting the same sort of problem where it's not picking up individual albums.

The user list in the gallery and forum has the same amount of users.

Been looking for solutions but not 100% sure of the error that I'm looking for
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 28, 2006, 10:53:48 AM
Your bridged with something.  It's a well known problem.  Basically, cpmfetch is looking for user information and its not there since it is in the forum database instead.

There are some posted solutions in the forums here, but essentially you need to yank all the information out of the sql statements that look up user info. 

Or

Create the same number of users in your cpg forum that you have in the other forum


Ok everything done now, just looking at solving this problem.  I've rebridged and getting the same sort of problem where it's not picking up individual albums.

The user list in the gallery and forum has the same amount of users.

Been looking for solutions but not 100% sure of the error that I'm looking for

Here is what I would do...  Find a photo that you should be getting but are not.  Look in the pictures table and get the owners id.  Then look that up in your users and make sure it exists.  If one is missing then that could be something.

Basically that is what is probably happening... the picture table has user id's that can't be found in the cpg user table (because its bridged).

At least thats my experience





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

stuarta

pics were uploaded by myself though had have same username on both, that's what's odd
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 28, 2006, 04:14:04 PM
pics were uploaded by myself though had have same username on both, that's what's odd

Username does not matter.  Each has a number assigned to the name.  The number is what matters
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

stuarta

ok completely confused now.  think i may forget the bridging.

My user id for Stuart in the forums is "1", which is also my admin username and was the only username that I had in coppermine.  All the albums were created with this user.
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 28, 2006, 04:36:47 PM
ok completely confused now.  think i may forget the bridging.

My user id for Stuart in the forums is "1", which is also my admin username and was the only username that I had in coppermine.  All the albums were created with this user.

I don't know.  If you can tell me what picture should be coming up, the code and page it is trying from and email me the access information again, I can take another look tonight. 
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

stuarta

That's ok, switched off the bridging for now and about to leave work and go home and chill over the weekend lol

My brain fried ere trying to do private work and getting stupid requests from staff when they printer or pc won't work lol

Thanks anyway Vuud, have good weekend
Comptia A+ / Network + certified

stuarta

right sorry only me again with an option query.

Is it possible to show ratings for an image and/or get people to rate it from the thumbnail in a random display.

I'm using

$options = array('subtitle'=>'%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);


on this page.  Its an album for a screenshot competition.  Would like to show ratings or stars below it.  I've tried various things with no joy

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 31, 2006, 05:13:42 PM
right sorry only me again with an option query.

Is it possible to show ratings for an image and/or get people to rate it from the thumbnail in a random display.

I'm using

$options = array('subtitle'=>'%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);


on this page.  Its an album for a screenshot competition.  Would like to show ratings or stars below it.  I've tried various things with no joy

http://www.simaviatorsuk.co.uk.streamlinenettrial.co.uk/home.php


I suspected we'd not heard the last from you.
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch06s03.html
--------------------------------------------------

%v - total number of votes cast for this photo
%V - the current rating in number of stars to one decimal place


There is no way through my code to cast a vote from the thumbnail - they can click on it and go to the gallery and then cast a vote there.  I'd include some instructions telling them to do this.

Otherwise, maybe some custom PHP in there to increment the vote counter or something...  I dunno

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

stuarta

QuoteI suspected we'd not heard the last from you.
nice

Tried that on

$options = array('subtitle'=>'%V,%t by %o',"cellstyle" => "copyright" );

assume it just returns number and not stars
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 31, 2006, 05:44:37 PM
nice

Tried that on

$options = array('subtitle'=>'%V,%t by %o',"cellstyle" => "copyright" );

assume it just returns number and not stars

Right you are!  Inserting images of stars in there would be a headache for layout and formatting and stuff.  May be an option someday since the stars come with cpg...  but for now... nope.

You could do:

'subtitle'=>'Rated %V out of 5<br>%t by %o'

A little nicer, but still no stars
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

stuarta

ok got

$options = array('subtitle'=>'Rated %V out of 5 %t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);


on one column, but now the following one with

$options = array('%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();


returns nothing  ???
Comptia A+ / Network + certified

vuud

Quote from: stuarta on July 31, 2006, 06:10:07 PM
ok got

$options = array('subtitle'=>'Rated %V out of 5 %t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewRandomMediaFrom(1,1,"album=7",$options);


on one column, but now the following one with

$options = array('%t by %o',"cellstyle" => "copyright" );
$objCpm->cpm_viewLastAddedMedia(4,1,$options);
$objCpm->cpm_close();


returns nothing  ???

There is an obvious error.  Please check it over carefully.

Please check carefully before posting.

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

twofer

When I run cftest.php I'm getting this:

5 You set your partial URL to /pics PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux linhost133.prod.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/content/t/w/o/twotrackbrewing/html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /cgi-bin/php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS


The thumbnails do not end up getting displayed and I am using the default prefixes for image files. Any ideas?

TIA

vuud

Quote from: twofer on August 01, 2006, 04:41:14 PM
When I run cftest.php I'm getting this:

5 You set your partial URL to /pics PASS
10 No dots in partial url PASS
15 coppermine.php not present PASS
20 coppermine_dao.php not present PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux linhost133.prod.mesa1.secureserver.net 2.4.21-27.ELsmp #1 SMP Wed Dec 1 21:59:02 EST 2004 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.3.11 INFO
55 DOCUMENT_ROOT: /home/content/t/w/o/twotrackbrewing/html INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /cgi-bin/php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 Found CPG config file PASS


The thumbnails do not end up getting displayed and I am using the default prefixes for image files. Any ideas?

TIA

Are you bridging coppermine to something, like SMF, PhpBB, etc, etc...  If so, search this thread for the problem and solutions to this.

Your document root is also pretty different from your script_filename variable...  Where did you put cpmfetch?
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

twofer

I'm bridging it to SMF and I did comment out line 54 and uncomment 59 but I'm still having this problem.

I placed the cpmfetch folder in the root so it's /cpmfetch.