We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25551 ☆ A M B ☆
    • 1,231 Posts
    Quote from: rossco at Apr 25, 2009, 04:43 AM

    Hello, I want to use this great snippet for several different features on a website but I have one question. Can I put the ratings in to a separate database? The reason I would like a separate database is because this could potentially make the modx database become very large in terms of listings of tables.

    I want to allow each user their own ratings area which works great but this is creating a whole table per user.

    modx_atRating_test
    modx_atRating_test1
    modx_atRating_test2
    modx_atRating_test3
    modx_atRating_test4

    etc....

    This will eventually make the modx database a bit annoying to scroll through so I thought that it would be good to have the ratings in a different database, on the same server. Is this possible with little hacking? Thanks!

    I asked this months ago and wondered if anyone has managed to use a separate DB for the ratings?
      Ross Sivills - MD AugmentBLU Edinburgh, Scotland UK
      AugmentBLU - MODX Partner

      BLUcart - MODX Revolution E-Commerce & Shopping Cart
      • 15116
      • 12 Posts
      Anyone encountered the similar experience below before?

      1. Defined a new group with atrGrp=`test` (example)
      2. Voted once, worked great.
      3. Deleted the table prefix_atRating_test from database.
      4. Refresh site (by right, the snippet will create the table again and allow u to vote, but in my case, the table is created but it does not allow users to vote at all)
        Juz

        Failure is not falling down, it is not getting up again. - Mary Pickford
        • 19741
        • 90 Posts
        @juzooi : Please delete cookies from your site and try "AnythingRating" again.
          Bye,
          Mithrandir
          • 15116
          • 12 Posts
          Quote from: Mithrandir at Oct 15, 2009, 03:20 PM

          @juzooi : Please delete cookies from your site and try "AnythingRating" again.

          that worked like a magic charm!

          thank you laugh
            Juz

            Failure is not falling down, it is not getting up again. - Mary Pickford
            • 23183
            • 102 Posts
            I had Anthing rating set up and wokring on a local XAMPP server now I have gone to a live server I am getting the folowing error:

            « MODx Parse Error »
            MODx encountered the following error while attempting to parse the requested resource:
            « Execution of a query to the database failed - Table ’fashio51_fashionsauce.modx_atRating_stores’ doesn’t exist »
            SQL: SELECT rating_id as ’params’, rating as ’nbStars’, lastIP as ’atrTpl’, nbIP, voteDate as ’endDate’ FROM modx_atRating_stores WHERE id = ’1’
            [Copy SQL to ClipBoard]

            It seems to be putting my database name ’fashio51_fashionsauce’ as part of the table name. Anyone know why this is happening?

            Thanks
              • 23183
              • 102 Posts
              Strangely enough it just seems to have randomly stopped bringing up that error message huh So all is ok for now
                • 23183
                • 102 Posts
                I have Anything rating installed and it was working but now I seem to have run into a probelm and Im not sure whats causing it. I have anything rating on three pages and it is working fully on one, but on the other two (which have a TXNewsletters snippet on the page) I get this error:

                « MODx Parse Error »
                MODx encountered the following error while attempting to parse the requested resource:
                « PHP Parse Error »
                 
                PHP error debug
                  Error: 	Invalid argument supplied for foreach()	 
                  Error type/ Nr.: 	Warning - 2	 
                  File: 	mysite/assets/modules/txnewsletters/txnewsletters.inc.php	 
                  Line: 	630	 
                  Line 630 source: 	foreach($modx->TXNewsletters['fields'] as $id => $field) { 	 
                 
                Parser timing
                  MySQL: 	0.0062 s	(16 Requests)
                  PHP: 	0.0836 s


                It seems strange that the error relates to TXNewsltter snippet but only shows when I click on the rating stars (the rating shows as ’undefined’ but does register)

                Ive racked my brains to think what I have changed since I previously had it all working. One thing I thought of was maybe Friendly URLs but I think it may have even been working with these enable for a shot while.

                Anyone have any ideas?

                Thanks
                  • 23183
                  • 102 Posts
                  Anyone help me with this one?

                  The instance of anything rating works on one page that is www.mysite.com/blogs but not one the page for www.mysite.com/blogs/blogname or www.mysite.com/stores/storename

                  all three instances work fine if I switch off Frindly URLs, so this must be whats causing the problem. I asked it the TXNewsletters support thread and was told that works fine with FURLs so dont think its that causing the error.

                  I have <base="[(site_url)]/> in my <head> and global $modx; in the anythingrating include.

                  What else could be causing it to retun the erro and ’undefined’? my snippet call on the blog pages that arent working are: [!anythingRating? &define=`1` &atrGrp=`blogs`!] at the top of the page and [!anythingRating? &atrGrp=`blogs` &atrId=`[*id*]`!]

                    • 23183
                    • 102 Posts
                    I think Ive solved the above problem - I think it was a problem with my <bod> tags, somehow two an sneaked in oops! So it must not have been registing the base tag!

                    Thanks for this great snippet smiley
                      • 23183
                      • 102 Posts
                      Is there a a way to place the images of the stars in the top rated table and dissablethe click on them? Instead of having text saying 5/5 stars etc.

                      If not what is the decimal place set to on the ratings? Is it always rounded off e.g 4, 4.25, 4.5, 4.75, 5. so I could created images to display each possible rating number? Or would there be to many possibilities?