SFGolfer
Forum Replies Created
-
Thank you. That worked perfectly.
Well, through some blind luck, I was able to achieve my goal of having NextGen still work in the posts but have it “not work” on a single page.
Pasted this into functions.php
function disable_nextgen($content) { if (is_page('Name of Page')) { define('NGG_SKIP_LOAD_SCRIPTS', TRUE); return $content; } else { return $content; } } add_filter('the_content', 'disable_nextgen', 9);
How this is able to work is beyond my understanding especially since the NextGen source files (JS, CSS) still gets loaded into the page’s source code.
Forum: Hacks
In reply to: Access database outside of WordPress 3.9Thank you. That worked.
I will replace $null within my code to be the variable names of the values being passed.
Forum: Hacks
In reply to: Access database outside of WordPress 3.9It seems using $wpdb>prepare does not work outside of WordPress.
Omitting $wpdb>prepare in my query now works but I’d sure like to know why it worked before and not now if it is included.
$tourney = $wpdb->get_results( "SELECT * FROM database WHERE player_name='".$player."' And season='".$season."' And status='' ORDER BY date DESC", ARRAY_N );
That fixed it. Thank you.
Forum: Fixing WordPress
In reply to: 3.7 Automatic Updates – Logging?Thanks for the links but I’m not looking for a listing of new features or closed tickets.
I just want a simple list of what WordPress changed on my site.
From a usability standpoint, I expect there to be a new section in the admin area relating to automatic updates with a log feature. The log says, “here’s what I did, what I changed and when I changed them”. If not in the admin area then somewhere where I can FTP and look at a log.
The background updating is fine but tell me what you’ve changed. Get granular. Hold yourself accountable. This helps with troubleshooting in other areas (themes, plugins, customizations, etc) should something go awry with one of these updates.
Please pass this on the Dev team for future consideration.
Thanks.
Forum: Fixing WordPress
In reply to: 3.7 Automatic Updates – Logging?Thanks but not quite what I was looking for. Email alerts doesn’t say anything more than that something was done.
I’m looking for more accountability on WordPress’ part by telling me exactly what it was that you did to my website.
Similar analogy would be a handyman saying that he replaced light bulbs in your house but is not telling you which ones he replaced.
Update on this.
I reinstalled WP-Table and ran its uninstaller which deleted the old WP-Table tables. Having both WP-Table and TablePress installed didn’t hurt anything on the front end but my application was reading the old tables which of course was no longer being updated by TablePress.
I then rewrote my custom application to automatically extract the post id from tablepress_tables (in wp_options) relating to my $season variable and then use WordPress’ JSON decoder (json_decode) to fill an array from the post id (in wp_posts).
It all works like a charm.
I have a couple of follow up questions to this.
1) I deleted the WP-Table plugin via WordPress’ Plugins area. I forgot about WP-Table having an uninstall option. Is there any danger in not using its uninstaller? Is there any danger in reinstalling the plugin and then running the uninstaller? All the tables appear correctly otherwise.
2) As stated above, I am using a custom function that queries the Tables depending on the season:
get_option(“wp_table_reloaded_data_”.$substr($season, -2));
This works great except when the table id is:
wp_table_reloaded_data_1
The table ID 1 displays correctly both in the admin area and the front end via the shortcode. But if I were to use PHPMyAdmin and look at the above field, it contains data for a completely different table (in my case, table ID 13); thus, the results for get_option table ID 1 is incorrect because the field has incorrect data.
I should state that there is a field named wp_table_reloaded_data_13 and it does contain table 13’s data. The field wp_table_reloaded_data_1 should contain table 1’s data but it does not.
How do I get table ID 1’s data into wp_table_reloaded_data_1?
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] bold font problemYou want to use font-weight.
Forum: Fixing WordPress
In reply to: Query finding names beginning with A-DUpdate.
I get this when using $wpdb->show_errors();
WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ”REGEXP \’^[A-E].*$\”) GROUP BY player_name ORDER BY player_name ASC’ at line 1]
SELECT player_name FROM pcgcwp_participants_database WHERE (player_name NOT LIKE ‘%team%’ AND player_name ‘REGEXP \’^[A-E].*$\”) GROUP BY player_name ORDER BY player_name ASCForum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Show ALL optionNever mind. I simply added it to the end:
“aoColumnDefs”: [ { “bSortable”: false, “aTargets”: [ 7 ] }, { “asSorting”: [ “desc”, “asc” ], “aTargets”: [ 1,2,3,4,5,6 ] } ], “iDisplayLength”: -1
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Show ALL optionGreat – that snippet worked.
Now I need to add it to an existing Custom Command:
"aoColumnDefs": [ { "bSortable": false, "aTargets": [ 7 ] }, { "asSorting": [ "desc", "asc" ], "aTargets": [ 1,2,3,4,5,6 ] } ]
Any ideas?
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Show ALL optionThe plugin works nicely. Thanks!
Now for another request. Is there a way to have the list default to “All”?
In other words, have the full table shown at which point the visitor can change the number shown if desired.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] Lock tables to prevent updatingThat seems to work.
Are there other capabilities to restrict access to a tables’s options:
Table Manipulation
Table Options
DataTables