Hi CS, Since the page contains PHP code, is the page published with extension, .php?
On Oct 17, 12:51 pm, CS <[email protected]> wrote: > To test whether php works or not, I tried the following code: > > <reddot:cms> > <if> > <query valuea="Context:CurrentRenderMode" operator="!=" > valueb="Int:2"> > <htmltext> > <div>The external RSS feed is only available on published > web > site.</div> > </htmltext> > </query> > <query type="else"> > <htmltext> > <?php echo "test"; ?> > </htmltext> > </query> > </if> > </reddot:cms> > > On preview mode, I got the message saying "The external RSS feed is > only available on published web > site.", I published and on published site, I am getting as "<?php echo > "test"; ?>" > > Any idea what might be wrong? Is there anything I need to install on > our unix server? > > Thanks, > CS > > On Oct 16, 11:24 am, Jian Huang <[email protected]> wrote: > > > > > > > > > Hi CS, > > > You are so close from the solution! > > > Ok, here is a basic break down of the problems: > > > You should not preexecute any code in CMS because you would not want > > to republish the page each time the remote RSS updates. You would > > rather the code run dynamically on the Unix Web Server, so you would > > need to publish out PHP code. > > > PHP code do not work in CMS because it is on a WIndows Server (Well, > > you can, but need a lot work to get it running). > > > So you just need rendertag to say, if not publish, display message > > saying RSS not available in current mode, else, output PHP code > > > <reddot:cms> > > <if> > > <query valuea="Context:CurrentRenderMode" operator="!=" > > valueb="Int:2"> > > <htmltext> > > <div>The external RSS feed is only available on published web > > site.</div> > > </htmltext> > > </query> > > <query type="else"> > > <htmltext> > > <?php include("external_rss.php"); ?> > > </htmltext> > > </query> > > </if> > > </reddot:cms> > > > In the event that you DO wish users to be able to see RSS even in non > > publish mode, well, you can use AJAX or ASP in that mode, but then you > > would have to maintain 2 set of code. > > > Best regards and best of luck, > > > -Jian > > > On Oct 15, 12:30 am, CS <[email protected]> wrote: > > > > Hi, > > > > Our Live server CMS is hosted in IIS 7.0 windows box and the sites are > > > published to Unix box. > > > > What we are trying to do is, read some RSS feeds and show the posts > > > excerpts in our site's web page in run time. > > > > There are some Google javascripts available to do this. For SEO > > > perspective, we would like to get raw HTML data and add the same to > > > our site. if we use javascripts when we view the source code of our > > > webpage, it will show the script not the generated html. and google > > > cannot read javascripts. > > > > One of the way I thought to do is using asp code between <! > > > IoRangePreExecute> tags in our template file. I tried that I can run > > > some basic code like: > > > > <!IoRangePreExecute> > > > <% > > > Response.Write ("<br>Testing HTML code here <br/>") > > > %> > > > <!/IoRangePreExecute> > > > > but I am not able to use any xml dom, download the rss feed, etc. > > > > Then I tried creating a .net dll and use the same in asp code in > > > between <!IoRangePreExecute> tags. I can succusfully read the rss in > > > an asp page. When I tried to use the same in liveserver, my admin says > > > they cannot use .net as the site we are publishing is a Unix box. > > > > I tried to use PHP but it doesn't worked may be it is not installed in > > > my server. > > > > Kindly suggest the best approach to achieve my requirement. If you > > > have any questions please let me know.- Hide quoted text - > > > - Show quoted text - -- You received this message because you are subscribed to the Google Groups "RedDot CMS Users" group. 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.
