Advanced search  

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]

Pages: 1 ... 21 22 23 24 [25] 26 27 28 29 ... 34   Go Down

Author Topic: CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG  (Read 389594 times)

0 Members and 1 Guest are viewing this topic.

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #480 on: May 02, 2005, 09:26:38 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?


Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Skate, Snow, and Surf - SFboarders - Bringing San Francisco Bay Area boarders together.
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #481 on: May 02, 2005, 10:55:38 pm »

Quote
I 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:

Code: [Select]
<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

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

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #482 on: May 02, 2005, 11:06:14 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:

Code: [Select]
<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.



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

Code: [Select]
<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

Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Skate, Snow, and Surf - SFboarders - Bringing San Francisco Bay Area boarders together.
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #483 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 $

Code: [Select]
<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.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #484 on: May 02, 2005, 11:34:30 pm »


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.




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

Quote
* @version $Revision: 1.1 $

Code: [Select]
<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.
Logged
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

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 34
    • Skate, Snow, and Surf - SFboarders - Bringing San Francisco Bay Area boarders together.
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #485 on: May 03, 2005, 12:54:03 am »

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. :)
« Last Edit: May 03, 2005, 01:36:48 am by nameless »
Logged

TerryIII

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #486 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
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/gallery"; )
My gallery is loacated at
http://www.scrantonprep.net/gallery


I have tried all off these:
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/gallery";
$ChangeThisToYourPartialUrlToCPG = "/";
$ChangeThisToYourPartialUrlToCPG = "./gallery";
$ChangeThisToYourPartialUrlToCPG = "./";
$ChangeThisToYourPartialUrlToCPG = "";

Nothing has worked what am i doing wrong?

If my Particular URL =
Code: [Select]
$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
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #487 on: May 03, 2005, 06:00:28 am »

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.

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
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/gallery"; )
My gallery is loacated at
http://www.scrantonprep.net/gallery


I have tried all off these:
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/gallery";
$ChangeThisToYourPartialUrlToCPG = "/";
$ChangeThisToYourPartialUrlToCPG = "./gallery";
$ChangeThisToYourPartialUrlToCPG = "./";
$ChangeThisToYourPartialUrlToCPG = "";

Nothing has worked what am i doing wrong?

If my Particular URL =
Code: [Select]
$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

« Last Edit: May 03, 2005, 07:33:53 am by vuud »
Logged
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

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 116
  • Can you feel the Love?
    • freesouljah.com
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #488 on: May 03, 2005, 11:48:25 am »

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



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

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

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #489 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?
Logged

freesouljah

  • Coppermine frequent poster
  • ***
  • Offline Offline
  • Posts: 116
  • Can you feel the Love?
    • freesouljah.com
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #490 on: May 03, 2005, 05:57:49 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?



Code: [Select]
$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

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #491 on: May 03, 2005, 10:05:21 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?

Code: [Select]
$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"
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #492 on: May 03, 2005, 10:32:28 pm »

Quote
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.

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
« Last Edit: May 03, 2005, 10:50:30 pm by TerryIII »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #493 on: May 04, 2005, 05:02:46 am »


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
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.

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
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Michael Gorey
Word Press problem
« Reply #494 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.
Logged

Sigh

  • Coppermine newbie
  • Offline Offline
  • Posts: 2
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #495 on: May 04, 2005, 02:44:59 pm »

Code: [Select]
$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? =(
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: Word Press problem
« Reply #496 on: May 04, 2005, 04:02:13 pm »


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


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.
Logged
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

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG
« Reply #497 on: May 04, 2005, 04:19:58 pm »

Code: [Select]
$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
« Last Edit: May 04, 2005, 09:03:57 pm by vuud »
Logged
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

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Windows IIS users rejoice... well somewhat
« Reply #498 on: May 04, 2005, 09:10:12 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:
Quote
Under 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


Logged
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

  • Coppermine newbie
  • Offline Offline
  • Gender: Male
  • Posts: 8
    • Michael Gorey
Re: Word Press Problem
« Reply #499 on: May 05, 2005, 06:45:17 am »

Hi Vuud,
Here's the code:

Code: [Select]
<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.
Logged
Pages: 1 ... 21 22 23 24 [25] 26 27 28 29 ... 34   Go Up
 

Page created in 0.031 seconds with 19 queries.