1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    detp is on a distinguished road

      0  

    Default installing Disqus comments in Sencha Touch /Architect

    installing Disqus comments in Sencha Touch /Architect


    Hi Please I am hoping the sencha guru's can help me with the following problem. I am trying to install disqus comments using its universal javascript code. I am trying to place the script inside the html section of an actionsheet, however I keep on receiving errors and it fails to load the application.

    The code is
    Disqus:
    Code:
    <div id="disqus_thread"></div><script type="text/javascript">var disqus_shortname = 'myafricancanvas'; function() { var dsq = document.createElement('script');dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered byDisqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>
    My Sencha markup is as follows:
    Code:
    Ext.define('MyApp.view.SocialShare', {
        extend: 'Ext.ActionSheet',
        alias: 'widget.Social',
    
    
        config: {
            height: 450,
            html: '<div id="disqus_thread"></div><script type="text/javascript">var disqus_shortname = 'myafricancanvas'; function() { var dsq = document.createElement('script');
    dsq.type = 'text/javascript'; dsq.async = true; dsq.src = 'http://' + disqus_shortname + '.disqus.com/embed.js';(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq); })();</script><noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered byDisqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>', 
            style: 'background:#000;',
            zIndex: 90,
            modal: false,
            scrollable: 'vertical',
            items: [
                {
                    xtype: 'button',
                    docked: 'right',
                    height: 50,
                    itemId: 'shareclose',
                    width: 50,
                    icon: 'addresources/close.png'
                }
            ],
            listeners: [
                {
                    fn: 'onMybutton4Tap',
                    event: 'tap',
                    delegate: '#shareclose'
                }
            ]
        },
    
    
        onMybutton4Tap: function(button, e, options) {
            this.hide();
        }
    
    
    });
    The app thru up the following errors in debug mode:
    HTML Code:
    Uncaught SyntaxError: Unexpected identifier app/view/SocialShare.js?_dc=1345723248496:22Uncaught Error: The following classes are not declared even if their files have been loaded: 'MyApp.view.SocialShare'. Please check the source code of their corresponding files for possible typos: 'app/view/SocialShare.js sencha-touch-all-debug.js:798
    Please I would be extremely grateful if someone can advise how to overcome this problem as I am under extreme pressure. It is probably just a syntax issue.

    I am happy to send the url of the app via PM if required.
    I decided to use a smiley as I dont see to many on the forum lol

    Thanks in advance.

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,789
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    The html is not valid, you have to escape the quotes.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    detp is on a distinguished road

      0  

    Default Disqus installation

    Disqus installation


    Thanks Mitchel

    Here comes a silly question, not quite sure what you mean "escape the quotes" can you pls give an example with the html I provided.

    Promise to add the whole solution for others in the forum.

    Thanks.

  4. #4
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,789
    Vote Rating
    833
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Code:
    html : 'some text here, isn\'t it good?'
    red text is an escaped single-quote
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  5. #5
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    detp is on a distinguished road

      0  

    Default


    Tried escaping quotes but still doesnt seems to be working.
    Code:
    <div id="disqus_thread"></div> <script type="text/javascript"> var disqus_shortname = \'myafricancanvas\'; (function() { var dsq = document.createElement(\'script\'); dsq.type = \'text/javascript\'; dsq.async = true; dsq.src = \'http://\' + disqus_shortname + \'.disqus.com/embed.js\'; (document.getElementsByTagName(\'head\')[0] || document.getElementsByTagName(\'body\')[0]).appendChild(dsq);})();</script> <noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript><a href="http://disqus.com" class="dsq-brlink">comments powered by <span class="logo-disqus">Disqus</span></a>

  6. #6
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    detp is on a distinguished road

      0  

    Default Disqus in Sencha

    Disqus in Sencha


    Can anyone in the forum please provide some help? I have tried a number of solutions none are yet to work. My javascript debugging skills are very limited.

    Thanks

  7. #7
    Sencha User
    Join Date
    Jan 2012
    Location
    London, UK
    Posts
    498
    Vote Rating
    51
    shepsii has a spectacular aura about shepsii has a spectacular aura about shepsii has a spectacular aura about

      0  

    Default


    Why don't you start with the html set to "hello" then put the disqus HTML in piece by piece until it works or breaks? Then you know that the little segment you just added didn't work and needs escaping or formatting correctly inside the single quotes.

  8. #8
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    detp is on a distinguished road

      0  

    Default


    Hi Shepsii

    Thanks I have tried that as well, the Disqus code comes in three parts and requires all the parts.

    I am sure it is something trivial I am missing.

  9. #9
    Sencha User
    Join Date
    Aug 2012
    Posts
    9
    Vote Rating
    0
    detp is on a distinguished road

      0  

    Default Help the needy! Disqus in Sencha

    Help the needy! Disqus in Sencha


    Can somebody on this forum please have the kindness of heart to help with this particular problem.
    Before offering solutions please test or if posible have experienced the problem.

    if I could I would happily pay for premium support.

    Thanks and blessings in advance

Thread Participants: 2

Tags for this Thread

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