-
Posts
10,902 -
Joined
-
Last visited
-
Days Won
349
Everything posted by adrian
-
http://eressurs.no/no/processdisplay/
-
The modules directory now has an option for PW 3.0 compatibility. Please test your modules with the latest dev version of PW and tag your modules with the new 3.0 option if everything works as expected. Thanks for all your contributions which help make PW what it is! For those who haven't discovered it (it's not terribly obvious), here is a list of all the modules that are currently tagged as being compatible with 3.0: http://modules.processwire.com/versions/3.0/
-
No problem at all - there is nothing wrong with the approach you took - completely valid code and appropriate in many cases so long as you don't need additional logic. Since you're new to PHP (and maybe other scripting languages?), you may not have seen ternary operators before, so here is a great explanation: http://davidwalsh.name/php-shorthand-if-else-ternary-operators They shouldn't be used instead of if/else in all situations, but in many cases they can make code simpler. If used incorrectly with too much nesting, they can become horrible to read If you want to stick to the style you have, you could do this: $staticPages = $about->children("sort=name"); foreach($staticPages as $staticPage) {?> <li class="list-group-item<?=$page == $staticPage ? " active" : ""?>"><a href="<?=$staticPage->url?>"><?=$staticPage->title?></a></li> <?}?> I find it messier, but others may prefer it. Also be warned about php shorttags: <?= vs <?php echo - not all servers will currently support shorttags, although it is the default in more recent versions of PHP.
-
This should do it. Sorry for reformatting your code, but it becomes awkward trying to add ternary operators into a code block with PHP tags sprinkled into the HTML like that. $staticPages = $about->children("sort=name"); foreach($staticPages as $staticPage) { echo "<li class='list-group-item" . ($page == $staticPage ? " active" : "") . "'><a href='{$staticPage->url}'>{$staticPage->title}</a></li>"; }
-
This should do the trick! $f = $fields->get("body"); echo '<i class="fa '.$f->icon.'"></i>'; PS make sure you load this on the page: <link rel="stylesheet" href="/wire/templates-admin/styles/font-awesome/css/font-awesome.min.css" type="text/css">
-
Clients need to regularly update page data from CSV files? Check out the enhanced Batch Child Editor (http://mods.pw/6K) to predefine CSV column - PW field connections.
-
You might be able to get some ideas from my Table CSV Import / Export module - even if you don't have Profields Table, you should still be able to grab the bits of code you need - take a look at the "Export as CSV" button on the screenshot in the first post: https://processwire.com/talk/topic/7905-profields-table-csv-importer-exporter/ In the repo you'll notice there is a helper Process module (ProcessTableCsvExport.module) for handling the action when that button is clicked. Hope that helps a little, although keep in mind that it uses a hidden iframe technique to spawn the download and as noted by others above, you will probably need an AJAX approach in this case.
-
Try this: $t = $templates->get("basic-page"); $nt = $templates->clone($t); $nt->save();
-
Ok, all new features have now been merged to the master branch. I have changed the release state from Stable to Beta for this release. Really just as a precaution for the Update mode options until I have had more feedback on this. Please let me know how this new version works out for everyone. It will probably take you a while to go through all the new configuration options, but I think it's worth the effort. You can use this module as a simple replacement for the Children/Subpages section of the Children tab (which allows for much quicker editing of child pages), all the way through to a fully customizable CSV import tool for site site editors to create and update pages. Feel free to send through any other ideas along with any issues you come across.
-
You want to use addStatus so that your change goes from 1 to 2049 so that when you remove unpublished via the admin it takes off the 2048 that means unpublished and returns it to one. If you set the status directly to unpublished, it will end up being 2048 which is not what you want. $page->of(false); $page->addStatus(Page::statusUnpublished); $page->save();
-
Great discussion everyone. In a hurry, but just wanted to mention that I have used that blueimp uploader on a site for several years now and found it awesome, so these guys definitely do good work!
-
Alternative to creating pages for temporary data storage
adrian replied to Vineet Sawant's topic in Getting Started
https://processwire.com/blog/posts/processwire-core-updates-2.5.28/#wirecache-upgrades and a little more hot off the press: http://processwire.com/blog/posts/processwire-2.6-rc1-2.5.29-and-more/#whats-new-this-week-processwire-2.5.29 -
Do you know what the new password is? You need to edit your /site/config.php file and change: $config->dbPass
- 1 reply
-
- 1
-
That module and teppo's swift mailer module work to extend the base wireMail class. I had forgotten that horst's one supported attachments directly. Glad you got things working!
- 5 replies
-
- attachment
-
(and 1 more)
Tagged with:
-
Limited time, so just a quick answer - I would recommend using SwiftMailer - check out this page on how to send a message and include attachments: http://swiftmailer.org/docs/messages.html You might be able to make use of the swiftmailer files from teppo's module: http://modules.processwire.com/modules/wire-mail-swift-mailer/ but I don't think there is anyway to use wireMail() directly to send attachments.
- 5 replies
-
- attachment
-
(and 1 more)
Tagged with:
-
I have managed an SMF forum for about 10 years. It's OK, but has definitely had its share of security issues over the years and internal developer squabbles, but feature-wise it is quite nice. For anything new I think I'd like for something more modern though.
-
Sorry about that, I never tested in a multi-language environment. I just took a quick look and committed a fix that seems to be working fine here. Could you please try out the new version and let me know if it works for you.
-
Either use a Page field or the new Options Fieldtype and then choose the Checkboxes Inputfield. Checkboxes as an Inputfield is very different to the singular "Checkbox" fieldtype.
-
Thanks for the report @NorbertH! There were a couple of updates this morning: fixing some issues with some page specific settings not overriding the main config settings added support for subfields in the field pairings - verified to work for Profields Textareas and MapMarker fields, but I think should work for most others as well - let me know if you find any that don't work. A question for all you multi-language folks out there - does anyone ever rename the name of the title field? I am sure you often change the label, but the name is what I am concerned about. There are a few places in the module that check for "title" but I am thinking that if this is not always its name, then I might need to check for it by: type = "FieldtypePageTitle" Trouble is that it is possible to have more than one FieldtypePageTitle field on a site which seems a little weird - does anyone know a use case for that? Any thoughts on this?
-
For those interested, I just committed another small update that includes a couple of fixes from @LostKobrakai as well as support for not needing to define the "title" field in the field pairings if you only have edit and overwrite mode enabled. This should make it much more flexible when running CSV data imports to update existing pages. EDIT: Also just changed "Overwrite" edit mode to be called "Update" to better describe what it does and also to avoid confusion with the "Overwrite Names" option.
-
I don't think this module currently works with v3 of Google's API: https://processwire.com/talk/topic/784-module-google-calendar-loader/?p=81207 Just a small FYI in case you don't know - those dates are effectively time zero for unix timestamps which is an indication that no datetime is being returned at all.
-
Looks awesome - very polished and professional - I can't wait! PS I hope they are a little biased
-
Ah, right - sorry I wasn't thinking about this style of game - I had no idea they still existed! owzim's comment is much more appropriate than mine
-
I don't see much use for PW in a project like that unless you have an associated site with profiles of all the players or something, but even so I think in that case I think there are better options for that. I assume the key thing you are looking for PW to do is store info about each player, their score, their weapons arsenal etc? Obviously the game itself will be canvas/javascript. Can I recommend EaselJS for all your game logic and canvas manipulations? I think I would probably go with a completely JS solution and use MongoDB (or some other noSQL DB) for this. There are lots of options.