Note: This fixes problems for IIS users, word press and other embedding into portal users and that guy who wanted image width control, etc...
--------------------------------------------------------------
Sign up for email notifications at
http://cpmfetch.fistfullofcode.com This will get you:
* Emails for new releases and development releases
* Notifications of new tutorials and online help
* Security notification (if we ever have one)
* Email addresses held closely - no spam, not shared
----------------------------------------------------------------
* * * Development release 1.3.4 is ONLINE now * * *
( get it at
http://cpmfetch.fistfullofcode.com )
I have posted a new development release online. Updating to this is purely up to you...
If there is something you like here, go ahead. If not stick with what you have. If you think
you have a bug now, upgrade to this before reporting it
Here is what is new:
WINDOW TARGET CODE
OPTIONS CASE SUPPORT FOR < PHP 4.2
HELP FOR MICROSOFT IIS USERS
NEW FUNCTION: cpm_viewMediaByPid($pid, $options)
NEW Subtitle options
DATABASE CLOSE PROBLEM
NEW STYLE AND OPTIONS ENTRIES
A WORD ABOUT DEV RELEASES
* Note * Special thanks to TJC for setting up, testing and troubleshooting this on IIS. Your karma
will be rewarding... thanks from me and the few that run IIS.
WINDOW TARGET CODE
======================================
* I redid the windowtarget option code. Now the options are:
_blank
_blank-js
_blank-cfshow
_blank used to use some javascript to display the image, which was included by having
the cpmfetch.js script load somewhere on your page. That is now handled by _blank-js. _blank now,
just opens up a full new browser window and sticks the media in it.
_blank-js :removes toolbars from the new window and resizes it) requires cpmfetch.js - I've also had some
issues with loading and resizing. So all around, the cfshow will be the recommened way to do it if
you dont like pure _blank. Suggestions on fixing the js are also welcomed
_blank-cfshow: calls the external php file cfshow to display the media. For now this avoids some rumors
of problems with IE just loading JPG files directly. In the future you will be able to do cool things with
this, such as display photo information with it, descriptions, etc... Who knows.
These only apply to the large display options.
OPTIONS CASE SUPPORT FOR < PHP 4.2
=====================================
While looking at a complaint for a the array_change_case function I noticed that
I never coded in an alternative for older PHP versions (ie: 4.1). Made that fix
and removed the change_array_key_case function all together. This simplified code
some and I don't think my iteration is going to be noticible slower on a 5 entry array.
HELP FOR MICROSOFT IIS USERS
=====================================
The program will now check for the setting "doc_root" from PHP.INI when
it cannot find DOCUMENT_ROOT, which IIS does not provide. No idea how much
this will help people... it works for at least one person. The alternative is to create an
environmental variable named DOCUMENT_ROOT if this does not work. There are other
ways to get it working on IIS, but they are well, just unnatural - so we wont speak of them.
Ever.
NEW FUNCTION: cpm_viewMediaByPid($pid, $options)
=====================================
Allows you to specify a given picture by the PID it is assigned. Displayed in the normal
way. I was planning on this for the cfshow.php script, but it could come in useful
for normal everyday use. One easy way to determine the pid of a photo is to look at the rating
starts in your gallery. Look at the link on one of the star sets for ranking and you will see:
http://www.fistfullofcode.com/photos/ratepic.php?pic=23&rate=1"pic" is the PID (Picture ID). There could be other ways, this is just the first one I found.
NEW Subtitle options
=====================================
%i = displays the PID value of the photo being shown.
DATABASE CLOSE PROBLEM
=====================================
Charbal #PHP on freenode gave me an idea of why the $cpm->cpm_close() was
wreaking havoc with other programs. Added in a fix so it *may* be safe to add
back in the close functionality when embedding into a phpbb, smf, wordpress template etc etc.
NEW STYLE AND OPTIONS ENTRIES
====================================
imagewidth => ""
imageheight => ""
These set the height and width tags on the images to be whatever you submit. I would recommend
using one or the other as the aspect ration will be kept. Specifiying both can result in strange looking
images... which may serve a purpose... Depending on the size you are scaling to you may want to start off
with the intermediate sized image if you are going to be closer to that size. Taking a thumbnail and scaling it up to
400 px will result in a blurry detail lacking image. Whatever you pass in these entries will be placed on
the image HTML tag.
A WORD ABOUT DEV RELEASES
====================================
Typically development releases are done in software when new features are added... New features sometimes
introduce bugs (software errors) that the testing we do here misses. If this happens, it is usually something
strange. The dev releases here are generally very stable. Changes sometimes even make the program
more stable, which adding new features.
Overall, In most circumstances, if your random thumbnail is not working for a few minutes when you upgrade
you are going to be okay. If a dev release has something you like, give it a try. I always have all the older versions up
for download so you can go back if it breaks.
If you do have a problem, PLEASE let me know. That way I can fix it. If I don't know about it, it could be
a long time before it gets fixed.
-------------------------------------------------------------------------------------------------------
Hopefully this email will come through... its the first one, so someone give me a heads up if its all amiss.
Thanks!
Bill@fistfullofcode.com