Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 03/16/2016 in all areas

  1. hello! I created a new site for my podcast Machines-ethics.net and thought I should create a version for anyone to use. With PW-podcast profile you can create one or more lists of pages with content and create one or more itunes RSS feeds to syndicate your podcast (as well as listening online). There is also a blog section and basic pages for anyother page you need. Check out the example site here: http://pw-podcast.nicegrp.com/ and the github here: https://github.com/benbyford/pw-podcast
    11 points
  2. Move all section template files in a folder "sections" and include them like that for rendering in other templates: $markup = wireRenderFile("sections/section-article", array( 'page' => $pageToRenderOf )); Because the files are no longer stored at the default template path these pages do no longer show up as viewable.
    4 points
  3. Since my last post we got 8 more likes! Should I keep posting here till we outrun Wordpress ? Come on! Gimme a hundred!
    3 points
  4. @Asmordean You might want to have a look at https://github.com/mozilla/pdf.js Widely used code for embedding PDFs in a standards-friendly way. As szabesz said, you still need to check for the client's browser setup and act accordingly if you want to make sure that the PDF is embedded in your HTML. Here's some code to point you in the right direction: https://gist.github.com/falexandrou/9753871 Instead of using an Iframe you could embed it as an object (see the first link above).
    3 points
  5. Just to be clear: it's not required to install a language pack. A language pack is nothing more than strings already translated. ProcessWire will not depend on that, it will always use the default if a translation if missing. Do you have lots of data already? If you don't, you can do the following: On setup > languages 1 - Change 'default' language title to Danish 2 - Change 'da' language name to 'en' and its title to English In every page, copy the content from one language tab (on every field) to the other. (yeah, I know...) =========== You can also use the module Migrator to export everything to a json file, open it and find/replace things there (I never tried, though)
    3 points
  6. @reno Yep, it also respects the $config->pagefileExtendedPaths setting, e.g. it creates a folder for each page ID or a nested folder structure, if the setting is enabled. Cheers
    2 points
  7. Yep. It's essentially moving the files folder to a non accessable folder. Everything inside the folder does stay the same.
    2 points
  8. If you want to install processwire on cloud server you may simply follow the guideline
    2 points
  9. There is a fix needed in the .htaccess file to allow services like Let´s encrypt to use the webroot authentication method. I created a pull request for this https://github.com/ryancramerdesign/ProcessWire/pull/1751
    2 points
  10. I think the best way to promote PW is through documentation and tutorials for new users or users that are migrating from other CMSs. One of the great strengths of wordpress is the large amount of available material for novice users. I know by myself that PW is super easy, but apart from the tutorial "Simple website tutorial" by Joss there's no other complete tutorial about PW that can take you from knowing nothing to understand how it PW works. I'd love to do some tutorials by myself, but I still do not trust what I am doing or if I am doing well.
    2 points
  11. 2 points
  12. ...but not the normal issue I have a situation where in really remote areas an intranet site loads extremely slow due to slow connection. I've implemented jQuery to stop the submit button from being able to be clicked more than once, and the user tells me they're definitely not spamming the button anyway, but on their occasionally really slow connection I sometimes receive a few dozen identical form submissions. As such I don't think a JS solution is likely to work and I need something clever in the form itself. Would it be enough to send a random string in a hidden field and check if that string has been used before? My only worry about doing it that way is I'd need to store that string with the form entry which seems like unnecessary overhead. The other way is with CSRF, but I don't want to show a nasty CSRF error - just a blank "this form has been submitted" message.. EDIT: Turns out I can just use an adapted version of this and use CSRF - thanks Soma! https://gist.github.com/somatonic/5233338
    2 points
  13. To not copy my suggestion again: https://processwire.com/talk/topic/12409-prohibit-view-of-pages-with-certain-template/ I'd really refrain from using $page->render() for rendering partials in favor of wireRenderFile().
    2 points
  14. @kongondo Just an idea: maybe you might want to consider integrating/utilizing Ryan's brand new Google Client API module.
    2 points
  15. Yahoo! Seems like our little campaign was successfull! Not without some changes in the alternativeto.net's inner workings (I do not know where that cyn.in went and how Joomla lost 2 voices), but anyway! Something to count as success at the end of the year. Edit: Interesting, have we got any trafic increase from there?
    2 points
  16. Hi, I have uploaded a new version to Github that fully supports PW 2.6+ with its new naming scheme. The package now ships with two Pim versions, the older one, called Pim, that can be used until PW 2.5 stable, and the new one, Pim2 that should be used with PW 2.6+ So, if you start a new site with PW 2.6+, simply install Pim2 only! If you have upgraded PW to 2.6 on an existing site with lots of image variations, you should install Pim2 additionally to the older one, (do not uninstall it yet!) then you should start to change your API calls in your templates like the following explanation . here is a code line from the older Pim: $image = $image->pimLoad($prefix)->watermarkText($txt, 75)->setQuality(80)->pimSave(); . To start with smooth change from Pim to Pim2, you can change it to this: // use the old Pim to remove the PimVariations with old naming scheme: $image->pimLoad($prefix)->removePimVariations(); // in the copied original code line, only change pimLoad to pim2Load, note the number 2 ! in the new start method ! $image = $image->pim2Load($prefix)->watermarkText($txt, 75)->setQuality(80)->pimSave(); . This way you have some control on which parts the new creation may take effect, e.g. on a small site you can change all API calls at once and drop caches if exists. On bigger sites you may start at one template / page first, and add more changes later. . Regardless of this, you can safely let the call to the older removePimVariations() method stay in your code for a while, as they do not interact with the newer one. After a while, when you do not see any of those old filenames in your assets/files folders, you can remove those lines from your code and also uninstall the older Pim. All other methods than pimLoad / pim2Load are completly identical and can be seen here in the API
    1 point
  17. Hi everyone, Here's a quick little module that I hope you'll find useful. NB It requires PW 2.5.16 (or late 2.5.15 - this is the exact commit) It allows you can control display of the various Page Edit tabs by user permissions. So if you want to always hide the Settings tab for users of a particular role across all templates, this should come in handy. http://modules.processwire.com/modules/restrict-tab-view/ https://github.com/adrianbj/RestrictTabView You can approach this from two directions - hide from all users unless they have View permission, or show to all users unless they have Hide permission. It's up to you to create the permissions and assign them to roles. Let me know if you have any problems or suggestions for improvements. BTW - I am not sure how much use the Delete and View options really are in most situations, but they are there if you want them. PS Thanks to @LostKobrakai for the code in this post: https://processwire.com/talk/topic/8836-how-to-manage-delete-tab-for-user-groups/?p=85340.
    1 point
  18. Some time ago I developed a module (FieldtypeImageExtra) which extends Fieldtype Image with the ability to add custom fields to an image. This worked well but it had a somehow restricted applicability and did not meet all of our needs. There of course are other useful image modules like CroppableImage or ImageFocusArea, but up to now there was no possibility to combine image cropping with custom fields support. So you had to decide whether to add image cropping or the possibility to add custom fields because each of those modules sets up their own field type (and input type) which cannot be combined. The new module ImageExtra allows you to have both functionalities. You can get the module from GitHub. For more informations have a look at this blog post. If you notice any problems or unexpected behaviour please let me know.
    1 point
  19. I'm committed to support Repeater and Repeater Matrix with ProDrafts, but don't yet know on how soon it will be. Most likely it will be a little after releasing PW 3.0 as the new stable version, since Repeater Matrix requires PW3. The good thing is that both of those types (and PageTable) are based on PW pages already, and ProDrafts works with PW pages. So supporting it is more a matter of linking and delegating things in the right way, since technically we can already maintain drafts of all those types... but just yet not connected with the owning page. Btw, I'm thrilled to hear how much you like Repeater Matrix. I haven't heard from many people using it since I released it, so it's very encouraging to hear that you are getting good use out of it! I am definitely getting good use out of it here too.
    1 point
  20. ProcessWire is a PHP cms. It's inherently backendy and even built to be as decoupled from actual markup as possible. For css / js things you'll probably need to look elsewhere.
    1 point
  21. It sounds like you are using the PageProtector module. It only prevents users from viewing pages on the front-end. I can't tell if that's what you want or if you expect them to also not be able to view and edit them in the backend? Also, you say that you selected all roles, except the member role. Do the members also have one of the other selected roles? Including "guest"?
    1 point
  22. Thank you Sérgio, that's a perfect solution for this particular situation!
    1 point
  23. Whether a PDF file is downloaded or not depends on server configuration or browser settings and maybe on transferring the document files through PHP should it be the case. eg.: https://www.devside.net/wamp-server/forcing-a-pdf-or-doc-to-open-in-browser-rather-than-downloading Personally my Safari is set to force the download of any PHP file by turning off the viewer plugins. So you might need to check the client's setup as well.
    1 point
  24. $config->urls->root doesn't have anything to do with the pagetree, especially on multi-language setups. It's much rather intended to be used as variable if processwire is installed in the root directory ( /… ) or in a subdirectory ( /mySubdirectory/… ).
    1 point
  25. Without much testing: install AdminCustomFiles module, create /site/templates/AdminCustomFiles/ProcessPageEdit.css with: #masthead { position: fixed; height: 2.8em; width: 100%; z-index: 1; } #breadcrumbs { padding-top: 4em; }
    1 point
  26. $child->image->url If this only does give you the path to the folder, your image field is multiple and not a single image field. If you change your field to only allow 1 image, then this would give you the full url to the image.
    1 point
  27. Thanks Ivan for bringing it up! I must have missed it, but now it is 93 as I added my own "like" to it (an obviously someone else too).
    1 point
  28. @kongondo I am all for number 1 as I am pretty sure that people are willing to pay for such a feature rich module.
    1 point
  29. straight on: https://processwire.com/talk/topic/9691-social-login/ (but actually not active supported from the dev - see last post there) regards mr-fan
    1 point
  30. Thank you for a new fresh idea. I used PageTable field and now it works. The only confusing thing is that every time I want to add new record I have to enter name of the subpage. Is there any solution to let PW automatically use new page ID as a name?
    1 point
  31. Hey Peter, I got a few up and running. Not really difficult, just make sure the domains are pointing to the same server and directory. Your questions: 1. See below for screens. 2. Unfortunately you can't share users across multiple domains by default. You need an Single Sign On service to share (front-end) users. 3. Depending on how you create your set-up you can easily deploy another site. In the set-up below the logo and content are different. We are going to add 4-5 sites when the first two are ready. Note: I'm using multi-site by apeisa (and later soma). I saw that soma recently updated some stuff to handle 404. I use a module for the different 404 pages. Also be sure to create two form-builder pages since the first one can't be shared. This might be different in soma's newest version. Screenshots: Tree Module configuration Name setup of the new homepage
    1 point
  32. been playing with Selectize.js for complex single selects; in combination with a module that lets you take various fields from the page you are selecting and put those into a json array as a data-data attribute... the selected option: open with search: sort of a supercharged chosen select .. might be worth having selectize.js into an alternate to chosen select, and bundled with the ability to define the array for json data att
    1 point
  33. Looks great. I'd just give the header navigation a bit more contrast to the background. Maybe I'll give it a listen later.
    1 point
  34. Another approach would be a hook in your init.php $this->addHookAfter('Page::viewable', function($event) { if(strpos($event->object->template, 'section-') !== false) { $event->return = false; } });
    1 point
  35. A single master key page (or storage location) is definitely involved, but it's not enough (you need to secure that key too, or you'll deliver the encrypted information in the database together with the key to decrypt it to the hypothetical attacker). You could still use my approach from above, just instead of creating a fresh key from scratch, use what I suggested as a password recovery mechanism to populate the users' profiles with the master key encrypted using their password hashes (basically, leave out step 2a). Everything else like creating a temporary session key and storing the key for field decryption and encryption - just in this scenario the master key - session-encrypted stays. So the steps would be: Once: First step is again to create an asymmetric public/private key pair for admin, save the private key off-site (best print it out too and store it in the safe) and puts the public key into config.php (you could e.g. use openssl to generate that key pair) Once: Admin creates a symmetric key (master key), encrypts it using the public key and stores it Admin creates users and assigns their passwords (or changes the passwords for existing users) In the same step, admin caclulates the user's password hash, decrypts the master key in config.php using his private key, then encrypts the master key with the user's password hash and stores it in a field in the user's profile Now, steps 1 to 6 with the exclusion of step 2a from above once again work, only instead of separate keys, every user decrypts and encrypts their copy of the master key. This should be a simple as it gets while you still avoid storing an unencrypted key at any point. There would be the theoretical possibility to use the admin's password hash to symmetrically encrypt and decrypt the master key in config, but that would mean there could be only one admin user (it would also introduce a predetermined breaking point when admin changes their password and forgets to update config.php with the re-encrypted key, which would result in garbage in the key copies assigned to users from this point on and, in the worst case, service information encrypted using such an invalid key). This system still has one known weakness: if an attacker acquires a copy of the database, they only need to crack one password to decrypt all service credentials. If you want to avoid that, things get exponentially more complicated because you would need to create a unique key for every service, store an admin-encrypted version of it somewhere and store (as well as update) a table of key <-> service mappings for every user. In turn, as reseting the user password every time access to a service is granted isn't practicable, you'd need a mechanism to encrypt the key for the user without knowing the user's password, leaving you with asymmetric encryption for that part. The user can't be asked to carry around and type in their private key though, so you need to store that private key for them encrypted using the user's password hash. It's another layer of indirection, and, as mentioned in my first reply, you'd need some kind of automated key infrastructure to make this easy to handle in code, and you'd also have to update two key fields and the whole mapping table with every password change (I'm not even going into the possible mayhem if password change by the user and service grant by the admin manage to overlap).
    1 point
  36. Another critical issue - when using an image extra field within a PageTable, the extra fields show up under the image and appear to be editable. You can make changes to the content of these fields, but of course they don't get saved when saving the main page which is very confusing for the user.
    1 point
  37. This is just a JavaScript/CSS issue. Go to Modules > Core and install the Languages Support - Tabs module.
    1 point
  38. Great module, worked fine for me! But since a couple of days, for any reason, it doubles my costum image fields. Updated it to Version 0.0.3 but still the same problem. I dont know what happened. Maybe i did anything wrong? I didn't install any other module in the past days, as far as I know . Here are some screenshots to show you what I mean: http://www.directupload.net/file/d/4071/vtafnu3t_jpg.htm http://www.directupload.net/file/d/4071/n592lj7s_jpg.htm Any ideas what could be wrong? Thank you!
    1 point
  39. 1 point
  40. You could do it with URL segments on your homepage template: if($input->urlSegment1 == 'search') { echo $pages->get('/tools/search/')->render(); } else { // output your homepage } For me, I guess I've always seen something like "search" as a tool, and being a good fit in /tools/search/. But you can of course structure it however you'd like.
    1 point
  41. $page->created …will give you the unix timestamp, or you can use PHP to format it however you want: <?php echo date("F j, Y, g:i a", $page->created); // October 10, 1974, 11:28 pm http://www.php.net/manual/en/function.date.php
    1 point
×
×
  • Create New...