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

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.

Alcor

Thanks for the answer. Yes, that is what I want, the Link to the user profile. Here it is the Link to my forum.

my forum

Underneath the photos are (in bold text): the title, the owner and the album where it's upload. The title that links to the photo, the owner links to the user's profile and the album links to the album that contains the image. That is what I would like to do, but I don't know do it.

luke

Hey vuud, this is probably already on your radar, but I noticed you can get images via pid in the latest release (iirc :) ), which reminded me of a feature request - is there any chance of stable url's making it into cpmfetch at some stage? :)

cheers :D
-luke

vuud

Quote from: Alcor on May 12, 2005, 11:06:35 AM
Thanks for the answer. Yes, that is what I want, the Link to the user profile. Here it is the Link to my forum.

my forum

Underneath the photos are (in bold text): the title, the owner and the album where it's upload. The title that links to the photo, the owner links to the user's profile and the album links to the album that contains the image. That is what I would like to do, but I don't know do it.

Yikes

Nope, I don't think you can do that as it is now...   Its a pretty cool idea though - something I will add in in the future. 

Subscribe to the notification list and watch that for updates.
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: luke on May 12, 2005, 12:28:47 PM
Hey vuud, this is probably already on your radar, but I noticed you can get images via pid in the latest release (iirc :) ), which reminded me of a feature request - is there any chance of stable url's making it into cpmfetch at some stage? :)

cheers :D
-luke

Yeah, I added getting by PID to support some new functions to be added into the full screen display (titles, descriptions, etc...) for the next release (probably). 

I am not sure what you are looking for here?  to be honest I am not crazy about the idea of tying into another hack, if they change something, and it breaks this then it is bad.  Right now I am 100% self contained...  The only thing that can screw me up (famous last words) is a drastic change to the structure of the database.

Does CPG 1.4 have a view by PID function?  If that has it then I would commit to providing that functionality, if not I'd have to think about it some more.

So, let me know what you are thinking, and if anyone else out there understands and wants this - let me know.

Thanks much & look forward to hearing from you





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

trued

hey vuud,
Im back to give a link to a coppermine displayimage page that has images with the mouseover border effect. This seems to work in IE too. Maybe this could help with the problem I encountered when applying the css of hover border where it was not supported by ie.
http://www.sortons.net/photos/tests/displayimage.htm#

Also  I wanted to know if its possible to click on a fetched image and have it open on the same page instead of trying to get into the cpg console. Im trying to make photo additions as easy as ppssible and although I like the cpg script Im not sure where to start customizing it to integrate into the site. So if I have the fetch fuction and it leads to the bigger image on the same page I wouldnt need to customize.
or
Maybe you know of some good cpg customizing tuts. Anything could help. I appreciate your help.
thx

vuud


That is FRIGGIN COOL   ;D

I love that.  Sweet work.  I would love it if cpmfetch could help with that.

At the worst, you can use the coppermine_dao object directly to handle the SQL calls and such.  You can even go through the coppermine.php and have it return result sets.  While this returns raw resultsets, you can pass the information back to get the full URL to image and such.   

Since you have such a cool example, tell me what you need it to give you (as I understand very little CSS when it comes to layouts) and I can tell you how, or add in a function to do it.   I will look more at your example, and see if anything leaps to mind.

Very cool indeed!


Quote from: trued on May 14, 2005, 08:34:13 PM
hey vuud,
Im back to give a link to a coppermine displayimage page that has images with the mouseover border effect. This seems to work in IE too. Maybe this could help with the problem I encountered when applying the css of hover border where it was not supported by ie.
http://www.sortons.net/photos/tests/displayimage.htm#

Also  I wanted to know if its possible to click on a fetched image and have it open on the same page instead of trying to get into the cpg console. Im trying to make photo additions as easy as ppssible and although I like the cpg script Im not sure where to start customizing it to integrate into the site. So if I have the fetch fuction and it leads to the bigger image on the same page I wouldnt need to customize.
or
Maybe you know of some good cpg customizing tuts. Anything could help. I appreciate your help.
thx
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

trued

i think its cool too but unfortunately its not my work, i saw it posted in the cpg forum somewhere maybe I can talk to the guy who did it to see what he used. I know there is javascript involved. i have no idea how to even begin getting that to work.
here is a cool site I came across when searching for an answer:

http://www.456bereastreet.com/archive/200503/css_tips_and_tricks_part_1/

uodate-
I was able to get the hover border effect to work in IE but then firefox was distorted. I guess there is no easy way. The best bet is getting info on that javascript.


vuud


Well, I can see how he did it there...  I will look into the IE hover thing... I need to get to someone with windows...

I think I can make some functions that would support something like that and maybe an example of doing it.  Hmmmm - at least it gives me something to do :D

This is sort of distracting as my next project was going to be making the SSI access into cpmfetch for people stuck on HTML pages.  Ah well... I will have to add this onto the list.  There was someone aways back asking for a css layout output so maybe this would be a good time to handle that.

Life goes on...


Quote from: trued on May 15, 2005, 05:20:10 PM
i think its cool too but unfortunately its not my work, i saw it posted in the cpg forum somewhere maybe I can talk to the guy who did it to see what he used. I know there is javascript involved. i have no idea how to even begin getting that to work.
here is a cool site I came across when searching for an answer:

http://www.456bereastreet.com/archive/200503/css_tips_and_tricks_part_1/

uodate-
I was able to get the hover border effect to work in IE but then firefox was distorted. I guess there is no easy way. The best bet is getting info on that javascript.


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

Elisabeth

Hi, thanks for making this, I got it to work just fine. :)  But I was just wondering...is there any way to pull the most recently added image as well as a random one?  Some of the Docs pages on your site don't show up, I'm not sure if you address this there, but I figured I'd ask anyway.  Thanks!!

vuud

Quote from: Elisabeth on May 16, 2005, 12:14:24 AM
Hi, thanks for making this, I got it to work just fine. :)  But I was just wondering...is there any way to pull the most recently added image as well as a random one?  Some of the Docs pages on your site don't show up, I'm not sure if you address this there, but I figured I'd ask anyway.  Thanks!!

Ahhhh you must be talking about the 1, 2, 3 sections in the docs... yeah, I have not done those yet... above there is a link into the readme, which is the extensive and convuluted documentation.   I should make it a little more obvious though.

You can do all sorts of wierd, wacky and wonderous things with it.

Check the readme off the documentation page, or in the file you downloaded

Let me know if you don't see it in there... check the functions section :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

Elisabeth


vuud

Quote from: Elisabeth on May 16, 2005, 02:06:54 AM
Ahhh, I didn't see that!  Thank you!

No problem... my docs are lacking in the useability department.  I did one overhaul, but really need to do another one sometime soon. 

Subscribe the notification list on the site to be made aware of new releases...

Good luck and post any problems

: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

Elisabeth

Hmmm...yes, I think I will subscribe. ;)

Actually, I am having a problem.  This isn't correct, is it?

<?php   
include "http://twilight-whispers.com/cpmfetch/coppermine.php";
$objCpm = new cpm('http://twilight-whispers.com/gallery');

$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewLastAddedMedia (1,1);

$objCpm->cpm_close();

?>

I'm a real newbie at PHP (I know HTML though ;)), so excuse any glaring errors.

vuud

Try this:

<?php   
include "/cpmfetch/coppermine.php";
$objCpm = new cpm('/gallery');
$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewLastAddedMedia (1,1);
$objCpm->cpm_close();
?>

That will show 1 random and also the last added.

If not, let me know what it does...




Quote from: Elisabeth on May 16, 2005, 06:00:12 AM
Hmmm...yes, I think I will subscribe. ;)

Actually, I am having a problem.  This isn't correct, is it?

<?php   
include "http://twilight-whispers.com/cpmfetch/coppermine.php";
$objCpm = new cpm('http://twilight-whispers.com/gallery');

$objCpm->cpm_viewRandomMedia (1,1);
$objCpm->cpm_viewLastAddedMedia (1,1);

$objCpm->cpm_close();

?>

I'm a real newbie at PHP (I know HTML though ;)), so excuse any glaring errors.
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

Quote from: vuud on May 03, 2005, 10:05:21 PM

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"


cool...its nice not to be locked into just one way, it leaves a lot more room to grow & learn from the universe  ;D

Joachim Müller

I have just started playing around with cpmFetch (v.1.3.4), so please forgive me if this has already been addressed in previous postings (this thread has become very large, I'd vote for a split, or at least for a lock and starting of several new threads for support and development discussion).

Here are some suggested improvements/fixes:
  • wrong link to PHP manual
    in /cpgfetch/docs/functions.html, find <a href="http://us2.php.net/manual/en/function.date.php1">documentation on Php.Net</a>and replace with<a href="http://www.php.net/manual/en/function.date.php">documentation on php.net</a>
  • Non-standards-compliant <img> tags
    It's a good idea to have a slash at the end of an image tag, however there should be a space between the last attribute of the tag and the slash. Currently, the html output is
    Quote<img alt="foobar.jpg" title="foobar.jpg" src="/bla/whatever/thumb_foobar.jpg"/>
    , although it should be
    Quote<img alt="foobar.jpg" title="foobar.jpg" src="/bla/whatever/thumb_foobar.jpg" />
    . To achieve this, edit /cpmfetch/coppermine.php, find        function htmlTagIMG($imagefile,$extraAttributes) {
                    $htmlOut = '<img';
                    if (array_key_exists('imagestyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['imagestyle']}";
                    if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
                    $htmlOut .= " src=\"$imagefile\"" . '/>';
                    return ($htmlOut);
            }
    and replace with        function htmlTagIMG($imagefile,$extraAttributes) {
                    $htmlOut = '<img';
                    if (array_key_exists('imagestyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['imagestyle']}";
                    if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
                    $htmlOut .= " src=\"$imagefile\"" . ' />';
                    return ($htmlOut);
            }
    . For better readability (although attributes don't matter in reference to html standards) I suggest putting the src attribute first and adding a border="0" attribute as well, so above code would become        function htmlTagIMG($imagefile,$extraAttributes) {
                    $htmlOut = '<img src="' . $imagefile . '"';
                    if (array_key_exists('imagestyle',$this->styleHash)) $htmlOut .= " {$this->styleHash['imagestyle']}";
                    if ($extraAttributes != "") $htmlOut .= " " . $extraAttributes;
                    $htmlOut .= ' border="0" />';
                    return ($htmlOut);
            }

  • No width and height attributes
    cpmfetch already queries coppermine's pictures table, so it would be easy to determine a pic's dimensions in the query as well and use this as width and height attributes for the <img> tag: both improved standards compliance and nicer display of the page while the pics are being loaded would be the result (whenever possible, the width and height attributes of the <img> tag should be used, that's why coppermine stores this in the db as well in the first place).
  • Why specify settings manually?
    You have to specify the thumbnail and intermediate size prefix if your install is non-standard in coppermine.php (in the lines        var $thumbnailprefix = "thumb_";
            var $intermedprefix = "normal_";
    ). This is not a good idea IMO: cpmfetch should do a query on coppermine's config table once it's called and use the settings made there for the thumbnail and intermediate prefixes.

vuud

#536
Quote from: GauGau on May 17, 2005, 05:14:56 PM
Here are some suggested improvements/fixes:

  • wrong link to PHP manual
  • Non-standards-compliant <img> tags
  • No width and height attributes
  • Why specify settings manually?

Hey GauGau,

I am definatly working on a split for the forum, and maybe a lock is a good idea too.   I'll tackle that over the next few days...

Thanks much for the feedback and suggestions. I like most of them...


  • wrong link to PHP manual
    Definately a good idea

  • Non-standards-compliant <img> tags
    Whoops - also a good idea.  I won't add in the border setting since I am adding in a generic adder for the img tag.  This allows you to set a border="0" if you want one, but still lets you add in a border="1" without having to contend with an existing border="0" hardcoded.

  • No width and height attributes
    I did not know these were in the database already.  The only thing is that this could interfere with my tags to set a different image size to have the browser automatically widen it.  This could be an optional setting I suppose... 

  • Why specify settings manually?
    I do not want to make extra database calls, and these rarely change AFAIK -  I really hate an extra call just to get those.  Most people, if they stick with the cpm defaults can leave these alone...
I'll get these into the next dev release... thanks for the help!

: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

dmahendra

HI

Could someone lead me to a forum message that has someting to do with CpmFetch:
$_SERVER['DOCUMENT_ROOT']

I am installing it on my organization intranet site and the cftest.php keeps giving me an error message
ERROR: Path to Coppermine incorrect. (D:/WWW/Jakarta/sphotos//include/config.inc.php)

i think the problem is located in coppermind.php and coppermind_dao.php where there is a line:

$this->filepathtocpm = $_SERVER['DOCUMENT_ROOT'] so it's always going to reply back with

(D:/WWW/Jakarta/sphotos//include/config.inc.php)

so I made some alternation on it and change it to $this->filepathtocpm = 'http://' . $_SERVER['HTTP_ROOT']


I am not a programmer and I would be happy if someone could tell my findings are incorrect.

thanks
Monty

vuud


Quote from: dmahendra on May 18, 2005, 12:45:44 PM
I am installing it on my organization intranet site and the cftest.php keeps giving me an error message
ERROR: Path to Coppermine incorrect. (D:/WWW/Jakarta/sphotos//include/config.inc.php)

i think the problem is located in coppermind.php and coppermind_dao.php where there is a line:

I have another theory, its in the cftest.php file.  You
See step 3 of the quickstart instructions http://cpmfetch.fistfullofcode.com/projects/copperminefetch/quickstart.php

Unless of course, you are really in a directory called "sphotos" - in which case I am wrong.

Also, run the newest development version from the web site since you are on windows.  Some things have been fixed for people forced to run windows servers.

Good luck

PS. Remove your alterations - you should not need them.

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

cassie396

I have successfully installed CPMFetch on my website with the gallery installed (guidinglightmultimedia.com). But the main page of my website is located at another url (guidinglightcity.com). I would like to show some random images to get people to visit the galleries more.

I did get the test to run successfully, but I'm not really sure how to get it to work on the other url. I have tried including cftest on the page, but the images don't show up and all the links are wrong.

What should I do?

Thanks for your help!
Cassie