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

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.

kegobeer

Starting in 1.4, all Coppermine db functions have a unique prefix, which prevents function clashes.  Not a lot of help now, but something to look forward to.

BTW, now you know the headaces bridge writers run into.  ;)
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

vuud

Quote from: kegobeer on April 09, 2005, 05:38:00 PM
You do know that certain functions in SMF conflict with Coppermine, right?  Most likely CpmFetch, which is probably use to the Coppermine database functions, is now using SMF's database functions, which are different and require different parameters.

Hmmm, that does not sound right for this... I use all my own database calls, and literally use zero code from coppermine itself.  I read the config in, but that is where it ends.  All my database accesses are directly from my script to the database.  Unless I am missing something

Checkout the coppermine_dao.php for example of what I am talking about.

Strange.  I will install SMF here and give it a whirl.


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

kuyaedz

#442
QuoteMySQL error!
Access denied for user: 'root@localhost' (Using password: NO)(Errno=1045)

Your query:
INSERT INTO evo_hitlog( visitTime, visitURL, hit_ignore, referingURL, baseDomain, hit_blog_ID, hit_remote_addr, hit_user_agent ) VALUES( FROM_UNIXTIME(1113071410), '', 'invalid', '', '', 2, '', '')

I just got cpmfetch installed & it loads a graphic just fine but I get this output at the bottom of my page.  I'm using it with b2evolution.  I'm sure its easy enough to input the correct username / pw but I dont know which file to edit.  Coppermine Gallery works fine on its own so I know that Db is setup correctly.  Any suggestions?

EDIT: only receive this error on directory open (ie; if I dont specify index.php).

Thanks in advance.

Texan78

is this correct <img src="/gallery/cfimageget.php">


i have a real good feeling that its wrong. I couldnt find any real clear moron proof docs. on how to set it up...LoL

I made the changed to the file but still get nothing.

vuud

Quote from: kuyaedz on April 09, 2005, 07:40:55 PM
QuoteMySQL error!
Access denied for user: 'root@localhost' (Using password: NO)(Errno=1045)

Your query:
INSERT INTO evo_hitlog( visitTime, visitURL, hit_ignore, referingURL, baseDomain, hit_blog_ID, hit_remote_addr, hit_user_agent ) VALUES( FROM_UNIXTIME(1113071410), '', 'invalid', '', '', 2, '', '')

I just got cpmfetch installed & it loads a graphic just fine but I get this output at the bottom of my page.  I'm using it with b2evolution.  I'm sure its easy enough to input the correct username / pw but I dont know which file to edit.  Coppermine Gallery works fine on its own so I know that Db is setup correctly.  Any suggestions?

EDIT: only receive this error on directory open (ie; if I dont specify index.php).

Thanks in advance.


This is not a coppermine fetch problem... I don't do any inserts into the database...  Hmmmm, of coure the close tag for coppermine fetch could be closing your database connection early...  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

vuud

Quote from: Texan78 on April 09, 2005, 08:39:06 PM
is this correct <img src="/gallery/cfimageget.php">


i have a real good feeling that its wrong. I couldnt find any real clear moron proof docs. on how to set it up...LoL

I made the changed to the file but still get nothing.

Its the path to whereever you put the cfimageget.php file.

So if its in your forums directory... it would be /forums/cfimageget.php




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

Texan78

WOOOOHOOOOO it workie workie now. Thanks a lot. Do you hvae a donation link on your site?

You can see the final product at http://www.texascampingforum.com/forum/portal.php

vuud

Quote from: Texan78 on April 09, 2005, 09:19:51 PM
WOOOOHOOOOO it workie workie now. Thanks a lot. Do you hvae a donation link on your site?

You can see the final product at http://www.texascampingforum.com/forum/portal.php

No, I do not have a dontation link...  If you really want to donate, please dontate to the eff.org for all of our sakes.  Or at least look at the site so you can see what they are actually protecting you from.

http://www.eff.org

Glad to hear it works :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

Texan78

Ok i was reading in the docs about showing albumdata and category data and what not. Which one of those will let be be able to show the pic title and/or the user who posted it?

Damonik

Has anyone had much luck getting cpmfetch working inside Wordpress?

i.e calling the php functions from within a wordpress post so you can create a post linking your gallery + thumbnails.

Cheers

vuud

Quote from: cdrake on April 09, 2005, 01:37:06 AM
Have you made it where you can include gif custom thumbnails yet?

Version 1.3.3 is up as a development version on my web site that will now do just this...

http://cpmfetch.fistfullofcode.com

I tested it lightly so please report any problems.  Note:  It will take jpg files as a precidence over gif's if they are both present.

So if you have:

soylentgreen.mp3
thumb_soylentgreen.jpg
thumb_soylentgreen.gif

It will use the jpg file.  If there is no jpg file, it will use the gif

(Also, now that I think about it, will only recognize lower case extentions)

Hope this helps






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

luke

Hey vuud, I've got cpmfetch working nicely using the cpm_showAlbumsUpdatedOverLastDays function (plus I added a DIV formatting thingy :) ), however I was wondering if its possible to just have a 'show last x updated albums' function (slap me if I'm missing something easy here :D ), and if such a function could include user galleries (maybe va $source?), which the current one doesn't seem to? I'm just thinking it could display album name/link with thumbnail (also link to album), date updated, and possibly number of new images added.. 

cheers ;D
luke

vuud

Quote from: luke on April 14, 2005, 11:39:17 AM
Hey vuud, I've got cpmfetch working nicely using the cpm_showAlbumsUpdatedOverLastDays function (plus I added a DIV formatting thingy :) ), however I was wondering if its possible to just have a 'show last x updated albums' function (slap me if I'm missing something easy here :D ), and if such a function could include user galleries (maybe va $source?), which the current one doesn't seem to? I'm just thinking it could display album name/link with thumbnail (also link to album), date updated, and possibly number of new images added.. 

cheers ;D
luke

Well, its always great to hear some got it working anyway.

For including user galleries (Well private ones anyway)
You can always include user galleries by setting the private setting off after making your initialization call and before asking for images.  From the documentation files:

cpm_unlockPrivate($bool)
This toggles access to non-public photos (default: false) It allows images not publically available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.

So you call for any of them would look like so...

<?php
include "./CoppermineFetch/coppermine.php";
$objCpm = new cpm("/gallery");
$objCpm->cpm_unlockPrivate(true);
$objCpm->cpm_viewRandomMedia(3,3);
$objCpm->cpm_close();
?>

Hmmm, now that I think about it - that does not really help you.

Well, this one does show updated albums... it does not take a source parameter since it should just cover all albums that are publically viewable.  I can't remember exactly...  give it a try and see if things work out.

cpm_showAlbumsUpdatedOverLastDays($numberOfDays,$options="")
Displays a list of albums with thumbnails and count over past days. Supports the setReturnType option.

As for limiting to the last 5 updated, no that is not in there right now.  Sounds like a good idea though

Sorry if this is somewhat disjointed... I have this nasty headache rolling in right now

Let me know if I am way off on any of this...






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

luke

Thanks for the response vuud.

Quote from: vuud on April 14, 2005, 08:48:00 PM
For including user galleries (Well private ones anyway)
You can always include user galleries by setting the private setting off after making your initialization call and before asking for images.  From the documentation files:

cpm_unlockPrivate($bool)
This toggles access to non-public photos (default: false) It allows images not publicly available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.

I gave this a go but it was returning a 'call to undefined function' error. I checked coppermine.php, and around line 169 the function listed is cpm_unlock_private ($bool) (note case change and extra underscore). I changed the name and it stopped returning errors, but I don't have any private albums so I'm not sure if it was working (I'm not a programmer so I'm just guessing here :) ).

Anyway, I should have been clearer in my post before - I'm using cpm_showAlbumsUpdatedOverLastDays , but its returning only the albums which appear under the main category structure, not (public) user galleries which have been updated. However, the number given for total number of images added over x days does include user galleries, which is a bit of a discrepancy. So, to give you an example, for me cpm_showAlbumsUpdatedOverLastDays is currently returning 3 updated albums, with 5, 1, and 1 new images respectively. However, it also says "13 new images have been added since ..." which is true since 6 new images have been added to user galleries (6+7=13), but these albums don't appear in the album list, but it would be good if they could! :D

QuoteAs for limiting to the last 5 updated, no that is not in there right now.  Sounds like a good idea though

Thanks, it would be really handy when albums are updated sporadically, as with last x days you might have 10 in the list sometimes, and 0 other times. For users I think it would be handy to just always see a consistent "last x albums" or whatever instead.

QuoteSorry if this is somewhat disjointed... I have this nasty headache rolling in right now

No worries at all I totally understand, I hope I was a bit clearer too! :D

luke

vuud


Sorry about the syntax on that command... I will have to check my docs to make sure its right (I think they are wrong).

I will check the code to see if that is doing the user galleries also... They get handled in a wierd way in the database, so my SQL could be ignoring them accidentally.  I'll add in that "last x updated" function - I know exactly what you mean about sometimes having 5 and sometimes 0.

My headache is better... I've been doing taxes all night, so suddenly understanding all this stuff is so much easier seeming for some reason!
:D




Quote from: luke on April 15, 2005, 03:37:50 AM
Thanks for the response vuud.

Quote from: vuud on April 14, 2005, 08:48:00 PM
For including user galleries (Well private ones anyway)
You can always include user galleries by setting the private setting off after making your initialization call and before asking for images.  From the documentation files:

cpm_unlockPrivate($bool)
This toggles access to non-public photos (default: false) It allows images not publicly available to be selected and displayed until it is turned off, or the object is lost. This program makes no distinction beyond if a media item is public or not - Meaning that photos that may be viewable by logged in users are considered private, not something in between.

I gave this a go but it was returning a 'call to undefined function' error. I checked coppermine.php, and around line 169 the function listed is cpm_unlock_private ($bool) (note case change and extra underscore). I changed the name and it stopped returning errors, but I don't have any private albums so I'm not sure if it was working (I'm not a programmer so I'm just guessing here :) ).

Anyway, I should have been clearer in my post before - I'm using cpm_showAlbumsUpdatedOverLastDays , but its returning only the albums which appear under the main category structure, not (public) user galleries which have been updated. However, the number given for total number of images added over x days does include user galleries, which is a bit of a discrepancy. So, to give you an example, for me cpm_showAlbumsUpdatedOverLastDays is currently returning 3 updated albums, with 5, 1, and 1 new images respectively. However, it also says "13 new images have been added since ..." which is true since 6 new images have been added to user galleries (6+7=13), but these albums don't appear in the album list, but it would be good if they could! :D

QuoteAs for limiting to the last 5 updated, no that is not in there right now.  Sounds like a good idea though

Thanks, it would be really handy when albums are updated sporadically, as with last x days you might have 10 in the list sometimes, and 0 other times. For users I think it would be handy to just always see a consistent "last x albums" or whatever instead.

QuoteSorry if this is somewhat disjointed... I have this nasty headache rolling in right now

No worries at all I totally understand, I hope I was a bit clearer too! :D

luke



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

#455
I've gone and inserted mu cpmfetch code into an SMF template and everything seems to work as I would expect.   if anyone is having / or had problems with SMF templates let me know.

The only difference I have found so far is that I cannot call the cpm_close() - since it apparently wreaks havoc with the existing database connection.

Basically that just shuts down the database connection anyway, and if the software is using the same one thats something to not worry about.

:D

Hmmm, one note:  My coppermine and SMF tables are in the same database.  Wonder what would happen if they were in different ones...



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

snork13

Quote from: vuud on April 15, 2005, 08:07:52 AM
I've gone and inserted mu cpmfetch code into an SMF template and everything seems to work as I would expect.   if anyone is having / or had problems with SMF templates let me know.

The only difference I have found so far is that I cannot call the cpm_close() - since it apparently wreaks havoc with the existing database connection.

Basically that just shuts down the database connection anyway, and if the software is using the same one thats something to not worry about.

:D

Hmmm, one note:  My coppermine and SMF tables are in the same database.  Wonder what would happen if they were in different ones...





@vuud

I should remove the cpm_close() call and it should work? Great news!!!
I do have coppermine and smf in the same database. I'll give it a try tonight

thanks,

snork13

vuud


That was my experience... if you have it in there, some pages work but some produce strange occurances.  Keep an eye on it though and let me know how well it works out for you.  I've got my forum up at

http://www.fistfullofcode.com/forums

I'm still hacking the template, so bear with me

I will also be using it for cpmfetch announcements only... Support and stuff will still be here and major announcements too, but if you want to get email notifications about dev and stable releases and tutorial updates and stuff subscribe there and do a notify thing on the cpmfetch news section. 

I will probably post tutorials here also, as formatting for one SMF can be copied over pretty easily :)

Quote from: snork13 on April 15, 2005, 02:24:11 PM
Quote from: vuud on April 15, 2005, 08:07:52 AM
I've gone and inserted mu cpmfetch code into an SMF template and everything seems to work as I would expect.   if anyone is having / or had problems with SMF templates let me know.

The only difference I have found so far is that I cannot call the cpm_close() - since it apparently wreaks havoc with the existing database connection.

Basically that just shuts down the database connection anyway, and if the software is using the same one thats something to not worry about.

:D

Hmmm, one note:  My coppermine and SMF tables are in the same database.  Wonder what would happen if they were in different ones...





@vuud

I should remove the cpm_close() call and it should work? Great news!!!
I do have coppermine and smf in the same database. I'll give it a try tonight

thanks,

snork13
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

Joachim Müller

vuud,

imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?

Joachim

vuud


Ok by me... Just let me know what I am supposed to do

Do I get a key to the executive washroom? :D

Quote from: GauGau on April 15, 2005, 09:48:49 PM
vuud,

imo it's time to start a separate sub-board dedicated to cpgFetch with you as moderator. OK?

Joachim

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