Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 11/17/2012 in all areas

  1. This module adds basic capability to restrict page rendering to selected number of IP addresses. Note: this is only meant to be used as an additional security measure in addition to typical username/password authentication or something similar, not on it's own! Currently individual IPs (127.0.0.1), IP ranges (127.0.0.1-127.0.0.255) and CIDR format (127.0.0.0/24) are supported. You can also decide whether restrictions should apply to a) admin area and b) authenticated users. By combining these two options you could create a site with public access restricted to selected IPs while still allowing users outside those addresses to have full access after authenticating. Better description can be found from README. And once again: all comments, bug reports, feature suggestions etc. are more than welcome! So far everything seems to work as planned, but I haven't had the chance to test this nearly as thoroughly as I'd like (that's also why this little cutie is flagged "Beta" in the modules directory..) https://github.com/t...erIPRestriction http://modules.proce...-iprestriction/ How to install Copy PageRenderIPRestriction folder to your /site/modules/, go to Admin > Modules, hit "Check for new modules" and install Page Render IP Restriction. That's it. How to use Default out-of-the-box settings don't introduce any restrictions. You can edit module settings (Admin > Modules > Page Render IP Restriction) to include those IPs you wish to allow access to your site for. Once you've filled in at least one IP address and saved module settings restriction will be immediately effective. Please note that if you fill in at least one IP address and check both "Restrict admin access" and "Restrict access for authenticated users" you will no longer be able to reach Admin without valid IP. Make sure that you've tested everything properly before turning those options on (and avoid turning them on at all unless you're 100% sure that you know what you're doing)
    6 points
  2. Hi Harm, try to develop the habit of always putting the constant first in statements like this... if('inactive' == $u->user_status) ... Then if you miss out an '=' sign PHP will shout at you about it.
    4 points
  3. Hi Processwires! Just updated the module with some small improvements: Loading Animation for each section for better usability Date Range: If your range is smaller than 3 days, the module queries the visitors per date AND time. For example: If your date range is "24 hours" back, then you will now get the count of visits per hour. Before, you only got a straight line between two dates. ;-) Optional feature: For the visits and pageviews, the module allows you to display the difference compared to the previous date range. This should give you a quick idea, if your website has more or less visitors compared for example to the month before. See the attached Screenshot By default this setting is disabled, but you can enable it in the module settings I also updated jqplot and the Google API Client to the newest versions. Let me now if you run into problems with some setups! Cheers
    4 points
  4. Just launched this site a few minutes ago. It's not totally done, as I've still got some detail work to do, but figured it was at a good point to share: http://www.houghtonacademy.org I did the design and development on this one. Like the blog profile, this one uses the Skeleton responsive CSS framework. Though I went a lot further with the media queries on the mobile side than I did for the blog profile. So you should see a nicely optimized layouts for tablets, mobile portrait and mobile landscape. So far only tested on iPhone though. Many of the graphics (though not all) are also optimized for Retina displays. When you get to the homepage, you should get a different photo and tagline on every page load. Highlights (in terms of ProcessWire development): Faculty Directory: http://houghtonacade.../about/faculty/ The data for the faculty directory is updated once daily and it pulls from a service called Veracross, that manages all their school systems. They are all represented as pages in ProcessWire, so the client can add unique biographies and such that aren't present in the service it pulls from. Form Builder is used throughout the faculty directory to power the individual employee contact forms. Events Calendar: http://houghtonacade.../news/calendar/ The events calendar uses jQuery plugin FullCalendar and it pulls from a ProcessWire-powered JSON feed. ProcessWire gets the data from a Veracross feed a few times a day, caches it, and creates a new feed specific to use with FullCalendar. The events data is also used on other pages in the site, such as the homepage. Photo galleries: http://houghtonacade...f/photogallery/ There are several photo galleries throughout the site, and they use the Photoswipe jQuery plugin, which is really great when using mobile as it duplicates the behavior of using the built-in iPhone photo gallery. Thanks to Soma for recommending this back in another thread. Video pages: http://houghtonacade...out/headmaster/ These are powered using the TextformatterVideoEmbed module and are responsive (per the latest update to this module).
    3 points
  5. Greetings, Thank you Ryan. I had a feeling it was not difficult to achieve this in ProcessWire. After all, I have yet to find anything that is difficult to achieve in ProcessWire! But this should be a warning that, being in my early phases with ProcessWire, I am liable to ask questions that are very easy to answer. My positive feelings about ProcessWire increase exponentially every day, based on the system itself and the community around it. It's quite amazing how much territory I have been able to cover in just a couple of weeks. And I am -- at best -- an intermediate PHP coder. Thanks again, Matthew
    2 points
  6. Thanks for your updates. This module has been updated with your changes, so it now supports drag-n-drop positioning. While I was in there, I added reverse geocoding (generating an address from the marker position), live geocoding of the address changes (previously it required a submit) and a toggle checkbox to enable/disable geocoding.
    2 points
  7. So, I've just started fiddling around with PW and so far I love it! I'm rather new to the PW way of thinking, code wise, so I hope you can help me with this thing I'm trying to do. And by all means, tell me if its a completely foolish method I'm trying. (I would then prefer to be guided in the right direction then ;-)) I've created a repeatable for the basic-page template, which consists of an image and a text field and, and what I want to do is create a jQuery slideshow with ul's and li's, where each slide has an image with a text description. So a rather simple slideshow actually. I've created a template for the repeatable loop and I also use the "Thumbnails" module for cropping the images back end. All that works perfectly. Now, my question is: Is it possible to create a "global" slideshow which is included in the top of all pages, instead of creating and uploading a repeatable with image for every single menu item? And if yes, could I make the "default" slideshow only appear if the current page doesn't have a custom slideshow repeatable defined? Meaning that the default slideshow would appear on all pages where no other slideshow is created. I hope you can help Kasper
    1 point
  8. Thanks for the nice feedback. Good suggestion. It's pretty readable here, but tried it on my wife's computer and it was a different case. I'll try changing this to Arial or something. Sort of. I evaluated the information architecture and researched other school sites and came to the conclusion that what they had on their previous site was quite nice in terms of organization. The problem was that it was navigationally bad, which made it hard to wade through. The old site had a design problem, not an architecture one. On the new site the information architecture (and even the exact URLs) are consistent with the previous site for the most part. But the new site makes the information a lot more accessible.
    1 point
  9. Check this thread out: http://processwire.c...-pages-via-api/ The error appears because your page was not found, thus the variable $mypage is an object of "NullPage". //Note the change from $wire->pages to $pages... $p = $pages->get("/foo/bar/"); if ($p->id) { //Page was found, you can modify with API } else { //Page was not found... it is NullPage and has id = 0 } Edit: Changed $page to $p, see Ryan's explanation below
    1 point
  10. Thanks again I really enjoy working with PW compared to a lot of the other framework-kind-of thingies that are out there. So easy to understand and get started with.
    1 point
  11. Alrighty, then the repeater is of course a good solution For the second part with the global slideshow, I would do the same with the repeater field. => Check if the current page has a repeater-field with more than zero entries, otherwise grab all the stuff from the repeater of the global page.
    1 point
  12. Hi kasperwf, welcome to the forums! For the slideshow you want to achieve, I think you don't need a repeater since you can already store multiple images with description in the Image-Fieldtype itself. Check out the options of your image field: Under "Details", set the option "Maximum files allowed" to zero. This way, you can add as many images as you want (with description). You can also give the description field more than one row in the "Input" section of the options. For the global slideshow, I would create a separate page which stores all global images & descriptions. This page can be hidden, as it serves only to store the global images. Then in your template code, you could do something like this: //Check if the actual page has some images stored in a field called images if ($page->images && count($page->images)) { foreach ($page->images as $image) { //..output page images slideshow } } else { //Display global slideshow $global_page = $pages->get("/path_to_your_global_page/"); foreach ($global_page->images as $image) { //... output global images slideshow } }
    1 point
  13. Excellent work. I am really impressed. I always wish to develop this type of website using CMS (ProcessWire CMS only). It would be great if we get some advanced level tutorial on ProcessWire.
    1 point
  14. Form Builder is one way to do it. But it's actually very simple to create pages anywhere in ProcessWire from the API. Here's a simple example: $page = new Page(); $page->parent = '/about/'; // or whatever parent you want $page->template = 'basic-page'; // or whatever template you want $page->title = "Test Page"; $page->body = "<p>This is a test, only a test.</p>"; $page->save();
    1 point
  15. Also, don't forget to enable page numbers for your template (Setup > Templates > your-template > URLs > Page Numbers).
    1 point
  16. I'm looking at it a lot more in depth now. This must have been a great project to work and plan on. Were you also involved in the information architecture part? There seems to be many pages. Nice work, since nearly everything feels really natural and well-thought through. Also, great to see the ProcessWire logo in the footer.
    1 point
  17. I'm not sure why you're converting that date to Unix timestamp, but that's probably why this is failing. Try something along these lines instead: wire('db')->query("UPDATE pages SET created='2012-11-15' WHERE id={$page->id}"); The type of db field created is timestamp, which doesn't by default accept Unix timestamps (...) as it's value.
    1 point
  18. Greetings, Very glad to find this topic, because I had a somewhat related question about handling user roles. Not only was my question answered, but I just expanded my general knowledge of ProcessWire by reading this thread. This is such a terrific user community, which -- besides the value of the CMS itself -- is like gold to anyone learning this system. I'm curious about one particular statement that onjegolders made: Can you share more about this? I'm curious about the best ways to give users front-end methods for creating pages. Thanks again for everything! Matthew
    1 point
  19. $projects = $pages->find("template=portfolio-item, sort=-created, limit=6"); foreach ($projects as $project) { $image = $project->images->first(); echo "<a href='{$project->url}'><img src='". $image->getThumb('thumbnail') ."' alt='{$image->description}'></a>"; }
    1 point
  20. Thanks Ryan, I managed to find this when it wasn't working: "User will inherit the permissions assigned to each role. You may assign multiple roles to a user. When accessing a page, the user will only inherit permissions from the roles that are also assigned to the page's template."
    1 point
  21. $results = $page->children("limit=25"); ... now loop the results ... echo $results->renderPager();
    1 point
  22. Ryan, One small bit of feedback on the calendar. Museo is a bit hard to read (and doesn't render all that well) for the event titles in the grid view. Maybe just a standard web font there would be better?
    1 point
×
×
  • Create New...