We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 14222
    • 55 Posts
    Bonjour,

    Je viens d’installer ce snippet, j’ai placer cette commande [!AnythingRating? &define=`1` &atrGrp=`grpName`!] en haut de ma page et celle ci dans mon contenu [!AnythingRating? &atrGrp=`visiteurs` &atrId=`[*id*]`!].
    En résultat, j’obtiens un message d’erreur :
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Table ’XXXXXXXXXX.modx_atRating_visiteurs’ doesn’t exist »
    SQL: SELECT rating_id as ’params’, rating as ’nbStars’, lastIP as ’atrTpl’, nbIP, voteDate as ’endDate’ FROM modx_atRating_visiteurs WHERE id = ’1’
    Ou est le problème ?

    EDIT : Si j’attribue un groupe a la valeur "&atrGrp" (&atrGrp=`visiteurs`)dans la commande en top, je n’ai plus d’erreur SQL, mais le snippet ne s’exécute pas :/
    ---------------------------------
    I just installed this snippet, I put this command at the top of my page [!AnythingRating? &define=`1` &atrGrp=`grpName`!] and in my content [!AnythingRating? &atrGrp=`visiteurs` &atrId=`[*id*]`!].
    As a result, I get an error message:
    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « Execution of a query to the database failed - Table ’XXXXXXXXXX.modx_atRating_visiteurs’ doesn’t exist »
    SQL: SELECT rating_id as ’params’, rating as ’nbStars’, lastIP as ’atrTpl’, nbIP, voteDate as ’endDate’ FROM modx_atRating_visiteurs WHERE id = ’1’
    Where’s the problem ?

    EDIT : If I put a group is set to "& atrGrp" (&atrGrp=`visiteurs`) in the top command, I have no SQL error, but the snippet is not running :/

    it’s really hard to access the website today sad
      • 5811
      • 1,717 Posts
      Vous devez utilisez le meme groupe dans l’appel de snippet de définition (&define=`1`) et celui de chaque item (&atrId=`[*id*]`)
      Si besoin supprimer sous phpmyadmin la table "modx_atRating_visiteurs" et recommencer.
      Voir aussi le site de démo indiquer dans ma signature.
      ===============================================================================================================
      You should use the same groupe name in the definition snippet call (&define=`1`) and inside the item snippet call (&atrId=`[*id*]`)
      If needed with phpmyadmin remove the "modx_atRating_visiteurs" table and try again.
      See also the demo site indicated in my signature.
        • 14222
        • 55 Posts
        Merci, je l’avais compris en relisant le topic... mais même après rectification et suppression de la table SQL, pas de résultat

        ---
        Thank you, I had understood by reading the topic ... but even after correction and deletion of the SQL table, no result
          • 14222
          • 55 Posts
          Pas de support ?

          No support?
            • 5811
            • 1,717 Posts
            Under firebug do you see any javascript error ?
            Could you send me by Personal Message the url address of your site where I can see the page ? Thks.
              • 14222
              • 55 Posts
              Non rien sous firebug version 1.4.2
              nothing under firebug...
                • 14222
                • 55 Posts
                Bonjour,

                Est-ce que je peux avoir un support ou dois-je me débrouiller seul ?
                --------
                hi,
                Can I have a support or I have to manage alone?
                  • 5811
                  • 1,717 Posts
                  You haven’t the css and the js files linked to your file. So it can’t work.

                  Adds <base href="[(site_url)]"></base> in the header of your template.
                  After that if you haven’t the files linked, for understand do as follow:

                  In the file classes/anythingRating.class.inc.php replace the lines 37-42:
                        // adds the anythingRating js file
                        $jsf = '<script src="'.$this->config['base'].'js/anythingRating.js" type="text/javascript"></script>';
                        $modx->regClientStartupScript($jsf);
                  
                        // adds the anythingRating css file
                        $modx->regClientCSS($this->config['atrCss']);

                  by:
                        // adds the anythingRating js file
                        $jsf = '<script src="'.$this->config['base'].'js/anythingRating.js" type="text/javascript"></script>';
                  echo "<h3>jsf=".$jsf."</h3>";
                        $modx->regClientStartupScript($jsf);
                  
                        // adds the anythingRating css file
                  echo "<h3>atrCss=".$this->config['atrCss']."</h3>";
                        $modx->regClientCSS($this->config['atrCss']);


                  Check the values provided by the echo lines and check the presence of the files.
                  If nothing is provided that means that the snippet is not call with &define=`1` on the page or that you don’t call correctly the snippet. In this case check the snippet call.

                  Otherwise, as I am busy, I have very few time to support you at this moment.
                    • 14222
                    • 55 Posts
                    Quote from: coroico at Aug 14, 2009, 03:58 AM

                    Otherwise, as I am busy, I have very few time to support you at this moment.

                    OK... en d’autre mots : débrouille toi tout seul
                    Juste pour info:
                    Adds <base href="[(site_url)]"></base> in the header of your template.
                    La ligne avait été ajouté ajouté lors de nos échanges MP, sans résultat.
                    In the file classes/anythingRating.class.inc.php replace the lines 37-42:
                    aucun effet.
                    If nothing is provided that means that the snippet is not call with &define=`1` on the page or that you don’t call correctly the snippet. In this case check the snippet call.
                    Si un copier/coller de l’appel directement issue du wiki fait que l’appel soit mauvais, il faut revoir la doc, hein !
                    J’ai re-téléchargé le snippet, re uploadé dans le dossier "/assets/snippets/", placé l’appel directement sur le groupe Administrator. Aucun résultat.

                    Merci quand même.
                      • 11055 ☆ A M B ☆
                      • 3,112 Posts
                      Quote from: alhvi at Jan 10, 2009, 11:39 PM

                      Quote from: coroico at Nov 13, 2008, 05:37 AM

                      @alhvi

                      I don’t know why but inside the anythingRating.css file for selectors : .star-rating a, .star-rating .current-rating replace left:0; by left:-50px;

                      Thanks a lot for your help!! It’s kind of weird, maybe something in another css file is causing this but don’t know what it could be.

                      When I did what you said the current rating position was fixed but .star-rating a got screwed up. So I ended up by splitting the clause and leaving .star-rating a as it was originally and changing left: -50px in .current-rating. This was for the article listing with Ditto. When I went to see an article by itself, the position was wrong again. So I made two different css files, one for each view and played a little with the css to tune things up.

                      Weird, weird, weird. undecided

                      But now it’s working, thanks a lot for your help!!!! grin


                      I just want to clear the code, since your post hide the clue :p

                      From:
                      .star-rating a, 
                      .star-rating .current-rating{
                        position:absolute;
                        top:0;
                        left:0;
                        text-indent:-1000em;
                        height:25px;
                        line-height:25px;
                        outline:none;
                        overflow:hidden;
                        border: none;
                      }

                      Be:
                      .star-rating a {
                        position:absolute;
                        top:0;
                        left:0;
                        text-indent:-1000em;
                        height:25px;
                        line-height:25px;
                        outline:none;
                        overflow:hidden;
                        border: none;
                      }
                      
                      .star-rating .current-rating{
                        position:absolute;
                        top:0;
                        left: -30px; <<== I only change this
                        text-indent:-1000em;
                        height:25px;
                        line-height:25px;
                        outline:none;
                        overflow:hidden;
                        border: none;
                      }
                        Rico
                        Genius is one percent inspiration and ninety-nine percent perspiration. Thomas A. Edison
                        MODx is great, but knowing how to use it well makes it perfect!

                        www.virtudraft.com

                        Security, security, security! | Indonesian MODx Forum | MODx Revo's cheatsheets | MODx Evo's cheatsheets

                        Author of Easy 2 Gallery 1.4.x, PHPTidy, spieFeed, FileDownload R, Upload To Users CMP, Inherit Template TV, LexRating, ExerPlan, Lingua, virtuNewsletter, Grid Class Key, SmartTag, prevNext

                        Maintainter/contributor of Babel

                        Because it's hard to follow all topics on the forum, PING ME ON TWITTER @_goldsky if you need my help.