Re: CF Image question...

2007-12-25 Thread C. Hatton Humphrey
 The thing I wish it would do is add a permanent watermark on uploaded images 
 instead of only on temp png while being shown.

You can do this:

1. Read in original image
2. Read in watermark image (transparent GIF)
3. Set transparency of watermark image to 20-30%
Either:
4. Mathematically locate position of watermark
OR
4. Resize watermark image to size of original (in memory)
THEN
5. Overlay watermark image on original image
FINALLY
6. Rewrite original image to drive.

This is something that can take the server some time to do - I would
suggest using asynchronous processing or scheduled task to handle
this.

Hatton

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295333
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Send Blowfish-encoded string to PHP

2007-12-25 Thread Dmitrii 'Mamut' Dimandt
Claude Schneegans wrote:
  where redirectTo simply redirects the page over to some place and sends
 the encoded value over with it.

  How can this be accomplished in PHP (using mcrypt library for instance)?

 Something is not clear: why does it has to be done in PHP since 
 apparently it is not done yet,
 and you seem to do not know how to do it?
   
I thought it was going to be easy :) Apparently it isn't. And PHP part 
is a requirement I can't change, unfortunately :(


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295334
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Send Blowfish-encoded string to PHP

2007-12-25 Thread James Holmes
I'm using that quote next time someone asks me why we write in CF and not PHP!

Sorry I can't help with the PHP part, by the way.

On Dec 25, 2007 9:04 PM, Dmitrii 'Mamut' Dimandt [EMAIL PROTECTED] wrote:
 
 I thought it was going to be easy :) Apparently it isn't. And PHP part
 is a requirement I can't change, unfortunately :(


-- 
mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295335
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


CFPARAM doesn't work as expected

2007-12-25 Thread marc --
In Applicationb.cfm I have these lines:

cfparam name=APPLICATION.objects.security 
default=#CreateObject('component','components.security').init(authorization='public',language=Left(CGI.HTTP_ACCEPT_LANGUAGE,2))#
cfparam name=APPLICATION.objects.util 
default=#CreateObject('component','components.util')#
cfparam name=APPLICATION.objects.db 
default=#CreateObject('component','components.db').init(dsn='irama',maxStringLength=25)#
cfparam name=APPLICATION.objects.cms 
default=#CreateObject('component','components.cms').init()#

First time the page gets requested, there's nothing in the APPLICATION scope so 
the lines CreateObject().init*() are executed. On subsequent calls the 
APPLICATION scope contains all the objects so I expect that the default values 
(CreateObject().init()) don't get assigned.
But they do! I put a cfdump in the init handler and _every_ time a page gets 
requested it gets executed. So every time my objects get initialized and 
previous data is lost.
I thought cfparam only assigns the default value if the variable doesn't exist 
but here it executes it every time.
Is this a bug or as designed?


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295336
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFPARAM doesn't work as expected

2007-12-25 Thread Todd
Yeah, you shouldn't be using cfparam like this at all.

On Dec 25, 2007 8:21 AM, marc -- [EMAIL PROTECTED] wrote:

 In Applicationb.cfm I have these lines:

 cfparam name=APPLICATION.objects.security
 default=#CreateObject('component','components.security
 ').init(authorization='public',language=Left(CGI.HTTP_ACCEPT_LANGUAGE
 ,2))#
 cfparam name=APPLICATION.objects.util
 default=#CreateObject('component','components.util')#
 cfparam name=APPLICATION.objects.db
 default=#CreateObject('component','components.db
 ').init(dsn='irama',maxStringLength=25)#
 cfparam name=APPLICATION.objects.cms
 default=#CreateObject('component','components.cms').init()#

 First time the page gets requested, there's nothing in the APPLICATION
 scope so the lines CreateObject().init*() are executed. On subsequent
 calls the APPLICATION scope contains all the objects so I expect that the
 default values (CreateObject().init()) don't get assigned.
 But they do! I put a cfdump in the init handler and _every_ time a page
 gets requested it gets executed. So every time my objects get initialized
 and previous data is lost.
 I thought cfparam only assigns the default value if the variable doesn't
 exist but here it executes it every time.
 Is this a bug or as designed?




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295337
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: WebAssist DataBase Search extension doesnt work!

2007-12-25 Thread Joseph Lowery
Hi Ali,

Your best bet would be to file a Technical Suppport incident with WebAssist. 
They'll be able to diagnose the problem and give you a solution. We're closed 
today for the holiday but will be back in the office tomorrow (Wednesday).

Best - Joe
Joseph Lowery
VP Marketing, WebAssist
Author, Dreamweaver Bible series

 Hi: I use DW8/CF8 and I tried to use this DW8 extension(WebAssist 
 Database Search version 1.4.1) to make the search for the website. But 
 the problem is at the end when I apply (I click finish) it returns an 
 error about a javascript. Anyone has used it? Anyone has the same 
 problem?
 Thanks 


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295338
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CF Image question...

2007-12-25 Thread s. isaac dealey
 This is something that can take the server some time to do - I would
 suggest using asynchronous processing or scheduled task to handle
 this.

We ran into some issues at my day job trying to use cfthread for
resizing images, realizing that if you're doing a lot of it, you can run
out of threads in the cfthread pool and the remaining cfthread tags will
error out if they don't get access to a thread fast enough. So one
alternative that would allow you to resize the images when the user
uploads them (no scheduled task) without slowing them down would be to
return content to the browser prior to your image editing, i.e. 

/body
/html
cfflush /
cfimage ... /

I do this occasionally in the onRequestEnd (function / template). The
drawback is that you can't use cflocation after the cfflush tag to
redirect the user if you're going to do that -- and at least with any
recent version of ColdFusion you can't use cflocation before any code
you want to execute. So if you wanted to redirect the user this way, you
would want to use either a meta tag or javascript in the content before
the cfflush tag. (and I would include a continue link also)

Another alternative would be to use cfhttp / to spawn a request for a
page in your application that performs the image manipulation without
waiting for the http result content. I'm told there is a way to use
cfhttp (a particular timeout value I think) in which ColdFusion doesn't
wait for the response, although I haven't personally used it. This way
you could span the http request and then redirect the browser with
cflocation if you want. 

hth,
ike

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 503.236.3691

http://onTap.riaforge.org



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295339
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: CFPARAM doesn't work as expected

2007-12-25 Thread Dave Watts
Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information! 

 -Original Message-
 From: marc -- [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, December 25, 2007 08:22
 To: CF-Talk
 Subject: CFPARAM doesn't work as expected
 
 In Applicationb.cfm I have these lines:
 
 cfparam name=APPLICATION.objects.security 
 default=#CreateObject('component','components.security').init
 (authorization='public',language=Left(CGI.HTTP_ACCEPT_LANGUAGE,2))#
 cfparam name=APPLICATION.objects.util 
 default=#CreateObject('component','components.util')#
 cfparam name=APPLICATION.objects.db 
 default=#CreateObject('component','components.db').init(dsn='
 irama',maxStringLength=25)#
 cfparam name=APPLICATION.objects.cms 
 default=#CreateObject('component','components.cms').init()#
 
 First time the page gets requested, there's nothing in the 
 APPLICATION scope so the lines CreateObject().init*() are 
 executed. On subsequent calls the APPLICATION scope contains 
 all the objects so I expect that the default values 
 (CreateObject().init()) don't get assigned.
 But they do! I put a cfdump in the init handler and _every_ 
 time a page gets requested it gets executed. So every time my 
 objects get initialized and previous data is lost.
 I thought cfparam only assigns the default value if the 
 variable doesn't exist but here it executes it every time.
 Is this a bug or as designed?
 
 
 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295340
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: Thoughts on my version of a DAO

2007-12-25 Thread s. isaac dealey
 Don't ask why I'm up at 5 in the morning on Xmas day!

I won't. :) 

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 503.236.3691

http://onTap.riaforge.org



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295341
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: CFPARAM doesn't work as expected

2007-12-25 Thread Dave Watts
 I thought cfparam only assigns the default value if the 
 variable doesn't exist but here it executes it every time.

I would recommend that you not use CFPARAM in this case. First, there have
been similar problems with CFPARAM creating complex objects in the past.
Second, and perhaps more importantly, there's significantly more overhead in
checking for the existence of each of these objects in the Application scope
before creating them, compared to checking for the existence of just one
(or, even better, avoiding the need to check for any by placing the creation
code in your onApplicationStart method).

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized
instruction at our training centers in Washington DC, Atlanta,
Chicago, Baltimore, Northern Virginia, or on-site at your location.
Visit http://training.figleaf.com/ for more information!


~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295342
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CF Image question...

2007-12-25 Thread Dave l
I had thought about that but I figured the overhead was gunna be too much even 
though its all done on my ded box. 

If you are going to do just a few or one at a time then this would work but in 
my case there would be between 80-300 at a time which would be a killer.

thanks tho!




  The thing I wish it would do is add a permanent watermark on 
 uploaded images instead of only on temp png while being shown.
 
 You can do this:
 
 1. Read in original image
 2. Read in watermark image (transparent GIF)
 3. Set transparency of watermark image to 20-30%
 Either:
 4. Mathematically locate position of watermark
 OR
 4. Resize watermark image to size of original (in memory)
 THEN
 5. Overlay watermark image on original image
 FINALLY
 6. Rewrite original image to drive.
 
 This is something that can take the server some time to do - I would
 suggest using asynchronous processing or scheduled task to handle
 this.
 
Hatton 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295343
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFPARAM doesn't work as expected

2007-12-25 Thread s. isaac dealey
It sounds to me like if the objects are being _assigned_ on each request
that it may be a bug... but make sure you check your application timeout
in your Application.cfc or CFApplication tag (whichever you're using) to
make sure you didn't accidentally assign it a really short timeout of
say a couple seconds that may be causing the application to timeout
between requests. 

However... even if the value already exists in the application and the
cfparam tag behaves correctly, I would say this is probably not the way
you want to create your component objects. It would probably be a lot
better to use the onApplicationStart method of your Application.cfc or
optionally if you don't have one, to use 

cfif isdefined(application.objects.cms)
  cfset application... /
  yadda...
/cfif

The reason for this may not be immediately obvious from looking at the
tags. The cfparam tag receives all its input _before_ it assigns
anything, so for example, if you were to say: 

cfparam name=form.x default=#variables.x# /

This line will error out if variables.x is undefined, even if form.x
*is* defined. Why? Well, because it doesn't do anything with the input
until it has all the input, so it's looking for the default value before
it checks to see if there's an existing definition. Had I written the
engine I might have written it differently, but... I digress... 

The long and the short of it is that if you use cfparam and put a
CreateObject() call in the default attribute, it's going to create one
every time the param tag executes it, whether it's used of not. So even
if it were retaining your application variables the way you wanted them
to, the server would still be doing a bunch of extra, unnecessary work,
creating new ones on each request.

Now there is an alternative that you may or may not like that allows you
to do basically what you were hoping for and at the same time prevent
the server from creating a whole bunch of components it's not going to
use: 

cfcomponent displayname=appObjects
  cffunction name=init access=public output=false

cfinvoke component=security returnvariable=this.security
  method=init authorization=public
  language=#Left(CGI.HTTP_ACCEPT_LANGUAGE,2)# /

cfset this.util = CreateObject(component,util) /

cfinvoke component=db returnvariable=this.db method=init 
  dsn=irama maxStringLength=25 /

cfset this.cms = CreateObject(component,cms).init() /

cfreturn this /
  /cffunction
/cfcomponent

cfset application.objects = iif(
  structKeyExists(application,objects),
  application.objects,
  CreateObject('component','components.appObjects').init()) /

The iif() function unlike the cfparam tag accepts strings as input
instead of the result variables and then determines which one to
evaluate once it's received it's input. So in this case, if
application.objects exists, then the string containing the CreateObject()
code isn't evaluated and it doesn't create that extra object that's
created by the cfparam tag. 

Or you could just: 

cfif not StructKeyExists(application,objects)
  cfinvoke component=components.appObjects 
method=init returnvariable=application.objects /
/cfif

Which is probably what I would do. Heck I might even wrap a named cflock
around that cfif statement just in case because iirc the server doesn't
single-thread the application start. 

hth,
ike

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 503.236.3691

http://onTap.riaforge.org



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295344
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: CFPARAM doesn't work as expected

2007-12-25 Thread Todd
From everything I've read and have been told, you don't need to cflock your
Application / Sessions that are within the OnApplicationStart and
OnSessionStart unless... you call OnApplicationStart() / OnSessionStart()
from somewhere else in the code.

On Dec 25, 2007 5:06 PM, s. isaac dealey [EMAIL PROTECTED] wrote:

 Which is probably what I would do. Heck I might even wrap a named cflock
 around that cfif statement just in case because iirc the server doesn't
 single-thread the application start.

 hth,
 ike



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295345
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFPARAM doesn't work as expected

2007-12-25 Thread marc --
Thanks Isaac, I didn't know cfparam executed the default value anayway and 
_then_ looks if it is needed... this explanation makes sense.
I used the StrutKeyExists() function.
Marc 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295346
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CFPARAM doesn't work as expected

2007-12-25 Thread s. isaac dealey
 Thanks Isaac, I didn't know cfparam executed the default value
 anayway and _then_ looks if it is needed... this explanation makes
 sense. I used the StrutKeyExists() function.

Welcome. Of course, it still shouldn't overwrite your object, but
generally speaking not the best way to instantiate them.

-- 
s. isaac dealey  ^  new epoch
 isn't it time for a change? 
 ph: 503.236.3691

http://onTap.riaforge.org



~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295347
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: CF Image question...

2007-12-25 Thread Rick Faircloth
Could you use a recursive routine to process, say, 25 images,
have a delay, then run the routine again on images that were
not processed the first or preceding runs, allowing the server
a chance to recover from each run until all images are processed?

Rick

 -Original Message-
 From: Dave l [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, December 25, 2007 4:32 PM
 To: CF-Talk
 Subject: Re: CF Image question...
 
 I had thought about that but I figured the overhead was gunna be too much 
 even though its all
 done on my ded box.
 
 If you are going to do just a few or one at a time then this would work but 
 in my case there
 would be between 80-300 at a time which would be a killer.
 
 thanks tho!
 
 
 
 
   The thing I wish it would do is add a permanent watermark on
  uploaded images instead of only on temp png while being shown.
 
  You can do this:
 
  1. Read in original image
  2. Read in watermark image (transparent GIF)
  3. Set transparency of watermark image to 20-30%
  Either:
  4. Mathematically locate position of watermark
  OR
  4. Resize watermark image to size of original (in memory)
  THEN
  5. Overlay watermark image on original image
  FINALLY
  6. Rewrite original image to drive.
 
  This is something that can take the server some time to do - I would
  suggest using asynchronous processing or scheduled task to handle
  this.
 
 Hatton
 




~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295348
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: CF Image question...

2007-12-25 Thread Dave l
Right now I can do it 2 different ways.. one is to upload each one separately 
or I can ftp into the site and just upload the images then in the admin I can 
choose to upload one or run scripts if I have already uploaded them. If I have 
ftp'd them then it does run them 25 at a time, it starts with cfdirectory loop 
grabs the next images enters the info in db then makes the larger image and 
puts into into the large folder, then the thumnail and put it into the thumbs 
folder then moved that original image to a saved folder. I don't delete them at 
that point because I need to keep the original ones for downloading but the 
girl whos site is is then goes in and picks out the ones she wants and the rest 
get deleted and then the good ones zipped up and then the originals are deleted 
to save space.

So to answer your ?.. it could but I guess it is just as easy to watermark them 
b4 hand. I run them through iwatermark and takes about 15 seconds to do 200 
images but there are other sites where they may add a few pix a week where that 
would work.



Could you use a recursive routine to process, say, 25 images,
have a delay, then run the routine again on images that were
not processed the first or preceding runs, allowing the server
a chance to recover from each run until all images are processed?

Rick 

~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:295349
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4