Jump to content

Ferdi Derksen

Members
  • Posts

    51
  • Joined

  • Last visited

Profile Information

  • Gender
    Not Telling

Recent Profile Visitors

3,734 profile views

Ferdi Derksen's Achievements

Full Member

Full Member (4/6)

51

Reputation

  1. @ryan Happy Birthday! And ... een heel hartelijk welkom in Nederland! (A very warm welcome in the Netherlands) 👋 I hope the weather will be okay and you enjoy the Dutch hospitality. Greets from 's-Heerenberg (right on the border with Germany, feel free to get a cup of coffee with us)
  2. Hi all! FYI / to be fixed Background: I tried updating on of our websites from a PHP7 to a PHP8 version, also migrating from 3.0.200 to 3.0.229 when an existing piece of code triggered a timeout. In this case I'm using the Sanitizer->truncate (WireTextTools - truncate) method with option 'collapseLinesWith' using an empty string as value. This triggered a timeout. Finding out why this occurred, I cannot find a clue. It seems between the referred versions there wasn't an update for this method. Anyhow, the fix is quite simple. Just using a blank space instead of the empty string fixed it. $html = '<p>Ligula sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas faucibus mollis interdum. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Nullam id dolor id nibh ultricies vehicula ut id elit. Donec ullamcorper nulla non metus auctor fringilla.</p> <h3>Header</h3> <p>Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Donec ullamcorper nulla non metus auctor fringilla. Cras justo odio, dapibus ac facilisis in, egestas eget quam. Donec sed odio dui. Praesent commodo cursus magna, vel scelerisque nisl consectetur et. Aenean eu leo quam. Pellentesque ornare sem lacinia quam venenatis vestibulum.</p> <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Vestibulum id ligula porta felis euismod semper. Nullam id dolor id nibh ultricies vehicula ut id elit. Aenean lacinia bibendum nulla sed consectetur. <a href="https://www.processwire.com" target="_blank">Look at this!</a>.</p>'; $intro = $sanitizer->truncate($html, [ 'type' => 'word', 'maxLength' => 350, 'visible' => false, 'collapseLinesWith' => '', // BUG! - just a blank space fixed it 'keepFormatTags' => false, ]); var_dump($intro);
  3. Tnx @neosin for your feedback - I'm currently rewriting the module with a lot of those issues fixed. Also adding a delay time checking for last modified time which is at least half an hour in the past. The preview is also a nice feature which I will take in consideration!
  4. Hi @loukote, Nice to hear that solves some problems. To add the fieldtype "PageTitleLanguage" you can simply add this to the module in file "PublishToTwitter.module" at line 399. Since I'd like to keep the module as simple as is, I don't think this will be added soon.
  5. Hi @loukote, My first thoughts were about that "user" template. This shouldn't be possible, because the module filters all System flagged templates. After installing the same PW and module as you did, I saw that there isn't a filter on the date-field nor title-field which indicates the option to select the "City" and "first name" fields. Those are valid by filtering only on the fieldtypes "FieldtypeDatetime" and "FieldtypeText" for the date field and fieldtypes "FieldtypePageTitle" and "FieldtypeText" for the title field. Since the filtering isn't that great, I added some minor changes to the module. Now it is possible to select the correct fields depending on the chosen template(s). The fieldtypes (as described above) are still used as a selector as well. Please let me know if this works out now.
  6. Hi @loukote, Maybe a stupid question, but you did save the module after selecting a template, right? The list of fields available is depending on the template(s) you selected at the first place. This should indicate the "user" template is selected now. On the other hand, the "date" field is build with a selector for fields of type FieldtypeDatetime or FieldtypeText. Otherwise send/place some screenshots, happy to help!
  7. Hi @benbyf, I'll check for the mention and when needed add it, when you need any extra support, let me know!
  8. Hi @loukote, There is no limitation/filtering in fields of the selected template(s). Therefore those drop-downs are selecting fields with type "Text" for "page title field" and type "Datetime" for "datefield to check for publication" so the checks when Tweeting (or selecting which to Tweet) can be done properly. Cheers, Ferdi
  9. Hi @DL7, First of all I assume you are using the module for version 3.x I think the first thing to change is the 'autoload' option in the getModuleInfo() method to 'autoload' => true (or add another template you are using for the creation of pages). Please let me know if that's working for you. Cheers!
  10. Well in this case I (kinda) solved my issue using an array like this; $selector[] = ['field' => 'date_pub_end', 'operator' => '<=', 'value' => $now, 'not' => true]; I also read the documentation about the array-selectors in the blog and from Ryan but I guess we still have to wait a little bit for the upgraded documentation for this announcement; Tnx anyways @Macrura @kongondo for pointing me in the right direction!
  11. Hello, I'm trying to build a selector array to work with an OR operator. I need all pages where the datetime field ("date_pub_end") is empty or in the future. In a selector string this could be solved with the following two examples (with and without OR-group) $selector1 = "... ,!date_pub_end<={$now}, ..."; $selector2 = "... ,(date_pub_end=''),(date_pub_end>={$now}), ..."; But I'd like it to work in selector arrays, so far I couldn't find a solution.
  12. My guess why PW isn't listed in the most popular CMS systems is because it ain't visible in HTML right away. In my opinion we're lucky about that so any type of hacking is therefor also very limited (look at WP ).
  13. Hi Raulyjo, Maybe you can repost the image - it isn't viewable now. Regarding your problem you might consider merging the VirtualHost options into 1 block and using ServerAlias for the www alias; <VirtualHost *:80> ServerAdmin Raul DocumentRoot "/opt/bitnami/apps/mywebsite/htdocs" ServerName mywebsite.es ServerAlias www.mywebsite.es </VirtualHost> Remember to restart Apache again after changing. I hope this works - but just let it know.
  14. Before you dive into this too deep - I got this working in a module-setup. I'm only interested to get it working without a module (not needed/critical).
  15. Tnx for the input, but unfortunately I didn't get that to work, it results in a fatal error; Fatal error: Call to a member function wire() on a non-object in /mypath/htdocs/wire/modules/Inputfield/InputfieldPage/InputfieldPage.module(283) : eval()'d code on line 1 Placed in my ready.php file: $contentWire = new ProcessWire('/mypath/to/content/site', '/content/'); wire('content', $contentWire, true); // using $this->wire.... didn't work Placed in the field PHP code: return $this->wire('content')->wire('pages')->find("parent=/"); I hope you have any thoughts left? Thanks in advance!
×
×
  • Create New...