-
Posts
65 -
Joined
-
Last visited
About regesh
- Birthday 12/04/1982
Contact Methods
-
Website URL
http://regesh.ru
-
ICQ
74905566
-
Skype
khudia
Profile Information
-
Gender
Male
-
Location
Russia,Saint-Petersburg
-
Interests
web development, snowboard. family, worldOFtanks =))
Recent Profile Visitors
4,008 profile views
regesh's Achievements
Full Member (4/6)
1
Reputation
-
oO! Thanks a lot guys!
-
regesh started following Auto page title and name , How to extend field visibilty rule? , Custom render function for field value in template and 3 others
-
Any field has visibility option (showif) that works perfect with field in current template. But i need to compare with the field in parent page template. Is it possible? The task is like that: I have multiselect field in parent page - it is "Page Refference" field. And i need field in children page compare that there is some page selected in parent multiselect field for it to show in editor.
-
How to make a hook that will customize value of field and output function result. I want for field date (in templates) to display values like: yearstaday or today or in other ways 21 may(in my lang) 2021. So for that i got function to parse Y-m-d to what i need. But i do not how to create hook. Thanks a lot!
-
Thanks a lot! thats is just my helper custom function function pre($data,$exit = false){ echo '<pre>'; var_dump($data); echo '</pre>'; if($exit){ exit(); } }
-
Thanks a lot! Yes, I realized that requests in a loop (and a selection of repeaters are requests) the decision is fundamentally wrong. Thank you for reminding me of this again. But in the morning I realized it too) I got one more querstion. Let's say I have pages with a specific template, a repeater is attached to the template. Is it possible to immediately get an array of all repeaters for the specified pages and then, having already looped through these repeaters and finding the necessary information, determine which page this repeater is attached to. Thanks again!)
-
I got about 2 thousand records with repeater field for each. And i need to get some result from that. Could anybody help me with how to optimize query for better performance (not 6-7 seconds as now) I'm executing getSubs() functions. Thanks a lot! <?php function getNextAction($clientId){ $result = []; $today = new \Datetime(date('Y-m-d', time())); $today = $today->format("U"); $action = wire('pages')->findOne('sort=action_start,template=action,selectedClient='.$clientId.',action_start>'.$today); if($action->id){ pre($action); $a = $action->selectedTrainer->text1.' '.$action->selectedTrainer->text2; $b = strftime("%d %B",$action->action_start); $result = [$a,$b]; } return $result; } function getSubs(){ $result = []; $x = 0; foreach (wire('pages')->get(1080)->children() as $client) { foreach ($client->clientSubscriptions as $sub) { if( (int)$sub->number1 - (int) $sub->number2 <=5 ){ $result[$x]['fio'] = $client->title; $result[$x]['left'] = round( (float)$sub->number1 - (float) $sub->number2 , 0, PHP_ROUND_HALF_DOWN); $result[$x]['action'] = getNextAction($client->id) ?? false; $x++; } } } return $result; }
-
Thanks' for reply. I'll check with "toggle" later.
-
Thanks for this module! It saved many hours for me. And one more thing i noticed. It has some bugs with toggle field value as dependency and when is used for field_tab But all other are works grate!)) Thanks again!
-
Is there any more simple and not paid solution?
-
How to create in template two fields (page_reference both) where the second field dropdown list depends on first (page_reference) field selected value?
-
Can anyone tell me how to find pages in propper way)) Now i solved taks like this //$place = 1036 //$type = 1122 //doctors_office = page field with multiselect by checkbox //direction_category = page field with select field for one value can be choosen foreach ($pages->find("template=doctor") as $doc) { foreach($doc->doctors_office as $item) { if($item->id == $place){ if($doc->direction_category->id == $type){ $list[] = $doc->title; } } }
-
Thanks. As i wrote on github, i started project with v1 of this plugin. So there is no time to check. After i'll finish, i'll test. Thanks again.
-
Can't use this module if select any parser (smarty or twig) Fatal Error: Uncaught Error: Class 'Twig_Loader_Filesystem' not found
-
Thanks a lot!!!
-
Could anyone tell my how to make thing like this: 1) When subpage for page with special template is created in admin than no fields to enter "title" and "name" is displayed - page creates automatic skipping this step and it has "name" and "title" like so - "post_1122" 2) And of course if this page is created from script - things go the same. I think hooks can help by i don't know how to use them in my case. Thanks a lot.