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

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

vuud


Pierse,

You can make this change now, or wait for later tonight and I will post a new version.
(This fix applies to version 1.1.4 only - it will be fixed in 1.1.5 and beyond)

Find line 147 in cfimageget.php
$this->setAllowedTypes($allowedtypes);

Change to
$this->setAllowedTypes($this->allowedtypes);

That should help bunches with this error :)

Sorry about that ::)

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

daverad

Hello,
When using fetch, is it possible to have the thumbnail link to the full size image in the gallery?  I am using cpg132 and fetch 1.1

Any help is appreciated!

-Dave

pierse

Thank You! I now have my random thumbnail back.  using the new cfig_random.php file.   In Tiny Portal, you only have an html block.  How would you pull the statistical information within an html block?  Use the same php code?  Any help would be greatly appreciated.

vuud

Quote from: daverad on March 11, 2005, 04:12:14 AM
Hello,
When using fetch, is it possible to have the thumbnail link to the full size image in the gallery?  I am using cpg132 and fetch 1.1

Any help is appreciated!

-Dave

Yes.

In the optionshash set
imagelink - [none|album|large] - Where to link to when clicked.

Also, if you use
windowtarget = _blank

and you include the popup.js you should get a nice popup.  I am looking and you probably will have an error if you dont.  I should work on that



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: pierse on March 11, 2005, 05:26:59 AM
Thank You! I now have my random thumbnail back.  using the new cfig_random.php file.   In Tiny Portal, you only have an html block.  How would you pull the statistical information within an html block?  Use the same php code?  Any help would be greatly appreciated.

no, you have to use the standard coppermine.php and the statistic functions in there.  You cannot get statistics out of cfimageget or the cfig_random functions.  Follow the quickdocs on the website

http://cpmfetch.fistfullofcode.com


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


Okay, one more step along the road to a new stable release.  Development version 1.1.5 is now up for download.

http://cpmfetch.fistfullofcode.com - see the download section

There are two fixes:
* One to the randomizer code
* One to cfimageget's object init

The documentation has the most changes... see the readme in the doc directory.  Much work has gone into this and more will before the next release. 

If you like the program, click the applaud link on the left of any of my posts, I'd appreciate it :D

As always, send comments and suggestion

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

mrmike987

Is it possible to show the date the image was added under each thumbnail?

vuud

Quote from: mrmike987 on March 11, 2005, 09:14:41 PM
Is it possible to show the date the image was added under each thumbnail?

Hell yeah

set the subtitle option to use either %w or %W  (the latter is unformatted and generally yucky looking)

So...

cpm_viewRandomMedia(array("subtitle" => "%w"));

or whatever function you want to use

;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: mrmike987 on March 11, 2005, 09:14:41 PM
Is it possible to show the date the image was added under each thumbnail?

Oh, BTW - when you do display the date or time, it will be using the servers date and time, not your machine.  So if you are in one time zone and the server is in a different time zone, the date could be off.  I guess its all relative since who ever is viewing your photos could be in yet another time zone.

Happy happy joy joy
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

Arlo

Forgive me if this has come up, but I made a small change (I wouldn't be so presumptuous to call it a hack :) ) to coppermine.php which allows dynamic thumbnail sizes within a given <div> block. I simply changed line 1119 from:

$htmlOut .= " src=\"$imagefile\"" . " />";
to:
$htmlOut .= " src=\"$imagefile\"" . " width=\"100%\" />";

You can see it in action at my site, http://www.dalahus.com, where I have a mix of both a single full-size random thumbnail and a 2,2 block of last additions at half the size. I'm sure there are better ways to do this, but this seems to work well enough (for my needs anyway).

Hopefully a future version of cpmfetch will give us thumbnail sizing as a proper parameter (please please?)

vuud

Quote from: Arlo on March 13, 2005, 10:55:12 PM
Hopefully a future version of cpmfetch will give us thumbnail sizing as a proper parameter (please please?)

Its good to see someone hacking the code... the more people that get in there, the better the chances things will improve.

Anyway - there is no plans at this time, and probably will never be an option for this under cpmfetch.  Hah!  So there!  >:(

But before you feel too bad, I have plans to add an option so that you can include whatever you want in the img tag, and probably in the td and table tags too.  So if you want to include width='100%' you can.  If you want to include doesnothing='yes' you can do that too.  This way, it lets you do anything you want without ending up with 1000 different options. ;D

It would also allow people to insert alignment settings if they want to without using css to do it.

But that does not work yet so your gonna have to do your way you want it to work for now...

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

Arlo

Quote from: vuud on March 13, 2005, 11:58:40 PM

Anyway - there is no plans at this time, and probably will never be an option for this under cpmfetch.  Hah!  So there!  >:(

I'll probably be switching back to Gallery when 2.0 goes final (assuming its built in random block plays nice with WP). So double there! ;)

vuud

Quote from: Arlo on March 14, 2005, 02:07:04 PM
I'll probably be switching back to Gallery when 2.0 goes final (assuming its built in random block plays nice with WP). So double there! ;)

Everything is going according to plan then... excellent.  Wait, did I say that out loud?
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

mrmike987

Quote from: vuud on March 11, 2005, 09:41:33 PM
Quote from: mrmike987 on March 11, 2005, 09:14:41 PM
Is it possible to show the date the image was added under each thumbnail?

Hell yeah

set the subtitle option to use either %w or %W  (the latter is unformatted and generally yucky looking)

So...

cpm_viewRandomMedia(array("subtitle" => "%w"));

or whatever function you want to use

;D


Thanks for the code
Can the date format be changed? Right now it reads  "Added 16-Mar-2005"  It would be cool if it read "Added  03/16/05"

vuud

Quote from: mrmike987 on March 17, 2005, 12:36:20 AM
Quote from: vuud on March 11, 2005, 09:41:33 PM
Quote from: mrmike987 on March 11, 2005, 09:14:41 PM
Is it possible to show the date the image was added under each thumbnail?

Hell yeah

set the subtitle option to use either %w or %W  (the latter is unformatted and generally yucky looking)

So...

cpm_viewRandomMedia(array("subtitle" => "%w"));

or whatever function you want to use

;D


Thanks for the code
Can the date format be changed? Right now it reads  "Added 16-Mar-2005"  It would be cool if it read "Added  03/16/05"



No, but that is a damned good point.  I will add that in and post when I build a new dev version (a day or two I'd say) - maybe sooner





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

mrmike987

I'm using this code:

$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w"));

Is there a way to make it link to the gallery and not the full view of the image?

vuud

Quote from: mrmike987 on March 20, 2005, 01:56:08 AM
I'm using this code:

$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w"));

Is there a way to make it link to the gallery and not the full view of the image?

Absolutely...  check the docs for the options array at this link:
http://www.fistfullofcode.com/projects/copperminefetch/docs/readme.html#optionsarray

There is much that can be done in that array
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

mrmike987

Thanks for the responce but I suck at code and have no idea how to do it. The docs dont help people like me,,

vuud

Quote from: mrmike987 on March 20, 2005, 05:14:30 AM
Thanks for the responce but I suck at code and have no idea how to do it. The docs dont help people like me,,

Sorry, I figured if you got that far you'd be okay with the list.

Basically you have this:

$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w"));

If you want to have it link to the gallery you just need to add another option to the array:
array("subtitle" => "<center>Added<br>%w", "imagelink" => "gallery")

So use that in your call:

$objCpm->cpm_viewLastAddedMediaFromAlbum(1,1,6,array("subtitle" => "<center>Added<br>%w","imagelink" => "gallery"));

The others on that documentation page I sent would just get added in the same way.

Happy fetching :D

PS. For some reason I am thinking that on the newer versions the default is the gallery, if not it should be!





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

okay... still trying to get this code to work:

Quoteinclude "gallery/cpmfetch/coppermine.php";
$objCpm = new cpm('/gallery');

$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");

$objCpm->cpm_close();

I am using Tiny Portal For SMF beta .5; using a phpbox block;

I get the following error:

QuoteWarning: Unknown(gallery/cpmfetch/coppermine.php): failed to open stream: No such file or directory in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1

Warning: Unknown(gallery/cpmfetch/coppermine.php): failed to open stream: No such file or directory in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1

Warning: (null)(): Failed opening 'gallery/cpmfetch/coppermine.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 1

Fatal error: Cannot instantiate non-existent class: cpm in /home/pierson/public_html/smf/Sources/Load.php(1042) : eval()'d code(31) : eval()'d code on line 2