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

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

vuud

Quote from: nameless on May 02, 2005, 08:39:42 PM
Sorry to sound like a dummy but can you give me an example of what to add and where to put it?

img src="http://www.yoursite.com/cfimageget.php?cmd=last"

I realize now that last is a bit confusing... the original thought was like "show last added". 

Does that help at all?


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

nameless

QuoteI realize now that last is a bit confusing... the original thought was like "show last added".  

Yes, last added are the one's I want to show meaning the newest photos uploaded. I added this added this but the last added photos are not showing. I want to show 3 of the most recent photos and 3 random images. Is this possible? This is the code I have below:

<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=1" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=2" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=3" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=4" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=5" border="0"></a>


I tried entering the following code below but the newest photo did not show

<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>

vuud

Quote from: nameless on May 02, 2005, 10:55:38 PM
Yes, last added are the one's I want to show meaning the newest photos uploaded. I added this added this but the last added photos are not showing. I want to show 3 of the most recent photos and 3 random images. Is this possible? This is the code I have below:

<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=1" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=2" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=3" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=4" border="0"></a>
<br>
<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?number=5" border="0"></a>


Random, you can always have as many as you want - cmd=random on all those above... the "last" parameter will only show one.  If you are doing this in a php file on the same server, you can just use copperminefetch instead of this.  Otherwise if you are in HTML on the same server, you will need to wait until I do the SSI mod.


Quote from: nameless on May 02, 2005, 10:55:38 PM

I tried entering the following code below but the newest photo did not show

<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>

What version are you running?  what did it show?  Anything?  What does the html src for that part show also?

Hmmm

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

nameless

I'm not sure if this is the version I found it on line 28 of coppermine.php

Quote* @version $Revision: 1.1 $

<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>

I entered the code above and it showed an old image not the newest one. This is added on a PHP file on the same server and the site is the same. I am not using copperminefetch because the formatting of my nav menu gets screwed up in IE.

vuud


I'd try getting the newest dev version...  Right now, my revision in there is 1.13 (12 commits newer)

Ah yes, the formatting...

Not sure why you would not get the newest... upgrade and see if that fixes it.




Quote from: nameless on May 02, 2005, 11:17:44 PM
I'm not sure if this is the version I found it on line 28 of coppermine.php

Quote* @version $Revision: 1.1 $

<a href="http://domain.com/pics"><img src="http://domain.com/cpmfetch/cfimageget.php?cmd=last" border="0"></a>

I entered the code above and it showed an old image not the newest one. This is added on a PHP file on the same server and the site is the same. I am not using copperminefetch because the formatting of my nav menu gets screwed up in IE.
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

nameless

#485
vuud, I just wanted to clarify is that 1.1.3 or 1.3.3?

Edit NM, I downloaded 1.3.3 and the formatting looks ok with my nav bar. :)

TerryIII

I am tring to install this on my webserver, and am having NO luck.....
the test file is lacated at
http://www.scrantonprep.net/gallery/cpmfetch/cftest.php
(Its curentaly set like this $ChangeThisToYourPartialUrlToCPG = "/gallery"; )
My gallery is loacated at
http://www.scrantonprep.net/gallery


I have tried all off these:
$ChangeThisToYourPartialUrlToCPG = "/gallery";
$ChangeThisToYourPartialUrlToCPG = "/";
$ChangeThisToYourPartialUrlToCPG = "./gallery";
$ChangeThisToYourPartialUrlToCPG = "./";
$ChangeThisToYourPartialUrlToCPG = "";


Nothing has worked what am i doing wrong?

If my Particular URL =$ChangeThisToYourPartialUrlToCPG = "";

The ERROR: Path to Coppermine incorrect. (/gallery//include/config.inc.php)
Goes away, but i am left with :

Fatal error: Call to a member function on a non-object in C:\PublicWeb\gallery\cpmfetch\coppermine.php on line 648

vuud

You should upgrade... your running something prior to the last stable... I'd recommend the latest dev version 1.3.3 - especially for tweaking to get it running on...

There are a few issues with running this on a windows server.  Since I don't have access to one, and since Microsoft is a minority in the web server world, I have not really been able to fix it.  I am not sure what to tell you...    If you are running Apache on windows, let me know.

If you are feeling adventerous... you can try to get it working and let us know how you did it...  There was at least one other person running IIS...  I really must find someone that has one...  Basically what is happening is that the program cannot find the config.inc.php file...    There is also going to be an issue later with DOCUMENT_ROOT not being provided by the server to be read.  If you look through the posts here, someone had hardcoded thier location into the script and got it working.

I emailed a friend of mine, and I am hoping he will be willing to try it under IIS and tell me where it is failing.

Quote from: TerryIII on May 03, 2005, 01:06:18 AM
I am tring to install this on my webserver, and am having NO luck.....
the test file is lacated at
http://www.scrantonprep.net/gallery/cpmfetch/cftest.php
(Its curentaly set like this $ChangeThisToYourPartialUrlToCPG = "/gallery"; )
My gallery is loacated at
http://www.scrantonprep.net/gallery


I have tried all off these:
$ChangeThisToYourPartialUrlToCPG = "/gallery";
$ChangeThisToYourPartialUrlToCPG = "/";
$ChangeThisToYourPartialUrlToCPG = "./gallery";
$ChangeThisToYourPartialUrlToCPG = "./";
$ChangeThisToYourPartialUrlToCPG = "";


Nothing has worked what am i doing wrong?

If my Particular URL =$ChangeThisToYourPartialUrlToCPG = "";

The ERROR: Path to Coppermine incorrect. (/gallery//include/config.inc.php)
Goes away, but i am left with :

Fatal error: Call to a member function on a non-object in C:\PublicWeb\gallery\cpmfetch\coppermine.php on line 648

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

freesouljah

it was a pleasant surprise, to say the least  ;D


Quote from: vuud on May 02, 2005, 02:07:22 AM

Thanks on both counts!  Good to see someone who understands the banner :D

Quote from: freesouljah on May 01, 2005, 08:58:17 AM
thank you...

this a beautiful addition to coppermine....just thought I would put that out there  ;)


also, I felt it necessary to point out the poignant banner on your site:

very cool  8)

peace


Sigh

Hello!
Everything work fine for me, but I want to "remove" the link from the pictures. If you understand..

When someone press on my pictures to get them big, they just opens in the current frame:/ I want them to open in an new page.
Sort of "target _blank"

How do I do that? Someone who can help me?

freesouljah

Quote from: Sigh on May 03, 2005, 05:31:15 PM
Hello!
Everything work fine for me, but I want to "remove" the link from the pictures. If you understand..

When someone press on my pictures to get them big, they just opens in the current frame:/ I want them to open in an new page.
Sort of "target _blank"

How do I do that? Someone who can help me?



$options = array(
"windowtarget" => "_blank",
                "imagesize" => "thumb") ;

$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));


check doc (or first post in this topic) for more on css options  8)

vuud

Quote from: freesouljah on May 03, 2005, 05:57:49 PM
Quote from: Sigh on May 03, 2005, 05:31:15 PM
Hello!
Everything work fine for me, but I want to "remove" the link from the pictures. If you understand..

When someone press on my pictures to get them big, they just opens in the current frame:/ I want them to open in an new page.
Sort of "target _blank"

How do I do that? Someone who can help me?

$options = array(
"windowtarget" => "_blank",
                "imagesize" => "thumb") ;

$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));


check doc (or first post in this topic) for more on css options  8)



FreeSoulJah is 100% right on how this is supposed to be done.  I was however told yesterday that M$ in thier infinate wisdom is starting to block JPG files from being referenced directly in web browsers.  I am not sure how much of this is true, but just because it comes out nicer - I am working on an external program that will display it...  give a few days for that to hit the dev versions...

If you do this, include the cpmfetch.js in your page... it has a nice javascript thing in there to show it nicely.  I think it works :D


BTW Freesouljah... I am actually a Buddhist, generally in a Vietnamese / Mahayana tradition, currently in dharma teacher classes also  - but not really locked into one way.  Just thought I would throw that out there since you liked my "ad"
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

TerryIII

#492
QuoteThere are a few issues with running this on a windows server.  Since I don't have access to one, and since Microsoft is a minority in the web server world, I have not really been able to fix it.  I am not sure what to tell you...    If you are running Apache on windows, let me know.

I am running this on a windows 2000 Server with IIS

i have version 1.3.3 installed at this location
http://www.scrantonprep.net/gallery/cpmfetch3/cftest.php

vuud


Well, hope may be on the horizon for those of you that are into IIS...  A friend of mine that uses that stuff at his day job has volunteered to install it and let me know where it is failing specifically.  So I would check back often, or susbscribe to my cpmfetch announcements at my web site

http://cpmfetch.fistfullofcode.com

Whatever fixes there are will be in the next development release - which will be as soon as we have something

Be well in the meantime




Quote from: TerryIII on May 03, 2005, 10:32:28 PM
QuoteThere are a few issues with running this on a windows server.  Since I don't have access to one, and since Microsoft is a minority in the web server world, I have not really been able to fix it.  I am not sure what to tell you...    If you are running Apache on windows, let me know.

I am running this on a windows 2000 Server with IIS

i have version 1.3.3 installed at this location
http://www.scrantonprep.net/gallery/cpmfetch3/cftest.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

mjg

Hello,
I can't get this to work in the sidebar of a Word Press template. It gives me one random picture, which is what I want, but screws up the other database calls.

I read your suggestion about not including the close command, but it just screwed up the sidebar in a different way  :-[

I'm trying version 1.3.3.

Sigh

$options = array(
"windowtarget" => "_blank",
               "imagesize" => "thumb") ;

$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));


check doc (or first post in this topic) for more on css options  8)
Quote

When I try this code, I get this error:
Fatal error: Call to undefined function: array_change_key_case() in c:\apache\htdocs\cpmfetch\coppermine.php on line 1161

Someone help me, please? =(

vuud


Is it because it is inserting a table?

Can you (PM if you need to) the exact call you are using, and a link to a broken example page (or conversily a screenshot if you don't want to leave it live - but having the source html could be handy).

Vuud


Quote from: mjg on May 04, 2005, 12:22:41 PM
Hello,
I can't get this to work in the sidebar of a Word Press template. It gives me one random picture, which is what I want, but screws up the other database calls.

I read your suggestion about not including the close command, but it just screwed up the sidebar in a different way  :-[

I'm trying version 1.3.3.
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: Sigh on May 04, 2005, 02:44:59 PM
$options = array(
"windowtarget" => "_blank",
                "imagesize" => "thumb") ;

$objCpm->cpm_viewRandomMedia ( 1,1,$options,array("subtitle"=>"%c"));


check doc (or first post in this topic) for more on css options  8)
Quote

When I try this code, I get this error:
Fatal error: Call to undefined function: array_change_key_case() in c:\apache\htdocs\cpmfetch\coppermine.php on line 1161

Someone help me, please? =(

You could be on a php version prior to 4.2...

What version of PHP and what version of cpmfetch?  I thought I had all the calls for that wrapped in an PHP version check to avoid this...

UPDATE:   I just modified my code base here to not use that function at all... I had code for using 4.2 and above, then code for less than 4.2... I decided to just go with the 4.1 compliant way to simplify the code base.  A little hedge trimming if you will.

When you see 1.3.4 come out...  that one has this.  Still not sure why you would get it - but that function is gone in the next development release (give me 2-3 days).  Subscribe to the mailer at http://cpmfetch.fistfullofcode.com to be notified of the release.

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

Quote from: Sigh on May 04, 2005, 02:44:59 PM

When I try this code, I get this error:
Fatal error: Call to undefined function: array_change_key_case() in c:\apache\htdocs\cpmfetch\coppermine.php on line 1161

Someone help me, please? =(

A good friend of mine loaded up a server with IIS, Coppermine and CPMFetch to work this out.  As it stands now, you can get around the problems of IIS by doing this:

From TJC:
QuoteUnder at least Windows XP (it should probably work for Windows 2000) you can
define a System (My Computer -> Properties -> Advanced -> Environment Variables)
environment variable called "DOCUMENT_ROOT" and point it at "C:\INETPUB\WWWROOT"
assuming you installed IIS on the C:\ drive. You have to reboot the computer
and then the $_SERVER['DOCUMENT_ROOT'] will be defined,

After that, he claims it all works fine (and sent a PDF to prove it).  So in the meantime I will try to work out some other solution for this so you don't need to muck with your
system variables.  If your on shared windows hosting and can't do this - your still outta luck till I fix it.  Or complain to your tech support you want to switch to unix hosting, or have them add it. 


Subscribe to the announcements mailer at http://cpmfetch.fistfullofcode.com to be notified of releases, which would note this when its fixed.

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

mjg

Hi Vuud,
Here's the code:

<h3>Random Picture</h3>
<div align="center">
<?php include "cpmfetch/coppermine.php";
$objCpm = new cpm('/pictures');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_close();?>

</div>


Deleting the headline and div doesn't make any difference. Here's a link to the screenshot ... http://www.gorey.com.au/images/word.jpg

As you can see, the Word Press database calls for "random posts" and "recent comments" are missing and a blog entry is inserted where there should be other sidebar stuff.