mglasser
Forum Replies Created
-
Forum: Plugins
In reply to: [EZ SQL Reports Shortcode Widget and DB Backup] Compatibility with php 7Thanks for the update. However, I still get the following errors when WPEngine checks the PHP7 compatibility. There are 25 of the user of mysql_ and one related to preg_replace (line 358). I do not know PHP, so are these statements inside of an IF that only executes when needed for backward compatibility?
FILE: /nas/content/live/hedwforum/wp-content/plugins/elisqlreports/index.php
————————————————————————————————————–
FOUND 26 ERRORS AFFECTING 26 LINES
————————————————————————————————————–
196 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
197 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
219 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
221 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
222 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
224 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
229 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
231 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
232 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
234 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
286 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
288 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
295 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
296 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
298 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
305 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
306 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
307 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
315 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
324 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
342 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
352 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
354 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
358 | ERROR | preg_replace() – /e modifier is deprecated since PHP 5.5 and removed since PHP 7.0
650 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
653 | ERROR | Extension ‘mysql_’ is deprecated since PHP 5.5 and removed since PHP 7.0 – use mysqli instead.
————————————————————————————————————–Forum: Plugins
In reply to: [Swift SMTP (formerly Welcome Email Editor)] PHP7 errorI second this request. I would rather not make changes to the plugin code that may be overwritten on next update. I think the fix is to change “mysql_real_escape_string” to “mysqli_real_escape_string”, but the parameters are different, so I am not sure the complete change. Here is the offending code….
function sb_we_get_superglobal($array, $key, $default=”, $escape=false, $strip_tags=false) {
if (isset($array[$key])) {
$default = $array[$key];
if ($escape) {
$default = mysql_real_escape_string($default);
}If someone can provide the correct code here, I guess I could edit the plugin and then hope the next upgrade has the same change.
Forum: Plugins
In reply to: [EZ SQL Reports Shortcode Widget and DB Backup] Compatibility with php 7Eli, love the plugin. Has there been any progress on making the plugin PHP 7 compatible?
Forum: Plugins
In reply to: [EZ SQL Reports Shortcode Widget and DB Backup] Access for Editors?Yes, I can see that I can add to dashboard, but it returns about 3,000 records, so I do not want that to run every time. I was hoping it would be available on the dashboard but only run on demand (when clicked). I just noticed that I can collapse the report on the dashboard, so that should be sufficient. I will just hope that it does not run the query if it is collapsed, since that would be an unnecessary performance hit.
Thanks for the quick reply and the plugin.
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorThanks for the great support in tracking this down.
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorI am also still curious where all the post type metadata is kept, if it is not in the database somewhere.
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorWith new release and using author=this in all 3 ABC tests, the answers come back with the proper number 12. I also got my original question to work with the following code.
[for type=all status=any] Post type: [each slug] Post count: [loop-count author=this] [/for]
I would also point out that the debug=true seems to show the debug output even when the code is placed between [note][/note]. I do not know if shortcodes are always processed between the [note], but that is what I used to comment out various code snippets.
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorProgress. I have got the answer of 12 for the hedwconference post type, but only for A and B. When the B logic is put inside the [for] it does not work. If I use author=this I get the right answer of 12 and if I remove it, then I get 17 for AB, but still zero for C.
A: 12
B: 12
C: Count post type: Conference (0 )A: [loop type=hedwconference status=any debug=true author=this][/loop][loop-count] B: [loop-count type=hedwconference debug=true author=this] C: [for type=hedwconference] Count post type: [each name] ([loop-count type=hedwconference debug=true author=this] ) [/for]
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorHere are more results from earlier requests. I changed the ABC tests to look at type=page.
A: [loop type=page status=any debug=true][/loop][loop-count] B: [loop-count type=page debug=true] C: [for type=page] Count post type: [each name] ([loop-count debug=true]) [/for]
This resulted in the following. Note that I have authored 65 pages.
A: 106 B: 102 C: Count post type: Page (102)
In the previous post I mentioned the number 2,000. That is the total number of all post types in my database. That number is misleading since our ABC test was only looking at hedwconferencem which there would be only 17 (12 authored by me). I was just trying to figure out where such a high number (459) would come from.
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorHere is the debug output from your last [for] suggestion. I compared it to the same code type=post and the only important difference I see is that my custom type has “[exclude_from_search] => 1”, but I may not be looking for the same things you are. I am also curious where all these post type attributes are stored. I am an SQL guy, so if these are in the database somewhere I think I could compare all the post types and find the differences.
Also note that you will see in the debug the actual post type I have been using is “hedwconference” with a label of “conference”. All the testing I have done with your code has been using the proper hedwconference post type. It just was not important to correct earlier in this thread.
Array ( [hedwconference] => stdClass Object ( [labels] => stdClass Object ( [name] => Conferences [singular_name] => Conference [add_new] => Add Conference [add_new_item] => Add New Conference [edit_item] => Edit Conference [new_item] => New Conference [view_item] => View Conference [search_items] => Search Conferences [not_found] => No Conferences Found [not_found_in_trash] => No Conferences Found in Trash [parent_item_colon] => [all_items] => Conferences [archives] => Conferences [insert_into_item] => Insert into post [uploaded_to_this_item] => Uploaded to this post [featured_image] => Featured Image [set_featured_image] => Set featured image [remove_featured_image] => Remove featured image [use_featured_image] => Use as featured image [filter_items_list] => Filter posts list [items_list_navigation] => Posts list navigation [items_list] => Posts list [menu_name] => Conferences [edit] => Edit [view] => View Conference [parent] => Parent Conference [name_admin_bar] => Conference ) [description] => Conferences [public] => 1 [hierarchical] => [exclude_from_search] => 1 [publicly_queryable] => 1 [show_ui] => 1 [show_in_menu] => 1 [show_in_nav_menus] => 1 [show_in_admin_bar] => 1 [menu_position] => [menu_icon] => [capability_type] => page [map_meta_cap] => 1 [register_meta_box_cb] => [taxonomies] => Array ( ) [has_archive] => 1 [rewrite] => Array ( [slug] => hedwconference [with_front] => 1 [pages] => 1 [feeds] => 1 [ep_mask] => 1 ) [query_var] => hedwconference [can_export] => 1 [delete_with_user] => [_builtin] => [_edit_link] => post.php?post=%d [label] => Conferences [name] => hedwconference [cap] => stdClass Object ( [edit_post] => edit_page [read_post] => read_page [delete_post] => delete_page [edit_posts] => edit_pages [edit_others_posts] => edit_others_pages [publish_posts] => publish_pages [read_private_posts] => read_private_pages [read] => read [delete_posts] => delete_pages [delete_private_posts] => delete_private_pages [delete_published_posts] => delete_published_pages [delete_others_posts] => delete_others_pages [edit_private_posts] => edit_private_pages [edit_published_posts] => edit_published_pages [create_posts] => edit_pages ) ) )
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorHere are the results. I cannot see where the 459 is coming from, since there are over 2000 posts with over 700 authored by me. The 17 in B is the number of conferences, with 12 of them authored by me. Also note that I tried your ABC code before I upgraded the plugin and A returned a value of 17 also.
A: 459
<hr>
B: 17
<hr>
C: 0I only see one debug output at the top of the page.
Array ( [post_type] => Array ( [0] => conference ) [ignore_sticky_posts] => 1 [post_status] => Array ( [0] => publish ) [posts_per_page] => -1 )
I added “author=this” to the loop in B. It returned a zero for the count and also produced another debug output.
Array ( [post_type] => Array ( [0] => conference ) [ignore_sticky_posts] => 1 [author__in] => Array ( [0] => 9999 ) [post_status] => Array ( [0] => publish ) [posts_per_page] => -1 )
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorI have updated to 3.5.1 and your latest code returns 0 for Total and for current user. But does show the post name.
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorI am sorry that I forgot to mention that the database numbers are just for me as the author, so it is not an author issue (probably).
I tried the loop with type=conference and it returned 12 items, which matches the database. I also added status=any in the [for] and it had no impact on any results.
Forum: Plugins
In reply to: [Custom Content Shortcode] Counts of post types for authorThanks for the plugin update, but it is not quite working. The results I see in the database do not match the results from your sample code.
From the database table wp_posts and field post_type …
attachment 371
xxxxconference 12
xxxxpresentation 261
nav_menu_item 52
page 64
post 4
reply 40
revision 5
topic 23
wpcf7_contact_form 4From your results …
Post type: Advanced Custom Fields
Post count: 0Post type: Forum
Post count: 0Post type: Conference
Post count: 0Post type: Presentation
Post count: 0Post type: Page
Post count: 63Post type: Post
Post count: 4Post type: Reply
Post count: 40Post type: Topic
Post count: 23Post type: Logs
Post count: 0Post type: Contact Form
Post count: 0Forum: Plugins
In reply to: [Sidebar Login] Add tag for %homeurl%I would also like the functionality of the %homeurl%. This seems so basic, I feel like it can already do this somehow and I must be configuring it wrong.