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 ... 12 13 14 15 [16] 17 18 19 20 ... 34   Go Down

Author Topic: CpmFetch - (OLD/LOCKED) stats/thumbnails/randoms/etc from outside CPG  (Read 382493 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 - New dev ver!
« Reply #300 on: March 11, 2005, 02:09:38 am »


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 ::)

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

daverad

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
« Reply #301 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
Logged

pierse

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
« Reply #302 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.
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 - New dev ver!
« Reply #303 on: March 11, 2005, 05:33:26 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



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 - New dev ver!
« Reply #304 on: March 11, 2005, 05:36:28 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


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 - New dev ver!
« Reply #305 on: March 11, 2005, 08:04:17 pm »


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




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

mrmike987

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
« Reply #306 on: March 11, 2005, 09:14:41 pm »

Is it possible to show the date the image was added under each thumbnail?
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 - New dev ver!
« Reply #307 on: March 11, 2005, 09:41:33 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
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 - New dev ver!
« Reply #308 on: March 13, 2005, 06:28:10 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
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

Arlo

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
A wee hack of mine...
« Reply #309 on: March 13, 2005, 10:55:12 pm »

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:

Code: [Select]
$htmlOut .= " src=\"$imagefile\"" . " />";to:
Code: [Select]
$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?)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: A wee hack of mine...
« Reply #310 on: March 13, 2005, 11:58:40 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




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

Arlo

  • Coppermine newbie
  • Offline Offline
  • Posts: 6
Re: A wee hack of mine...
« Reply #311 on: March 14, 2005, 02:07:04 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! ;)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: A wee hack of mine...
« Reply #312 on: March 14, 2005, 05:30:17 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?
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

mrmike987

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
« Reply #313 on: March 17, 2005, 12:36:20 am »

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"
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 - New dev ver!
« Reply #314 on: March 18, 2005, 07:04:00 am »

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





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

mrmike987

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
« Reply #315 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?
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 - New dev ver!
« Reply #316 on: March 20, 2005, 04:24: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
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

mrmike987

  • Coppermine newbie
  • Offline Offline
  • Posts: 18
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
« Reply #317 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,,
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 - New dev ver!
« Reply #318 on: March 20, 2005, 06:01:56 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!





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

pierse

  • Coppermine newbie
  • Offline Offline
  • Posts: 11
Re: CpmFetch - stats/thumbnails/randoms/etc from outside CPG - New dev ver!
« Reply #319 on: March 20, 2005, 06:56:48 pm »

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

Quote
include "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:

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

Logged
Pages: 1 ... 12 13 14 15 [16] 17 18 19 20 ... 34   Go Up
 

Page created in 0.027 seconds with 13 queries.