Title: nihil.core's Replies | WordPress.org

---

# nihil.core

  [  ](https://wordpress.org/support/users/nihilcore/)

 *   [Profile](https://wordpress.org/support/users/nihilcore/)
 *   [Topics Started](https://wordpress.org/support/users/nihilcore/topics/)
 *   [Replies Created](https://wordpress.org/support/users/nihilcore/replies/)
 *   [Reviews Written](https://wordpress.org/support/users/nihilcore/reviews/)
 *   [Topics Replied To](https://wordpress.org/support/users/nihilcore/replied-to/)
 *   [Engagements](https://wordpress.org/support/users/nihilcore/engagements/)
 *   [Favorites](https://wordpress.org/support/users/nihilcore/favorites/)

 Search replies:

## Forum Replies Created

Viewing 3 replies - 1 through 3 (of 3 total)

 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [[Social Sharing Toolkit] [Plugin: Social Sharing Toolkit] Fixes for errors – HTML5 themes](https://wordpress.org/support/topic/plugin-social-sharing-toolkit-fixes-for-errors-html5-themes/)
 *  [nihil.core](https://wordpress.org/support/users/nihilcore/)
 * (@nihilcore)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-social-sharing-toolkit-fixes-for-errors-html5-themes/#post-2953755)
 * UP!
    I still get a lot of Javascript errors in the console due to the bad behavior
   of the Facebook Like button.
 * Example
 *     ```
       Unsafe JavaScript attempt to access frame with URL
       http://www.yoursite.com/
       from frame with URL
       http://www.facebook.com/plugins/like.php?channel_url=http%3A%2F%2Fstatic.ak.facebook.com%2Fconnect%2Fxd_arbiter.php%3Fversion%3D11%23cb%3Df51707e84%26origin%3Dhttp%253A%252F%252Fwww.yoursite.com%252Ff3f60f759c%26domain%3Dwww.yoursite.com%26relation%3Dparent.parent&extended_social_context=false&href=http%3A%2F%2Fwww.yoursite.com%2Fexample-page%2F&layout=button_count&locale=en_US&node_type=link&sdk=joey&send=false&show_faces=false&width=90.
       Domains, protocols and ports must match.
       ```
   
 * Any other possible solution???
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [cformsII php mysql help!](https://wordpress.org/support/topic/cformsii-phpmysql-help/)
 *  Thread Starter [nihil.core](https://wordpress.org/support/users/nihilcore/)
 * (@nihilcore)
 * [14 years, 9 months ago](https://wordpress.org/support/topic/cformsii-phpmysql-help/#post-2054891)
 * hi mediatory,
 * sorry my late reply…
    i’m confident you solved the problem on your own, anyway
   to answer your question you just have to dump the ‘wp_cformsdata’ table and then
   look at the sub_id value of the form you are interested to get the value from.
 * if your DB runs on phpmyadmin you can find an “Export” icon in the menu on top!
   
   i hope this could help 🙂
 * bye
 *   Forum: [Plugins](https://wordpress.org/support/forum/plugins-and-hacks/)
    In
   reply to: [cformsII php mysql help!](https://wordpress.org/support/topic/cformsii-phpmysql-help/)
 *  Thread Starter [nihil.core](https://wordpress.org/support/users/nihilcore/)
 * (@nihilcore)
 * [15 years ago](https://wordpress.org/support/topic/cformsii-phpmysql-help/#post-2054711)
 * in the end i did it myself!
    i’ll post the code just in case it can be helpful
   for someone else:
 *     ```
       <?php
       if ( is_single('240')) {
   
       $max = $wpdb->get_var( "SELECT field_val FROM $wpdb->cformsdata WHERE field_name = 'Indica un numero massimo di studenti' AND sub_id = '12' " );
       echo '<span style="float:left;">Maximum number of submissions:<b> ' . $max . '</b></span>';
   
       $registrations = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->cformssubmissions WHERE form_id = '3' " );
   
       $seats = $max - $registrations;
       echo '<br><span style="float:left;">Seats left:<b> ' . $seats . '</b></span>';
       } ?>
       ```
   
 * where:
    › **is_single(‘240’)** is the ID of the post › **‘Indica un numero massimo
   di studenti’** (in english = Set the maximum number of students) is the field
   name of the field in the form that the teachers use to propose lessons to select
   how many students can register to the lesson › **sub_id = ’12’** is the ID where
   the data of the “teacher’s form” has been stored in the DB (to find this number
   you have to enter your phpmyadmin, go to the ‘wp_cformsdata’ table and then print
   or export your ‘sub_id’ – DO THIS ONLY IF YOU KNOW WHAT YOU’RE DOING!) › **form_id
   = ‘3’** is the ID of the form that the students are using to register to the 
   lesson (you can find this one by entering your phpmyadmin, going to the ‘wp_cformssubmissions’
   table and then to form_id – DO THIS ONLY IF YOU KNOW WHAT YOU’RE DOING!) › in
   the end there is the easy math and the printing of the value of the variable!
 * i’ve put everything into an **if** construct because i have a different form 
   for each post, so in my case i’ve had to duplicate the code for each post ID 
   with different values of tables’ ID.
    this code is in the **single.php** file.
 * i know it’s not very automatic but i need it to work in a very short time and
   i will try to improve it later. For the moment it works!
    You can watch it here
   [http://milano.tradeschool.it](http://milano.tradeschool.it)

Viewing 3 replies - 1 through 3 (of 3 total)