Leaderboard
Popular Content
Showing content with the highest reputation on 05/12/2016 in all areas
-
Hi Davabo, the problem seems to be your generated HTML code, not the PHP code. You need to create one single select with a dynamic list of options. Try this: <select id="colour"> <option value="-" selected="selected" disabled="disabled">Select Colour</option> <?php foreach($page->colour as $colour): ?> <option value="<?= $colour->colourtext ?>"><?= $colour->colourtext ?></option> <?php endforeach; ?> </select>4 points
-
Another post on t3n using processwire as an example of why classic CMS aren't always the best choice. (And as expected: Immediately random Typo3 fanboys with no pw experience whatsoever popping up and start hatin'. Business as usual).3 points
-
// You don't need to loop the select $options = "<option value='Select Colour' selected='selected' disabled>Select Colour</option>"; foreach($page->colour as $colour) { $value = $colour->colourtext; $options .= "<option value='" . $value . "'>" . $value . "</option>"; } echo "<select id='colour'>" . $options . "</select>"; ps, could have a bug or 2 typed in browser.3 points
-
I think this is now fixed. Following this thread: https://processwire.com/talk/topic/1002-cant-upload-imagefiles-problem/ I created /site/assest/uploads which didn't previously exist and then added this line to /site/config.php immediately below the debug line $config->uploadTmpDir = dirname(__FILE__) . '/assets/uploads/'; It seems the temp upload directory was either not set or not writable. Hope this helps someone.3 points
-
Hey.... I figured it out. It was an echo statement messing up the buffer, in turn causing the Ajax call in ProcessPageList.js to fail. Just shoot me. Apologies to anyone who spent time looking at the post. And I just advanced to junior member too lol Have a good one..3 points
-
Well, I installed a fresh copy of 3.0.17 and started all the steps again. At the first moment, it didn't work, but after I changed the lines on _strings.php to _x('Text to translate', 'General');instead of __('Text to translate'), the translations appeared! But I tried that on my current project and it didn't work, so I'm trying to figured it out here. I'll keep you posted. EDIT: It worked on my project as well! I was forgetting to set the context on one string. So everything is good now!2 points
-
This is probably an overkill, but it would be nice if drag-and-drop an image from an image field to CKEditor could work, even if showing a popup first.2 points
-
This jQuery plugin is very nice and handle these issues: http://vadikom.github.io/smartmenus/src/demo/2 points
-
Okay, replace filter() with find(): $tagless_images = $page->images->find("tags=''");2 points
-
New site for SteynStudio using bb-starter, AIOM, Batcher, image crop, Textarea Counter, Site-wide File Manager.2 points
-
I've just added a pull request for a ProcessWire driver to laravel valet: https://github.com/laravel/valet/pull/55/files For anyone wanting to have a quick local dev environment (on a mac) you should certainly take a look. https://laravel.com/docs/master/valet1 point
-
Thanks to Renobird and LostKobrakai, ProcessWire’s images field has been re-designed and redeveloped with a lot of great new features we think you’ll love! This new images field is available for use now in ProcessWire 3.0.17. The linked blog post covers it in detail. There’s also a screencast at the end that shows you the new images field in action. https://processwire.com/blog/posts/major-images-field-upgrade/1 point
-
Even though I really don't know Renobird or LostKobrakai I would still like to extend a word of thanks for their hard work and the time they put in to make things happen and get stuff done. Congratulations on the roll out. Nicely done.1 point
-
Glad you figured it out! It's interesting why it doesn't work without the context for you. Are you sure you haven't messed up the underscores? There is one in latte files, and two in _strings.php. But I guess you checked that enough times Getting string translation to work is a bit tedious at first, but once you get the hang of it it's easy. Using plurals adds another layer of complexity, even if I tried hard to make it as simple as I can1 point
-
Just do nothing and everything should work fine in 2.x as well as 3.x. One has only to care about namespaces if it's explicitly wanted/needed.1 point
-
You don't need to set any variable for translation. If you need to translate string in the controller, use "_t('Text to translate'). In .latte file you can use '_', '_t'. I tried to replicate your issue, here are the steps (tried on 3.015 and 3.017 also): 1. Added "<p>{_'Text to translate'}</p>" into "home.latte" (one underscore). Text appearead in my home page fine, untranslated. 2. Added this to "_strings.php" - mind the double underscore here: __('Text to translate') 3. In the admin language editor I added the corresponding translation. Prevously I have selected the file "_strings.php" to translate. etalsnart ot txeT After that, this translated text appeared on the page. Even for the default language when setting it another value in the Language Translator.My further bugsolving thoughts are: are you sure the same string is in _strings.php and your .latte file? try clearing Latte cache in module settings Btw, just realized that _strings.php doesn't need starting php tag and comments but only listing the translations (without semicolon at the end).1 point
-
My first stop is always the Network tab of my dev console - there is probably an error from the ajax request that will appear there.1 point
-
Are you using ProcessWire 2.7.2, 2.7.3 or 3.0.17? PHP Version? List of any Third Party modules? Example of any custom code you are using?1 point
-
Good idea - hiding it might be a decent option - I'll have a think about it. I am surprised about this - I am not sure why unless you are using a browser extension. Surely with the online version of any of these tools they won't have any Debugger bar code loaded. Am I missing something obvious? I can imagine that having Tracy running with "Allow Logging in Production Mode" enabled might make a very minor change to scores, but I would expect it to be insigificant.1 point
-
Hi Horst, thank you for your quick replies (I know you are busy)! If I can say thank you with a little invitation, send me a pm. That said, I was really inadvertently resetting all crops (many, many) on my test site. But I had a backup in place, I know I run on thin ice with early beta software but I am so extremely happy that the cropping is working again. I was expecting that - as you wrote earlier here - it does not matter if the cropped versions are deleted, they would be recreated with the stored cropping coordinates. But in fact they were all reset to default instead. Maybe that had to do with the fact I was updating the module only and had no fresh setup. After the page is saved once, the positions get remembered most of the time, but still not always. - If I have more information, I will file a report at your GitHub page.1 point
-
The cache file is regenerated on each pageview, where the file is no found. E.g. when installing the module or if you remove the file manually, where the last one is not a good solution for resetting, as it's removing all timestamps, therefore all hooks would automatically run on the next request. Also LazyCron does not care for specific hooks. It just runs the everyDay function if it's due no matter how many things might be hooked into it.1 point
-
As I said it depends on the timestamp in the LazyCron.cache file. This does determine when the everyDay hook is triggered (e.g. all everyDay hooks at once). If you're using a cron anyways I'd rather suggest not using LazyCron at all in that case. It's nice if you just want to ensure LazyCron to run, but if you want it to run at the cron execution just let it run 'php /some/path/cron.php' with this: <?php // cron.php include 'index.php'; //Trigger anything needed1 point
-
Does it really have to be the "guest" user? As each new user is automatically a guest I think it'll be hard to prevent anyone being a guest. I'd simply create another generic user account, where you log in your "privileged" guest with forceLogin() and then you can at least differ between them. For getting active sessions you'd need to build any querying logic custom for your job. But the mysql query for the session db module can probably be copied from the module itself.1 point
-
Hi again. In case anyone is wondering... this module doesn't currently work with the new image field upgrade in 3.0.17 :-( As Ryan points out here https://processwire.com/blog/posts/major-images-field-upgrade Many thanks Nik1 point
-
Thanks for everyone being involved! I have one issue though, see image: This is a transparent png, a completely white logo that used to be visible, thanks to ProcessWire properly dealing with the issue (before the upgrade). Now we cannot see it anymore, also the new layout and the new buttons are useless in this usecase. The logo is horizontal (a lot wider than its height) and now I might want to set its Column Width a lot wider so that the image is not rendered in such a tiny size. However, I cannot see the image anyway, so for the time being this width might do... BTW: I will never want to crop the image (being a site logo, it is already resized to my liking), it will always have only one variation, so these buttons can clearly be useless, just take up precious space. Also, what if I do not want clients to fiddle with crop? It would be nice to have options to turn these button on/off. Say, on the Input tab where Column Width can be set among other options. I'm also missing a list view. Actually, for basic needs, the old way of doing things worked better. Now we have a lot of bells and whistles, but some basics needs are not fulfilled anymore. I hope this will improve in the future. Thanks anyway! EDIT: please read teppo's comment below, too. He did a great job of further clarifying what I meant.1 point
-
This week I've got to keep the blog post a little brief because I've been so caught up in this weeks' updates that I've run out of time to write much in the post! The updates this week are not actually to the core code, but rather to the API reference documentation for ProcessWire 3.x. There's lots more work to do still, but I definitely have a good start, so going to introduce it here in this post. https://processwire.com/blog/posts/processwire-3.x-api-reference/1 point
-
Not sure what you mean; $tagless_images are your images without tags, for images with tags you use: $mytag_images = $page->images->findTag('mytag'); Count does not belong in your if expression: ->has() returns true or false so it doesn't make sense to count it.1 point
-
$tagless_images = new WireArray(); foreach ($page->images as $image) { if(empty($image->tags)) { $tagless_images->add($image); } } Now $tagless_images is a WireArray of images on the page that have no tag. Edit: this is better... $tagless_images = $page->images->filter("tags=''");1 point
-
Sorry, I have not tested this module in any recent version, but I recommend using the dev version in the thumbnails branch, some minor issues might be fixed there: https://github.com/phlppschrr/ImageFocusArea/tree/thumbnails I have not looked into these new ajax features. Does anybody know of any thread here how to support ajax editing and loading for your own fields? Please continue to report any issues and improvement ideas here (or even better at github). PS: Sorry, for being a bad module maintainer. I still have some plans with this module, but not enough time - too much customer work and a newborn baby at home.1 point
-
lol, I copied your code and the page id number was different. Feel like a complete (choose appropriate insulting word) - wrong page id - I never noticed! Now eq() works fine. Thanks a lot LostKobrakai1 point
-
Thanks horst, but what I was looking for can be found in a blog post by Ryan, I just discovered it yesterday: https://processwire.com/blog/posts/august-2014-core-updates-1/1 point