Go Back   MarcomCentral (PTI) and FusionPro User Communities > Software-Related Talk > The JavaScript Library

Notices

Reply
 
Thread Tools Search this Thread Display Modes
  #11  
Old February 9th, 2009, 11:18 AM
Rayed Rayed is offline
Junior Community Member
 
Join Date: Sep 2008
Posts: 21
Default Re: Need a little instructions on how to apply a rule

That is a good idea LeberMac. I will try it and let you know. I am working on a Mac.
Rayed
Reply With Quote
  #12  
Old February 9th, 2009, 12:03 PM
Rayed Rayed is offline
Junior Community Member
 
Join Date: Sep 2008
Posts: 21
Default Date and time rule is not working

Well, I changed the Date/Time on my Mac to 2010, but the online pdf proof Disclaimer still said 2009.

So now I am wondering, is the pdf proof and hi-res proofs generated online use an internal Printable Date and Time that the rule:
"return FormatDate(Today(), "yyyy");" could be picking up?

Or does that rule pick up the date and time from what ever computer initiates the download?

I just think that my rule is not correct and is not applying the year correctly.
Rayed
Reply With Quote
  #13  
Old February 9th, 2009, 12:19 PM
LeberMac's Avatar
LeberMac LeberMac is offline
Junior Community Member
 
Join Date: Jan 2009
Location: Milwaukee, WI
Posts: 25
Default Re: Need a little instructions on how to apply a rule

Hrm. I dunno. I defer to Sweet and Dan on this one.
I'm unsure as to where FusionPro picks up its date & time data.

Stupid question that I forgot to ask - you are using FusionPro Desktop, right? (Cause if it's being composed somewhere else, you'll need to change the date/time there. Forgive me if that seems like the condescending "Is your computer plugged in?" tech support question.)
__________________
"I say we take off and nuke the entire site from orbit. It's the only way to be sure."
Reply With Quote
  #14  
Old February 9th, 2009, 12:36 PM
Rayed Rayed is offline
Junior Community Member
 
Join Date: Sep 2008
Posts: 21
Default Re: Need a little instructions on how to apply a rule

Yes, I am using FusionPro Desktop on my Mac which is plugged in. But I think it is my rule. I don't think I did it right.
Thanks for your suggestions, however.

I suppose if Dan or David took a look at my rule, they could tell me if I applied it correctly.
One question I had for Dan, which could be obvious is, what exact rule information goes into the "rule_Copyright" rule. I assumed it was this:
"return FormatDate(Today(), "yyyy");" but he did not specify.
Thanks,
Rayed
Reply With Quote
  #15  
Old February 9th, 2009, 12:58 PM
Dan Korn's Avatar
Dan Korn Dan Korn is offline
FusionPro Senior Engineer / Forum Moderator
 
Join Date: Aug 2008
Location: Chicago, IL
Posts: 4,502
Default Re: Need a little instructions on how to apply a rule

Quote:
Originally Posted by Rayed View Post
Well, I changed the Date/Time on my Mac to 2010, but the online pdf proof Disclaimer still said 2009.

So now I am wondering, is the pdf proof and hi-res proofs generated online use an internal Printable Date and Time that the rule:
"return FormatDate(Today(), "yyyy");" could be picking up?

Or does that rule pick up the date and time from what ever computer initiates the download?

I just think that my rule is not correct and is not applying the year correctly.
Rayed
The Today() function returns a JavaScript Date object representing the current system date and time, on the machine where the function is called. At composition time, it returns the system date and time on the machine where the composition is performed. So, if you're composing on a remote FP Server machine, which is what happens when you submit a job to FP Web, then the composition picks up the date and time from that remote composition machine. Changing the system clock on your local machine will only affect compositions preformed locally on that machine; it can't possibly have any effect on a composition which occurs on a different machine.

Obviously the composition machines running jobs for FP Web are set up with the actual current date and time. I would expect that these machines are set for Pacific Time, since we're a California-based company.
Quote:
Originally Posted by LeberMac View Post
Hrm. I dunno. I defer to Sweet and Dan on this one.
I'm unsure as to where FusionPro picks up its date & time data.

Stupid question that I forgot to ask - you are using FusionPro Desktop, right? (Cause if it's being composed somewhere else, you'll need to change the date/time there. Forgive me if that seems like the condescending "Is your computer plugged in?" tech support question.)
Well, no, actually, it's not a stupid question at all. In fact, it's exactly the right question to ask. The context under which you are running a job is absolutely relevant and crucial to diagnosing any issues. See my signature.
Quote:
Originally Posted by Rayed View Post
Yes, I am using FusionPro Desktop on my Mac which is plugged in. But I think it is my rule. I don't think I did it right.
Thanks for your suggestions, however.

I suppose if Dan or David took a look at my rule, they could tell me if I applied it correctly.
One question I had for Dan, which could be obvious is, what exact rule information goes into the "rule_Copyright" rule. I assumed it was this:
"return FormatDate(Today(), "yyyy");" but he did not specify.
Thanks,
Rayed
Like I said earlier, you can use the Today() function, and it is guaranteed to return the current date and time, on the machine where the composition is being performed. I'm not sure why my assurances in this regard aren't satisfying, but you also now have empirical results that back this up: specifically, you saw that changing the system time on your local machine affects the date returned for a local composition, but not for a remote composition (via FP Web).

And as I also noted earlier, instead of always using the "current" date at the time of composition, you might want to hard-code a specific year into that function, in case you happen to be composing a job which is intended for printing or mailing at a later date than when the composition is performed. But you did not seem interested in this advice either.

In the end, exactly what logic should go into your rules depends on your business requirements, and I can't tell you what those are.
__________________
Dan Korn
FusionPro Developer / JavaScript Guru / Forum Moderator
PTI Marketing Technologies | Printable | MarcomCentral
LinkedIn

I am a not a Support engineer, and this forum is not a substitute for Support. My participation on this forum is primarily as a fellow user (and a forum moderator). I am happy to provide help and answers to questions when I can; however, there is no guarantee that I, or anyone else on this forum, will be able to answer all questions or fix any problems. If I ask for files to clarify an issue, I might not be able to look at them personally. I am not able to answer private messages, emails, or phone calls unless they go through proper Support channels. Please direct any sales or pricing questions to your salesperson or inquiries@marcom.com.

Complex template-building questions, as well as all installation and font questions or problems, should be directed to FusionProSupport@marcom.com. Paid consulting work may be required to fulfill your template-building needs.

This is a publicly viewable forum. Please DO NOT post fonts, or other proprietary content, to this forum. Also, please DO NOT post any "live" data with real names, addresses, or any other personal, private, or confidential data.

Please include the specific versions of FusionPro, Acrobat, and your operating system in any problem reports or help requests. I recommend putting this information in your forum signature. Please also check your composition log (.msg) file for relevant error or warning messages.

Please post questions specific to the MarcomCentral Enterprise and Web-to-Print applications in the MarcomCentral forum. Click here to request access. Or contact your Business Relationship Manager (BRM/CPM) for assistance.

Please direct any questions specific to EFI's Digital StoreFront (DSF) to EFI support.

How To Ask Questions The Smart Way

The correct spellings are JavaScript, FusionPro, and MarcomCentral (each with two capital letters and no spaces). Acceptable abbreviations are JS, FP, and MC (or MCC). There is no "S" at the end of "Expression" or "Printable"! The name of the product is FusionPro, not "Fusion". "Java" is not is not the same as JavaScript.

Check out the JavaScript Guide and JavaScript Reference! FusionPro 8.0 and newer use JavaScript 1.7. Older versions use JavaScript 1.5.

return "KbwbTdsjqu!spdlt\"".replace(/./g,function(w){return String.fromCharCode(w.charCodeAt()-1)});
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:01 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.