Jump to content

Matzn

Members
  • Posts

    36
  • Joined

  • Last visited

Profile Information

  • Gender
    Male
  • Location
    Neuruppin, Germany

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Matzn's Achievements

Jr. Member

Jr. Member (3/6)

6

Reputation

  1. @Macrura I have tested something. If add the date field to page or repeater page it works, but not to a fieldsetpage: echo "\nFieldsetPage:\n"; echo $page->Check->ratingDate; echo "\n"; echo $page->Check->getUnformatted("ratingDate"); echo "\nPage:\n"; echo $page->ratingDate; echo "\n"; echo $page->getUnformatted("ratingDate"); echo "\nRepeaterPage:\n"; echo $page->About->businessProvider->first()->ratingDate; echo "\n"; echo $page->About->businessProvider->first()->getUnformatted("ratingDate"); Live Result: FieldsetPage: 19.05.2021 19.05.2021 Page: 19.05.2021 1621375200 RepeaterPage: 19.05.2021 1621429619 It's a bug or i can set somthing?
  2. @wbmnfktr ic know this postes, but no way to get the unix timestamp by $page->getUnformatted('yourDateField'); I also used it in several projects, but now the output must be set for date field to none. So i use this date field only as $page->yourDateField; I also don't understand why one field is save as unix and the other not (same settings).
  3. Hi, i have two date fields. One stores in unix timestamp (ratingDate) the other as a normal date (googlePageSpeedDate). Both have the same settings! How can I influence the saving? The strange thing is that I can't get the unix timestamp by (Check is the FieldsetPage) $page->Check->getUnformatted('googlePageSpeedDate'); ProcessWire\FieldsetPage Object ( [id] => 9932 [name] => for-page-1072 [parent] => /admin_panel_page/repeaters/for-field-389/ [template] => repeater_Check [name1067] => [status1067] => 1 [googlePageSpeedDate] => 2021-05-17 00:00:00 [data] => Array ( [name1067] => [status1067] => 1 [googlePageSpeedDate] => 2021-05-17 00:00:00 ) ) ProcessWire\RepeaterPage Object ( [id] => 1137 [name] => 1618998033-3988-1 [parent] => /admin_panel_page/repeaters/for-field-312/for-page-1075/ [template] => repeater_businessProvider [name1067] => [status1067] => 1 [isSocialMedia] => 0 [businessProviderPage] => (Page) 1132 [rating] => 4,6 [ratingUsers] => 10 [ratingDate] => 1621240175 [urlTo] => https://maps.google.com/?cid=11132489695980159614 [reviewUrl] => [data] => Array ( [name1067] => [status1067] => 1 [isSocialMedia] => 0 [businessProviderPage] => ProcessWire\Page Object
  4. It´s a old post, but i'm looking for this same problems. Hope, helps you, too. It must be noted that if "When output formatting is off the value of an image/files field is always a WireArray" found here to save works only $page->save(image/files field) Example for a custom field "counter" : $page->of(false); $file = $page->csvFiles->first(); $file->counter = "your content here"; $page->save('csvFiles'); Actually easy.
  5. Omg. The issue is caused at php version 8.0.2. Processwire running perfekt to php 7.4. I'm looking for entries in protocolls: nothing. No php error or warnings for this issue. That's mean. @wbmnfktr @BitPoet I thank both of you. Closed
  6. Nothing special. Only add new fields to template and somthing in template output. No. That's the weird thing. I don't touch hooks or other settings. Language only change default backend settings. It's an (almost) new installation. I think slowly it is due to php or something on the server. I've an other similar project. I will to compare this booth.
  7. Ok, then I understood your family restrictions setting. No, in none template set family restrictions. I've already checked everything - what I know. If the template is unused i can change the page to them, but not if used for other page. I despair...😭
  8. No, "Don't allow pages to change their template" is not checked. I'm the superuser and the parent page is home. I'm not sure what do you mean with family restriction by parent page?
  9. Hi. I use a fresh multilanguage site. I only change default language to german. Now i can't chang the page template after use this template for one page, although multiple use is permitted. Some ideas?
  10. @tomaskostadinov and how do you access the fields by language? I found only a solution by suffix. Or there is another solution?
  11. Ok, it seems as if the fields are only translated for the Pageobject. Either you create a page and moves all fields there or you call up the fields of the modules include the suffix as follows: english: myField german: myField__1024 if ($user->language->name != "default") $lable = "__" . $user->language->id; $modules->get('Mymodule')->get("myField$lable");
  12. Hi @Zeka some fields from $page are switch in right language, but not the field from modul. It doesn't matter whether I call up the modul-field in the template or via hook.
  13. Hi. To manipulate the page output i use the hook Page::render. It works for html, php etc without touch the templatefiles. Example i build a modul called "Mymodul" and integrate some multilanguages fields: class MymodulConfig extends ModuleConfig public function getInputfields() { $inputfields = parent::getInputfields(); $ckeditorToolbar ='Format, Bold, Italic, -, RemoveFormat'; $f = $this->modules->get('InputfieldCKEditor'); $f->toolbar($ckeditorToolbar); $f->attr('name', 'myField'); $f->useLanguages = true; $inputfields->add($f); return $inputfields; } } and add it to all pages: public function ready() { if ($this->page->template != 'admin') { $this->addHookAfter('Page::render', $this, 'addSome'); } } public function addSome($event) { ob_start(); eval('?>'.'<?php echo $this->modules->get('Mymodule')->myField ;?>'. '<?php'); $add = ob_get_contents(); ob_end_clean(); $event->return = str_replace("</body>", $add . "</body>", $event->return); } What i'm missing are the variables for $languages and the switching of the multi languages fields from module. Does somebody has any idea why get only the default language field from modul?
  14. Hui, the solution is very easy: $matches = $pages->find("selector")->not("selector"); Example for trees: //all 1,5m no 11,5m $matches = $pages->find('title%=tree, title%="1,5 m")->not(title%="11,5 m"'); //all 11,5m no 1,5m $matches = $pages->find('title%=tree, title%="11,5 m")->not(title%="1,5 m"');
  15. Thanks all for yous ideas. I must had a tittle more explain my project. The page listing all trees und i use the height for a ajax filter function. I wan´t add a new field. It was more about the basic to the selectors. Hope external links ok. A example: https://gutschein-für.de/preisvergleich/layher-uni-komfort-fahrgeruest-universalgeruest-mit-treppenaufstieg/ @MoritzLost It would be good, but you dirt solution don´t work 'title%=" 1,5 m". All Whitspaces lost. @Robin S Yes, if add a additional word befor it works, but need only "1,5m"/"11,5 m"
×
×
  • Create New...