rictans
Forum Replies Created
-
“Please disregard rictans’s comment about this. (rictans: No offense meant here!)”
No worries… I was just rambling on at 3am in the morning, but still awake enough to put in a “disclaimer”.
Your latest suggestion worked, so I am now using the DataTables plugin for jQuery “natively”.
I am looking forward to your latest addition to TablePress: importing data by “auto import”:
“Now, you are lucky about the auto import. I’m currently working on a TablePress Extension to add exactly this feature. I might have something ready at the beginning of next week. So, no need to try to do this with some PHP code!”
How are you going to notify users when you are done? Release a new version?
Ric
Tobias…
Getting an error in jquery.dataTables.js: Reference error: jQuery is not defined
—————————————————————–
(function( factory ) {
“use strict”;// Define as an AMD module if possible
if ( typeof define === ‘function’ && define.amd )
{
define( [‘jquery’], factory );
}
/* Define using browser globals otherwise
* Prevent multiple instantiations if the script is loaded twice
*/
else if ( jQuery && !jQuery.fn.dataTable )
{
factory( jQuery );
}
}
——————————————————————
Maybe I have a bad download???Thanks…
Hi Bloggorus,
Sounds like you are using Excel as a database, which its not. Why don’t you create table(s) on the MySQL database (I’m guessing you are using MySQL) and import the data once. But before doing that, you would need to create Add, Delete, Modify web pages to manage the information. It would be similar to what WordPress provides for managing users. I haven’t checked plugins that may meet your needs. There may be one or hire a developer if you are not one yourself. Add, delete and modify stuff is pretty standard. Then you may want something for reporting what you have in the table(s) once in a while too. Anyways… just some comments without knowing exactly what you/your business does (a disclaimer ?? )
I like Tablepress and want to use it on my site(s).
OK… page template… I give it a try… thanks.
OK, I am embarrassed… I don’t think WordPress’ jQuery is running in my installation (which is probably not true so there must be something wrong with what I am doing). In my header.php I have added the following:
<!– ———- My additions to header.php below———- –>
<script type=”text/javascript” charset=”utf-8″ src=”https://www.sohopoints.org/wp-includes/js/DataTables/media/js/jquery.dataTables.js”></script>
<?php wp_enqueue_script(“jquery”); ?>
<style type=”text/css” title=”currentStyle”>
@import “https://www.sohopoints.org/wp-includes/js/DataTables/media/css/demo_table.css”;
</style><script>
jQuery(document).ready(function() {
alert(‘hi’);
});
</script><script type=”text/javascript”>
jQuery(document).ready(function(){
jQuery(‘#table1_id’).dataTable({“aaSorting”:[],”bSortClasses”:false,”asStripeClasses”:[‘even’,’odd’]});
});
</script><!– ———-My additions to header.php above———- –>
I can’t get DataTables running ??
Can you have a quick look, the site is not in “production”… thank you: https://www.sohopoints.org/datatable-page/
Thanks for the link. I have been looking at that already trying to figure things out. According to WordPress documentation:
Query noConflict wrappers
Note: The jQuery library included with WordPress loads in “no conflict” mode. This is to prevent compatibility problems with other javascript libraries that WordPress can load.
In “no-confict” mode, the $ shortcut is not available and the longer jQuery is used. For example:
$(document).ready(function(){
$(#somefunction) …
});Becomes:
jQuery(document).ready(function(){
jQuery(#somefunction) …
});So this means I don’t have to add the following in header.php:
<script type=”text/javascript” charset=”utf-8″ src=”/DataTables/media/js/jquery.js”></script>
Correct?
Thanks for your help and advice… much appreciated. Particularly your prompt replies…
There is a plugin called “dbview”. Are you familiar with it? It says:
Presents the results of a database query in a table. The query can be saved as a view which can then be embedded in any post using a shortcode.
I haven’t tried it yet but will have a look.
I surely take a look at datatables.net but I am not javaScript literate… another thing to learn. I am pressed for time so I am looking for the easy route.
Again… thanks Tobias.
I am trying to build points tracking system whereby earned or used points are displayed on a table like this:
Date Description Debit Credit Balance
Similar to a bank’s account activity web page. So I would have “transactions” in a MySQL table… run the SQL for a particular user, then display them in a table.
Instead of creating my own HTML, I am looking for a plugin that can display the info, have paging, search and sort functions.
Aside: Table borders are set in a css and not a TablePress option? (I’ll admit I am lazy! ??
Thanks.
As I understand how TablePress works, a table can be created and the entries in the table has to be manually entered. Is it possible to create the table first with no entries, then run PHP/SQL code that is in a page template, to populate the table?
Thanks,
Wordpress rookie ??