Jump to content

Leaderboard

Popular Content

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

  1. First, take a look at the docs on pagination, if you haven't already done so. Important thing to remember is that you need to enable pagination in your parent template (/galerie/) in the case of your example, or in the case of a shop perhaps /produkte/. If it is for a shop, then each product should probably be a page, but you can paginate images just as easily. (And if it is a shop take a look at this.) If you get stuck, come back here and ask some more.
    5 points
  2. There's FieldtypeSecureFile, which allows you to store files off the webserver root directory and therefore denying direct access to the file. You can then serve the file through your php code, which can check your rules for allowing access to it, before sending anything. I just want to emphasis, that this will need good configuration of the webserver and returned header data, otherwise you'll considerable increase the load on your webserver as content served this way is essentially not server-side cacheable as well as loading php for static files does need more computation. Client side caching can work, but depends on how fast you want to be able to revoke access again. I'll just add this part, because you didn't add a specific intend in your post: You shouldn't and really can't encrypt / hide content for unauthenticated users. If it needs to be publicly readable / accessable on your website then it's public no matter what you do. As long as the browser needs to have unauthenticated access everyone else has access, too.
    3 points
  3. A couple of posts: https://processwire.com/talk/topic/5762-how-do-we-use-pagestack/ https://processwire.com/talk/topic/3660-what-page-was-the-caller-of-render/
    3 points
  4. True, but a hidden css file cannot power a public website because – well – it's hidden. That's why I asked for specifics.
    2 points
  5. If it hides well there's no example to show
    2 points
  6. I'm also curious what october cms does (trys) to hide your css. Do you have any examples?
    2 points
  7. Even pages are most of the time queried once and after that cached. And their fields are as well only loaded once on first demand of it, as long as it's not autojoin field, which are automatically loaded with the pages native data (id, template, …).
    2 points
  8. Can you explain a little more? Do you need your assets to be hidden for guest users?
    2 points
  9. ALIF - Admin Links In Frontend EDIT: latest version update with PHP 8 fixes on 05. Nov 2023 (!) The version now is 1.1.9 (!) This module combines some of the admin links that we want to use on the frontpages sometimes. It is a comfortable and easy way to do so. After you have installed and configured the module, you can inject the links into the frontpage with code like this in a template file: echo $modules->isInstalled('AdminLinksInFrontend') ? $modules->get('AdminLinksInFrontend')->render() : ''; . Credits: The comfortable Javascript Color Picker in the Configpage comes from Jan Odvarko (http://jscolor.com). Many thanks for this! * Toolbar The toolbar can be positioned by css values for top/bottom and left/right. It can expand in vertical or horizontal direction. The buttons are links to the PW admin, for logout, or for editing the page in admin, or informational ones. All settings, including the colors, can be defined in the modules config page. This is available for all PW versions from PW 2.3 up to now. Depending on how you configure this part, it can be used for authors and editors too, maybe. * Import / Export Settings It has the possibility to export and import its settings via two textarea fields. When importing settings, you get a second screen where you can select which settings you want to import. * One-click User Account Switcher For PW versions 2.6.8+, there is one really nice function available, that I use when developing / testing sites with different user / roles. A fast User-Account-Switcher that lets you view the same page from different user accounts with only one click. To enter this mode, you need to login as a superuser one time, and the feature needs to be enabled in the module of course. After that, you can log out, login with different user roles, etc. At least the toolbar buttons for the User-Account-Switcher will stay visible for you. This is session based. There is also an extra button with a trash can and the text "Session", that helps you to leave this mode once you are finished. As you can see in the screenshot, after clicking "guest", I was logged out, but a regular login button, a warning for debug mode and my three defined buttons for user accounts are available. When clicking another user button I login with this account. Very handy. ATTENTION! The use of the One-click User Account Switcher is mainly intended for dev sites, not for public sites! You should be aware that there is a huge security risc when using this feature on public reachable sites! We completly leave ProcessWires comfort zone in regard of security, - and the only thing between your site and potentially hackattacks is this module. (Oh mom, - what have I done?) PW 2.6.8+ has a comfortable function for admin tasks, that let us log into different user accounts via API without using passwords. This module uses this function! All data that is needed during a User Account Switcher session is stored in the session data on the server. So, if someone steel your session cookie, there is potentially risc that he can login as a superuser, depending of the user account buttons you have in your admin links collection! To prevent SessionHijacking, the module can be bound to a single IP address, it uses a fingerprint depending of IP(s) and UserAgent string. And you need to define a max time to live in minutes between 2 and 60, a User Account Switcher session may run. A User Account Switcher session only can be initialized by a Superuser who also explicitly has set a permission called 'alif-user-account-switcher', what is defined by the module, when installing it. So, the prefered way to use this module is, to enable and use the User Account Switcher while the site is unpublic, and before it goes public, remove the permission from the superuser role. This way, you can use its menu function, but not the UAS anymore. On a sidenote, for those rare cases where multiple superusers simultaneous developing on a site and want to use the ALIF, but the UAS should be used only by one, you can leave the 'alif-user-account-switcher' permission removed from the superuser role, but need to assign the role 'alif-superuser' to the single user account. This way, only that single superuser has the permission for UAS, whereas all other superusers doesn't have it. . . * The Configpage * Online demo I have pasted it into this old site and enabled it to be present every time (when the site is in demo mode only!). So, it is an earlier state, but the switcher is functional there: http://pwlaf.biriba.de/dbinfo/ * Download From our modules directory or from github repo
    1 point
  10. As the normal WireMail uses php's mail() to send mails you can see all possible settings at http://php.net/manual/en/function.mail.php So you in PW it should be $mail->header('Reply-To', 'webmaster@example.com'); Haven't tested it but should do what you want ;-)
    1 point
  11. Bookmarking: https://processwire.com/blog/posts/making-efficient-use-of-fields-in-processwire/
    1 point
  12. Essentially the places to look at are Pages::getById and Page::getFieldValue.
    1 point
  13. Hi guys. In case it's helpful for anyone to know, I solved this issue. Client had created an incorrect redirect using the JumpLinks module.
    1 point
  14. Hi everyone, New version just committed. It comes packaged with both stable (2.3.10 - what it was using before) and master (2.4 dev) versions of Tracy. If you have PHP 5.4.4+ it will use the master/dev version which among other improvements, adds support for monitoring of, and allowing dumping from, AJAX calls. One quick way to see the AJAX monitoring in effect is to check "Backend" under the "Show Debug Bar" config option. Then hover over the PW menu in the admin to one of the AJAX-driven submenus - notice the new row in the debug bar showing the time etc for the AJAX request. You'll also see this popup when clicking on the Children tab when editing a page, and several other places throughout the PW admin. Of course this will also work for any AJAX requests on the front-end of you site. Here's a screenshot showing both rows (normal and ajax) with the Dumps panels for both. I have two bd() calls - one "classic" and one via "ajax". Please let me know if you notice any issues with this new version.
    1 point
  15. replying to the OP - use a data- attribute on the select using jQuery you read that data attribute for the selected item and then show it... see more here: https://processwire.com/talk/topic/419-extending-inputfields/?p=76861
    1 point
  16. Thank you, Adrian! People like you make PW community so pleasant to be involved in. Not only the code you share has helped me and many others numerous times, but your attitude: friendliness, passion and commitment. This module of yours is a true example of the best international open source spirit. Thank you for your marvelous work. And... please keep it going) The post is awesome too . It is kind of hard to go through the dozen pages of the original module forum thread and not get lost at the first time. Sum up for it is a great idea and there is no better place for it than the official PW blog. Congrats!
    1 point
  17. Just wanted to let you all know that I added a new section to the blog post. Hard to believe I had missed anything given how long it already was, but this new section deals with Access Permissions / Restrictions and how they are controlled/related to the Detect, Development, & Production Modes. Here's the shortcut link to this new section: https://processwire.com/blog/posts/introducing-tracy-debugger/#access-permissions-restrictions Hopefully you'll find it useful in understanding who has access to what with which settings. Please let me know if there is still something that isn't clear or even if you have suggestions on how the settings/logic might be tweaked.
    1 point
  18. There is a keyframe animation module for PW, if interested.
    1 point
  19. New version 0.6.0 brings an improved new command and a brand new module:upgrade command. I've been missing this for a very long time and finally I managed to implement it. Check if module upgrades are available. $ wireshell module:upgrade --check An upgrade is available for: - FlagPages: 0.0.8 -> 0.2.3 - ImageExtra: 0.0.1 -> 0.0.3 Download and upgrade existing module. $ wireshell module:upgrade ImageExtra An upgrade for ImageExtra is available: 0.0.3 Downloading module ImageExtra... 840.40 KB/840.40 KB ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ 100% Preparing module... Module ImageExtra downloaded successfully. Module `ImageExtra` was updated successfully.
    1 point
  20. Hi to all, As I've mentioned earlier to Ryan, ProcessWire runs fine on Windows 7/2008 Server setup with IIS 7.5 WebServer with IIS Mod-Rewrite from Micronovae that can read .htaccess file. The problem is that this IIS filter is free for development use on localhost without limitations but it's not free for production use on live server (it costs $150 per server license). I've found another solution that works flawlessly and it's absolutely free. Download URL Rewrite Module 2.0 for IIS from http://www.iis.net/download/urlrewrite and install it Define new web site under "sites" in IIS Manager and point it to directory where you've unzipped ProcessWire files Download web.config (translated from original .htaccess) file from this post, unzip it and put it in ProcessWire root directory Delete .htaccess file (because you don't need it any more). I hope that this will help someone if the need arises for ProcessWire use on this kind of install. web.config.zip
    1 point
  21. Hi Zahari, I haven't used pagestack before, but from what I just read, you don't send it with the render call. You would use: $options['pagestack'] in your pg_Video_Element.php template file. It is an array of the pages that rendered the template so you would foreach through: $options['pagestack'] to get the article page. Let me know if that works. Maybe I should go test it too
    1 point
  22. In future versions of ProcessWire, including the current PW 2.3 dev branch, you can also do this: if(count($options['pageStack'])) { // don't include header/footer, etc. } $options['pageStack'] is an array of pages that called render(); before the current one. It basically gives a way for a page to discover the context it is being rendered in.
    1 point
  23. Okay this was very short notice so it is incredibly rough! But this is for Diogo and all those others wedded to PW http://21stcenturyblues.co.uk/pwdream1.mp3 (Organized, try listening at less than 120db!)
    1 point
×
×
  • Create New...