CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 8 CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG - Page 8
 

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 - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG

Started by vuud, December 17, 2004, 10:19:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

vuud

Quote from: Titooy on January 06, 2005, 09:05:48 PM
Maybe a hint is that coppermine's charset is iso-8859-1 and the page where copperminefetch is used is windows-1252

I don't even understand where the problem is?

Is it am image thats not displaying? 
Is it a problem in the alt tag?

I just don't even know where to start :)
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

--Martin--

I change to charset iso-8859-1 on the page...the same thing is happening.
I think it´s a problem whit the alt tag....
Every image or album whit å.ä.ö letter is not shown on the page.
Wonder if there is any others from sweden who has the same problem?

vuud

Can you attach an image that is giving you that problem to a post here?

That way I can add it into mine and see if I can replicate the problem?

Thanks!
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

dale

Quote from: vuud on January 05, 2005, 10:51:31 PM
Ironically I spent last night and part of today doing just that.  
http://www.fistfullofcode.com/projects/copperminefetch/index.php

Sorry for the poor docs, but I am trying to make them better.  I posted some code a little while ago for you to try.  Essentially replace your PHP code with this:


<?php 
include "./cpgfetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_viewRandomMediaFromCategory(1,1,2);
$objCpm->cpm_close();
?>



This assumes that you have this file in the root of your web site, and that you put the coppermine.php and coppermine_dao.php in a directory off the root called cpgfetch.

If all this is true, it will work.  

:D

Check out the new docs on the web site

Everything seems to be working the way it should now. My testimage.php file pulls the files from the gallery just fine. I am still getting errors when I try to use the script in my forum portal. I think that has to do with the portal script though. Im going to try a few things yet.

My forum gives me the following error when I try to include the script into a portal block.
ERROR: Path to Coppermine incorrect.
Fatal error: Call to a member function on a non-object in /home2/barstone/public_html/potaid/cpgfetch/coppermine.php on line 371


Ill keep trying some things to see if I can make it work. Ill let you know what I find. let me know if you have any ideas.

Cool script though. Ill definitely use it one way or another. Thanks for the help.

By the way the docs on your site are great. thanks for setting all that up.
Im not a complete idiot... Some parts are missing.

vuud


Well, it could be a few things I can think of off the bat.  Can you point me at a url on your site where I can see where its failing in the portal.   I know your under development, so I have the domain name here if you want to exclude it.

With the "ERROR path to coppermine does not exist"...
This is given when the program takes the path  you  give it and it tries to find the config.inc.php file (from whick it grabs the rest of the data).  In theory, it should.

Do me a favor and download the 0.9.2 dev release from my web site
http://www.fistfullofcode.com/projects/copperminefetch/downloads.php

It will give you an error with where it was looking when it generates that message.

And where can I see the problem in motion


Bill



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

vuud

Dale, if you could also try the cftest.php page that comes with the 0.9.2 release that would be great (I just added it)
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

--Martin--

Quote from: vuud on January 06, 2005, 11:29:00 PM
Can you attach an image that is giving you that problem to a post here?

That way I can add it into mine and see if I can replicate the problem?

Thanks!

Okioki here is one :)

vuud

Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed

;D

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

--Martin--

Quote from: vuud on January 07, 2005, 07:07:52 AM
Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed

;D



tell me, tell me :)

vuud

Quote from: --Martin-- on January 07, 2005, 07:14:26 AM
Quote from: vuud on January 07, 2005, 07:07:52 AM
Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed
;D
tell me, tell me :)

I do not know yet, but if I can replicate it, I can fix it

But after looking at it some more I am even more confused.  When I replicate it on my site and view it my pages are set to UTF-8 which breaks the file.

But, If I do not set a charset it works fine (defaults to ISO-8859-1) or if I force it to windows-1252 or the iSO-8859-1 it works fine.  On your site the charset is for Windows-1252 on your pages so it should work fine. 

Should I be able to see the problem on your main page?  Cause I cannot.  If you have a test page you are doing that image on, try adding in the meta tag for a windows-1252 charset...  it should work

really.

I looked into adding somethign to convert charsets by it would add many dependencies to the code (external libraries and such you would have to install yourself if your server would let you)

Let me know how that pans out








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

vuud

#150
The following is a list of things I want to get into the stable release after this one (1.2).  This is a probably a month or so before a stable is out, but dev releases will be out in the meantime as I finish a function.

So anyway, this is not a vote or anything, but I value your thoughts.  If there is anything not on the list you can think of, please let me know.  I am not making promises, but I have yet to turn down a suggestion.   So be the first on your block to have a feature request shot down!! ;D

Here they are, in no particular order:

Specify more than one album or category: - Available as of Development release 1.1.0
This would allow anywhere you wanted to specify more than one album or more than one category to draw information from.(album=1,3,2 or category=1,4,2 or even combinations, cat=3,album=3,4,6)

Category=1 requests to show all user albums- Available as of Development release 1.1.0
Instead of doing nothing like it does now :D

Subtitles generated for images:
Allow subtitles to be specified to appear under the images (or next to or on top of) complete with placeholders to dynamically generate the text

[b]Last added category or albums (with thumbnails):[/b]
Show the albums and or categorories that have been added recently - potentially since the last number of days or the last number of them added
This will not be done in the foreseeable future.  Cpg does not track creation times for albums and categories.  I do not see that as part of what I want my code to do (start its own metadata) so this is off the list

Last added comment with image:
Someone was asking for this... show the last image that was commented on along with the comment.  It seemed fun

Show last albums or categories that have had images added - trand
(along with title and descriptions and placeholders)   A list of categories or albums that have new photos along with a representative thumbnail and some text (title, description, total number of images maybe   

Possibly a method to limit the size of the files returned(width)
I have a few wide ones that always screw up my random image tables :( - just pisses me off

Set option to have html results returned instead of output
This way you could fiddle with them on your own php page, whatever you want to do to them

Set option to have html results returned as data instead
You would have to do all the formatting, but coppermine fetch could be used more as a generic interface to the coppermine gallery

Framing popup option for large photo version requests
As pointed out to me, this would be much nicer than the target="_blank" option

Is there anything else?  What would be cool?

I have a few other thoughts, but I am not sure they are technically possible - so I will not mention them here!

Thanks for all your appreciation and positive comments! 

BTW: Dont forget the main site for anything besides this discussion is on
http://www.fistfullofcode.com/projects/copperminefetch

Docs, Tips, etc, etc...
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

--Martin--

Quote from: vuud on January 07, 2005, 07:45:44 AM
Quote from: --Martin-- on January 07, 2005, 07:14:26 AM
Quote from: vuud on January 07, 2005, 07:07:52 AM
Good news!  I was able to replicate your problem...

That means two things:

1) Its not you
2) It can be fixed
;D
tell me, tell me :)

I do not know yet, but if I can replicate it, I can fix it

But after looking at it some more I am even more confused.  When I replicate it on my site and view it my pages are set to UTF-8 which breaks the file.

But, If I do not set a charset it works fine (defaults to ISO-8859-1) or if I force it to windows-1252 or the iSO-8859-1 it works fine.  On your site the charset is for Windows-1252 on your pages so it should work fine.  

Should I be able to see the problem on your main page?  Cause I cannot.  If you have a test page you are doing that image on, try adding in the meta tag for a windows-1252 charset...  it should work

really.

I looked into adding somethign to convert charsets by it would add many dependencies to the code (external libraries and such you would have to install yourself if your server would let you)

Let me know how that pans out










Sorry for all the problem!!
It was my browser...arggg
The script works fine whit letters like åäö!!
Again sorry :)

Loking forward to the "last image whit comment" add :)

Casper

Hi Vuud,

excellent work.  I installed version 0.9.2 today, and have the following questions.  I looked through the thread, and didn't see them, so apologies if already asked.

Q1.  Is it possible to state getrandom from more than 1 cat, or more preceisely, from all cats greater than 10000 (cid >10000), as selecting cat 1 does not work.  I want to restict it to the user galleries only.

Q2.  I have a gif in my gallery, and when that is shown(see pic), it only shows as a link (which is broken).  Is it possible to stop it selecting gif files.

Note 1.  The links from the pics are all broken, as the pid is not being added.  The url for every pic is showing as '..../displayimage.php?pos=-' (no pic number).

But other than that, brilliant.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

vuud

Quote from: Casper on January 07, 2005, 08:35:07 PM
Q1.  Is it possible to state getrandom from more than 1 cat, or more preceisely, from all cats greater than 10000 (cid >10000), as selecting cat 1 does not work.  I want to restict it to the user galleries only.

Q2.  I have a gif in my gallery, and when that is shown(see pic), it only shows as a link (which is broken).  Is it possible to stop it selecting gif files.

Note 1.  The links from the pics are all broken, as the pid is not being added.  The url for every pic is showing as '..../displayimage.php?pos=-' (no pic number).

Hi Casper,
First off thanks for the kudos on this... I appreciate it

As for your problems:

Q1: About multiple categories...  Not right now, but its on the list for the next version - so over the next few weeks that will be added.  As for selecting category 1 not working, technically it does work (at least how I programmed it) but aparently the user categories do not follow the normal categories.  Thats okay.  I will fix that in the next release also.  I just had no idea that cat 1 stood for that :D


Q2: As for the gif... that should work, so that is actually a bug.  I will have to fix that.  There is a pretty robust filtering mechanism you can do to limit what is selected.  See the cpm_setFilter method
http://www.fistfullofcode.com/projects/copperminefetch/docs.php#cpm_setFilter

I will look into the gif problem - does it show the image, but mess up the link?

Where are you having the problem with the pid not being added?  Thats strange.  Is it only on the gif file or something?

Interesting.

Thanks for the feedback!

Update: this means I have to apply the kegobeer mod to get gif upload support.  This will have to wait till tonight then :(





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

Casper

Hi Vudd,

thanks for the reply.

1.  Yes, I agree it works with cat 1, but cat 1 never contains albums itself, it contains sub-cats, from 10000 >.  Therefore, all the user albums are actually in these higher numbered cats.  Perhaps if it could be got to include sub-cats?

2.  The gif image does not show at all, just the title, as shown in the screenshot above, which is set to show 4 images.

3.  None of the links work.  The command in use is 'cpm_viewRandomMedia(4,1)'.  The resultant link does not include the image id, and is left blank.
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here

vuud

Quote from: Casper on January 07, 2005, 09:57:43 PM
1.  Yes, I agree it works with cat 1, but cat 1 never contains albums itself, it contains sub-cats, from 10000 >.  Therefore, all the user albums are actually in these higher numbered cats.  Perhaps if it could be got to include sub-cats?

2.  The gif image does not show at all, just the title, as shown in the screenshot above, which is set to show 4 images.

3.  None of the links work.  The command in use is 'cpm_viewRandomMedia(4,1)'.  The resultant link does not include the image id, and is left blank.

Aha...
#1 - That sounds like what I will implement.  Good idea and perfectly doable...

#2 - Your not going to believe this, but I looked at the gif, saw the text and for some reason thought it was the as of yet uncoded subtitle functionality.  I need more sleep, more coffee or a better brain.  Well the img links are definately broken then.

#3 - Okay, the cpm_viewRandomMedia(4,1) works okay here - not meaning that I don't believe you, its got to be some other unforeseen aspect of Coppermine I failed to anticipate.

Is there a live example of this I can look at?  You can PM me that if you want to.  If not, can you look at the img src for the missing images and see where it is broken? 

Also have you made any mods that could have changed the name of fields in your database?  Is there anything whacky you can think of?

Thanks for your patience
Vuud








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

vuud


Oh screw me.  I don't have a new enough GD on the server I am on to do the gif mod.  I am moving servers over the next few days, so hopefully the new one is new enough to do it.  Is there any other way I can get  gif image into the system for testing this problem that you know of?


Quote from: vuud on January 07, 2005, 10:32:19 PM
Quote from: Casper on January 07, 2005, 09:57:43 PM
1.  Yes, I agree it works with cat 1, but cat 1 never contains albums itself, it contains sub-cats, from 10000 >.  Therefore, all the user albums are actually in these higher numbered cats.  Perhaps if it could be got to include sub-cats?

2.  The gif image does not show at all, just the title, as shown in the screenshot above, which is set to show 4 images.

3.  None of the links work.  The command in use is 'cpm_viewRandomMedia(4,1)'.  The resultant link does not include the image id, and is left blank.

Aha...
#1 - That sounds like what I will implement.  Good idea and perfectly doable...

#2 - Your not going to believe this, but I looked at the gif, saw the text and for some reason thought it was the as of yet uncoded subtitle functionality.  I need more sleep, more coffee or a better brain.  Well the img links are definately broken then.

#3 - Okay, the cpm_viewRandomMedia(4,1) works okay here - not meaning that I don't believe you, its got to be some other unforeseen aspect of Coppermine I failed to anticipate.

Is there a live example of this I can look at?  You can PM me that if you want to.  If not, can you look at the img src for the missing images and see where it is broken? 

Also have you made any mods that could have changed the name of fields in your database?  Is there anything whacky you can think of?

Thanks for your patience
Vuud









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

Tranz

You can install php/myadmin/apache on your own computer. Then you can use the latest GD.

Local server makes it much easier to develop. I hate it when there are occassional incompatibilities with Windows machine and Linux webhost so I have to upload files to test.

vuud

Quote from: TranzNDance on January 08, 2005, 06:41:46 AM
You can install php/myadmin/apache on your own computer. Then you can use the latest GD.

Local server makes it much easier to develop. I hate it when there are occassional incompatibilities with Windows machine and Linux webhost so I have to upload files to test.

I actually already have php, mysql, apache on my computer and on my server here... just no coppermine.  I suppose I could install that there.  Windows machines?  Don't have any of them either :)

(Actually there is one in the other room - also known as the box no one likes - I need it for webtrends... no monitor attached to it though)

I'm not doing development on the core coppermine product so my testing is a bit easier... I have an ANT build file that I just hit ant posttest and it does syntax checking and uploads for me.  Yeah, local would be easier...

Ah well



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

Casper

Quote from: vuud on January 07, 2005, 10:32:19 PM
Is there a live example of this I can look at?  You can PM me that if you want to.  If not, can you look at the img src for the missing images and see where it is broken? 

I will pm the url, as this is a test site under development for some friends, and not yet live.
The <img src is correct, it is just the <a href that is broken. It is not picking up the pid and attaching it at the end of the url.

I should have said, this is a 1.4 install, bridged to smf, using a custom theme, and the page showing the images is in the coppermine root folder.

As a dev I know full well there is no support for 1.4, and this is probably related to that, so please use this report as such, if you have no problems with 1.3 users, and hopefully it may help you prepare this mod for the 1.4 release  ;)
It has been a long time now since I did my little bit here, and have done no coding or any other such stuff since. I'm back to being a noob here