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 2 3 4 [5] 6 7 8 9 ... 34   Go Down

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

0 Members and 1 Guest are viewing this topic.

blackhat

  • Coppermine newbie
  • Offline Offline
  • Posts: 9
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #80 on: December 23, 2004, 12:53:58 pm »

I'm a newbie t o php but I've managed to get it working, but I wanted to know if someone could help me pul all this into a variable that I can include in my template.

thanks :)
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #81 on: December 23, 2004, 05:05:10 pm »


I can try, but I am not quite sure what you mean?

vuud


I'm a newbie t o php but I've managed to get it working, but I wanted to know if someone could help me pul all this into a variable that I can include in my template.

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

Titooy

  • VIP
  • Coppermine addict
  • ***
  • Offline Offline
  • Posts: 736
    • under construction...
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #82 on: December 23, 2004, 06:14:06 pm »

Great mod !

(Could you numerate your packages in order to know if we have the last version?)
Logged

cxprod

  • Coppermine novice
  • *
  • Offline Offline
  • Posts: 21
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #83 on: December 24, 2004, 12:02:16 am »

Is there a site I can snag a few wmv files from to test this out.  Preferrably one with custom thumbnails so I can make sure it works.

I was poking at it some today and found the default media thumbs.  So you are saying you can make your own thumb specifially for one media file (say a frame from it) and it will serve that up if you have it... default otherwise.

That should not be hard....
( I probably just cursed myself saying that)

Actually all my sites are in a pass protected area & adult in subject matter...  not everyones cup of tea...

You could probably find a few wmv files in your my videos location as samples for windows media player
For a custom thumb all you need to do is put a thumb_moviefilename.jpg in the same folder the videos are
located in the album area of the gallery... 


Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #84 on: December 24, 2004, 01:38:37 am »


Thanks!   Since there has actually been a response to this mod, I am rewriting part of it based on new needs.  By the end of this month, version 1 will be released.   I will start a formal numbering system with the release of that one (as 1.0)

The basis will be the same, but somethings will be easier, like installation.

thanks again

Great mod !

(Could you numerate your packages in order to know if we have the last version?)
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: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #85 on: December 24, 2004, 01:39:36 am »

Actually all my sites are in a pass protected area & adult in subject matter...  not everyones cup of tea...

You could probably find a few wmv files in your my videos location as samples for windows media player
For a custom thumb all you need to do is put a thumb_moviefilename.jpg in the same folder the videos are
located in the album area of the gallery... 

 ;D No problem.  I was able to achieve the same functionality with some mp3's and custom images.

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
new development release - if you feel brave (0.6)
« Reply #86 on: December 24, 2004, 09:45:43 am »

 ;D Just in time for xmas

Version 0.6 - http://www.fistfullofcode.com/projects/copperminefetch/copperminefetch-dev.tar.gz

This is not quite everything I want to get done this year, but its enough where you can start playing with it.  In summary:

<ul>
<li>Changed stylehash is now optionhash</li>
<li>Added imagesize=[thumb,int,large] as optionhash option</li>
<li>Improved cfimageget.php program</li>
<li>Initialize by pointing to the cpm directory</li>
<li>Multimedia images returned for video, sound, etc</li>
<li>Last added media by album and category</li>
<li>Text reporting on how many added, how many comments, etc</li>
</ul>

Some really really important notes:

The biggest change, and the one that will cause you the most grief is the way the coppermine object is constructed.  The old way involved this:

   include "../photos/include/config.inc.php";
   include "./coppermine.php";
   $objCpm = new cpm($CONFIG['dbname'], $CONFIG['dbserver'],
                     $CONFIG['dbuser'],$CONFIG['dbpass'], $CONFIG['TABLE_PREFIX'], '/photos');

No more!  The new way has been reduced to this:

   include "./coppermine.php";
   $objCpm = new cpm('/photos');

Now, the parameter there is the url path to the coppermine directory.  NOT THE WHOLE URL... in my case my coppermine gallery is at http://www.fistfullofcode.com/photos.  So I just have to put /photos.  it will figure everything else out.


If you still want to do the old way (for some reason), you can do it with

$objCpm = new cpm( );
$objCpm->init( ... all the old parameters ... )

But why on earth would you want to? 

Okay, we have something for everyone here.

 ;D The Stylehash is now an option hash and takes a size argument. 
imagesize = thumb, int, large.  More options will be added to this in the future and it will become the main way to customize your returned images

I also reworked the code so the parameters you pass in are case insensitive.

 ;D Somewhat graceful handling of multimedia files.   CoppermineFetch will, when getting something other than a JPG check first for a custom thumbnail for the file, and if that does not work, it will return the default image for that file type.  This is less than perfect as if you request intermediate sized files, you still get a little thumbnail.  More work will be done on this in the future, but for now you at least get something back.  IT DOES NOT at this time take into account themed icons.  That could be coming up, if you use them, let me know and I may bump it up my list.  That would involve extra DB calls to get configuration which I refuse to do - unless absolutely need to.  I have a work around in mind, but thats coming up later.

 ;D Last added media by album or category.  By popular demand:
Code: [Select]
cpm_viewLastAddedMediaFromCategory($rows, $columns, $catid, $options="")
cpm_viewLastAddedMediaFromAlbum($rows, $columns, $albumid, $options="")

 ;D Nifty stats ouputing.  For the guy who wanted it to say 72 files in 3 albums, etc.
Code: [Select]
cpm_formatStats($format);

Format would be a string interspersed with whatever text you want and placeholders.  The following placeholders are valid at this time:

%f - file count
%a - album count
%c - category count
%v - view count
%n - comment count (note count)
%% - Escapes a percent sign. (I dont know either, it just seemed like a good idea)

This example:
Code: [Select]
$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");
outputs:

Here is a percent sign % There are 366 files in 8 categories containing 27 albums, having served 243 views and getting 0 comments

Still to do for the 1.0 release.
* Access override into private albums<br />
* Subtitles under images generated<br />
* Option to link images to album or specific image<br />
* Improved documentation<br />
* Docs on how to use this for random avatars<br />
* Added private_override as optionhash options<br />
* Limiting what kinds of media to return (not music, etc)<br />

For those of you not familiar with development releases... this means it may work really well for you, or somethings may be broken.  What tests here on my box, may not run on yours for some unknown reason.  So PLEASE send me feedback if it works fine for you, if something is strange, etc...  If I don't know about it, I cant fix it.

I also promise some usable docs!


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

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #87 on: December 24, 2004, 09:53:00 am »

* Docs on how to use this for random avatars<br />
That would be great. I actually tried to use coppermine fetch for a random signature but it didn't work.

I figured out a way using another script and .htaccess, but it is not very elegant and I'm stuck using specific albums.
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #88 on: December 24, 2004, 09:55:44 am »

* Docs on how to use this for random avatars<br />
That would be great. I actually tried to use coppermine fetch for a random signature but it didn't work.

I figured out a way using another script and .htaccess, but it is not very elegant and I'm stuck to specific albums.

Heh, its incredibly simple...  You need to get the cfimageget.php working.  Should be simple, there are only like two things in the top of the file to configure.

After that, whenever you have the option to specifiy a url for an avatar... just enter

http://www.yourwebsite.com/path/to/cfimageget.php

Thats it, a random thumbnail all the time

You can also add on ?category=3   or ?album=3 (whatever numbers you want)

I use it like that here

Me sleep now

Happy holidays



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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #89 on: December 24, 2004, 09:58:21 am »

attaching your files to my posting (for future reference in case the original files go down), both the original and a zipped version.

Joachim

[edit]
removed attachments, use the attachments in the first posting on the thread for the most recent versions of the files.
[/edit]
« Last Edit: January 03, 2005, 10:32:04 am by GauGau »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #90 on: December 24, 2004, 05:09:29 pm »


Thanks much, is that something I should do with current versions?  Probably not a bad idea :)

Thanks much!
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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47844
  • aka "GauGau"
    • gaugau.de
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #91 on: December 26, 2004, 10:39:15 am »

yes, please attach your mods to your postings whenever possible. You might want to consider naming the files with reference to the version number. Using the naming scheme we use for our own files your file would be named like this: cpg1.3.2_mod_copperminefetch0.6.tar.gz, but of course you're free to come up with a naming scheme of your own, e.g. copperminefetch-0_6.tar.gz

Joachim
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppemineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #92 on: December 26, 2004, 04:55:56 pm »

yes, please attach your mods to your postings whenever possible. You might want to consider naming the files with reference to the version number. Using the naming scheme we use for our own files your file would be named like this: cpg1.3.2_mod_copperminefetch0.6.tar.gz, but of course you're free to come up with a naming scheme of your own, e.g. copperminefetch-0_6.tar.gz

Joachim

Well, Mom alwatys told me to fit in and conform so I have no problem doing it that way :)

I will probably go with the later, since I am tied very very little to coppermine, the version scheme is not as applicable.  And most of what I tie to would not change between releases probably.

I'll keep the most up to day on the intial post using your second way... 

Thanks for coppermine!






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
End of the year release - 0.7 - please test this out
« Reply #93 on: December 28, 2004, 06:52:05 am »

Okay, I have produced a test version to make sure that it works before I give it the big version 1.0.

 ;D Much going on if you did not get the last development release.  Much has been added.

 :-\\ I am sorry to say that some of the plans for this release have been put of.  This basically means the "subtitles" and also the multiple category / album selection.  On both of these counts I have run into some issues that I need to think over more.

I am attaching both a tar.gz and a .zip file.  There is an updated Readme.html in the docs directory.

Changes and updates include:
  • Simplified startup of object
  • Access into private albums now possible
  • Control over if the thumbnail is a link
  • Control over target of link
  • Control over what it links to (album or large photo)
  • Displays images for non jpg formats
  • Filter out unwanted media types at will
  • More getlastadded functions
  • Formatted statistics now possible
  • Easier cfimageget.php configuration

Well, if you try it - let me know if it works - comments and suggestions.  If some people can try it out and it works, I can roll out 1.0 and start on some new features.

Happy holidays
 ;D
Updated:  31-Dec-2004 - The 0.7 release has been superceeded.  The first post in this thread will always have the latest Dev and dist versions (although 0.8 is the best right now)

http://forum.coppermine-gallery.net/index.php?topic=12679.0


« Last Edit: December 31, 2004, 07:34:00 am by 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

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #94 on: December 30, 2004, 11:42:40 pm »

A couple of suggestions...  (Good work, by the way.)

I've been using cpm_viewLastAddedMedia and cpm_viewLastAddedMediaFromAlbum.

1) imagelink should have a setting to link to the display page of the image (ex: http://somesite/galleries/displayimage.php?pos=-803)
2) imagelink should have a setting to call the javascript function MM_openBrWindow (this is what Coppermine does to display a large image)
3) more options should be available for the alt attribute.  I specifically would like to show the date of the image in the alt tag, but there are probably other things that would be useful to show as well.
4) add a title attribute that is identical to the alt attribute.  (Mozilla browsers don't show alt attributes on mouseover, but they do show title)

BUG? -- I'm getting a double slash between the directory and the file:  http://somesite/galleries/albums/test//testpic.jpg

BUG? -- It seems some "box" characters got added to the end of some of the files of version 0.7, probably artifacts of zipping the files.  They don't hurt too much except they do get printed on the html page when coppermine.php is included.  I'm using windows...

Thanks,
Kory
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #95 on: December 30, 2004, 11:53:52 pm »

A couple of suggestions...  (Good work, by the way.)

I've been using cpm_viewLastAddedMedia and cpm_viewLastAddedMediaFromAlbum.

1) imagelink should have a setting to link to the display page of the image (ex: http://somesite/galleries/displayimage.php?pos=-803)
2) imagelink should have a setting to call the javascript function MM_openBrWindow (this is what Coppermine does to display a large image)
3) more options should be available for the alt attribute.  I specifically would like to show the date of the image in the alt tag, but there are probably other things that would be useful to show as well.
4) add a title attribute that is identical to the alt attribute.  (Mozilla browsers don't show alt attributes on mouseover, but they do show title)

BUG? -- I'm getting a double slash between the directory and the file:  http://somesite/galleries/albums/test//testpic.jpg

BUG? -- It seems some "box" characters got added to the end of some of the files of version 0.7, probably artifacts of zipping the files.  They don't hurt too much except they do get printed on the html page when coppermine.php is included.  I'm using windows...

Thanks,
Kory

Hey Kory,

For your suggestions #1 & #3 above - those are in the works.  The ALT tag will be handled with much like the stats one... give it some text with placeholders....  "From album %a" would give "From album Summer Vacation".  A few other tags.  #1 is on my list, but it was going to be pretty intrusive, so I skipped it for now.  Starting on that one soon. 

Suggestion #4: That explains why I was never seeing them in firefox!  I'll put that one in to the next dev release.  After I will handle it the same way as the alt tag will be later.

Suggestion #3:  MM_OpenBRwindow a coppermine function? 

Thanks for the bugs... the boxes on the end are probably an artifact of my linux box converting the files to be readable by windows easily.  I think I know where I made that mistake. 

I am working on some other stuff right now that I really dont want to do... so this gives me an excuse to stop that :D

Thanks and check back later for 0.8



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
New test version out (0.8)
« Reply #96 on: December 31, 2004, 07:29:22 am »

Okay, this is probably it before I just give it a 1.0 and move onto some new functionality/

Since the 0.7 release
<ul>
<li>Limiting what kinds of media to return (not music, etc) - setFilter($filters)</li>
<li>BUG Fixed: Fixed windows distrobution of end of file characters being added (probably)</li>
<li>BUG Fixed: Extra slash in link name </li>
<li>Added title attribute (same as alt attribute)</li>
<li>BUG Fixed: Frmat stats code - would fail if % was first char</li>
<li>Added ALTTAG / TITLE formatting</li>
</ul>

As for alt tags, I broke a big rule of development and added in new features after the code was frozen.  But I figure that this is small enough that I could get away with it.  If you set an alttag in your options hash you can insert place holders.

Code: [Select]
<?php $objCpm->cpm_viewLastAddedMedia(1,2,array("alttag" => "filename: %f")); ?>
Would produce alt and title tags that said "filename: myphoto.jpg".

This is the full list of available placeholders:

<p>
%p - filepath of the media<br />
%f - filename of the media<br />
%s - filesize in bytes<br />
%S - filesize in KB rounded to one decimal place
%t - title given to the media<br />
%c - caption for the media<br />
%o - owner name for the media<br />
%w - when added (reformatted ctime field)<br />
%W - raw Ctime field data (seconds)
%h - hits for the media<br />
%a - album name it belongs in<br />
%d - album description<br />
%% - inserts one % sign<br />
</p>

I plan on using the same for the subtitle generation in a near future release.

Credit to KaptainKory for two bug reports :D

THE DOWNLOADS are either on the first post in this thread
http://forum.coppermine-gallery.net/index.php?topic=12679.0

Or on my website at:

http://www.fistfullofcode.com/projects/copperminefetch

Thanks!













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
Any advice?
« Reply #97 on: December 31, 2004, 08:38:26 am »

1) imagelink should have a setting to link to the display page of the image (ex: http://somesite/galleries/displayimage.php?pos=-803)
2) imagelink should have a setting to call the javascript function MM_openBrWindow (this is what Coppermine does to display a large image)

Let me know if you have any ideas on this thing about linking to the intermediate photos.  I have tried to keep my database access very light and very fast.  I am having trouble coming up with a single sql statement that will give me the data I need back.  I need to know the position in the album, but that is calculated by a sql call to get all the photos in an album.  This means that I have to do 1 + 1 per image calls to the database.  That is bad.  Hopefully I will be able to work some sql magic...

As for the MMOpenBrowser code... that is part of the coppermine javascript library.  I try to not tie to the actual coppermine implementation as much as possible (less work between releases probably - works on more versions) so I don't want to add that in directly.  I'm going to work in something so you can pass javascript commands to the CF program.  That way you can import the JS from coppermine in your page if you want and craft the javascript call and pass it in.  I think that will get you where you want to go.

As for now, I may tinker with the SQL, but I wont get either of those in until after this one is released as 1.0.  I want a stable version :) - but that should only be a few days anyway.

I hope I hit everything you could want in the ALT tag formatting :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

kaptainkory

  • Tester
  • Coppermine regular visitor
  • *
  • Offline Offline
  • Posts: 51
Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #98 on: December 31, 2004, 08:13:38 pm »

The new alt and title tag features are great.  I agree that calling a javascript function straight from Coppermine is probably a bad idea, however replicating the same action isn't.  What Coppermine seems to do--without looking at the code too closely--is to open a pop-up window (without menus, status bar, etc.) that is sized to match the image AND centers it on the screen.  These are nice features beyond just using target="_blank".

Also, you seem to have fixed the end-of-file "artifacts".  I might make one more suggestion about the overall package: put everything (including docs, README, etc.) into one folder: CoppermineFetch.  This way, the whole package can just be unzipped to the directory where you want it and it all stays together; no risk of overriding an unrelated REAME file or docs folder.

This is a cosmetic thing, but the html code produced by the script has a LOT of extra spaces and tabs.  Some of these are the result of unspecified variables (ex: $linkStyle), which does not bother me.  But there is quite a bit of trimming up beyond this that could be done.  Some people, like myself  :), like to look at what html produced.

Finally, here is my solution for linking to the intermediate photos:

In coppermine_doa.php, line 48, add "p.pid" to the END of the query string:
Code: [Select]
var $sqlPictureAlbumSelect = ' p.filepath, p.filename, p.aid, p.filesize, p.title, p.caption, p.owner_name, p.ctime, p.hits, a.title, a.description, p.pid ';
In coppermine.php, starting at line 620, after the check for 'large', add the following code:
Code: [Select]
elseif ($imagelink == 'intermediate') {
$linkhtmlstart = '<a href="' . $this->urltocpm . '/displayimage.php?pos=-' . $row[11] . '" " ' . $linkStyle . $linktarget .' >';
$linkhtmlend = '</a>';
}

Now the intermediate page can be called simply by setting 'imagelink'=>'intermediate'.  However, this to me seems like more of a DEFAULT action.  Perhaps you would consider making 'imagelink'=>'none' a special action and opening the intermediate page as the default.

Cheers,
Kory
« Last Edit: December 31, 2004, 08:26:52 pm by kaptainkory »
Logged

vuud

  • Moderator
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 1803
  • [cpmfetch.fistfullofcode.com]
    • Fist Full Of Code
Re: CoppermineFetch - stats / thumbnails / randoms / last added outside cpm
« Reply #99 on: December 31, 2004, 08:48:31 pm »

Also, you seem to have fixed the end-of-file "artifacts".  I might make one more suggestion about the overall package: put everything (including docs, README, etc.) into one folder: CoppermineFetch.  This way, the whole package can just be unzipped to the directory where you want it and it all stays together; no risk of overriding an unrelated REAME file or docs folder.

This is a cosmetic thing, but the html code produced by the script has a LOT of extra spaces and tabs.  Some of these are the result of unspecified variables (ex: $linkStyle), which does not bother me.  But there is quite a bit of trimming up beyond this that could be done.  Some people, like myself  :), like to look at what html produced.

Finally, here is my solution for linking to the intermediate photos:

In coppermine_doa.php, line 48, add "p.pid" to the END of the query string:
Code: [Select]
var $sqlPictureAlbumSelect = ' p.filepath, p.filename, p.aid, p.filesize, p.title, p.caption, p.owner_name, p.ctime, p.hits, a.title, a.description, p.pid ';
In coppermine.php, starting at line 620, after the check for 'large', add the following code:
Code: [Select]
elseif ($imagelink == 'intermediate') {
$linkhtmlstart = '<a href="' . $this->urltocpm . '/displayimage.php?pos=-' . $row[11] . '" " ' . $linkStyle . $linktarget .' >';
$linkhtmlend = '</a>';
}

Now the intermediate page can be called simply by setting 'imagelink'=>'intermediate'.  However, this to me seems like more of a DEFAULT action.  Perhaps you would consider making 'imagelink'=>'none' a special action and opening the intermediate page as the default.

Well that seems like a simple enough solution.  I poked at that before, but did it without the - sign, which does not work. That is way to simple to not put in the final release.  And, yes - that one should definately be the default.

As for the extra spaces I will get around to that, but its not high on my priority list.  A lot of it is due to using straight html in the php library which I can fix pretty easily.   Legacy code... you know the deal.

The EOF characters were being generated by a setting I had in my ANT build file.  I adjusted it - glad to hear they are gone.

I am unsure about changing the packaging... I did it that way exactly for the reverse of what you are saying... I wanted to keep the rest of the stuff out of the installation :)  I will give this some more thought though - I can see benefits to both ways.

Thanks for the notes and the solution to the intermediate file... If I had a bigger ego I would be incredibly embarrassed that I missed that :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
Pages: 1 2 3 4 [5] 6 7 8 9 ... 34   Go Up
 

Page created in 0.057 seconds with 21 queries.