Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/09/2012 in all areas

  1. PageListImageLabel Marty requested and sponsored a new module little while ago. http://processwire.c...t-image-option/ I just wanted to create a separate release thread. Many thanks to Marty for sponsoring and making this possible. This just shows how great this community is. So here it is the Page List Image Label module. It enables you to add thumbnails of images from the pages in the admin page tree. Download: http://modules.processwire.com/modules/page-list-image-label/ Github: https://github.com/somatonic/PageListImageLabel A screenshot of it in production. (old version)
    4 points
  2. I've been working on a blog profile that we can have as an installation option for ProcessWire. The goal is to have a profile that someone could download and setup a pretty nice website/blog without having to touch any code (i.e. it's ready-to-run and populate). I'm hoping that this is something that may help us to grow our audience beyond the web development community. The requirement is that it must be as easy (or easier) than WordPress, both to install and use. This profile is also for web developers, as it's a blog profile ready to be styled and enhanced -- a good starting point. It uses the Zurb Foundation CSS framework, so it is fully responsive and mobile-ready. It's not much to look at now, but should be fully functional. I'm making progress and wanted to post a preview. The content you see here is from one of my client's blogs and the content is just here to test things out. http://processwire.com/blogtest/ I'm hoping to get this up on GitHub next week. I've never really done much blogging, so am seeking feedback on what others would suggest to make the blog profile as good, powerful and simple as it can be. Right now it's pretty much a generic Zurb Foundation "look and feel", so it probably needs at least some color tweaks and integration of some masthead photo(s) or something.
    2 points
  3. The prefered, simpler way is to make the user when created via API unpublished: $user->addStatus(Page::statusUnpublished); See cheatsheet addStatus Then the user can't login yet. And the admin can just go and publish the user (same as with pages) in the admin. Users are pages so the page API applies here same way as it is for pages. Or using API to publish $user->removeStatus(Page::statusUnpublished); See cheatsheet removeStatus The different system flags are also on the cheatsheet.
    2 points
  4. 0.0.6 released. I added an option in the settings to disable the sub-folder for the default language.
    2 points
  5. WillyC, you the man. That worked like a charm. I forgot to say "misjgoth" but it still worked!
    1 point
  6. Hello there! I'd consider adding a role with very few privileges (basically only page view access), name it "unapproved" or something like that. The register form could create new users via the API and assign that non-privileged role to them. After that an admin could check their info and assign whatever role they actually need. You can find many posts about creating forms from the forum and creating new users is instructed in the API documentation: http://processwire.c...variables/user/. Also, here's some discussion about adding extra information for users: http://processwire.c...extending +user. You could also edit the user template like @Soma suggested above -- not really sure which is the "correct way" here..
    1 point
  7. Go on templates, filter to show "system" templates, edit user template.
    1 point
  8. This looks great! I need to start thinking about building a tiny shop profile. One note though: while browsing with android phone, the site feels little slow. I would guess it is the use of those CSS gradients on big post elements.
    1 point
  9. heyu.make small changeto item like.add periodto sentance then.say misjgoth in.english and cluck save, fixed
    1 point
  10. This is on the list for 2.3, so should be coming soon!
    1 point
  11. Thanks diogo! Thanks again to everyone for your help. This is what I've cobbled together for those interested: Archive include - which outputs the years: <?php $today = time(); $bloglist = $pages->get("/journal/")->children("publish_date<$today"); foreach($bloglist as $blogyear) { $pubyear = strtotime("{$blogyear->publish_date}"); $urlyear = date("Y", $pubyear); if (!in_array($urlyear, $years)) { echo "<a href='/journal/" . $urlyear . "'>$urlyear</a><br/>"; $years[] = $urlyear; } } And my list page. My template has 'Allow URL Segments' set to on in the admin: <?php $thisyear = date("Y"); $year = (int) $input->urlSegment1; $blog = $page->children("sort=-publish_date, publish_date>=$year-01-01, publish_date<=$year-12-31"); foreach($blog as $blogitem) { $str = "{$blogitem->publish_date}"; $publishyear = strtotime($str); $urlyear = date("Y", $publishyear); echo "<h2><a href='{$blogitem->url}'>{$blogitem->title}<span class='date'>{$blogitem->publish_date}</span></a></h2>"; echo "<p class='summary'>{$blogitem->summary}</p>"; } // For fun if(!$blogitem AND $year<$thisyear) echo "<p class='summary'>" . $pages->get('/settings/no-entries')->setting . " $year."; if(!$blogitem AND $year>$thisyear) echo "<p class='summary'>" . $pages->get('/settings/future-entries')->setting . ""; Regards Marty
    1 point
  12. Jquestion, one good thing that has changed in ProcessWire since that post you linked to was written is that the user system is now built around pages and templates. You can add whatever fields you want to your 'user' template. This opens up a lot more possibilities that didn't exist back when that post was written. So if you want multiple users to have access to a given page, you might just want to create and add a new page reference field to the 'user' template. You might call it something like "client_page". Use 'PageListSelect' or 'PageListSelectMultiple' as the Input field type for that page field. Now when you edit a user, you can select what private page(s) they should be able to view. In your template used by that private page, you'll want to have some kind of access check in there like this: if($user->isGuest() || $user->client_page->id != $page->id) throw new WirePermissionException("You don't have access to this page"); or if a multi-page reference field: if($user->isGuest() || !$user->client_pages->has($page)) throw new WirePermissionException("You don't have access to this page"); To allow for logins by email address: if($input->post->login_submit && $input->post->email) { $email = $sanitizer->email($input->post->email); $emailUser = $users->get("email=$email"); if($emailUser->id) { $user = $session->login($emailUser->name, $input->post->pass); if($user) { echo "Login success!"; } else { echo "Login failed!"; } } else { echo "Unrecognized email address"; } }
    1 point
×
×
  • Create New...