-
Posts
7,529 -
Joined
-
Last visited
-
Days Won
160
Everything posted by kongondo
-
Using fwrite() to create file in scripts directory
kongondo replied to louisstephens's topic in API & Templates
I there's maybe two things to consider Can your fwrite() access the location you want to write to? The location of the js script needs to be accessible (readable) to the world so that browsers can serve it.. If the js script are for external use (i.e. external to PW), maybe you want to keep it clean and add them to the file system of whatever app you are using them for. Just my lazy 2p on a lazy Friday afternoon..- 2 replies
-
- generation
- frwite
-
(and 1 more)
Tagged with:
-
<unrelated> I need to try laragon again. Last time I did, it didn't work for me or I didn't want to exclusively work on PHP 7.x. I still need to support PHP 5.3 + for some of my modules and laragon did not seem to support that? </unrelated>
-
Maybe you are calling $copy->of(false) in the wrong place. This works for me, cloning a page with children and grandchildren. $copy = $pages->clone($page); //$copy->parent = '/cloned-parent/'; $copy->title .= $page->title . ' - copy'; $copy->name = $sanitizer->pageName($copy->title); $copy->of(false); $copy->save();
-
Moderator Note @simonsays, @Deniss Surnin That's incorrect. You have not been banned. After their initial post, new users are only allowed one more post within the first 24 hours. After this time period, they can post normally. Could you try posting again using your original handle? Let us know if you still experience problems. If its working, you'll have to delete you new handle (Deniss Surnin).
-
Since at least 2.4.x. However, some properties like defaultGamma since maybe 2.5.x.
-
Hi @harmvandeven, OK. Makes sense. It doesn't sound too difficult given the Vimeo/YT API. I'm thinking we'll add a setting in MM for users to indicate whether they'll want to view/manage online content such as YouTube. We'll create a list for this but currently, support only YT and Vimeo. Later, we could expand this to include other media sources. We can add the input to the upload screen as a third tab (only visible if users indicate they'll want to view/manager online content such as Vimeo). So, Add / Scan / Online (or Other or something appropriate) - I'll be removing the 'Help' tab. With good documentation, we don't need it. I'll be working on the docs once version 012 is in beta testing. We'll also have an input for the media Title. We'll either reuse the file field that video media use to store the image or copy and reuse the image field that image media use in the video media templates. We'll use an InputfieldTextarea field to store the embed code and other data. We can just reuse the Textarea field we use for MM settings - copy that to the video template. Again, this field will only be added to the video template if online content feature will be used. For the frontend, we'll have video media return a property with the data required for video output. I think that should cover it. OK. I'll have a look.
-
Maybe 'easiest' to just duplicate the uikit admin, edit it as you wish and install that as your admin theme. Of course, you'd still need to dig into the code to find out what you need to change...It might not be as straightforward as it sounds though .
-
We did .
-
xdebug has always been slow (all over Google). Some things you can do Disable xdebug Profiler Disable xdebug Profiler enable trigger Disable xdebug auto trace Disable xdebug auto start (if you can) Helpful hints http://www.devinzuczek.com/anything-at-all/i-have-xdebug-and-php-is-slow/
-
@SamC, Moderator Note FYI, you posted 3 other copies of this thread. I am guessing you were on mobile, or your computer was a bit wonky. I've deleted the other three.
-
@dweeda, Moderator Note Multithreading is not allowed. Please, do not open different topics regarding the same issue. Keep it in one place. I have merged your other thread with this one.
-
From the repo. Browse the repository commits and click on the commit shown in the screenshot below: That will take you to the page where you can clone/download that version.
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
kongondo replied to kongondo's topic in Modules/Plugins
loadPageField() is required to stop the field from visiting the database. There is a comment right there in the method . If we remove the method, it will just call its parent loadPageField() (Fieldtype.php). Hence, we override it. We can have it return true. That results in renderMarkup() being called once only (rather than twice currently - once each for wakeupValue() and loadPageField()). -
Module Module: RuntimeMarkup Fieldtype & Inputfield
kongondo replied to kongondo's topic in Modules/Plugins
@adrian, I have tested and cannot replicate this. I tested with both single and multi page reference fields using different inputs (Asm, Checkboxes, etc). I also tested using render via code and via wire('files')->render('some-file'). This is what I get if I put bd($page->id) at the top of renderMarkup(). 1367 is the ID of the page being edited. The pages saved in the page reference fields are not called. Edit I think there is something else going on in your install. There is nothing peculiar about the field. Apart from renderMarkup(), all the other methods are ProcessWire Field methods. Theoretically, it means if a bug exists, then all Fields should be exhibiting the same behaviour. -
Hi @Bacelo, Achievable from version 0.1.5 using the getMenuItems() method (see examples here) or from version 0.1.8 using the 'disable menu items' feature. Please note that support for ProcessWire 2.x ceased with version 0.2.2. In your case, you can upgrade Menu Builder up to version 0.2.1. and you'll be fine. If you can though, I'd advise to upgrade to ProcessWire 3.x.
-
Hi Alex. Not yet. Illness, Easter and Hay Fever all colluded against me. Please note that I'm also upgrading Jquery File Upload alongside Media Manager. I'm working as fast as I can .
-
Hi @harmvandeven, Welcome to the forums. Thanks for the purchase. Currently no, but it's something I've thought about, briefly. I've not been able to decide how to best implement it. For instance, they would need to live under /video/. However, that would require a video file to be uploaded. Also, should the videos be embedded or not, etc? Thinking out loud, maybe we should have a different media type for online content - mainly for YT and Vimeo. What's the workflow? Your custom module gets the thumbnails and then you upload these as images to Media Manager? Do you want them to be able to play the related videos by clicking on the thumbs? Frontend, Backend? Sounds cool. Hard to tell without knowing more about how your modules work. We can discuss here or in PM or email if you wish.
-
Module Module: RuntimeMarkup Fieldtype & Inputfield
kongondo replied to kongondo's topic in Modules/Plugins
Hi @adrian, ___wakeupValue is needed for frontend access. I am assuming some people use the field in the frontend. ___sleepValue should be able to work with return true only. I'll have to investigate deeper though. The whole module is based on Ryan's concat field. These methods were copied as is (or almost) from that module. So, his module must be having the same issues then. I'll have a look sometime. Still no ETA though, sorry. -
[SOLVED] InputfieldInteger not found on Core Update
kongondo replied to phillipschmitz's topic in General Support
How did you update ProcessWire. Using some module? Manually? For now, are you able to downgrade ProcessWire to the last stable version you had? What version of ProcessWire was that, 3.0.62? Does it work then? You can then upgrade incrementally, e.g. 3.0.62 to 3.0.7x to try replicate the issue. If you are able to do the test on a local server first, the better. I'm probably clutching at straws here...- 11 replies
-
- 1
-
-
- internal error
- 500
-
(and 3 more)
Tagged with:
-
I suppose because it runs off Amazon's servers...?
-
Hi @adrian_gp, Welcome to the forums. Let's say you have a category 'Technology' whose URL is /categories/technology/. In the template file of the template CategoriePage, you can do this: // @note: we set a limit here. You can use pagination if you have many posts $posts = $pages->find("template=BlogPost, limit=10, categories=$page"); $out = ''; // category title $out .= "<h2>{$page->title}</h2>"; // found posts in this category if($posts->count) { foreach($posts as $post) { $out .= "<h3><a href='{$post->url}'>{$post->title}</a></h3>" . "<p>{$post->summary}</p>";// assuming you have a summary field } // no posts in this category yet else $out .= "<p>No posts found in this category</p>"; echo $out; Quickly typed in the browser, check for errors, just an example. Btw, there are blog profiles and a Blog module you can look at for more examples.
-
I don't know . But this is what Google says . I trust Google 100% (), so this must be correct. OK, so, it's StackOverflow. I trust SO .... <script type="text/javascript"> function loadXMLDoc() { var params = "lorem=ipsum&name=binny";// your data to the server var xmlhttp = new XMLHttpRequest(); xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == XMLHttpRequest.DONE) { // XMLHttpRequest.DONE == 4 if (xmlhttp.status == 200) { document.getElementById("output").innerHTML = xmlhttp.responseText; } else if (xmlhttp.status == 400) { alert('There was an error 400'); } else { alert('something else other than 200 was returned'); } } }; xmlhttp.open("POST", '../my-url/', true); xmlhttp.send(params); } </script> source
-
@zimali. Consider this your final warning. You have been posting Drupal stuff in the ProcessWire forums. You have, presumably, ignored my request for clarification. This has trolling written all over it.
- 3 replies
-
- 1
-
-
- inputfieldselect
- hook
-
(and 1 more)
Tagged with:
-
Do you need to sanitize radio buttons or checkboxes when using POST?
kongondo replied to SamC's topic in General Support
Oh yes. Very much so. Try it yourself. Edit a value in chrome dev and inspect what's been sent. I forgot to mention. If you are not doing it already, use CSRF protection and a honey pot.