Products

Solutions

Resources

Partners

Community

Blog

About

QA

Ideas Test

New Community Website

Ordinarily, you'd be at the right spot, but we've recently launched a brand new community website... For the community, by the community.

Yay... Take Me to the Community!

Welcome to the DNN Community Forums, your preferred source of online community support for all things related to DNN.
In order to participate you must be a registered DNNizen

HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Scheduler, replace tokensScheduler, replace tokens
Previous
 
Next
New Post
4/24/2007 10:04 AM
 

I have written a scheduler that send emails on a daily basis.  This emial will replace tokens before it is sent.  I need to know for example how to create a link in my email for the url of my site. 

EX: #HOST_URL#, i want this to be replaced with the url setup in my dotnetnuke instance, i have exposed to me the portalid in my scheduler.  What do i instantiate in my scheduler to get this value?

Thanks, Eric


Eric Garza
EGI Consulting
Dallas, TX
(972) 767-5930
View my profile on LinkedIn

Are you looking for DotNetNuke ModulesDotNetNuke Skins or DotNetNuke Support?

 
New Post
5/5/2007 1:26 AM
 

You should write your code to replace token as you are replacing the portalId in your code this may be your method or event that you r using


"Knowledge Sharing Matters!"
 
New Post
5/5/2007 7:10 AM
 

have a look at GlobalResources.aspx in the language editor, how tokens are formatted in the system emails. You can use Token Replace (available in DNN 4.4.1+) to replace tokens with host, portal, module, tab and user properties. You simply need to call tokenReplace yourself, your difficulty will be in the scheduled task, to get a vaild context. HTH


Cheers from Germany,
Sebastian Leupold

dnnWerk - The DotNetNuke Experts   German Spoken DotNetNuke User Group

Speed up your DNN Websites with TurboDNN
 
New Post
5/5/2007 9:20 PM
 

Getting context can be a real pain since technically
 - there IS NO CONTEXT when you are inside a scheduled process.
 - and no context means not portalid - to get portal settings from.

 - The easy way to get CONTEXT is to actually NOT user the scheduler process for your send processing.

1. Create your send code in a standard web module - this also makes it MUCH easier for testing since you can do all your testing without worrying about the scheduler handling.

Once the system is working completely:

 - create a simple SCHEDULER STUB module that does only one thing
-    which "is"  make a http request to the page on your website ...

The only problem you have here is working out how to get the scheduler stub to call the right page.

For my scheduler modules

- we created a small SQL table that holds a list of web pages to call
- we also do some schedule management in the table  as well since, we occasionally see double bounce type issues with the built in scheduler - that is - the scheduler firing more than once for the same time segment.

Since your scheduler stub is actually calling a page inside your website
- the full context of your site is available to the send processing.

The other advantage from a development point of view
 - is that once you have coded and debugged your scheduler stub
 - you can do all your remaining testing on the WEB PAGE itself - which makes for much easier debugging.

Westa

Westa

 

 

 

 
Previous
 
Next
HomeHomeArchived Discus...Archived Discus...Developing Under Previous Versions of .NETDeveloping Under Previous Versions of .NETASP.Net 2.0ASP.Net 2.0Scheduler, replace tokensScheduler, replace tokens


These Forums are dedicated to discussion of DNN Platform and Evoq Solutions.

For the benefit of the community and to protect the integrity of the ecosystem, please observe the following posting guidelines:

  1. No Advertising. This includes promotion of commercial and non-commercial products or services which are not directly related to DNN.
  2. No vendor trolling / poaching. If someone posts about a vendor issue, allow the vendor or other customers to respond. Any post that looks like trolling / poaching will be removed.
  3. Discussion or promotion of DNN Platform product releases under a different brand name are strictly prohibited.
  4. No Flaming or Trolling.
  5. No Profanity, Racism, or Prejudice.
  6. Site Moderators have the final word on approving / removing a thread or post or comment.
  7. English language posting only, please.
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out
What is Liquid Content?
Find Out