Mad Max
Forum Replies Created
-
Forum: Plugins
In reply to: [Download Monitor] Programmatically get file path from idThank you very much for pointing me in the right direction!
Forum: Plugins
In reply to: [Download Monitor] Programmatically get file path from idHello @raldea89 and thanks for the super quick reply!
I’ve tried the methodparse_file_path( $file_path )
of class DLM_File_Manager, but it always return an array with 2 empty elements, if called with my file url that is like thishttps://mysite.ext/download/2378/?tmstv=1678986055
where obviously “download” is the configured endpoint for downloads and the links correctly starts the download of the file when pasted in a browser address bar.
Any advice?
Regards
Forum: Plugins
In reply to: [Make Section & Column Clickable Elementor] Links are opening in a new tabyou’re welcome!
Forum: Plugins
In reply to: [Make Section & Column Clickable Elementor] Links are opening in a new tabThe target blank is set on links no matter the option you set in elementor “wrappable” panel, so I’ve fixed the code; just replace the before_section_render(Element_Base $element) function, starting on line 77 and ending on line 91 in make-section-clickable-elementor.php , with this version:
public static function before_section_render(Element_Base $element) { $link_settings = $element->get_settings_for_display('ra_element_link'); if ($link_settings && !empty($link_settings['url'])) { $target = ( isset( $link_settings['is_external'] ) && $link_settings['is_external'] =='on' ) ? '_blank' : '_self'; $element->add_render_attribute( '_wrapper', [ 'data-ra-element-link' => json_encode($link_settings), 'style' => 'cursor: pointer', 'target' => $target, 'onClick' => 'window.open("' . $link_settings['url'] . '", "'. $target .'")', ] ); } }
You can find the formatted code in this pastebin
- This reply was modified 1 year, 8 months ago by Mad Max.
I got it!
While I was trying to explain the problem better, I came up with the solution!The problem arises when you select the first radio option in {radio-2}, i.e the online payment with Paypal or Credit card. Only in that case, the {checkbox-1} element (that is checked by default) is hidden by this rule:
SHOW IF {radio-2} IS NOT "ONLINE: Paypal..."
and cascading, the fields that depend on its display state (name-3, name-4, text-8, text-9 etc.), are hidden with a rule like this:
SHOW IF {checkbox-1} IS NOT <checkbox-value>
That’s because only when {checkbox-1} is visible and unchecked, I need to show theese fields.
But I found that this combination of rules is ambiguous. What’s the value of an hidden checkbox, that is checked by default? And how other fields depending on it, behave when checking for its value?
Adding the same {checkbox-1} visibility rule to all the other fields depending on its state, and so better specifying the visibility cases, fixes the problem.
I don’t know if I managed to explain myself, so here you will find the fixed and working form in case you want to check the solution.
Thank you so much for the time you spent on this for me! I really appreciate it.
Daniele
Hi Zafer (@wpmudevsupport15),
thanks for the quick reply!In the forum post I’ve linked above, your staff hint was to use the code as a guide, so I figured it needs to be customized in some way to work. Actually I already applied the code in the theme functions.php file with no success.
I added an error_log() statement at the very start of the wpmudev_forminator_fix_can_not_submit_on_nest_required_fields_func() to be sure it runs and so it does, but when I submit the payment with Paypal, the form notifies errors on hidden fields as you can see looking to the ajax response here and here
I can post the page url with the form, if you need to see it in action, and share sandbox paypal credentials of a test buyer to test the process.
Regards,
Daniele.Same issue here when I update from 3.7.6 to 3.7.7 on PHP 7.3.4. I also have elementor pro 3.7.7
There’s an open issue on github about this with atemporary fix, changing only one line of code
https://github.com/elementor/elementor/issues/19894
- This reply was modified 2 years, 2 months ago by Mad Max.
Forum: Plugins
In reply to: [Favorites] Is it possible to create different lists of favorite posts ?I’ve just made a pull request on plugin github repository, adding 2 parameters to [user_favorites] shortcode that enable filtering by taxonomy terms also. This way you can have different lists of favorites on the same post_type, filtering them by taxonomy.
Forum: Plugins
In reply to: [Simple Yearly Archive] add class “current” to year linkIt works great, thanks a lot!
Forum: Plugins
In reply to: [Simple Yearly Archive] add class “current” to year linkHi @alphawolf, and thanks for your time, really appreciate it.
In the functions.php code you sent me, I’ve replaced the IF test with this:
if (is_integer( get_query_var('year') ) && get_query_var('year') > 0 && get_query_var('year') == $post->post_year ){
to get the currently viewed archive year value. Now, with this code and the new version of the plugin file, the class “current-link” is added in to the
<ul><li>
, on every post link listed under the currently viewed year of posts, as you can see in this screenshot. In this case, all<ul></li>
are hidden because I’m not using “Collapsible years” in the plugin options, and each year is linked as I’m using linked years option turned on.Indeed, what I actually need to do, is to add the class “current” (or “current-link”) to the Year link (see screenshot), not to the listed posts within.
You can see the yearly archive pages I’m talking about here.
If you click on year links, you can see what I got with my change to your plugin.
Specifically, what I did was change line 285 from this$output .= $before . '<a id="year' . $year . '"></a>' . $linkyears_prepend . $year . $linkyears_append;
to this
$current = (is_integer( get_query_var('year') ) && get_query_var('year') > 0 && get_query_var('year') == $year )?'current':''; $output .= $before . '<a id="year' . $year . '" class="'.$current.'"></a>' . $linkyears_prepend . $year . $linkyears_append;
So, to sum up it up, I’d need to have a filterable string of classes, added to every
<a id="year' . $year . '"></a>
links.
Something like:$yearclasses = ""; $yearclasses = apply_filters("sya_yearlink", $yearclasses, $year); $output .= $before . '<a id="year' . $year . '" class="'.$yearclasses.'"></a>' . $linkyears_prepend . $year . $linkyears_append;
Then in my function.php, I can use:
function sya_modify_year_classes( $yearclasses, $year ) { if (is_integer( get_query_var('year') ) && get_query_var('year') > 0 && get_query_var('year') == $year ){ $classes = explode(" ", $yearclasses); $classes[] = "current"; $yearclasses = implode( " ", $classes); } return $yearclasses; } add_filter( 'sya_yearlink', 'sya_modify_year_classes', 10, 3 );
Sorry for the low level of details in my previoius post. Hope the issue is more clear now.
Daniele
Forum: Plugins
In reply to: [Simple Yearly Archive] add class “current” to year linkHi @alphawolf, thanks for your replay. I’ve modified one line in your plugin to add the class “current” to generated links, based on the query_var “year” value.
I’m wondering if you could add a filter for the links in an upcoming version of your plugin, so I can modify links the same way, but without touching your source code.Thanks, Daniele.
Forum: Plugins
In reply to: [Favorites] Programmatically clear favorites for current userOk, it seems that delete “simplefavorites” user meta it’s enough. To reset the “favorites” count for posts, just deleta post_meta “simplefavorites_count” for each post
Thanks a lot @webtemyk for your super quick response!
Any news on multisite support?
Forum: Plugins
In reply to: [Yoast Duplicate Post] Cloning elementor popup issueThanks @aksriob, I’m here for the very same issue, let us know if elementor team will reply.