Jump to content

Zahari M.

  • Posts

  • Joined

  • Last visited

Everything posted by Zahari M.

  1. Hi @adrian No worries mate. I understand. More importantly, thanks so much for having tried! I am very grateful to ya for all you have done! ? The Video FieldType is so useful and awesome. P.S. Any chance you could share that latest version that was not working? Reason I ask is that as a personal project for next year, I want to figure this OOP stuff out and try and have a tinker with it. Knowing you... it probably won't be too far off the mark ? Thanks again Adrian!! Cheers
  2. H @adrian Nothing to say sorry for mate! On the contrary it is I who am so very grateful. I installed this dev version of Fieldtype Video. The good news is it worked and the video file is imported into the page just fine. ? The only drawback? I suppose Adrian is that no thumbnails are generated. Would you know of some workaround that I can do to create the thumbnails Adrian? Or is there any way that a button could be added to Fieldtype video such that one could regenerate it's thumbnails on the page? I've added a picture of the successful Admin Action and the thumbnail issue seen on the page we have imported the file into... Hopefully this last bit isn't too difficult? Or there is a workaround you can suggest... ? Many thanks Cheers
  3. Hi @adrian Thanks for looking into this Adrian! I installed the latest version of AdminActions. When trying to perform a "Admin Actions FTP Files to Page" action, my videos field now appears in the selection dropdown. So that's fixed. Yay! ? However, there is another problem. I put a video file here: /var/www/ceritabengkel.test/public/site/assets/cache/AdminActions/uploads/video.mp4 I then tried to perform the Admin Action. What happens is it errors out with the message heading: ProcessWire: ProcessAdminActions: Unable to install invalid image. There is then a whole slew of text. I will add this error output at the bottom of this message. Going to Setup > Logs > Exceptions gives me this error message: Unable to install invalid image In /wire/core/Pageimage.php line 1679 This is definitely beyond me! But as always happy to try out anything you want me experiment with. Many thanks Adrian! P.S. Those messages: ERROR DEBUG MODE BACKTRACE ($config->debug == true): #0 /var/www/ceritabengkel.test/public/wire/core/Wire.php(417): ProcessWire\Pageimage->___install() #1 /var/www/ceritabengkel.test/public/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod() #2 /var/www/ceritabengkel.test/public/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks() #3 /var/www/ceritabengkel.test/public/wire/core/Pagefile.php(183): ProcessWire\Wire->__call() #4 /var/www/ceritabengkel.test/public/wire/core/Pagefile.php(134): ProcessWire\Pagefile->setFilename() #5 /var/www/ceritabengkel.test/public/wire/core/Pageimage.php(167): ProcessWire\Pagefile->__construct() #6 /var/www/ceritabengkel.test/public/wire/core/Pageimages.php(58): ProcessWire\Pageimage->__construct() #7 /var/www/ceritabengkel.test/public/site/assets/cache/FileCompiler/site/modules/ProcessAdminActions/actions/FtpFilesToPage.action.php(78): ProcessWire\Pageimages->add() #8 /var/www/ceritabengkel.test/public/site/assets/cache/FileCompiler/site/modules/ProcessAdminActions/ProcessAdminActions.module.php(272): FtpFilesToPage->executeAction() #9 /var/www/ceritabengkel.test/public/wire/core/Wire.php(414): ProcessAdminActions->___executeRun() #10 /var/www/ceritabengkel.test/public/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod() #11 /var/www/ceritabengkel.test/public/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks() #12 /var/www/ceritabengkel.test/public/site/assets/cache/FileCompiler/site/modules/ProcessAdminActions/ProcessAdminActions.module.php(739): ProcessWire\Wire->__call() #13 /var/www/ceritabengkel.test/public/wire/core/ProcessController.php(337): ProcessAdminActions->__call() #14 /var/www/ceritabengkel.test/public/wire/core/Wire.php(414): ProcessWire\ProcessController->___execute() #15 /var/www/ceritabengkel.test/public/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod() #16 /var/www/ceritabengkel.test/public/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks() #17 /var/www/ceritabengkel.test/public/wire/core/admin.php(160): ProcessWire\Wire->__call() #18 /var/www/ceritabengkel.test/public/wire/modules/AdminTheme/AdminThemeUikit/controller.php(15): require('/var/www/cerita...') #19 /var/www/ceritabengkel.test/public/site/templates/admin.php(15): require('/var/www/cerita...') #20 /var/www/ceritabengkel.test/public/wire/core/TemplateFile.php(327): require('/var/www/cerita...') #21 /var/www/ceritabengkel.test/public/wire/core/Wire.php(414): ProcessWire\TemplateFile->___render() #22 /var/www/ceritabengkel.test/public/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod() #23 /var/www/ceritabengkel.test/public/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks() #24 /var/www/ceritabengkel.test/public/wire/modules/PageRender.module(554): ProcessWire\Wire->__call() #25 /var/www/ceritabengkel.test/public/wire/core/Wire.php(417): ProcessWire\PageRender->___renderPage() #26 /var/www/ceritabengkel.test/public/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod() #27 /var/www/ceritabengkel.test/public/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks() #28 /var/www/ceritabengkel.test/public/wire/core/WireHooks.php(1059): ProcessWire\Wire->__call() #29 /var/www/ceritabengkel.test/public/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks() #30 /var/www/ceritabengkel.test/public/wire/modules/Process/ProcessPageView.module(225): ProcessWire\Wire->__call() #31 /var/www/ceritabengkel.test/public/wire/modules/Process/ProcessPageView.module(171): ProcessWire\ProcessPageView->renderPage() #32 /var/www/ceritabengkel.test/public/wire/core/Wire.php(417): ProcessWire\ProcessPageView->___execute() #33 /var/www/ceritabengkel.test/public/wire/core/WireHooks.php(951): ProcessWire\Wire->_callMethod() #34 /var/www/ceritabengkel.test/public/wire/core/Wire.php(485): ProcessWire\WireHooks->runHooks() #35 /var/www/ceritabengkel.test/public/index.php(55): ProcessWire\Wire->__call() #36 {main}
  4. @adrian Hi Adrian! Just a quick question. I have just installed your Admin Actions module for the very first time. The functionality of it that I am after is the FTP Files to Page action... Ultimately what I want to do is FTP video files up to an uploads directory on the server and then move them into specific pages with a template that has a "Fieldtype Video" using your Admin Actions module. I created a field named videos using the "Fieldtype Video". I assigned this field to the home template. Small videos I upload via the regular admin page ui work fine and the videos render on the site fine. And so I can safely say the videos field works fine ? The issue I am having Adrian is that when it comes to selecting my videos field via "Admin Actions FTP Files to Page", my videos field does not appear in the "Field" selection dropdown. I have a couple of image fields in my home template and they appear just fine in the "Admin Actions FTP Files to Page" "Field" selection dropdown. So Admin Actions does recognise image fields. But it does not recognise my videos Fieldtype Videos field. I hope I have clearly explained the issue. Is there something extra that I need to do for the selection dropdown to recognise Fieldtype Videos fields? Many many thanks Adrian!
  5. Hi @adrian Gosh you are a genius ? It worked instantly ? Looking at your GitHub commits Adrian, were the error messages appearing simply because I was not using subtitles? Or was it something else? Once again Adrian... you create such amazing goodness with the modules and help that you so generously give forth... God bless you! P.S. Still learning how to use this awesome module to it's full potential. So i might have a question or two in the future... ?
  6. Hi Adrian! Hope you can help me. I am revisiting this module after many years and am encountering an error. I created a field named videos. I added the field to my homepage template. I add this code to my homepage. Is this correct? <?php foreach($page->videos as $file) { echo $file->play; } ?> I set Max number of files to zero. I set formatted value to Automatic. I am not using subtitles and so have done nothing with regard to this. I uploaded two videos to the home page. All OK. Thumbnails are generated fine. Both videos appear on the homepage. Yay! However I get the following error messages displayed on the homepage as I am on a local machine with debug mode enabled. Warning: file(/var/www/ceritabengkel.test/public//site/assets/files/1/test720p.vtt): failed to open stream: No such file or directory in /var/www/ceritabengkel.test/public/site/assets/cache/FileCompiler/site/modules/FieldtypeVideo/FieldtypeVideo.module.php on line 147 Warning: Invalid argument supplied for foreach() in /var/www/ceritabengkel.test/public/site/assets/cache/FileCompiler/site/modules/FieldtypeVideo/FieldtypeVideo.module.php on line 149 Each video I add will have output it's own pair of these error messages above... I am running: Debian 11. Apache/2.4.51 PHP 7.4.25 I have gone to the Modules page and clicked on the Clear Compiled Files button but this does not seem to help. Any suggestions what I might be doing wrong Adrian? Is there any other info I can provide you with? Many many thanks! Cheers
  7. @flydev and @LostKobrakai Thank you both for your help gents. For future searches & seekers that might stumble upon here... For those of you gents, ladies ( and any others ) that are wanting to be able to , from the admin side, create custom queries to select specific sets of pages, such that you can easily determine what pages are listed via a specific "listing" page, then the Selector fieldtype is definitely your friend! Rough Installation Guide Go to admin > modules > core. Scroll to the Fieldtype section. Locate and install "Selector" fieldtype. Create a new Selector field. I named mine 'selector'. Upon creating it, it suggests that you give it a starting value like template=product. In my case... I ended up not giving it any value. Leaving that initial suggested template value out means we have the option of subsequently selecting our template later, which gives us more flexibility in use. Go to your template in admin and add the selector field. Go to your template file and do something like below. Thus, we can, as LostKobrakai suggests, start building a selector that ultimately creates the required variable string and safely feeds this into our $pages->find() selector... $posts = $pages->find("$page->selector"); Go to a page that has this field and using the selector field's UI, start building your selector! I have tried attaching a screen shot of what it looks like. What I was trying to do earlier can be seen in my Query text field as mentioned in my original question. I have now removed this Query text field and just use the Selector field. As an aside, I am using a Page Reference field called opts_article displayed in the form of multiple checkboxes. What I am doing here is using these checkboxes as a means of preventing certain pages from being listed. For example, you can see here that my Selector is listing all pages that has the article-page template. You can also see the limit of 10 pages. But one of my favourite blog posts from Ryan talked about efficient use of PW fields,see here: Efficient Use of Fields. And so by creatively using a single Page Reference field, we can create, on the fly many checkboxes easily. I mention this because using this Selector field, it enables one to effortlessly select and factor in the desired logical purpose of your checkbox when building your selector. I'm sure this is all basic stuff for many of you here, but I'm also sure it can help dummies like me too ?
  8. Hello psy Maybe it's a personal thing, but a hi or hello goes a long way when a total stranger addresses you directly... some might possibly consider it rude and confrontational I shall be happy to honor your request and no longer assume that ProcessWire devs are gents. If there are any other non males here that may have taken offence, my apologies to you all too.
  9. Hey LostKobrakai! Thanks for the replies!! I did look there initially before asking but there were quite a few uninstalled ones. Hence I thought better ask you first. I did find it and it's called Selector and it says... Build a page finding selector visually. Very interesting options to build the selector. I will try and figure it out from here... Cheers!
  10. Hi LostKobrakai Thanks for the reply! I'm not familar with this FieldType Selector. Is it a module we add on? Could you point me to a specific page that I could start looking into it? Cheers!
  11. Hi gents! Apologies if the topic to this question does not use the correct terms. But here goes... Lets say we have a parent page. This parent page has lots of child pages. In the template file for this parent page, I write this: $posts = page()->children('limit=10'); This works great. Now the question about saving this as a variable... I have created a text field called myquery and attached it to the parent pages template. Inside this text field, I have entered the whole selector and statement like so into the text field: $page()->children('limit=10') Now what I am trying to do in my template file is this: $q = $page->myquery; $posts = $q; Doing this gives me this error, Fatal Error: Uncaught TypeError: Argument 1 passed to ProcessWire\ukPosts() must be an instance of ProcessWire\PageArray, string given. If I wanted to lets say change the number of children from a text field in my template, I have managed to do this by way of passing a variable into the statement. So I could use a variable for the value for limit. This works. But the reason I want to try and save the whole statement and selector is so that we can run a query on this page and it can fetch pages from anywhere in our site. In a way, I do understand the error in that I am making posts now equal a string. But how can I echo out an entire query statement from a field and get it to be "run"? Hope the question makes sense! Cheers
  12. Hi pwired! Thanks for reading and your reply. Much appreciated! Yes your right!! It's all about the ports. The T60 T61 series laptops are special in that they have a dedicated adapter whereby you can take out the CD or DVD drive from the bay and in it's place put in a combined serial and parallel port interface adapter. I managed to find one of these adapters in France. So am hoping that someone there can purchase it on my behalf and ship it to me Even though they might be considered as antiques, I actually quite like these old ThinkPads. Also I am really getting in to Raspberry Pi's now and they would make a good low cost companion to connect to the Raspberry Pi with. I just bought a T400 with docking station, monitor, mouse and keyboard for a very cheap price to use to play with my Raspberry Pi 3 and to learn Python and SQLite on Thanks again pwired for chiming in
  13. Hi there! I'm hoping any forum members from France could perhaps help me I have an old ThinkPad laptop and I have been trying to look for a part for it. After some searching I have found one in France! I did try emailing the company, but they did not reply Anyways, I'm hoping that a member here in France could help me buy it online, get it delivered to their house, and then ship it to me in Malaysia! I will PayPal you upfront. If someone here can help, do let me know k! Many thanks!
  14. Hi guys! I have to say that I too had the same problem as cjx2240. The solution suggested by Gideo So was the trick! You need to add mystyles: before the path like so... mystyles:/site/modules/InputfieldCKEditor/mystyles.js HTH
  15. Ok... I actually figured it out. I just found this page which helped.... https://processwire.com/api/ref/page-array/add/ Here's what I ended up with.... $p = new Page(); $p->template = "basic-page"; $p->parent = "/api-generated-pages/"; $p->title = $randomTitle; $p->pageoptions->add(array(1023,1026)); $p->save(); Fortunately I had read a few threads looking for the solution and that is what helped me add the array in to add multiple pages into the page field at once. Hope it helps someone else! Have a great weekend everyone!
  16. Hi Guys Been trying to sink my teeth into the API as I want to be able to create pages via simple scripts. I am using a page type field in my template which enables me to select other pages. I am selecting these other pages via checkboxes as a means to provide options for my page. i.e one option is to hide comments and the other is to hide the sidebar. My problem is I can't populate the page type field with the values I need. So currently I am doing this $p = new Page(); $p->template = "basic-page"; $p->parent = "/api-generated-pages/"; $p->title = $randomTitle; $p->save(); All this works great. But how do I modify the above script to also populate my page field named "pageoptions" with the page id values of say 1234 and 1235? I've been searching the forum for an hour and tried many ways to write it but I can't seem to find a solution to set them. So pardon my poor searching. I'm sure the answer is there but I can't seem to find it! Many thanks!
  17. Thanks Steve!! Fabulous module indeed! Curious now... what were the jobs or the needs you had that made you make it?
  18. Hi Steve Have messaged you the details you asked for. Many thanks mate!
  19. Hi Steve Actually the site is on local host in MAMP Pro. I will upload it to a live site over the weekend and pass you the login details so you can have a dig! But now that you mention it mine is 3.0.38. Hmmm. Will rollback too and see! Cheers!
  20. Hi Steve Thanks so much again for looking into this. Unfortunately after trying the dev version, i think it's made things worse. At least for me. The clock picker has now stopped working on both a "normal simple" page and within a repeater matrix. Replacing it with the previous main one restored back the clock picker on the "normal" page....
  21. Hi Steve! Thanks so much for all the effort you have put into this! I will check out the thread you linked to to learn more. Many thanks again!
  22. Hi Steve Time format is Hours (0-24) & minutes (00-59) Picker is unchecked or not inhibited. Works fine on a regular page. Just not in a repeater matrix. Terima kasih!
  23. Selamat Pagi. Khabar baik tuan Steve! Thanks for the reply! Look forward to you figuring it out whenever your free next. Till then... Cheers!
  24. Hi Steve When i use this field in the profields repeater matrix, the clock picker no longer works. But outside of the repeater matrix, it works fine. Within the repeater, we do not get <script type="text/javascript">$('.clockpicker').clockpicker();</script> added. I guess that is the cause. Any ideas what could cause that and how we can get it to show up? Cheers
  • Create New...