Leaderboard
Popular Content
Showing content with the highest reputation on 01/30/2014 in all areas
-
As Joss mentioned ( I hope I find some time to do a case study. ) I didn't use any framework as I thought it's not necessary/not possible here as I needed specific widths. The site should run on 1024px monitors and lower, and the company wanted the 970px banner format in the top. Next they wanted a fixed sized 336px rectangle banner on the right. We wanted to have max space on 1024px and it should work on mobile. The thing I wanted was that more important content should be more in the top in the source then less important content. The max space I could give the site was: 1024px minus the 20px scrollbar for Windows XP Explorer 8. ( 1004px ) So here's the calculation what I used for the sizes: (16 pixels is gutter space ) header: banner XL 16 + 970 + 16 = 1002px body: column column banner size column 16 + 301 + 16 + 301 + 16 + 336 + 16 = 1002px So 1004 is the max width the site can be (screen wise) but I succeed it to stretch till 1002. The columns on home for example will figure out if the column should float left or float right. Those blocks can be 100% width or 50% width of the container. it's depending on height of previous blocks. I wrote this script to handle it.6 points
-
Dear Ryan, After wrestling with a WordPress installation at work, I have come to even more deeply appreciate ProcessWire. Like I tell my children, "If I love (PW in this case) any more, I'll melt." So that's a quotable quote. "If I love ProcessWire any more, I'll melt." Not only does ProcessWire purge the cache of the home page and the parents of an edited or added article, it also refreshes the cache on the paginated section pages. WordPress does not do that, with the W3TC plugin, or the WP Varnish plugin (according to our WordPress person.) At http://significatojournal.com, I've set up paginated section pages of articles, and tonight I tested the template caching option: "Clear cache for the saved page and parents (including homepage)" After testing adding an article, the paginated section pages correctly moved the last article on the page to the next page, and shuffled the next pages as well. When I deleted the test article, the section pages all shuffled back. Zowie. For this WordPress installation, we'll have to revise one of the plugins to do that. Have I said I like ProcessWire? Kudos, Ryan, and all the Brilliant, Genius Contributors! Peter5 points
-
Today we launched a new website www.pluimveeweb.nl. This is our first portal page build in ProcessWire is all about poultry. Partners of pluimveeweb can have their own Microsite within the site. There are several different sources where information is comming from, imported to ProcessWire, managed in the backend and make it ready for articles. It is quite a big project worked the last 3 months on it. Here ya go: pluimveeweb4 points
-
Greetings, Hey Peter, I know what you mean! It's part of my routine to express -- out loud -- how much I love ProcessWire. I say it quietly to myself, I say it in forums, and I say it to clients. You mention your kids in the same context as ProcessWire. Well, my five-year-old daughter knows about ProcesWire already, or at least the amazing community we have here. She regularly enters my office, sees me on the PW forum, and asks to see that "green monster" that shows up on the forum pretty regularly. You came here from WordPress. Many of us have come here from various other systems. I suffered with Joomla for a couple of years prior to ProcessWire. But we're all glad to have arrived here now. Thanks for posting, Matthew4 points
-
Is this OK that I am (laughingly) complaining a bit about another CMS? It's a pub and that's where people do that, right? I took on a WordPress project after 7 years of no WordPress. No surprises: exact same level of frustration. After admiring the built-in "Press This" bookmarklet feature for a few seconds, I was amazed to see these dashes holding the conceptual page model together. With sortable columns, dashes start to fly everywhere! Everyone gets a dash. After looking that over, I had a back-and-forth discussion on "where is the posts page? Maybe this page should be the posts page" and it was making me feel like I had wandered back into the asylum. I pitched ProcessWire as a backend for this project, but it unfortunately it was a decision for a different team. It's also weird how there's nothing even close to, say, $input->get->foo in WP. You have to head on over to functions.php and start writing a filter so you can capture that stuff if you need it. Oh well. I'm thankful to have learned enough PHP from ProcessWire that I know what to look for and can work around a lot of stuff that they recommend you install plugins to fix.3 points
-
Haha Similar experience from here: my six year old son recently asked his mom "did you know that dad has a friend called Ryan, who lives in USA?"3 points
-
Hmmm, You could easily do this with a very simple module, no? E.g. make use of Soma's latest jQuery Data Tables helper class (with Ajax goodness, etc) or PW inbuilt MarkupAdminDataTable. I'll post a link to a short demo video here and some code in Github to show you how simple this can be accomplished..... Edit: added video demo code: Will upload soon....it is very rough code, a proof-of-concept... ;-) As you can see from the video, a couple of things could be improved! Uploaded here The code here is so trivial it shouldn't even be upped to Github. However, I hope this helps to show newbies that PW is dead-easy!..even for PHP newbies like me! Pete, sorry to hijack your thread3 points
-
Nice! Thanks. Aaah, a Windows issue.... Let me test.. Edit: Bazinga! Fixed! Am the proud owner of a brand new Core tab!2 points
-
Dear Matthew and PWired, Thank you! I appreciate that. I've learned SO much about ProcessWire from these forums. This is a great community. Matthew: I didn't come from WordPress. The company I work for has WordPress installs, but I'm not the WordPress guy. I came from MODX Evo, and before that, I wrote my own CMS in Perl. But ProcessWire ROCKS. Peter2 points
-
You reported WireTabs not working in modal=1 mode on GitHub, but I've not been able to reproduce that. There was an issue a couple weeks ago with modal=1 mode, but that was fixed. It's possible the version you upgraded to (2.3.13) didn't that that fix. We are now at 2.3.15. Debugging is developing I'm not aware of any changes that would affect access control, though we do have bug fixes in place. Most likely your site was affected by a bug involving the rewriting of the pages_access table, and when you saved something with the roles, it dumped and re-created the table, cleaning out the old buggy data.2 points
-
Always such great videos kongondo, and a great module too. Just also thought it worth mentioning that several of the 3rd party themes out there all display last created / last edited in either a sidebar, or at the bottom of the page, eg: Moderna and MetroWire. It's often as simply done as something like this: foreach($pages->find('limit=5, sort=-modified') as $p){ if ($p->editable()) { echo "<li><a href='".$config->urls->admin."page/edit/?id={$p->id}'>". date('d.m.', $p->modified) ." " . $p->title . "</a></li>\n"; } }2 points
-
Good catch Kongondo, thanks! I didn't test that quite enough obviously. I fixed this and also added a little bit intelligence to the option: If currently edited page is hidden but published all published pages are acknowledged (visible or hidden) If currently edited page is unpublished all pages are acknowledged Otherwise (visible, published page) only visible and published pages are acknowledged That may lead to some confusion I'm sure, but it felt quite natural to me. Feel free to disagree .2 points
-
Field dependencies are coming in ProcessWire 2.4, and I just wanted to give you guys a little preview of it. The development of this new feature is being sponsored by Avoine, the company where Antti works (he also specified how it should work). Field dependencies are basically just a way of saying that one field depends on another. It dictates which fields should be shown in a given context. In our case, it also gets into whether a field is required or not. This short video demonstrates how it works: (switch to the 720p and full screen version, as YouTube's default settings for this video make it impossible to see): // Edit @Adamkiss: Here's link for those on mobile: youtu.be/hqLs9YNYKMM The implementation here is done both client-side and server side. Javascript handles the showing/hiding of fields and the required vs. not required state changes. On the server side, it doesn't process any fields that aren't shown, and honors the required rules. A separate processing occurs both client side and server side, ensuring that the user can't make their own rules by manipulating the markup or post data. These field dependencies can be used with any Inputfield forms. That means you'll be able to use it not just in ProcessWire, but in FormBuilder, and via the API too. It's very simple to use from the API. All you have to do is specify a ProcessWire selector to either "showIf" or "requiredIf" to the Inputfield, and ProcessWire takes care of the rest: // show this field only if field 'subscribe' is checked $inputfield->showIf = "subscribe=1"; // show this field only if 'price > 0' and at least one category selected $inputfield->showIf = "price>0, categories.count>0"; // make this field required only if 'email' is populated $inputfield->required = true; $inputfield->requiredIf = "email!=''"; This feature will be in the 2.4 core (rather than as a separate module), so it will also be ready and available for things like module and field configuration screens.1 point
-
Hi all! Here it is the first draft of the italian translation of processWire 2.2. All files should be translated, but for clarity, below there are all the files translated. Core /wire/core/Fieldtype.php Inputfield Modules /wire/modules/Inputfield/InputfieldEmail.module /wire/modules/Inputfield/InputfieldFile/InputfieldFile.module /wire/modules/Inputfield/InputfieldImage/InputfieldImage.module /wire/modules/Inputfield/InputfieldPageListSelect/InputfieldPageListSelect.module /wire/modules/Inputfield/InputfieldPageName/InputfieldPageName.module /wire/modules/Inputfield/InputfieldPassword.module /wire/modules/Inputfield/InputfieldSubmit/InputfieldSubmit.module /wire/modules/Inputfield/InputfieldTinyMCE/InputfieldTinyMCE.module /wire/modules/Inputfield/InputfieldURL.module /wire/modules/Inputfield/InputfieldPageAutocomplete/InputfieldPageAutocomplete.module Markup Modules /wire/modules/Markup/MarkupPageFields.module Language Support Modules /wire/modules/LanguageSupport/LanguageSupport.module Process Modules /wire/modules/Process/ProcessForgotPassword.module /wire/modules/Process/ProcessLogin/ProcessLogin.module /wire/modules/Process/ProcessPageAdd/ProcessPageAdd.module /wire/modules/Process/ProcessPageClone.module /wire/modules/Process/ProcessPageEdit/ProcessPageEdit.module /wire/modules/Process/ProcessPageEditImageSelect/ProcessPageEditImageSelect.module /wire/modules/Process/ProcessPageEditLink/ProcessPageEditLink.module /wire/modules/Process/ProcessPageList/ProcessPageList.module /wire/modules/Process/ProcessPageSearch/ProcessPageSearch.module /wire/modules/Process/ProcessPageSort.module /wire/modules/Process/ProcessPageType/ProcessPageType.module /wire/modules/Process/ProcessProfile/ProcessProfile.module /wire/modules/Process/ProcessField/ProcessField.module /wire/modules/Process/ProcessHome.module /wire/modules/Process/ProcessList.module /wire/modules/Process/ProcessModule/ProcessModule.module /wire/modules/Process/ProcessPageTrash.module /wire/modules/Process/ProcessPageView.module /wire/modules/Process/ProcessPermission/ProcessPermission.module /wire/modules/Process/ProcessRole/ProcessRole.module /wire/modules/Process/ProcessTemplate/ProcessTemplate.module /wire/modules/Process/ProcessUser/ProcessUser.module Admin Theme /wire/templates-admin/default.php ================== I will check with more attention the quality of translation in the week-en! If you want to contribute, this is the Github repo: https://github.com/U...ian-processwire Cheers, Alessio1 point
-
Here's my first draft for the Spanish translation. Please note that: It's fairly complete, but not quite ready for production. Spanish is not my mother tongue (I'm French), but I've been living in Spain for 10 years so it should be acceptable. Contributions and suggestions are welcome. I will post updates as necessary. This is Spanish for Spain. Some parts of the translations might not be appropriate in South American countries for example. In particular, I've used the less formal, more direct version of "you": "tú" as opposed to "usted", which is much more common in Spain. I love ProcessWire and I'm glad I can contribute to this awesome project. UPDATES: December 10, 2013: Translation files updated for dev version 2.3.8 (see "spanish-spain-december2013.zip" below) March 4, 2014: I've created a Github repository that I plan to update whenever possible. All updates will be posted there from now on. June 16, 2014. Update to 2.4.4. spanish-spain.zip spanish-spain-december2013.zip1 point
-
@MarcC - wordpress with ACF gives a little % of processwire feel; custom fields and api to get the data; on the rare instance i use WP, i'm always using ACF..1 point
-
If anyone is interested in a (now) free font conversion tool for OS X: http://fontprep.com It works a treat for converting any free TTF or OTF libraries you have.1 point
-
I just wanted to take the time to personally thank you for adding the notification feature. It works brilliantly.1 point
-
Soma, Thanks for sharing this — I just updated 3 in-house "dataTable" modules to use this module instead of their local copies. So much easier to maintain. Also, the ProcessDataTable module has been an excellent boilerplate for building custom admin pages. So, thanks for that too.1 point
-
What a waste of time, but I have managed to narrow down the debug accordion/source truncation issue to the ProcessPageDelete module and this code: public function addJavascript(HookEvent $event) { $js = ' <script type="text/javascript"> $(document).ready(function() { $("li.PageListActiondelete a").live("click", function(el){ if(!confirm("Are you sure?")) { return false; } }); }); </script>'; $event->return = str_ireplace("</head>", $js.'</head>', $event->return); } I am still not completely sure why it is breaking things and especially why only on one installation, but what I did was move that JS code into it's own file and call parent::init(); to have the module automatically load the ProcessPageDelete.js file. I'll submit a pull request to Nico.1 point
-
1 point
-
Several options, but this post should get the juices flowing: http://processwire.com/talk/topic/2480-sort-children-by-the-sum-of-two-fields/1 point
-
Speaking of the debug section, would you be opposed to this change so that it can be toggled closed again? $(document).ready(function() { $("#debug").accordion({ header: 'h3', heightStyle: 'content' }).hide(); $("#debug_toggle").click(function() { if ($('#debug').is(":hidden")) $("#debug").slideDown(); else $("#debug").slideUp(); var n = $(document).height(); $('html, body').animate({ scrollTop: n },'50'); return false; }); });1 point
-
The debug info is meant to be shared among admin themes (optional), so the new admin theme uses the one from /wire/templates-admin/debug.inc. Have a look in that file. At the bottom should be a Javascript section with a $('#debug').accordion(...). It sounds like that JS is not getting executed or, maybe there's another element on the page with the #debug id? We should probably use a different ID attribute for this debug div, as #debug is a potentially very common thing that is maybe best left for 3rd party use. If you view the source on your page and search for "debug" does it come up anywhere other than for the <div id='debug'> at the bottom? That just means that the files for that module aren't writable to ProcessWire. The logo is intended to disappear at mobile sizes. But if the combination of topnav items + search boxes forces them to be split on two rows, then it'll show the logo again, since there is room for it. If the combination forces it to go onto 3 lines, then it again hides the logo and moves all the navigation to that hamburger icon. So the behaviors kind of depend on how many top navigation items you have in your admin. Thanks, I'll go through and test these out and add any missing __('functions');1 point
-
Dear Kongondo and Adrian, Yes, those options are good ones. I just thought it would be cool if it was included by default in the new PW version. I installed a few of those other admin templates, but ended up coming back to the PW flavor. One day, I'll work on modifying an admin theme myself: just haven't gotten there yet. Peter1 point
-
Thanks, that helped me to fix it (I think!). If you try out the latest dev, you should now see a Core tab (file updated was this one). Please let me know if that doesn't resolve it. The attributes you mentioned are added by jQuery UI via Javascript. Check if there is a JS error occurring? I don't know what "New Admin Theme" is, but check your /site/modules/ directory to see if you've got an admin theme in there and remove it if you do. Also if you've got a /site/templates-admin/, go ahead and remove or rename that too. Double check that your /wire/ directory was fully removed and replaced (rather than replaced into) during the last update.1 point
-
Attached, the whole list (local install, no worries...) fields.txt1 point
-
Thanks Adrian for the reminder. Yes, there's that as well. I forgot to mention that this could also be accomplished using a custom admin page....We're spoilt for choice with PW!1 point
-
Something you could do in terms of creating the full table automatically: function maketable($pageid){ $current_page = wire('pages')->get($pageid); echo "<table>"; foreach($current_page->fields as $field){ if (strpos($field,'DMC_') !== false) { echo "<tr> <td>{$field->label}</td> <td>{$current_page->$field}</td> </tr>"; } } echo "</table>"; } maketable(xxxx); This will create the entire table for you from just the ID of the page and will make a table row for each field that contains "DMC_" in it's name.1 point
-
1 point
-
Great to see lots of new votes and tweets coming in. Thanks to everyone that's been voting and tweeting–keep it up! If you haven't yet voted, now is a good time to get your vote in as we've got just 2 days left.1 point
-
What you've done is not wrong at all. But think I will do this a little bit different. Your function returns the global Label of the field and not the field label belonging to the requested Page. ( context settings of the field ) And I guess you want that one. // needs a Page object to function function maketable(Page $page, $field_name = null) { // escape if no fieldname given if(!$field_name) return; $field = $page->fields->$field_name; return "<tr><td>$field->label</td><td>" . $page->$field_name . "</td></tr>"; } echo maketable($looped_page, 'title'); // $looped_page, a Page that makes the table row1 point
-
*UPDATE* So, I just had to implement a solution so I ended up using cookies. There are two cookies created for every user, when user reaches payment page, his/her user ID & transaction number are stored. Every time when user is redirected back to site, if he/she is logged out, using transaction ID returned by payment gateway, I identify user by comparing the stored transaction ID and get user id stored with it. Once I've user ID, I complete the post successful payment procedure to make sure user gets what he paid for. Updated it here so it might help someone in future and also, experts here can tell me if this solution is safe enough. Thanks & Have a great day.1 point
-
You can get the label within your function like this: echo wire('fields')->$field->label; The details of the field (like the label) are part of the $fields array, and not the $pages array if that makes sense.1 point
-
1 point
-
Try wrapping $current_page->$field in curly brackets like: {$current_page->$field}1 point
-
Nik, Thanks for the update. Works nicely but there is one issue..A cookie is not being set/or is being ignored for "remember this setting" when it comes to "Edit next sibling page". Is this the intended behaviour? (maybe to deal with cases where there is no next sibling?). At the moment, it is rather tedious to keep on selecting after save -> edit next sibling on each page edit1 point
-
Makes sense to me Nik. When a parent is filled with imported unpublished pages, it's likely that you save/publish/delete it and go to the next unpublished/hidden.1 point
-
Hanna Code doesn't actually execute from the DB. It writes each Hanna code to a file in /site/assets/cache/HannaCode/ and then uses the DB copy of the code to compare against the one on the file system, to make sure something hasn't changed the one on the file system. It executes the PHP code from a file in order to ensure it is as fast as possible (avoiding eval) and in the same context as a template file. That's what it does behind the scenes, but Soma's tip is just as useful either way, as Hanna Code wouldn't let you edit its own PHP files directly.1 point
-
Well, I'm no pro at this and you could probably improve it, but here's my attempt which serves my current needs pretty well: /** * Creates a repeater field with associated fieldgroup, template, and page * * @param string $repeaterName The name of your repeater field * @param string $repeaterFields List of field names to add to the repeater, separated by spaces * @param string $repeaterLabel The label for your repeater * @param string $repeaterTags Tags for the repeater field * @return Returns the new Repeater field * */ public function createRepeater($repeaterName,$repeaterFields,$repeaterLabel,$repeaterTags) { $fieldsArray = explode(' ',$repeaterFields); $f = new Field(); $f->type = $this->modules->get("FieldtypeRepeater"); $f->name = $repeaterName; $f->label = $repeaterLabel; $f->tags = $repeaterTags; $f->repeaterReadyItems = 3; //Create fieldgroup $repeaterFg = new Fieldgroup(); $repeaterFg->name = "repeater_$repeaterName"; //Add fields to fieldgroup foreach($fieldsArray as $field) { $repeaterFg->append($this->fields->get($field)); } $repeaterFg->save(); //Create template $repeaterT = new Template(); $repeaterT->name = "repeater_$repeaterName"; $repeaterT->flags = 8; $repeaterT->noChildren = 1; $repeaterT->noParents = 1; $repeaterT->noGlobal = 1; $repeaterT->slashUrls = 1; $repeaterT->fieldgroup = $repeaterFg; $repeaterT->save(); //Setup page for the repeater - Very important $repeaterPage = "for-field-{$f->id}"; $f->parent_id = $this->pages->get("name=$repeaterPage")->id; $f->template_id = $repeaterT->id; $f->repeaterReadyItems = 3; //Now, add the fields directly to the repeater field foreach($fieldsArray as $field) { $f->repeaterFields = $this->fields->get($field); } $f->save(); return $f; } And here's an example of calling it: $f = $this->createRepeater("sc_promos","sc_promo_active sc_promo_code sc_promo_discount","Promotional Offer","shoppingCart"); You can then use $f to add your new repeater field to a fieldgroup/template.1 point
-
Cool, combined with Repeater Table you can setup a nice ordered table within 5 minutes1 point
-
This is epic. Thanks for building it Ryan. Couldn't be happier with how it turned to be!1 point
-
Antti here it is if you want to give it a try. Replace these files with those attached: /wire/modules/Fieldtype/FieldtypeFile.module /wire/core/Pagefile.php Test it out on a non-production setup first, as it does make schema modifications. But once installed, it adds 'modified' and 'created' fields to all file/image fields, and these can be queried in selectors as well. They initially start out at the current date/time. If you modify a file/image description or sort, that updates the 'modified' property. The 'created' property stays the same. Let me know how this works for you? If all is good, I'll commit it to the dev branch. FieldtypeFile.module Pagefile.php1 point
-
That's unexpected. I have no idea what that would be. Doesn't sound like something coming from ProcessWire. I agree with everything Soma and 12345J said. When you get a "destinationPath is not writable" message, that only comes as a result of a permission issue. 12345J's suggestion was just to rule out the possibility that destinationPath isn't what we think it is for one reason or another, as well as to point out what the directory is so that we know what we're troubleshooting. But if you aren't even getting an error message when changing to his suggested code, that's a bit unusual. Why don't you just try changing it to this temporarily: if(!is_writable($this->destinationPath)) die($this->destinationPath . " is not writable"); That will halt execution and give you the message indicating exactly what directory isn't writable. Most likely there is a permission issue affecting the directory due to some change at the server or a site migration that didn't retain permissions. If you have shell access, a simple way to resolve it would be this: cd /your/web/root/ chmod -R og+rw ./site/assets If that doesn't do it, or you don't have shell access to do that, then I'd suggest creating a simple test script that you can use to help resolve it without having to upload an image every time. Place this in your web root in a file called test.php: /test.php: <?php if(is_writable('./site/assets/files/1/')) echo "Writable!"; else echo "NOT writable!"; If you know the ID of your page, replace the "1" in the path above with the ID of your page. For instance, ID 123 would be: ./site/assets/files/123/1 point