Hi guys

I'd like to call a user-defined job to look for pages of template X and 
remove keyword Y if the page was created between certain dates.

I have the following RQL working in a SmartEdit page - what changes do I 
need to make to call it as a user-defined job .asp file? I presume changing 
the login guid/session key calls (to what?) but what else?

<% 
set objIO = Server.CreateObject("RDCMSAsp.RDPageData")
objIO.XmlServerClassName = "RDCMSServer.XmlServer"
set XMLDomPage = Server.CreateObject("Microsoft.XMLDOM")

xmlData = "<IODATA loginguid=""<%inf_loginGuid%>"" sessionkey=""<
%inf_SessionKey%>"">" & _
"<PAGE action=""search"" templateguid=""30422810663E41BFB6CF5C03CBC8B6F4"" 
projectguid=""<%inf_projectGuid%>"" createdatefrom=""40544"" 
createdateto=""40908"" keyword=""2011"" flags=""1"" maxrecords=""200""/>" & 
_
"</IODATA>"
xmlData = objIO.ServerExecuteXml(xmlData,sError)
if sError>"" then Response.write "An error has occurred with listing the 
pages:<br />" & sError & "<br /><br />" End if
Call XMLDomPage.LoadXML(xmlData)
set pageData = XMLDomPage.getElementsByTagName("PAGE")

For n = 0 to (pageData.Length-1)
xmlData = "<IODATA loginguid=""<%inf_loginGuid%>"" sessionkey=""<
%inf_SessionKey%>"">" & _
"<PROJECT>" & _
"<PAGE guid=""" & pGuid & """ action=""assign"">" & _
"<KEYWORDS>" & _
"<KEYWORD guid=""8F303AE60F0F41659F58DF56B8809117"" delete=""1"" 
changed=""1""/>" & _
"</KEYWORDS>" & _
"</PAGE>" & _
"</PROJECT>" & _
"</IODATA>"
xmlData = objIO.ServerExecuteXml(xmlData,sError)
if sError>"" then Response.write "An error has occurred with removing the 
keywords:<br />" & sError & "<br /><br />" End if
Call XMLDomPage.LoadXML(xmlData)
Next

set XMLDomPage = nothing
set objIO = nothing
set xmlData = nothing
%>

Many thanks

Neil

-- 
You received this message because you are subscribed to the Google Groups 
"RedDot CMS Users" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/reddot-cms-users/-/qTkEqk_eRUwJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/reddot-cms-users?hl=en.

Reply via email to