1. #1
    Ext JS Premium Member Elijah's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    382
    Vote Rating
    0
    Elijah is on a distinguished road

      0  

    Default Help with Rss Example Feed please

    Help with Rss Example Feed please


    Hi everyone, I started going through the example code 2 days ago and realized that it was using php or at least trying to on the backend. I am not familiar with php but have done coldfusion years ago. So, i figured i could just swap out the php files for cf files. I finally got the call to work and return an XML structure back to the caller. I am using firefox with the plugin and can see the response data contains the xml depending on how i modify my code so I know I do have the call returning the data but I cannot for the life of me get the xml to render to the feeder view. Can someone please help me? tell me what I must do.

  2. #2
    Ext JS Premium Member Elijah's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    382
    Vote Rating
    0
    Elijah is on a distinguished road

      0  

    Default My feed-proxy.cfm file

    My feed-proxy.cfm file


    Here is the code for the cf file I made based off of the php file.
    Code:
    <cffunction access="private" name="getRss" returntype="Struct" >
        <cfargument name="rssFeedUrl">
        <cfhttp method="get" url="#rssFeedUrl#" result="rssFeedData">
        <cfreturn rssFeedData>
    </cffunction>
     
    <cfscript>
     // this is an example server-side proxy to load feeds
     if(!IsDefined("feed")){
        xml = 'Elijah no loading occured';
        writeOutput(xml);
     }
     else{
      if(feed != '' && FindNoCase(feed, 'http') == 0){
         rssFeed = getRss(feed);
         xml = XmlParse(rssFeed.Filecontent);
         xml = ReplaceNoCase(xml, '<content:encoded>', '<content>');
         xml = ReplaceNoCase(xml, '</content:encoded>', '</content>');
         xml = ReplaceNoCase(xml, '</dc:creator>', '</author>');
         xml = ReplaceNoCase(xml, '<dc:creator', '<author');
         // This has value but the ajax xml response shows null
         writeOutput(xml);
      } // if
     } // if
    </cfscript>
    Also, in the example file FeedWindow.js method
    validateFeed : function(response, options){...
    The catch is always going off. Checking various steps in the method I have determined that
    var
    xml = response.responseXML;

    alert(
    'xml' + xml); shows me that xml is always null.

    Any insight on this please help. I'd rather not have to abandon yet another example code because it wont execute.

  3. #3
    Sencha User aaronstatic's Avatar
    Join Date
    Dec 2007
    Posts
    32
    Vote Rating
    0
    aaronstatic is on a distinguished road

      0  

    Default


    console.log(response);

    inspect the response object using firebug, maybe that will help to point you in the right direction

  4. #4
    Ext JS Premium Member Elijah's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    382
    Vote Rating
    0
    Elijah is on a distinguished road

      0  

    Default


    Okay, when I was able to get the console command to run I saw that the value was under response response.responseText and not response.responseXML. However since your last post, I can not get console to display a damn thing. I can see the rss xml structure in the response tab but nothing displays in the viewer. So I am just assuming that the structure of how things are being done on the coldfusion side is not correct.

    Does anyone know of any examples in coldfusion so that I can see what I need to do?

    I could really use some more help here.
    Thank you.

  5. #5
    Ext JS Premium Member Elijah's Avatar
    Join Date
    Nov 2009
    Location
    USA
    Posts
    382
    Vote Rating
    0
    Elijah is on a distinguished road

      0  

    Question


    Code update for the Coldfusion side. Needed to set the cfcontent type.

    Code:
    <cfsetting showdebugoutput="no">
        <!--- Generate a clean feed by suppressing white space and debugging information. --->
        <cfprocessingdirective suppresswhitespace="yes">
            <!--- Generate the JSON feed as a JavaScript function. --->
            <cfcontent type="application/xml">
    
            <cffunction access="private" name="getRss" returntype="any" >
                <cfargument name="rssFeedUrl">
    
                <!--- Read in the rss from the url provided --->
                <cfhttp method="get" url="#rssFeedUrl#" result="rssFeedData">
                <cfreturn rssFeedData.fileContent>
            </cffunction>
    
            <cfscript>
                if(!IsDefined('feed')){
                    feed = "";
                } // if
    
                // this is an example server-side proxy to load feeds
                if(feed.trim() == ""){
                    //theJSON = SerializeJSON('Elijah no loading occured');
                    xml = 'Elijah no loading occured';
                }
                else{
                    if(FindNoCase(feed, 'http') == 0){
                        // Call to get the xml from the rss feed
                        xml = XmlParse(getRss(feed));
                        xml = ReplaceNoCase(xml, '<content:encoded>', '<content>');
                        xml = ReplaceNoCase(xml, '</content:encoded>', '</content>');
                        xml = ReplaceNoCase(xml, '</dc:creator>', '</author>');
                        xml = ReplaceNoCase(xml, '<dc:creator', '<author');
                    } // if
                } // if
            </cfscript>
        </cfprocessingdirective>
        <cfoutput>#xml#</cfoutput>
    So far I am able to specify in the add Rss Feed some feeds that will render, but some feeds do not register as valid with the Rss Feed example. Are all feeds supose to work in this or is there something else that I am missing?

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi