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

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

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 9 Guests are viewing this topic.

cyprus07

Quote from: vuud on September 28, 2005, 04:08:05 AM


Read the quickstart
http://www.fistfullofcode.com/projects/copperminefetch/quickstart.php

Then if you are especially giddy, the documentation (the how to use stuff)



ok i did what you said and put it here http://www.poli-online.net/cpmfetch/cpmfetch.php

however how do i include it in the code where i want it to be displayed. and if it can be like they have done it here http://www.poliaektimisoara.ro/forum/index.php  so that instead of going acros it goes down, and displays the Latest image, then 3 of the last images in the last 3 albums



vuud

Quote from: lavashark.com on September 28, 2005, 11:07:55 AM
Quote from: vuud on September 28, 2005, 05:48:16 AM

If you want to show the last image from two different categories, you could just make two calls to cpmfetch (hint: don't recreate the object, just add a second call).

Of course I could be misunderstanding the problem


If I  call it twice, i think it will simply display the last uploaded file twice.
How might I specify only to call one per album.

In other words, not two last uploaded files, but most recent file from latest two albums.

Yes, just use the function call that asks for the last uploaded photo from an album

do it twice, asking for different albums

Check out:  cpm_viewLastAddedMediaFrom( ) on this page:
http://www.fistfullofcode.com/projects/copperminefetch/manual/ch07s03.html

do call it twice, the first time for album 1 and the second time for album 2 (insert your own album numbers)

Lemme know if I am still being dense... its been a loooong day



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

willstein

i think you are saying:
call one: display most recent photo from [album1]
call two: display most recent photo from [album2]

But instead of displaying most recent from album, I'm looking to display most recent from gallery (only allowing one per album)


Currently I am displaying the two most recent gallery wide.

Same thing, except somewhere in there might be a function:
"After insert recent photo 1, check recent photo 2.
If recent photo 2 is from same album, check recent photo 3, etc."



I havent actually tried what you are asking yet. It doesnt seem like its going to work, but if you want I'll just shut up and just try what it is that you're saying.

vuud

Quote from: lavashark.com on September 29, 2005, 06:29:54 AM
i think you are saying:
call one: display most recent photo from [album1]
call two: display most recent photo from [album2]

But instead of displaying most recent from album, I'm looking to display most recent from gallery (only allowing one per album)


Currently I am displaying the two most recent gallery wide.

Same thing, except somewhere in there might be a function:
"After insert recent photo 1, check recent photo 2.
If recent photo 2 is from same album, check recent photo 3, etc."

I havent actually tried what you are asking yet. It doesnt seem like its going to work, but if you want I'll just shut up and just try what it is that you're saying.

So what you are saying is that you have more than two galleries, but you only want to show the newest 1 added to the last two galleries to be added to?

So they would come from different galleries each time then?

Your screwed on that one then.  Nothin in there to do that. 

If you have php know-how, you can get back a lot of recently added and cycle down till you find two from different galleries.  If you try this, let me know if you get stuck.

This page has some examples of extending cpmfetch that could get you headed down the right path
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php

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

willstein

Right, but NOT from two different galleries, but two different albums.

The current latestupdate fetch works great. It displays the two latest photos.
I am only trying to modify it to not display two images from the same album.

Does that make sense?



vuud

Quote from: lavashark.com on September 29, 2005, 07:15:02 AM
Right, but NOT from two different galleries, but two different albums.

The current latestupdate fetch works great. It displays the two latest photos.
I am only trying to modify it to not display two images from the same album.

Does that make sense?

When you say galleries do you mean categories?  Or two entirely different cpg installations?


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

willstein

I only have one gallery.
I have about four categories (with more to be added in the future)

vuud

Quote from: lavashark.com on September 29, 2005, 07:22:26 AM
I only have one gallery.
I have about four categories (with more to be added in the future)

Yeah, thats going to be custom coding to do that... regrettably.  If I can tomorrow I will ponder it.  So much to do.

Me sleep now
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

willstein

sleep my friend.
and let me know if there is anything i can do in return.

mulesnx

Quote from: nk111 on September 27, 2005, 11:36:52 AM
Hi there,

i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.

Here's the url:

http://mad-d-sign.com/cpmfetch/cftest.php

http://mad-d-sign.com/cpmfetch/cfimageget.php

My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?

regards
Nico

<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>



I am having the same problem as this guy... Is it because my cpg is bridged with phpbb?  That is the only "hack" I have used at all.  How do I get around this, if there is a way??? Thanks..

vuud

Quote from: mulesnx on September 29, 2005, 08:03:19 AM
Quote from: nk111 on September 27, 2005, 11:36:52 AM
Hi there,

i downloaded and installed cpmfetch today. After setting the path in cftest i got
no more errors there but no pictures at all. Same in cfimageget. I just get a 1x1
empty gif there which seems to be the problem.gif I guess.

Here's the url:

http://mad-d-sign.com/cpmfetch/cftest.php

http://mad-d-sign.com/cpmfetch/cfimageget.php

My CPG 1.3.5 is bridged with SMF 1.1 RC1. Could that be the problem. If so, any ideas
how to solve this?

regards
Nico

<edit>
Sorry, for not reading the recent posts. I guess, I'd have to create all the users in the cpg tables too? There are too many to do so... Any other way to solve the problem? Or should I just wait for a newer version?
</edit>


I am having the same problem as this guy... Is it because my cpg is bridged with phpbb?  That is the only "hack" I have used at all.  How do I get around this, if there is a way??? Thanks..


Probably is the same problem.  The problem is that the phpbb bridge does not use the cpg user table.  If you only have a few users, you can recreate them in the cpg database and that will solve your problem.

I am sure it could be automated for larger numbers of users.

So in short, if you add some users to cpg, it should start working

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

nk111

Quote from: vuud on September 27, 2005, 04:51:25 PM
Do you mean wait for a newer version of the SMF Bridge?   I am not sure that I will be supporting all of the hacks that come out for coppermine photo gallery.  I may change it so that it ignores user data completely, which would solve this problem.

Hmmm,

Ah nevermind... I thought we could get away with something, but not really.  Too bad.  A few solutions leap to mind... you can recode the cpm_dao sql to use the smf user tables, or just take out the references to anything in the user table in the sql at the top and then in all the different sql calls lower.  The other solution is to write some sort of sql call that will take the smf users and copy the corresponding data into the cpg user tables.

Wish I could be more help on this, but I don't use the SMF bridge and I am having a tough time finding time to get ready for the 1.4 release of CPG never mind my personal wish list for CpmFetch

Good luck and let me know if you have any questions

Ok, I'm working on a cpmfetch_dao for the smf-bridged version. I'll post here if I get it working.

Another problem: Is it possible to change the way to get the document root? In my case it's wrong. As you can see here:

5 You set your partial URL to /_md/mad-d-sign.com/gallery PASS
10 No dots in partial url PASS
15 coppermine.php found PASS
20 coppermine_dao.php has been removed PASS
25 cpmfetch.php found PASS
30 cpmfetch_dao.php found PASS
35 Server OS = Linux powerbox.prohost.de 2.4.30 #13 SMP Tue Jul 19 03:33:01 CDT 2005 i686 INFO
40 WebServer = Apache INFO
45 PHP Version = 4.4.0 INFO
55 DOCUMENT_ROOT: /www/einsweb INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/einsweb/_md/mad-d-sign.com/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file


my apache document root the scripts reads from $_SERVER['DOCUMENT_ROOT'] as "/www/einsweb". But since this a shared server my real document root is /www/einsweb/_md/mad-d-sign.com! So I have to add the missing part in front of my partial url to pass the tests!

Ok, this worked, and after switching off the privacy mode by using $objCpm->cpm_unlock_private(true) i got a table on the test page. But now of couse the img and href url's are wrong because of the tweaked partial url.

I Guess a better solution would be to let the user define the absolute path to coppermine himself and maybe giving _SERVER["SCRIPT_FILENAME"] as hint?!

What do you think? I could imagine I'm not the only one who runs in this problem...

regards
Nico
¿ uwop ap!sdn - upside down ?

vuud

Quote from: nk111 on September 29, 2005, 04:24:45 PM

Ok, this worked, and after switching off the privacy mode by using $objCpm->cpm_unlock_private(true) i got a table on the test page. But now of couse the img and href url's are wrong because of the tweaked partial url.

I Guess a better solution would be to let the user define the absolute path to coppermine himself and maybe giving _SERVER["SCRIPT_FILENAME"] as hint?!

What do you think? I could imagine I'm not the only one who runs in this problem...

regards
Nico


There is a small smattering of people that have had this problem... but it gets worse once you start including other web servers (IIS, etc).

Anyway, there are ways to override it...  Basically, do the setup so that it can find your cpg config file and then use these functions

cpm_OverridePathToCoppermine($newpath_)
cpm_OverrideUrlToCoppermine($newpath_)

The first changes what the program uses internally to find stuff
The second changes what it uses for links and stuff

The whole startup thing is being re-written into a new and glorious form that will bring wonderous functionality and new and exiting features to all.  This will be part of the CPG 1.4 support I am adding.

I'll need beta testers when its done, so if you are having problems - this could be a good thing to try.  I'll be posting to the mailing list.

Good luck





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

mulesnx

I will try putting some people in my cpg table.  Thanks!!!  Oh yeah.  When do you plan on making this compatible with the new version of coppermine?

vuud

Quote from: mulesnx on September 29, 2005, 06:50:35 PM
I will try putting some people in my cpg table.  Thanks!!!  Oh yeah.  When do you plan on making this compatible with the new version of coppermine?

Well...  I planned on making it compatible a few weeks ago, but have not had time yet.  I am hoping to sit down and spend a few days just catching up and modiying stuff.  I would say before 1.4 is officially releases (or a day or two after as that will motivate me greatly)

You can get it to work with 1.4+ but it requires commenting one line out and uncommenting another.  That will make it work (its a very quick edit)

The release notes for 1.6.1 have some details. are here:
http://www.fistfullofcode.com/projects/copperminefetch/downloads/releasenote_1.6.1.txt
(but use 1.6.2 if you download one)

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

GuTe

great script!

How can i turn off so that it doesn't link to the pic?

nk111

Hi,

for those you having trouble with cpmfetch and the smf-bridged cpg:

I made a version of cpmfetch_dao.php that works with the bridged version. I simply removed
all references to the cpg user tables. Of couse you can not use any user related information
in the format string for the pictures with that version. But it works fine if you just want the
pictures.

You can download the file here
and put in your cpmfetch folder.

regards
Nico
¿ uwop ap!sdn - upside down ?

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

nk111

Quote from: vuud on September 30, 2005, 02:44:02 PM
Can you add a version number to the download... as in, which version of cpmfetch it is based on.

Thanks

Done... Please modify your post also to update the quoted link.

Another one: Is it possible to get rid of these <br /> tags when i want no subtitle at all?
The only solution i found, is to set return type to "html" and then replace the tags myself.
This would be nice for future versions because it makes the table cells higher than necessary.

Thank you again for your great work
regards
Nico
¿ uwop ap!sdn - upside down ?

vuud

Quote from: nk111 on September 30, 2005, 03:41:48 PM
Quote from: vuud on September 30, 2005, 02:44:02 PM
Can you add a version number to the download... as in, which version of cpmfetch it is based on.

Thanks

Done... Please modify your post also to update the quoted link.

Another one: Is it possible to get rid of these <br /> tags when i want no subtitle at all?
The only solution i found, is to set return type to "html" and then replace the tags myself.
This would be nice for future versions because it makes the table cells higher than necessary.

Thank you again for your great work
regards
Nico

Sounds like some undesired behavior... I'll just fix 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