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

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.

unknown_girl

Hello! can anyone tell me a way to put in my site the 2 last images uploaded? like in htm if possible (not in php)

Tranz

Not possible in html. The difference between html and php is like the difference between walking and driving.

Nibbler

You can create a php page to get the pic, and link to it using an img tag from an html page.

unknown_girl


Tranz


unknown_girl

the coppermine Fetch?? I download it, but I only know the random way, thats way I am asking, specila because my english is not so good

n704fn

Thanks again for this awesome script!  I've recently decided to make my gallery private, but would still like to use cpmfetch for avatars, and cpm_viewLastAddedMediaFromCategory, etc...  Can someone give me a hint as to how to use cpm_unlock_private  and the ramifications of doing so? Got that figured out, but...

Is it possible to use cpm_unlock_private with cpmfetch? Or is it even possible to use cpmfetch with a private gallery?
OK, looks like that won't work.  Guess you can't have everything :)

Thanks,

Mark


(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.thechouinards.com%2Fcfetch%2Fcfig_random.php&hash=562ee9e4ceefcfa4cca83d45f784b926a8235733)

Rodinou

tried, and don't work for me

http://www.sortons.net/cfimageget.php?category=7

nothing ...


but

http://www.sortons.net/cftest.php

works well.


in cfimageget.php



include "coppermine_dao.php";
include "/photos/include/config.inc.php";

// This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory
$pathtocpm = "../photos";

// This is the partial url (part AFTER your domain name, to get to the coppermine directory
$urltocpm = "/photos";


// This is the prefix your Coppermine databse uses for thumbnails  (default shown)
$thumbnailprefix='tn_';

// This is the prefix coppermine uses for intermediate sizes (default shown)
$intermedprefix='normal_';


in cftest.php


<?php
// You need to change this variable to the directory that the Coppermine photo gallery is installed in.
$ChangeThisToYourPartialUrlToCPG "/photos";
?>


<html>
<head>
<title>CoppermineFetch Install Test page</TITLE>
</head>
<body>

<h1>CoppermineFetch Install test page</h1>
<p>Thank you for using CoppermineFetch...</p>

<hr>



in coppermine.php


var $thumbnailprefix = "tn_";
var $intermedprefix = "normal_";
var $fullsizeprefix = '';

var $defaultimagesize = "tn_";
var $cpm = "";
var $urltocpm = "";       //from a web client point of view without domain name /photos
var $filepathtocpm = "";  //server path to cpm directory  /home/vuud/cpm


Where am I wrong ?

unknown_girl

Hello! I was trying to reach the file rss_lastadded.php, and it says in my server: I'ts not possible to show the XML 
It's not possible to se the files introduction of the XML, user by the style sheet. Correct your error, and then refresh the site, or try later.
--------------------------------------------------------------------------------

The sistem doesn't supports the specific codification. Error processing : 'http://hilaryduff.hostingportugal.com/copperminefetch/cpmfetch/rss_lastadded.php';.

Can you help me? (I translate this becauste it was in portuguese, so sorry if there's any mistake)


BZRK

Quote from: vuud on March 01, 2005, 07:41:20 AM

You can probably just override the alt with a blank - although I am not sure.  Try this:

$cpmobj->cpm_viewRandomMedia(1,1,array("alttag" => ""));

That should just add an empty alttag

Hope that helps


Thank you, it did help :)

canelli

I installed the mod on my test web but i had two problems

1) DOCUMENT_ROOT is not set in anyinstallation (any of that ) - IIS 5.0 - php 4.3.2  and IIS 6.0 - php 4.3.10

2) I have the albums directory outside of the coppermine tree and not with standard name. Now the dricetory is hardcoded
it is not possible  get the album directory from the cpg's configuration CONFIG['fullpath']  ?

vuud

Quote from: canelli on March 04, 2005, 04:42:10 PM
I installed the mod on my test web but i had two problems

1) DOCUMENT_ROOT is not set in anyinstallation (any of that ) - IIS 5.0 - php 4.3.2  and IIS 6.0 - php 4.3.10

2) I have the albums directory outside of the coppermine tree and not with standard name. Now the dricetory is hardcoded
it is not possible  get the album directory from the cpg's configuration CONFIG['fullpath']  ?



Its really starting to bother me that I dont get email notifications about new postings :(

The CONFIG is read by the program, but it finds it based on the DOCUMENT_ROOT

You can probably do something with cpm_init to start it instead of using the normal cpm constructor.  After that you can also call

cpm_OverridePathToCoppermine($path)
cpm_OverrideUrlToCoppermine($path)

The first should override where it looks for images from a filesystem point of view, the second is from a web browser point of view.  These are probably only available in the lastest version

Hope that makes sense to someone :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

vuud

Quote from: n704fn on March 04, 2005, 12:33:43 AM
Is it possible to use cpm_unlock_private with cpmfetch? Or is it even possible to use cpmfetch with a private gallery?
OK, looks like that won't work.  Guess you can't have everything :)

Thanks,

Mark



I think it would be possible... you'd have to edit the cfimageget.php and add in a call to the coppermine_dao to that function.  OR, you can wait till I finish the next release which will have a 100% redone cfimageget.php (I assume thats what you were referring too)

The code to enter would be:

$cpm->setPriviteLockOn(false);

At line 65 in the version 1.1.3 (Just after the setPhotoPrefix

That should get you there









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


What version are you using?  The 1.1.3 is much better with cfimageget - try that if you are still using the stable version (which is old)

My bad, I decided to redo all the cfimageget stuff again before the next release - then got real busy.  I want to finish it, but wont be able to for at least a few days.  The new way will be much better



Quote from: Rodinou on March 04, 2005, 03:11:01 AM
tried, and don't work for me

http://www.sortons.net/cfimageget.php?category=7

nothing ...


but

http://www.sortons.net/cftest.php

works well.


in cfimageget.php



include "coppermine_dao.php";
include "/photos/include/config.inc.php";

// This is the path (NOT URL) from where your cfimageget.php file is to your coppermine directory
$pathtocpm = "../photos";

// This is the partial url (part AFTER your domain name, to get to the coppermine directory
$urltocpm = "/photos";


// This is the prefix your Coppermine databse uses for thumbnails  (default shown)
$thumbnailprefix='tn_';

// This is the prefix coppermine uses for intermediate sizes (default shown)
$intermedprefix='normal_';


in cftest.php


<?php
// You need to change this variable to the directory that the Coppermine photo gallery is installed in.
$ChangeThisToYourPartialUrlToCPG "/photos";
?>


<html>
<head>
<title>CoppermineFetch Install Test page</TITLE>
</head>
<body>

<h1>CoppermineFetch Install test page</h1>
<p>Thank you for using CoppermineFetch...</p>

<hr>



in coppermine.php


var $thumbnailprefix = "tn_";
var $intermedprefix = "normal_";
var $fullsizeprefix = '';

var $defaultimagesize = "tn_";
var $cpm = "";
var $urltocpm = "";       //from a web client point of view without domain name /photos
var $filepathtocpm = "";  //server path to cpm directory  /home/vuud/cpm


Where am I wrong ?

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


To say the least, the cpmFetch RSS stuff is not ready for primetime.    It seems like you are sending a feed, so I do not understand if this is fixed, or if its a problem with your newsreader.

I just dont know  ???



Quote from: unknown_girl on March 04, 2005, 01:02:00 PM
Hello! I was trying to reach the file rss_lastadded.php, and it says in my server: I'ts not possible to show the XML 
It's not possible to se the files introduction of the XML, user by the style sheet. Correct your error, and then refresh the site, or try later.
--------------------------------------------------------------------------------

The sistem doesn't supports the specific codification. Error processing : 'http://hilaryduff.hostingportugal.com/copperminefetch/cpmfetch/rss_lastadded.php';.

Can you help me? (I translate this becauste it was in portuguese, so sorry if there's any mistake)


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: unknown_girl on March 06, 2005, 06:25:11 PM
vuud, thanks any way

Are you sure your reader is working correctly?  I am working on a new release right now, then the RSS functionality will get a good going over for the next one. 

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

n704fn

Quote from: vuud on March 05, 2005, 12:35:01 AM
Quote from: n704fn on March 04, 2005, 12:33:43 AM
Is it possible to use cpm_unlock_private with cpmfetch? Or is it even possible to use cpmfetch with a private gallery?
OK, looks like that won't work.  Guess you can't have everything :)

Thanks,

Mark



I think it would be possible... you'd have to edit the cfimageget.php and add in a call to the coppermine_dao to that function.  OR, you can wait till I finish the next release which will have a 100% redone cfimageget.php (I assume thats what you were referring too)

The code to enter would be:

$cpm->setPriviteLockOn(false);

At line 65 in the version 1.1.3 (Just after the setPhotoPrefix

That should get you there


Tried that, but it just broke cfimageget.  No errors, just no image.  Looking forward to the next version.

Mark
(https://coppermine-gallery.com/forum/proxy.php?request=http%3A%2F%2Fwww.thechouinards.com%2Fcfetch%2Fcfig_random.php&hash=562ee9e4ceefcfa4cca83d45f784b926a8235733)

vuud

Quote from: n704fn on March 06, 2005, 08:43:44 PM
Tried that, but it just broke cfimageget.  No errors, just no image.  Looking forward to the next version.
Mark

Hmmm, okay.  Well, I have been working today on it, and have the cfimageget up to where I think I want it.  Depending on a few other things I could have the new development version (which is really going to be a release candidate for the next stable) out later today or tomorrow.  Depending on how much I feel like testing later on today.

Private message me with an email addr if you have time and want to try this one in the meantime...

Happy days





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

pierse

I have been trying to re-create this:
Quote$objCpm->cpm_formatStats("Here is a percent sign %% There are
   %f files in %c categories containing %a albums,
   having served %v views and getting %n comments");
but I cannot get it to work.  I wanted to include this line in my template.php for my forum I use and I always get an error page that is standard for my portal.  (Tiny Portal (SMF)).  I do not know php code. so, please forgive me in advance. ;)