doublesharp
Forum Replies Created
-
Forum: Themes and Templates
In reply to: [Hueman] Navbar not full width until scrollI also still see the issue with all plugins disabled, and I am also using the boxed layout.
It looks like there is some javascript that sets the width after scrolling but not onLoad.
Forum: Plugins
In reply to: [Remote Content Shortcode] Handle invalid HTML@tecbrat, thanks for the email, and I just pushed an update so you may lose your changes.
In version 1.4.2 I added some filters that should accomplish what you’re looking for. Just before the content is passed to phpQuery, I am applying a filter like so:
// include phpQuery include_once( 'inc/phpQuery.php' ); // filter the content $response = apply_filters( 'remote_content_shortcode_phpQuery', $response, $url, $selector, $remove ); // load the response HTML DOM phpQuery::newDocument( $response );
You can filter the response however you would like by adding a filter:
add_filter('remote_content_shortcode_phpQuery', function($response, $url, $selector, $remove) { return 'The new content!'; }, 10, 4);
Forum: Plugins
In reply to: [Remote Content Shortcode] ampersand issueHa, it’s even a pain to write an example of how the encoding is being dealt with because of the encoding of the form content here ??
Forum: Plugins
In reply to: [Remote Content Shortcode] ampersand issueHi @tproli, apologies for not seeing this until now. This was a perpetual annoyance to me too, and I finally fixed it in the latest version 1.4. The shortcode checks the URL to see if it contains “
&
” and if so converts it back to “&
” before making the request. If you flip between the visual/text editor it will still show up as HTML encoded, but it should work just fine.Thanks!
- This reply was modified 8 years ago by doublesharp.
- This reply was modified 8 years ago by doublesharp.
Forum: Plugins
In reply to: [Remote Content Shortcode] Support for HTTPSHi @neuquen7, apologizes I didn’t see your post until now. The plugin does work with SSL, I just checked that I was able to fetch multiple sites over HTTPS.
Here are the curl options that are being set (including to not validate SSL certs that may be invalid or self-signed).
$ch = curl_init(); // set up curl curl_setopt( $ch, CURLOPT_URL, $url ); // the url to request curl_setopt( $ch, CURLOPT_TIMEOUT, $timeout ); // set a timeout curl_setopt( $ch, CURLOPT_RETURNTRANSFER, true ); // return to variable curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false ); // don't verify host ssl cert curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false ); // don't verify peer ssl cert if ( ! empty( $userpwd ) ) curl_setopt( $ch, CURLOPT_USERPWD, $userpwd ); // send a user:password if ( $method == 'POST' ) curl_setopt( $ch, CURLOPT_POST, true ); // optionally POST if ( ! empty( $content ) ) curl_setopt( $ch, CURLOPT_POSTFIELDS, $content ); // send content of tag if ( false === ( $response = curl_exec( $ch ) ) ) // fetch remote contents $error = curl_error( $ch ); // if we get an error, use that curl_close( $ch ); // close the resource
Hi @deep2039 – this sounds like an issue with your server’s configuration. This error is not being generated by the plugin code, it is from a lower level indicating that it is not able to resolve that name through DNS. Make sure that you are able to use curl from the command line to access the content you are trying to embed.
Thanks!
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Broken dependencies JS & CSSThanks @alysko, I’m still working on a brand new version of this plugin and will be sure to include this in the new release.
Hi @vehn67 – I can only load the first image you posted which is indicating an error with a percent sign, so my guess is that maybe you have included PHP tags? The validation code is
eval
‘d so you should just include the code, not the PHP tags.Let me know if you were able to get it working and I will close this ticket, otherwise if you could include an example of your validation function I can try to debug further.
Thanks!
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Validation for Date Range?You should be able to do something like:
for ( $inputs as $input ){ if ( $input['field'] == 'the field i care about' ){ if ( $input['value'] != $value ){ return "the date values don't match"; } break; } }
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Validation on EDITHi @haksuma – it sounds like this might be a bug, the plugin is supposed to ignore the duplicate rule when the post is edited. This will be addressed in the new version of the plugin I am still trying to find time to work on…
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] URL ValidationHi @tzone_51 – yes, you can validate a text field as a URL. You can do this using either a regular expression, or if you want more robust checking you can use a PHP filter.
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] plugin not appearingHI @ddimaio – there should be a new field type called “Validated Field” once the plugin is activated. You should also see global settings in the WP-Admin.
@danieliser – I’m setting this error (
Uncaught TypeError: Cannot set property 'amd' of undefined
) as well on WooCommerce product edit pages. Is this fix included in the latest version?Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Validation for Date Range?Hi dkdelosreyes,
You can – you would just need to convert the values from their string representation to a Datetime or timestamp. For each field the
$value
variable contains the current field’s value, but you can access the other submitted fields using the$inputs
array. Each array element is an array with the keys ‘field’, ‘value’, and ‘prev_value’.Thanks!
Forum: Plugins
In reply to: [Advanced Custom Fields: Validated Field] Undefined index errorsHi @eric3d,
Unfortunately this is one of the issues with the current implementation of Validated Field – it essentially has to copy the properties of the sub field on the parent for the UI to work. This means that for things I haven’t explicitly defined, you will sometimes see a warning if the property wasn’t synced. In this case, it’s the various Number fields that are causing the issue, but there are likely other field types as well. For now I can only suggest ignoring the warnings and this won’t be an issue with the new version once I have time to finish it up.
Thanks!
J