Ninos
Forum Replies Created
-
Forum: Plugins
In reply to: [Email Before Download] Contact Form 7 UpdateHey there,
seems in the html-function you changed latest insertBefore() to appendChild(). Is it possible to do it with all insertBefore()-function in the html-function of the file /includes/class-email-before-download-form.php?
So change:public function html() { $raw = do_shortcode("[contact-form-7 id=\"$this->form_id\" ]"); $remove = array('<ebd />','<ebd/>','<ebd_left />','<ebd_left/>'); $raw = str_replace($remove, "", $raw); $form = new DOMDocument; libxml_use_internal_errors(true); $form->formatOutput = true; $form->loadHTML(mb_convert_encoding($raw, 'HTML-ENTITIES', 'UTF-8')); $form->removeChild($form->doctype); $form->replaceChild($form->firstChild->firstChild->firstChild, $form->firstChild); $parent = $form->getElementsByTagName('form')->item(0); $formID = $parent->getAttribute('action'); $tmp = explode('#', $formID); $this->atts['form_id'] = $tmp[1]; $paragraph = $parent->getElementsByTagName('div')->item(0); foreach ($this->download_id as $key => $id) { if(count($this->download_id) == 1) { $item = $this->hide_download_dom_obj($id, $key); }else{ $item = $this->download_dom_obj($id, $key); } $item = $form->importNode($item, true); $paragraph->parentNode->insertBefore($item, $paragraph); } foreach ($this->atts as $name => $value) { if($value){ $item = $this->hidden_dom_obj($name,$value); $item = $form->importNode($item, true); $paragraph->parentNode->insertBefore($item, $paragraph); } } if($this->atts['hide_form'] == 'yes'){ $script = $this->jquery_dom_obj(); $item = $form->importNode($script, true); $parent->appendChild($item); } libxml_clear_errors(); return $form->saveHTML(); }
to
public function html() { $raw = do_shortcode("[contact-form-7 id=\"$this->form_id\" ]"); $remove = array('<ebd />','<ebd/>','<ebd_left />','<ebd_left/>'); $raw = str_replace($remove, "", $raw); $form = new DOMDocument; libxml_use_internal_errors(true); $form->formatOutput = true; $form->loadHTML(mb_convert_encoding($raw, 'HTML-ENTITIES', 'UTF-8')); $form->removeChild($form->doctype); $form->replaceChild($form->firstChild->firstChild->firstChild, $form->firstChild); $parent = $form->getElementsByTagName('form')->item(0); $formID = $parent->getAttribute('action'); $tmp = explode('#', $formID); $this->atts['form_id'] = $tmp[1]; $paragraph = $parent->getElementsByTagName('div')->item(0); foreach ($this->download_id as $key => $id) { if(count($this->download_id) == 1) { $item = $this->hide_download_dom_obj($id, $key); }else{ $item = $this->download_dom_obj($id, $key); } $item = $form->importNode($item, true); $paragraph->parentNode->appendChild($item); } foreach ($this->atts as $name => $value) { if($value){ $item = $this->hidden_dom_obj($name,$value); $item = $form->importNode($item, true); $paragraph->parentNode->appendChild($item); } } if($this->atts['hide_form'] == 'yes'){ $script = $this->jquery_dom_obj(); $item = $form->importNode($script, true); $parent->appendChild($item); } libxml_clear_errors(); return $form->saveHTML(); }
I have lots of styling-errors because of insertBefore()..
Forum: Plugins
In reply to: [Email Before Download] Contact Form 7 Update@mandsconsulting I also recommend changing /includes/class-email-before-download-form.php:61 from:
$paragraph->parentNode->insertBefore($item, $paragraph);
to
$paragraph->parentNode->appendChild($item);
If possible I would change all insertBefore to appendChild.
Reason:
WP sometimes adds a p-tag around your hidden fields (e.g. when using page builders). So if p-tag is before name, email and submit-field you’ll mostly get styling errors. p-tag on the end will not destroy much as on beginning of the form-fields..Forum: Plugins
In reply to: [Email Before Download] Contact Form 7 Updatep-tag class can be fixed by changing /includes/class-email-before-download-form.php:42 from:
$p->setAttribute('class', 'cf7_input');
to
$p->setAttribute('class', $p->getAttribute('class') . ' cf7_input');
Forum: Plugins
In reply to: [Email Before Download] No data foundSeems fixed since latest 5.1.1. Thank you! ??
Forum: Plugins
In reply to: [Email Before Download] Contact Form 7 UpdateBTW: Seems this bug is available since v5.0…
Forum: Plugins
In reply to: [Email Before Download] No data foundForum: Plugins
In reply to: [Email Before Download] Contact Form 7 UpdateHey there,
still have the same problem with cf7 5.0 and before download 5.1 (all latest). Forms are currently wrong.I get following html-code directly after the form-tag:
<p><label class="ebd_input"><input name="ebd_downloads[]" value="10729|Trends im Affiliate-Marketing 2018" type="hidden"></label></p>
Before there was no p-tag, and so no line-break.Also following cf7-html:
<p class="name-download">Ihr Name<br /> [text your-name class:name-input id:name]</p> <p class="email-download">Ihre E-Mail-Adresse*<br /> [email* your-email class:email-input id:email]</p> <p class="submit-download">[submit "Download-Link anfordern" class:submit-pc]</p>
will now be rendered to this:
<p class="cf7_input" id="downloadinputform">Ihr Name<br><span class="wpcf7-form-control-wrap your-name"><input name="your-name" value="" size="40" class="wpcf7-form-control wpcf7-text name-input" id="name" aria-invalid="false" type="text"></span></p> <p class="cf7_input">Ihre E-Mail-Adresse*<br><span class="wpcf7-form-control-wrap your-email"><input name="your-email" value="" size="40" class="wpcf7-form-control wpcf7-text wpcf7-email wpcf7-validates-as-required wpcf7-validates-as-email email-input" id="email" aria-required="true" aria-invalid="false" type="email"></span></p> <p class="cf7_input"><input value="Senden" class="wpcf7-form-control wpcf7-submit" type="submit"><span class="ajax-loader"></span></p>
As you can see, the p-classes are completely wrong.
Hope you can fix it asap ??
Forum: Plugins
In reply to: [WP Hash Password] WooCommerceNope, I’m replacing the function, see:
https://github.com/WordPress/WordPress/blob/master/wp-includes/pluggable.php#L2076See also:
https://codex.www.ads-software.com/Function_Reference/wp_hash_password#NotesForum: Plugins
In reply to: [WP Hash Password] WooCommerceThank you for your feedback. This problem is not part of my plugin. My plugin only replaces the wp_hash_password-function. If woocommerce uses its own function for password hashing I strongly recommend opening a ticket in their issuing system:
https://github.com/woocommerce/woocommerce/issues/Something like that must not happen.
Normally wp_hash_password() must be used, because woocommerce uses the wp_update_user()-function for saving the new user data:
https://github.com/woocommerce/woocommerce/blob/f434fc7d9a1f00363b07c60bde0aa3c0666e46ac/includes/class-wc-form-handler.php#L248
And this function is using wp_hash_password():
https://core.trac.www.ads-software.com/browser/tags/4.7.4/src/wp-includes/user.php#L1760Please retry changing a password and tell me if it’s still md5. Then I’ll investigate. May you checked old user accounts, which were created before my plugin was installed/enabled.
- This reply was modified 7 years, 5 months ago by Ninos.
Hey Marcus,
thanks for your reply. The WP_Query has filters which can be used to extend the query. So WP_Query can also be multisite-ready. You could use following scripts, so you don’t need to code something by yourself for multisite-feature:
https://github.com/ericandrewlewis/WP_Query_Multisite
https://github.com/miguelpeixe/WP_Query_MultisiteI really recommend switching to WP_Query. It’s may a little bit work, but it enhances your compatibility with lots of plugins and also adds flexibility to your queries.
Kindest regards
Forum: Plugins
In reply to: [WP Custom Login] How to use the hooksSorry for the late response. You can use following hooks:
- wp_custom_login_header_before
- wp_custom_login_header_after
- wp_custom_login_footer_before
- wp_custom_login_footer_after
Also you can use a css-file ‘wp-custom-login.css’ in your theme for adding custom css to the login page.
Best regards
Forum: Plugins
In reply to: [Boxers and Swipers] Improve photoswipe loading with data-sizeAh ok, that would be perfect. No stress, atm I’m just changing the relevant code part ??
Forum: Plugins
In reply to: [Boxers and Swipers] Improve photoswipe loading with data-sizeHmm, yeah there you’re right. So then I would do something like that ??
if ($this->foot_count == 0 && ( strstr($contents, '="boxersandswipers"') || apply_filters( 'boxersandswipers_enable_js', false ) )) {
Best regards ??
Forum: Plugins
In reply to: [Boxers and Swipers] Improve photoswipe loading with data-sizePS: Following has better performance:
if ($this->foot_count == 0 && ( strstr($contents, '="boxersandswipers"') || has_post_thumbnail() )) {
Forum: Plugins
In reply to: [Boxers and Swipers] Improve photoswipe loading with data-sizeWow, you’re very fast and thanks you! I have another improvement XD If you’re using boxersandswipers for the thumbnail and you have no images in content (the_content()), then the lib is not loaded. Therefore I added following additional check in /inc/BoxersAndSwipers.php on line 243:
if (strstr($contents, '="boxersandswipers"') && $this->foot_count == 0) {
to
if ( (has_post_thumbnail() || strstr($contents, '="boxersandswipers"') ) && $this->foot_count == 0) {
Best regards ??