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 ... 9 10 11 12 [13] 14 15 16 17 ... 34   Go Down

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

0 Members and 3 Guests are viewing this topic.

FutschiKato

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Hi there.

First of all thank you for your work on this hack. (gifts, girls, money...all yours!) :)

Would it be possible to use this coppermine hack to display a specific picture as direkt output like in the cfimageget.php example.
Something like cfimageget.php?album=7&pos=3, used inside a <img src=""> tag. That would be a hell of a dream!


The following, I tried with copperminefetch 1.0 and CPG 1.3.2.
I tried writing a new function for coppermine_dao.php which is nearly like the getRandomImageFromAlbum function only changing a bit on the SQL:

Code: [Select]
function getImagefromAlbumAndPosition ($albumid, $pos) {
$retval = "";
if (is_numeric($albumid) && is_numeric($pos)) {
          $sqlcode =     /*same SQL Code till: */    p.aid=$albumid limit $pos, $pos";
/*Same code for the rest of the functiion*/


Instead of searching for a random image, I only wanted to return the picture limited by the position given to the function (limit $pos, $pos)
Then I wanted to call that function the same way one uses the getRandomImageFromAlbum function from within cfimage.php.

Code: [Select]
if (array_key_exists('aid',$_GET) && array_key_exists('pos', $_GET)) {
    global $cpm;
$aid = $_GET['aid'];
$pos = $_GET['pos'];
$size=getSizeOption();
$results=$cpm->getImagefromAlbumAndPosition ($aid, $pos);
returnImageToBrowser($results,$size);
}
/*Rest of code the same as cfimage.php*/


Unfortenatly, this solution does not work out jet.

Do you have any hints on that?
If not, I would like to extend the feature request list with this issue!

Thank you
Georg
 :)
Logged

peeps

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 29
  • Image pulled by Coppermine Fetch
    • philpeeps.com
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #241 on: February 15, 2005, 03:05:30 am »

Hi there.

First of all thank you for your work on this hack. (gifts, girls, money...all yours!) :)

Would it be possible to use this coppermine hack to display a specific picture as direkt output like in the cfimageget.php example.
Something like cfimageget.php?album=7&pos=3, used inside a <img src=""> tag. That would be a hell of a dream!


The following, I tried with copperminefetch 1.0 and CPG 1.3.2.
I tried writing a new function for coppermine_dao.php which is nearly like the getRandomImageFromAlbum function only changing a bit on the SQL:

Code: [Select]
function getImagefromAlbumAndPosition ($albumid, $pos) {
$retval = "";
if (is_numeric($albumid) && is_numeric($pos)) {
           $sqlcode =     /*same SQL Code till: */    p.aid=$albumid limit $pos, $pos";
/*Same code for the rest of the functiion*/


Instead of searching for a random image, I only wanted to return the picture limited by the position given to the function (limit $pos, $pos)
Then I wanted to call that function the same way one uses the getRandomImageFromAlbum function from within cfimage.php.

Code: [Select]
if (array_key_exists('aid',$_GET) && array_key_exists('pos', $_GET)) {
    global $cpm;
$aid = $_GET['aid'];
$pos = $_GET['pos'];
$size=getSizeOption();
$results=$cpm->getImagefromAlbumAndPosition ($aid, $pos);
returnImageToBrowser($results,$size);
}
/*Rest of code the same as cfimage.php*/


Unfortenatly, this solution does not work out jet.

Do you have any hints on that?
If not, I would like to extend the feature request list with this issue!

Thank you
Georg
 :)

I don't understand...why not just hard code the link to the image if that is what you are wanting to do...
Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149

I was thinking the same thing.
Logged

FutschiKato

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

Thanks for your quick answers! Perhaps I will describe what should be the final result of my questions:

My goal would be a thing like it is used on the forums on www.airliners.net . They got a pictures database (non-Coppermine) and can use preview pics from that database in the forum like you will see in this thread:

http://www.airliners.net/discussions/general_aviation/read.main/1958918/
As you will see there, the picture is presented including picture data and the links will bring you directly to the pic IN the gallery....

And why all that? See here:
The next step would be a hack for a forum to include a picture with bbcode like   [pic]album=4&pos=2[/pic]

So, presenting a specific pic would be a step towards this goal, I wanted to start simple.  ;)
Perhaps, this kind of usage is not applicable with cfetch, but till now it is the best I know.

Let me know if you got something or if I was not able to give a good picture of what is my question. :)

Georg
Logged

peeps

  • Contributor
  • Coppermine novice
  • ***
  • Offline Offline
  • Posts: 29
  • Image pulled by Coppermine Fetch
    • philpeeps.com
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #244 on: February 15, 2005, 11:55:38 pm »

Thanks for your quick answers! Perhaps I will describe what should be the final result of my questions:

My goal would be a thing like it is used on the forums on www.airliners.net . They got a pictures database (non-Coppermine) and can use preview pics from that database in the forum like you will see in this thread:

http://www.airliners.net/discussions/general_aviation/read.main/1958918/
As you will see there, the picture is presented including picture data and the links will bring you directly to the pic IN the gallery....

And why all that? See here:
The next step would be a hack for a forum to include a picture with bbcode like   [pic]album=4&pos=2[/pic]

So, presenting a specific pic would be a step towards this goal, I wanted to start simple.  ;)
Perhaps, this kind of usage is not applicable with cfetch, but till now it is the best I know.

Let me know if you got something or if I was not able to give a good picture of what is my question. :)

Georg

It seems like that would all be achievable with just a bbcode hack and smart creation of the picture database. The hack for the bbcode would need to just add an img code with the pic# to the end of a url and then the same for an link code, right? Just tell the users to look at the filename and use that as the pic#...
Logged

Tarique Sani

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Gender: Male
  • Posts: 2712
    • http://tariquesani.net

Abbas has a bbcode hack with which you can write [thumb=324] and it shows a thumbnail linked to the proper picture (and it also respects permissions) - I will see if he can be cajoled into releasing it :)
Logged
SANIsoft PHP applications for E Biz

FutschiKato

  • Coppermine newbie
  • Offline Offline
  • Posts: 3

peeps: I never thougt that way round.
Tarique: That sounds a lot like a solution. I would really appreciate this.

Cheers
Georg  :)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #247 on: February 16, 2005, 06:04:59 pm »

peeps: I never thougt that way round.
Tarique: That sounds a lot like a solution. I would really appreciate this.

Cheers
Georg  :)

If you need to access the coppermine database from elsewhere, you can directly use the coppermine_dao object...  its undocumented really, but I wrote it so it will function standalone to make it easy to get the data without all the formatting stuff. 

Thanks everyone for handling this question - I painted the room my computer is in a few days ago and the fumes are nasty.  That and I have stopped getting email notifications for some reason :(

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

I need some help. Does anyone have the code that does this:
(From page1  post1)

Since Friday, December 10 2004 we've added about 355 images
Category name Album New count
Haley - The early years (1999-2002) 2000 Haley - the second year 17 new
 1999 Haley - the first year 69 new
 2001 Haley - the third year 30 new
Haley, Christi and me Our furry friends 18 new
 May 2003 - Beckett Trip 15 new
 Misc - Just don't fit anywhere 11 new


I've tried everything and just can't get it to work.
Thanks
Mike
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #249 on: February 17, 2005, 10:08:35 pm »


Hey Mike,

I emailed you the code to accomplish that.  Let me know if you did not get it...

I need some help. Does anyone have the code that does this:
(From page1  post1)

Since Friday, December 10 2004 we've added about 355 images
Category name Album New count
Haley - The early years (1999-2002) 2000 Haley - the second year 17 new
 1999 Haley - the first year 69 new
 2001 Haley - the third year 30 new
Haley, Christi and me Our furry friends 18 new
 May 2003 - Beckett Trip 15 new
 Misc - Just don't fit anywhere 11 new


I've tried everything and just can't get it to work.
Thanks
Mike

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

boboli

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #250 on: February 19, 2005, 12:02:06 pm »

Hi vuud, thank you for the mod..
Big Problem:
can't have the test page to work:
here is the link
http://boboli.altervista.org/cpmfetch/cftest.php

if you click on the "Click on this link to get into your coppermine gallery. it should not work, but the path shown in the web browser should help you to find what the correct one should be." it works so I presume the
Code: [Select]
$ChangeThisToYourPartialUrlToCPG = "/gallery"; is correct

the strange is
Code: [Select]
ERROR: Path to Coppermine incorrect. (/var/www/html/gallery//include/config.inc.php) where I see 2 slashes after gallery...

any idea ???
thanx
Roberto - Italy
Logged

deltafun

  • Coppermine newbie
  • Offline Offline
  • Posts: 10

Hi,

A few suggestions for this mod, I will probably implement these myself.

* Ability to show image title and description with the image - One site I am using coppermine for I am using Coppermine to allow users to administrate albums, however the presentation of the photos and site is required to be presented in a much less "community" based way.

* With the CFIMAGEGET.PHP the ability to specify a users favourites could be very usefull - One site I use coppermine on has a community aspect, and a commercial aspect. Currently one of the girls at the company administers large parts of the site using phpBB, i.e specific posts are pulled onto specific php pages. What I would like to be able to do is for the company/community to have ALL photos visible within the gallery section, but then for the admin girl to browse the photos and maintain her own favourites list, this favourites list would be all the photos that she (the company) are happy to have on the main site pages. I could then simply replace all images on all pages with the cfimageget.php call for an image, allowing the site to have a dynamic feel in many areas with rotating images from the admin users favourites.
Sort of making a site much more interesting for the visitor, and giving the company a lot more control, whilst giving the web designer less hassle.
I`m aware there are otherways this could be accomplished, however I think making use of the favourites feature within Coppermine would be the best way to go. The reason for wanting to do it from a specific users favourites rather than the most viewed or most voted for etc is wanting those two features to exisit within coppermine untouched, allowing the community to vote/view photos without affecting the main site pages. Obviously the most viewed and most voted for images, might differ a lot from images a company would want to present as its main visibility.

Its a great mod, very usefull :)
 
Logged

micro

  • Coppermine newbie
  • Offline Offline
  • Posts: 1
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #252 on: February 23, 2005, 04:28:22 pm »

i'm having some problems trying to get images posted to another site,,thought  copperminefetch (cfimageget.php) would be the solution but i'm getting error messages..
Code: [Select]
Warning: main(../photos/include/config.inc.php): failed to open stream: No such file or directory in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 28

Warning: main(../photos/include/config.inc.php): failed to open stream: No such file or directory in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 28

Warning: main(): Failed opening '../photos/include/config.inc.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 28
No Database SelectedNo Database Selected
Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 112

Warning: Cannot modify header information - headers already sent by (output started at /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php:28) in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 145

Warning: Cannot modify header information - headers already sent by (output started at /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php:28) in /home/micropr/public_html/copperminefetch/cpmfetch/cfimageget.php on line 146

tried changing file permissions.

/photos   is the correct path
running coppermine 1.3.2
copperminefetch 1.0

thanks
Logged

lilcgt

  • Coppermine newbie
  • Offline Offline
  • Posts: 1

help please here is my erroe mess.

Notice: Undefined index: DOCUMENT_ROOT in C:\Inetpub\wwwroot\cpmfetch\coppermine.php on line 87
ERROR: Path to Coppermine incorrect. (photo//include/config.inc.php)
Fatal error: Call to a member function on a non-object in C:\Inetpub\wwwroot\cpmfetch\cftest.php on line 5

and this is my test file

<?php
include "../cpg132drop/include/config.inc.php";
include "coppermine.php";
$objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'], $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'], '../cpg132drop');
$objCpm->cpm_viewRandomMediaFromCategory(1,1,9);
$objCpm->cpm_close();
?>

i have in following dir
/cpmfetch    this program
/cpg132drop  my coppermine photo gallery

i have tried several diff things and no luck i tried the test which comes with it and it gave some errors has well im a newbie so
SHOOT me
Logged

katharsis

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #254 on: February 24, 2005, 08:40:11 pm »

I've got cfimageget working.  I've read through all this thread but I don't see where anyone has asked or explained how to get a result like cfimageget but rather than random, have it display a single thumb of the last image added to the gallery.  That's all I want, just a single image, not even a link.  I can't figure out where I should butcher the code. I'm suffering from option paralysis.
Logged

Nibbler

  • Guest
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #255 on: February 24, 2005, 08:52:53 pm »

Tried this ?

Code: [Select]
cpm_viewLastAddedMedia (1, 1);
Logged

katharsis

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: CoppermineFetch - stats/thumbnails/randoms/etc from outside cpm - New dev ve
« Reply #256 on: February 24, 2005, 10:51:54 pm »

Quote
Tried this?
Code: [Select]
cpm_viewLastAddedMedia (1, 1);Well...I have NOW.
Thanks!
Logged

BZRK

  • Coppermine newbie
  • Offline Offline
  • Posts: 2

Very nice work, I'm using it to show a random image on my page.

But how can I prevent the image shown from displaying an alternate text? I don't like that much, since it just shows somestupidnumber.jpg

thx
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code

Very nice work, I'm using it to show a random image on my page.

But how can I prevent the image shown from displaying an alternate text? I don't like that much, since it just shows somestupidnumber.jpg

thx

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


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


Sorry for the delay... the first one is already done... check the latest dev versions for the subtitle features.

CFImageget is being completely rewritten and will be very extensible after I am done.  You could be able to add this sort of functionality without changing the core application (leaving you open to upgrades).  Although that feature would get into the coppermine_dao library and need changes there.  I have not done anything with favorites, but if you get something going in that respect, send me a diff or patch so I can add it in here. 

Thanks!

Hi,

A few suggestions for this mod, I will probably implement these myself.

* Ability to show image title and description with the image - One site I am using coppermine for I am using Coppermine to allow users to administrate albums, however the presentation of the photos and site is required to be presented in a much less "community" based way.

* With the CFIMAGEGET.PHP the ability to specify a users favourites could be very usefull - One site I use coppermine on has a community aspect, and a commercial aspect. Currently one of the girls at the company administers large parts of the site using phpBB, i.e specific posts are pulled onto specific php pages. What I would like to be able to do is for the company/community to have ALL photos visible within the gallery section, but then for the admin girl to browse the photos and maintain her own favourites list, this favourites list would be all the photos that she (the company) are happy to have on the main site pages. I could then simply replace all images on all pages with the cfimageget.php call for an image, allowing the site to have a dynamic feel in many areas with rotating images from the admin users favourites.
Sort of making a site much more interesting for the visitor, and giving the company a lot more control, whilst giving the web designer less hassle.
I`m aware there are otherways this could be accomplished, however I think making use of the favourites feature within Coppermine would be the best way to go. The reason for wanting to do it from a specific users favourites rather than the most viewed or most voted for etc is wanting those two features to exisit within coppermine untouched, allowing the community to vote/view photos without affecting the main site pages. Obviously the most viewed and most voted for images, might differ a lot from images a company would want to present as its main visibility.

Its a great mod, very usefull :)
 
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
Pages: 1 ... 9 10 11 12 [13] 14 15 16 17 ... 34   Go Up
 

Page created in 0.034 seconds with 19 queries.