soulwasted
Forum Replies Created
-
Jim, thank you for your assistance. You gave me a lot of good advices.
I am still looking for a way how to display translated relationships.
More here: https://github.com/pods-framework/pods/issues/5307.I didn’t mention links to differences in CS and EN:
CS: https://strapa.cz/ivb/osoba/josef-bryja/
EN: https://strapa.cz/ivb/en/person/josef-bryja/
(this is just for testing, live web is here: https://www.ivb.cz/osoba/josef-bryja/)Ahaaa…
DATEPART is not for MySQL/MariaDB.But there is DATE_FORMAT which works!
'orderby' => 'DATE_FORMAT(intranet-year.meta_value, "%Y") DESC, post_title ASC'
Thanks for your wisdom, aura and everything!
- This reply was modified 5 years, 9 months ago by soulwasted.
Yes. I used WP All Import. This is very good one.
My decision was to use “date” format. But I need just year. It means that month and day which are added makes problems with sorting. Records have to have the exact dates from particular year to be sorted by year and then by title correctly.
One solution could by to sort records by year when date is “trimmed” just to year.
I am not sure how to achieve that using PODS.
Like...'orderby' => 'date(intranet-year.meta_value, Y) DESC, post_title ASC',...
which is bit nonsense but it shows my idea.Is that possible?
Hi.
I’ve found the problem.
Year is stored as date. So for year 2013 it was 2013-11-29. (the year was 2013 but the day of import was 27th November 2018).
When someone edited one record the year 2013 stayed but day and month changed after save. So 2013-11-29 became 2013-02-10.
When sorting by year using DESC, so it sorted exactly by the date.Maybe there is a glitch with saving of dates.
Or if I want to have just year, than change Field type from “Date” to “Plain text”.Anyway thank you for the tip with ?pods_debug_sql=1.
Forum: Plugins
In reply to: [Easy Registration Forms] Redirect after submission stopped working@maryando I think that this didn’t work in some cases. So I threw out this code.
Workaround: New members has role “editor” and I disabled everything using Adminimize plugin.
Hope this helps.Forum: Plugins
In reply to: [Easy Registration Forms] How do you sanitize inputs?I am now rendering some simple HTML into this hidden ipnuts.
Just text and “br” tags.
Nothing harmful.But “sanitize_text_field” will break my JS scripts and the whole process.
Is it possible to use this? https://codex.www.ads-software.com/Function_Reference/wp_kses
And somewhere allow tags? Or by default “br”?
Please ??Thank you.
Forum: Plugins
In reply to: [Easy Registration Forms] How do you sanitize inputs?Hi.
What about input type “hidden”?
Don’t forget to fix this. (+ maybe other use of “bad” strlen).
Please!Thanks.
Forum: Plugins
In reply to: [Easy Registration Forms] Reload page after submission editHi.
I’ve returned to this.
When I catch trigger ‘erf_submission_edited’ so this trigger is triggered immediately when modal is opened.I need to “catch trigger” when submission is edited and saved. So for this “saved”.
Thanks!
Ok.
In
class-validation.php
ispublic static function maxlength($value, $len) { return (strlen($value) <= $len) ? true : false; }
use
mb_strlen()
instead ofstrlen()
.According to this: https://stackoverflow.com/questions/31560930/strlen-and-non-latin-characters
Forum: Plugins
In reply to: [Easy Registration Forms] Call custom script/shortcode after submissionOuukey…
But how to use it?
I mean how to exactly call my function when just registration is made? Let’s say form#1.
I don’t want to call my function when using another ERF form to make custom posts and to edit them. form#2Forum: Plugins
In reply to: [Easy Registration Forms] Redirect after submission stopped workingOh.
You are awesome!
Thanks again!Hi.
I’ve tried this.
Attribute in <input> tag works fine.
It takes correct length of string. Even for non-latin characters. ě????yáíé etc.In you form this works fine too.
But validation returns error.eg.
maxlength = 5
string1 = asdfg
—> input takes max. 5 characters, ERF validator checks it as correct.string2 = asdf?
—> input takes max. 5 characters, ERF validator checks it as incorrect. ERF validator counts “?” as 2 characters.So this is it.
Forum: Plugins
In reply to: [Easy Registration Forms] Success message puts \ before ” in linksOh. The same problem happens in Message in Notifications.
This worked fine before.
Don’t know whether it’s my fault or some other plugins…