uelkfr
Forum Replies Created
-
Forum: Plugins
In reply to: [Posts 2 Posts] if we have posts2posts why taxonomies are needed?I have used posts2posts to replace my custom taxonomies with custom post types. It works very good, topic can be closed.
Forum: Plugins
In reply to: [Posts 2 Posts] if we have posts2posts why taxonomies are needed?I found this CPT-nomies plugin, which is seems an alternative to posts2posts
https://www.ads-software.com/plugins/cpt-onomies/Forum: Plugins
In reply to: [Custom List Table Example] post_parent and hierarchydeleted
Is there any hook to modify data before displaying?
For example, [table id=1 /] is only contain first row (THEAD).
function get_data_from_database($data, $args)
if($args[‘id’] == 1) {
//global $wpdb; // or WP_Query here
// row $data[0] is THEAD, so we start from $data[1]
$data[1][0] = 123; // ID
$data[1][1] = “Product 1”; // Name
$data[1][2] = 500; // Price
}
return $data;
}
add_filter(‘tablepress_data’, ‘get_data_from_database’);Forum: Plugins
In reply to: [XML Sitemap Generator for Google] Warnings on PHP 5.5I have also checked different pages in admin panel. Maybe you have too much hooks, because your warnings are everythere. Try to turn WP_DEBUG = true under WordPress 3.6.1. On Plugins page they are on front of each of plugin.
Own table will not allow to edit row in WordPress’s native editor with ability to use beautiful metaboxes for custom fields (I usually use CMB Library), through revisions will become row-wise linked which can be considered as disadvantage. I want to notice that in new storage format each table would refer to own custom post type and you specify it in table’s settings, if custom post type doesn’t exists TablePress will create and manage it. I don’t ask to change the internal storage format, but to add new format by side, you specify which format to use in table’s settings and you can switch from one format to another, because they are compatible (same two-dimensional array). This suggestions comes from that I regularly create custom post types and dispay them using jquery.DataTables. I agree that this will bring overhead, but it is considered for small tables, you can show notice to the user, if table have big row count, that this storage is not recommended. Own table can be a third storage format ??
Tobias, you can check for shortcode on ‘save_post’ action and cache it in global set_option for all posts or local set_post_meta for single post, then use get_option/get_post_meta in ‘wp_enqueue_scripts’ to conditionally add styles. It can be done very easily.
Forum: Plugins
In reply to: [TablePress - Tables in WordPress made easy] How to expand Tablepress row1) Something like this:
/** * Evaluate "datatables_row_details" parameter and add corresponding JavaScript code, if needed */ function tablepress_add_row_details_js_command( $command, $html_id, $parameters, $table_id, $js_options ) { if ( ! $js_options['datatables_row_details'] ) return $command; $name = str_replace( '-', '_', $html_id ); $datatables_name = "DT_{$name}"; $columns = $js_options['datatables_row_details_columns']; if ( count( $columns ) > 1 ) { // multiple columns case $row_details_output = ''; foreach ( $columns as $column ) { $row_details_output .= '\'<span class="row-details-left row-details-left-column-' . $column . '">\' + headers[' . $column . '] + \': </span><span class="row-details-right row-details-right-column-' . $column . '">\' + row[' . $column . '] + \'</span>\' + '; } $row_details_output .= '""'; // for the last "+" in the JS } else { // single column case $row_details_output = 'row[' . $columns[0] . ']'; } //if($js_options['datatables_row_details_columns_check_empty']) { $check_empty_details = array(); foreach ( $columns as $column ) $check_empty_details[] = "\$tr.children('td:nth-child({$column})').text() != ''"; $check_empty_details = implode(' || ', $check_empty_details); //} $command = <<<JS function {$datatables_name}_row_details(row, headers) { return {$row_details_output}; } var {$name} = $('#{$html_id}'), {$datatables_name}, {$datatables_name}_titles; {$name}.find('thead, tfoot').find('tr').prepend( $('<th class="column-1" />') ); {$name}.find('tbody').find('tr').each(function(index, element) { var \$tr = $(element); var details_button = ''; if({$check_empty_details}) details_button = '<div class="row-details-open" />'; \$tr.prepend( $('<td class="column-1 row-details-toggle">'+details_button+'</td>') ); }); {$datatables_name} = {$name}.dataTable({$parameters}); {$datatables_name}_titles = $.map({$datatables_name}.fnSettings().aoColumns, function(node) { var title = node.sTitle.slice(5, -6); if ( '?' == title ) title = ''; return title; }); {$name}.find('tbody').on( 'click', '.row-details-toggle div', function() { var row = $(this).toggleClass('row-details-open').toggleClass('row-details-close').parents('tr').toggleClass('row-details-row-open')[0]; if ( {$datatables_name}.fnIsOpen( row ) ) {$datatables_name}.fnClose( row ); else {$datatables_name}.fnOpen( row, {$datatables_name}_row_details( {$datatables_name}.fnGetData( row ), {$datatables_name}_titles ), 'row-details' ); } ); JS; return $command; }
It should be an option in short code
datatables_row_details_check_empty=true
. Suggestions are right, but my variable naming not so good, not recommended to use.The problem was solved moving to Form Manager plugin and using PHP mail() instead of WP_mail() in advanced settings. Contact Form 7 doesn’t have this setting.
Sorry. Yes, spinning arrow is due to incorrect XHTML (non-validated). But how it can be syntax error in si-contact-form-admin.php if I haven’t done any modification to it.
Also about spinning arrow, I have disabled Contact Form 7 javascript loading in wp-config.php, and now it is returns HTTP 500 internal error https://www.chelnyucheba.ru/order/#wpcf7-f117-p58-o1
Forum: Themes and Templates
In reply to: Splix Theme, Scaling in IE, and sweatI’m not sure, but maybe it need clear trick.
<div id="wrapper"> <div id="content">...</div> <div id="sidebar">...</div> <div class="clear"></div> </div>
.clear { clear: both; height: 0; overflow: hidden; font-size:0; border: none }
Forum: Themes and Templates
In reply to: Splix Theme, Scaling in IE, and sweatSorry, wrong translation. Not scaling, its called “zoom” in View menu. Zoom to 99% or less. I can’t link my site, because it’s not international (not english). It will become english after a year I suppose. Preview is here. I often change zooming with Ctrl + Mousewheel, to view pics ?? and then I come back to my site, watch it in perplexity.
Forum: Plugins
In reply to: Need a plugin – users can post posts (not through wp-admin)TDO Mini Forms is not updating anymore. I need similar plugin, which allows contributors editing posts not through /wp-admin/post.php?action=edit&post=#, but through custom editorial form, which should containg only edit area with support only p,b,i,img,h3 html tgas and one custom (meta) field called ep_cost that accepts integer values from 0 to 999999, no comments, no pings and trackbacks allowed, allow category and tags selection.