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

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

Mambocube


martin g

hello...

i visited the CpmFetch and must say, that`s amazing...
----------------------

have some trpuble after downloading and upping the cpmfetch-folder


i started the cftest.php file, but it can`t display images!

used bridge: pragmamx.inc.php

my folders:   

/html/albums        (included  /html/albums/userpics )

/html/cfmfetch

/html/moduls/Gallery     (this the copperminefolder)


5   You set your partial URL to /html/modules/Gallery   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 dd10120 2.4.21-273-athlon #1 Mon Jan 17 13:03:46 UTC 2005 i686   INFO
40   WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 PHP/4.3.11 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6i   INFO
45   PHP Version = 4.3.11   INFO
55   DOCUMENT_ROOT: /www/htdocs/v161957/   INFO
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: /www/htdocs/v161957/html/cpmfetch/cftest.php   INFO
75   DOCUMENT_ROOT is a good match   PASS
80   Found CPG config file   PASS

Trying to display some images:
Not in Coppermine...



can somebody help me please?



vuud


Is the partial URL set correctly?

If your CPG is located at something like

http://www.domainname.com/Gallery

then the top of the cftest script should be

"/Gallery"

Can you post the site, or PM it to me if you are not comfortable posting it

Thanks

Quote from: martin g on August 22, 2005, 05:01:20 PM

5   You set your partial URL to /html/modules/Gallery   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 dd10120 2.4.21-273-athlon #1 Mon Jan 17 13:03:46 UTC 2005 i686   INFO
40   WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 PHP/4.3.11 mod_perl/1.27 mod_ssl/2.8.12 OpenSSL/0.9.6i   INFO
45   PHP Version = 4.3.11   INFO
55   DOCUMENT_ROOT: /www/htdocs/v161957/   INFO
60   C_DOCUMENT_ROOT: Not found   INFO
65   doc_root: Not found (IIS Servers only)   INFO
70   SCRIPT_FILENAME: /www/htdocs/v161957/html/cpmfetch/cftest.php   INFO
75   DOCUMENT_ROOT is a good match   PASS
80   Found CPG config file   PASS
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

Rodinou

Quote from: vuud on August 22, 2005, 03:47:01 PM
Quote from: Rodinou on August 22, 2005, 02:24:44 PM
I would like to have this (right bottom) ... but
1. it's a tableless system
2. I would like infos appears by dhtml popup.

I have seen your "core" code ... it's a hell for me. I have suggested you (without answer) to help you to transform your excellent plugin in tableless system ...

Sorry the code is a hell for you... Programming can be a bit daunting for newcomers when they first look at it.  Its probably the whole thing on how it generates the code, its so elegant...  I just love that part.

Anyway, I am pretty sure I did respond.  But in brief:

* I am NOT going to transform to tableless...  Few people care about it at this point in HTML/CSS's evolution.  I will make an option to generate tableless, but that has to wait until I have time and can abstract out the generation code so I can provide a generic interface for me to code to.

* Please be more specific as for what help you are offering...  If you are writing code to do this, just want to make feature requests, etc, etc.

I do think it would be a nice to have, but not particularly needed at this point.  I understand that because you need it for something that you do feel its much more urgent - but not all that much is moving to DHTML IMO.  I run a web development company and we have 0 requests for this sort of thing - and we also tend to not suggest it as HTML is very well supported across browsers, but CSS layouts are not as proven.

So I have a list, somewhere on that list is abstracting the output code... that will make Tableless more attractive.

Regardless, I would suggest if you really need it now to simply extend CPMFetch and write your own code.  You will not have to deal with my code "Hell" since you only use the ones you need.

Here are some short examples
http://www.fistfullofcode.com/projects/copperminefetch/tests/test6.php

Hopefully that can get you where you want to be

Keep me posted, and I think there is a forum here for extending cpmfetch - if you decided to go that route, post there to keep this all organized


I'm really not ok with you ... it has been proven CSS / XHTML was THE solution for web interfaces. All "great" sites like Microsoft, Macromedia ... are recoded in XHTML / CSS ... I think a lot of web agencies "show" they can do, but they can do is not the same thing "the best". A lot of discussions about designers / coders show "one clic = 1 page" is a very old "way" to think (with dhtml, xmlhttprequest ...) ... before doing websites, go a day inside a cybercafe ... you can learn more than anything. Show to your clients http://www.csszengarden.com and show them they can change interface as simple as a clic ... they WANT this. Csszengarden proves tables are prehistoric.

So OK, I'll go inside your code to erase table / tr / td ... it's incredible to see in 2005 tables are better CSS ... waouh. If all people thought like that, we'll all run with Lynx or Mosaic today.

But let me say :

<table>
<tr>
  <td>
    <a href="urlpic"><img src="pic"></a>
  </td>
  <td>
    <a href="urlpic"><img src="pic"></a>
  </td>
  <td>
    <a href="urlpic"><img src="pic"></a>
  </td>
</tr>
</table>

is better for you than

<div id="thumb">
  <a href="urlpic"><img src="pic"></a>
  <a href="urlpic"><img src="pic"></a>
  <a href="urlpic"><img src="pic"></a>
</div>

Live example http://www.sortons.net/dev/nol33t/testgalerie.htm
With CSS, you can even change the "thumb" without using php (the thumbs have normal width / height, but seem to be cropped). Look at the code : say me it's not better than tables ...

And you can CONTROL ALL your layout with the ID ... we don't live in the same planet :) sorry :)

Indeed, you can erase all parameters like "cols" or "rows" ... making your script simplier.


Consider my post not a personal attack, but I see the "old" coders don't like evolution. But xhtml is the better evolution since 1998. (and the dead of NS 4, of course)

vuud

Quote from: Rodinou on August 22, 2005, 08:22:31 PM
I'm really not ok with you ... it has been proven CSS / XHTML was THE solution for web interfaces.

Where was this proven?  Can you tell me there are no cross platform issues?  None?  Because if I search on that I get 600,000 "workarounds" pages.  I did not find anything "proving" that CSS layouts are THE solution.  In fact, with almost any technology, anyone who lables anything "THE Solution" for anything is either a zelot or a salesperson.

Quote from: Rodinou on August 22, 2005, 08:22:31 PM
Show to your clients http://www.csszengarden.com and show them they can change interface as simple as a clic ... they WANT this. Csszengarden proves tables are prehistoric.

I would be amazed if a client actually wanted that.  I suppose if you were building web sites for some small business somewhere, but larger ones want exact control over look and feel.  I get more grief because the type face can't be used or that the color looks different on one monitor than on another.  Do you build web sites for a living? Just curious if your experience is different.  How well does tableless work on say WebTV or any number of portable devices... airport internet access kiosks?  Palm pilots? Etc, etc... 

Quote from: Rodinou on August 22, 2005, 08:22:31 PM
So OK, I'll go inside your code to erase table / tr / td ... it's incredible to see in 2005 tables are better CSS ... waouh. If all people thought like that, we'll all run with Lynx or Mosaic today.

I actually run Lynx and sometimes links from the console pretty often.

Quote from: Rodinou on August 22, 2005, 08:22:31 PM
Live example http://www.sortons.net/dev/nol33t/testgalerie.htm
With CSS, you can even change the "thumb" without using php (the thumbs have normal width / height, but seem to be cropped). Look at the code : say me it's not better than tables ...

Why do all CSS layed out sites look the same? 

Quote from: Rodinou on August 22, 2005, 08:22:31 PM
And you can CONTROL ALL your layout with the ID ... we don't live in the same planet :) sorry :)
Indeed, you can erase all parameters like "cols" or "rows" ... making your script simplier.

Regrettably, there is a minority of people who want this.  Taking out the way most people use it just seems like a bad bad bad idea.  Besides, why on earth would I want to remove cols and rows?  How would we tell the layout how many you wanted across or down?

Quote from: Rodinou on August 22, 2005, 08:22:31 PM
Consider my post not a personal attack, but I see the "old" coders don't like evolution. But xhtml is the better evolution since 1998. (and the dead of NS 4, of course).

No problem.  Old coders don't mind evolution, we have just learned that jumping on every new thing to come along is not always effective.  If you switch now, you need to deal with all the cross platform issues, incompatibilies... heck we've been using CSS for formatting for a long time and there are still browser bugs. 

As for Microsoft using CSS (Which it seems to me they don't - I see lots of evil table tags in there) - that is not exactly a great endorsement from the people who bring you quality software like windows. 

Anyway, if you want to discuss it further I am willing, but PM so we don't clutter up the forum with our friendly banter. 



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: this is just another "DHTML/tableless is superior" rant posted by Rod several times already. You're welcome to try to argue, but this thread might then turn into a flamewar. Seen it before. Suggestion: ignore.

noworyz

Ok, I have another question!  I have the cpmfetch working just fine in all my pages and in my phpbb forums!

phpbb example
http://www.egriz.com/GrizBoard/

main site examples
http://www.egriz.com/

Now what I want to do is get this code working in the header of my coppermine gallery
http://www.egriz.com/GrizPics2/index.php

I read throuhg some info on how to make a custom header but didn't really understand how to go about doing it for this.  I want to keep it the same look as it is now but instead of using the image tag to grab the photo I want to use the cpmfetch.php file to do it so it links to the photo

thanks for your help!!!!

Rodinou

Quote from: GauGau on August 23, 2005, 09:17:58 AM
@vuud: this is just another "DHTML/tableless is superior" rant posted by Rod several times already. You're welcome to try to argue, but this thread might then turn into a flamewar. Seen it before. Suggestion: ignore.

THANX gaugau : but Vuud and me have choosen another "cleaver" solution : continue with PM. It's sad to ignore progress the new browsers offer. Don't forget for WHO you code (people or you ?)

MAher

Sorry to bother you with such a basic problem as the path to the config-file. I searched this thread and the docs but didn't find anything on this yet. Tried all the possible paths but no... :-[

Somehow the Document_Root is not correct, the script puts var/www in front of the Partial path to CPG I put in cftest.php.
The result is like this:


5 You set your partial URL to /site/new/scripts/cm 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 ***.***.*** 2.4.27-2-686 #1 Mon May 16 17:03:22 JST 2005 i686 INFO
40 WebServer = Apache/1.3.33 Ben-SSL/1.55 (Debian GNU/Linux) PHP/4.3.10-15 INFO
45 PHP Version = 4.3.10-15 INFO
55 DOCUMENT_ROOT: /var/www INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/user/public_html/site/new/scripts/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /var/www/site/new/scripts/cm/include/config.inc.php


The config file is in /home/user/site/ etc. /var/www/ is not the root for my site. What's going wrong? php(info) gives for the root 'no value'  ???

vuud


I am not sure about that... sounds like you need to do some template modification if you want to add it into your coppermine gallery... Check the template doc's and some of the forums here are dedicated to themes creation and modification...

I thought I had done it to mine, so I was just going to post the code.  But I was thinking of PHPBB...

Ah well... if you have a solution, jot it down and send it... I can always add it to the docs

:)


Quote from: noworyz on August 23, 2005, 09:40:13 AM
Ok, I have another question!  I have the cpmfetch working just fine in all my pages and in my phpbb forums!

phpbb example
http://www.egriz.com/GrizBoard/

main site examples
http://www.egriz.com/

Now what I want to do is get this code working in the header of my coppermine gallery
http://www.egriz.com/GrizPics2/index.php

I read throuhg some info on how to make a custom header but didn't really understand how to go about doing it for this.  I want to keep it the same look as it is now but instead of using the image tag to grab the photo I want to use the cpmfetch.php file to do it so it links to the photo

thanks for your help!!!!
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: MAher on August 23, 2005, 11:57:19 AM
Sorry to bother you with such a basic problem as the path to the config-file. I searched this thread and the docs but didn't find anything on this yet. Tried all the possible paths but no... :-[

Somehow the Document_Root is not correct, the script puts var/www in front of the Partial path to CPG I put in cftest.php.
The result is like this:


5 You set your partial URL to /site/new/scripts/cm 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 ***.***.*** 2.4.27-2-686 #1 Mon May 16 17:03:22 JST 2005 i686 INFO
40 WebServer = Apache/1.3.33 Ben-SSL/1.55 (Debian GNU/Linux) PHP/4.3.10-15 INFO
45 PHP Version = 4.3.10-15 INFO
55 DOCUMENT_ROOT: /var/www INFO
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /home/user/public_html/site/new/scripts/cpmfetch/cftest.php INFO
75 DOCUMENT_ROOT is not a good match BAD
80 CPG Config file not found: /var/www/site/new/scripts/cm/include/config.inc.php


The config file is in /home/user/site/ etc. /var/www/ is not the root for my site. What's going wrong? php(info) gives for the root 'no value'  ???

Yeah.  Its probably symlinked in there or something.  Servers can do some strange stuff...

Check your /var/www directory and see whats there... it should still work.   Are you hosted or self hosted?


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

MAher

/var/www is used for phpmyadmin, MRTG server statistics and for the main website of the server or so. All the users ar in /home/user and so is my gallery.
I am hosted, by a friend that is.. and tried to use cpmfetch even though I got an error but didn't work. But why is the script adding /var/www?

vuud

Quote from: MAher on August 24, 2005, 12:29:14 PM
/var/www is used for phpmyadmin, MRTG server statistics and for the main website of the server or so. All the users ar in /home/user and so is my gallery.
I am hosted, by a friend that is.. and tried to use cpmfetch even though I got an error but didn't work. But why is the script adding /var/www?

CpmFetch uses the apache DOCUMENT_ROOT setting to figure out the path to your web documents.  On most servers this works correctly, on your's - the personal directory is not represented in that.

Try this:

In the top of the cftest.php page (and future subsequent pages you add it into)

set

$_REQUEST['DOCUMENT_ROOT'] = "/home/user/public_html";

That should change it for the duration of the request.  We've seen strange Document_root behavior with many IIS servers, but this is the first time with apache.

Let me know how that works

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

smoke10010

does this work with e107... i find that a lot of mods and hacks work with e107 even though it's been ported into the system since it basically is coppermine with a few sligh modifications which don't effect how e107 runs as a whole.. chances are i'm going to test it either but it'd be nice if someone were able to let me know it works.

MAher

OK, your suggestion to put
$_REQUEST['DOCUMENT_ROOT'] = "/home/user/public_html";

in the top of cftest.php didn't work, no effect on the path whatsoever.

But my host used a symlink() to make /var/www/ point to /home/ as well so /var/www/user is the same as /home/user/public_html and that works great although it's in fact a workaround.

According to him the setup of the server is rather standard this way (working with virtual hosts for all users)
But maybe a suggestion: why not let us fill in the whole path, not just a partial path? Or has this to do with compatibility with IIS or some hosts restricting access or so?

Only thing is: I get a My_SQL error :( :

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
/home/user/public_html/site/new/scripts/cm/cpmfetch/cpmfetch_dao.php on line 710


If you do not see thumbnails, or get more warnings then something is pretty wrong :(

I am running the 1.4.1 beta version of cpg, does that have any impact?

vuud


Yep, I posted a about a week ago about the 1.4.1 has a few database changes.

if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out.  Switch which one is commented (instructions are in there also).

its a temporary fix till I get a better way to handle the new database layout.

As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before.  Of course, that could just be dumb luck on my part :)


Quote from: MAher on August 25, 2005, 12:56:19 PM
OK, your suggestion to put
$_REQUEST['DOCUMENT_ROOT'] = "/home/user/public_html";

in the top of cftest.php didn't work, no effect on the path whatsoever.

But my host used a symlink() to make /var/www/ point to /home/ as well so /var/www/user is the same as /home/user/public_html and that works great although it's in fact a workaround.

According to him the setup of the server is rather standard this way (working with virtual hosts for all users)
But maybe a suggestion: why not let us fill in the whole path, not just a partial path? Or has this to do with compatibility with IIS or some hosts restricting access or so?

Only thing is: I get a My_SQL error :( :

Your installation seems correct so far, you should see a small grid of thumbnails from your gallery
Unknown column 'u.user_website' in 'field list'
Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in
/home/user/public_html/site/new/scripts/cm/cpmfetch/cpmfetch_dao.php on line 710


If you do not see thumbnails, or get more warnings then something is pretty wrong :(

I am running the 1.4.1 beta version of cpg, does that have any impact?
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: smoke10010 on August 25, 2005, 11:40:16 AM
does this work with e107... i find that a lot of mods and hacks work with e107 even though it's been ported into the system since it basically is coppermine with a few sligh modifications which don't effect how e107 runs as a whole.. chances are i'm going to test it either but it'd be nice if someone were able to let me know it works.

Essentially if you can execute code from your e107 layout, then yes this can be made to work.

Somehow.  We've been able to do all the other content systems that came along - but I can't say that I have tried it with e107
(Although I here good things about e107)

There is another thread here for integrating into portals, if you have any problems post there and we will see what we can do...  If you get it working, also post so i can mark it off - I'd greatly appreciate 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

MAher

Quote from: vuud on August 25, 2005, 03:44:40 PM

Yep, I posted a about a week ago about the 1.4.1 has a few database changes.

if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out.  Switch which one is commented (instructions are in there also).

its a temporary fix till I get a better way to handle the new database layout.

As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before.  Of course, that could just be dumb luck on my part :)

Now it works like a charm! Great job and thanks a lot!

vuud

Quote from: MAher on August 26, 2005, 09:12:11 AM
Quote from: vuud on August 25, 2005, 03:44:40 PM

Yep, I posted a about a week ago about the 1.4.1 has a few database changes.

if you are using a newer version of CpmFetch, open cpmfetch_dao.php and look for the two big long SQL statements near the top (Before the first function anyway) - one is commented out.  Switch which one is commented (instructions are in there also).

its a temporary fix till I get a better way to handle the new database layout.

As for Apache, yes virtual servers are pretty standard... Its just document_root being set differently, which I have not come across before.  Of course, that could just be dumb luck on my part :)

Now it works like a charm! Great job and thanks a lot!

Ironically it is due to a new feature I put in just a few weeks ago :(

Anyway, I am planning a new version with an installer and tighter integration into cpg overall.



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

Andreas W.

Hi,
i could need some help.

After uploading all files i tried /cftest.php

Everything seems fine (PASS), except the thumbnail images are not displayed (although the links to the big photos work).

I noticed that the thumbnail links are corrupt:

example: http://albums/userpics/10051/thumb_wels_1.jpg

It should be http://www.mywebsite.com/albums/userpics/10051/thumb_wels_1.jpg

Perhaps it helps that i´m using a subdomain for the gallery like http://gallery.mywebsite.com
but mysqldb is here: http://www.mywebsite.com

Any help appreciated.
thank you
andreas

5 You set your partial URL to / 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 dd5738 2.4.20-4GB-athlon #1 Fri Jan 14 15:04:28 UTC 2005 i686 INFO
40 WebServer = Apache/1.3.27 (Linux/SuSE) mod_fastcgi/2.4.2 FrontPage/4.0.4.3 mod_perl/1.27 PHP/4.3.10 mod_ssl/2.8.12 OpenSSL/0.9.6i INFO
45 PHP Version = 4.3.10 INFO
55 DOCUMENT_ROOT: /www/htdocs/_removed_/ INFO  *edited*
60 C_DOCUMENT_ROOT: Not found INFO
65 doc_root: Not found (IIS Servers only) INFO
70 SCRIPT_FILENAME: /www/htdocs/_removed_/cftest.php INFO *edited*
75 DOCUMENT_ROOT is a good match PASS
80 Found CPG config file PASS