Jump to content

Tom.

Members
  • Posts

    461
  • Joined

  • Last visited

  • Days Won

    7

Everything posted by Tom.

  1. /processwire/setup/field/save The url above when saving a field is giving me a 404. It started happening randomly - anyone have any ideas on what could be happening? Thanks Tom
  2. This is because you are setting the session to 0 every time the page loads, the reason it's working if you are logged in is because of the $user->isLoggedin(). You don't need anything else other than: if($session->get('visit_counter_flag') === 0 && !$user->isLoggedin()) { /* if the user is NOT logged in and not counted */ /* turn of output formating so PW do not give an error when we change the value */ $page->of(false); /* increment the current integer plus one */ $page->visit_counter++; /* save the visitor_counter field */ $page->save('visit_counter'); /* turn on output formating so PW work as it should */ $page->of(true); /* set a visit counter flag to 1 so next load do not count */ $session->set('visit_counter_flag', 1); }
  3. Exactly what I've seen as mentioned in my previous post above. I look to rectify this.
  4. The overlay will fill the entire screen rather than taking up a section of the screen. It will display a close button next to the save button at the top. Still allowing you to quickly edit pages.
  5. Here is the security issue - https://github.com/conclurer/ProcessWire-AIOM-All-In-One-Minify/issues/44 How strange, I get a 404 when clicking the link, however if I focus the URL bar and press enter it works. Here is a link to the pull request - https://github.com/conclurer/ProcessWire-AIOM-All-In-One-Minify/pull/53
  6. Hello, I'm unsure if this is still being updated - supported. There has been a major security problem (Thanks Ryan) for a while. I've done a push request to attempt to fix this https://github.com/TomS-/ProcessWire-AIOM-All-In-One-Minify I'm going to go through the issues and try and fix them on this branch.
  7. Sadly, I wasn't able to do all the mock-ups this weekend as I was away. However I've managed to make a start on the edit page. @LostKobrakai - Thank you for your feedback, I let the sidebar in for this exact reason. I also have some ideas on how to fill out that space when only the Page link is available (due to permissions - editorial role). My idea is to have maybe the recently edited appear as like widgets in the sidebar - or something along those lines. I really need to think about it. This will be just be a theme I'll be building mostly to gain experience on the system but also to use in my personal projects. I will be releasing it for others to download. Anyway, here is the edit page (http://i.imgur.com/kp96yng.jpg):
  8. Damn, Okay, thank you for the heads up mr-fan I'll have a look into this Concatenate field. Thanks alot!
  9. I've tried searching the forum but I can't seem to find anything on this, I have no doubt it's been asked before. I have an advert field, which is an image field that will only allow 1 image to be uploaded. I also have a advert url, which will only show and be required if the image field has an image. I've tried: advert.count>0 advert>0 advert!=0 advert.count!=0 advert!=false advert!='' Non of them seem to work. Anyone know how to do this?
  10. Stumbled pass this completely by accident, though I could see plenty of uses for this in previous projects I've done. I think for 3.0 the Documentation could do with a major refresh. It would be great to put maybe a team together to work on this. I'll be happy to chip in.
  11. I completely agree, the way I'm heading in my Mockup is in fact the edit page comes in as a sidebar, taking up about 75% of the screen. However I agree with the sidebar as of current. For most users they only see "pages" it seems pointless having it there just for the one link (which will always be active). My plan was to hide the sidebar if that was the only link. However across the top will do nicely too and it will so give more screen real estate for the edit page overlay. The only reason why in thinking the edit page be an overlay instead is two things, without it, what is the default page? How would lister also implement this? Especially if you have already done a search. Ill finish my mockups this weekend glad to get some feedback already and get a discussion started on this. Especially for the upcoming 3.0 brand refresh.
  12. I've decided to make a start on the design, I thought I'd get a feel on what people think about the idea behind me doing this before continuing. I've always been passionate about UI/UX, and I'm always up for the extra practice wherever I can get it. Here is the design I've started: (http://i.imgur.com/2SY50ua.jpg - full size) So here are few things I've tried to solve with this: Unify the user journey, this page tree is going to be the main focus for every user and often unless you are an admin, the sidebar doesn't get used often. This is great from a UX point of view because that means they know exactly where everything is and there is no complicated bloat. I've tried to move very useful features into this screen as this is where I find users spend the most time. Also giving admins the ability to better define that user journey. The cog will edit the filter and the add filter button will, well, add a filter. Filters will work much like Peter mentioned ListerPro, however they will work just as well with Lister. I will do a mock-up if people want on how a filter page will look. The other people is moving items in the page tree. Many people expect to be able to drag and drop and if they want to move into a child and didn't open the page tree first. Then they will have to stop the move, open the tree and then move again. This works by hovering over a parent, the child will then expand. You can start a move just by dragging the page name. Another people I've seen people do, is not knowing to click on the edit on the right of the page name. Instead they frantically click the page tree and watch the page name highlight change, but nothing happen. I hope to do some work on this, but part of the problem is that the page names look like links. However I think they should be clickable to go into edit. I see people doing it, so they must feel natural doing it that way. I haven't yet thought of a solution for this as I also like how the click expends children. However one thing I've thought of is have it click it edit if it doesn't have children. If it does the will have to use the edit as normal. I'm not completely sold on this idea as I don't like the idea behind having two ways to get to edit. I can see this confusing users. Advanced Search will be the same as Lister.
  13. Hi Peter, yes ListerPro is very much what I was referring too, thank you for that. However, I'm still keen to look at the UI/UX. If anything just to better demonstrate my ideas.
  14. I absolutely love the Reno Theme, however this is an aesthetic change. After using Craft Pro 2.5 for a recent project. I can see how the UI/UX for ProcessWire can be greatly improved. There are many things that I love about both CMS, but for me it's Crafts backend admin, ProcessWire for everything else. So the thing I like about Craft is: Almost like lister, there is a way to select an entry type and have that display custom columns and be filterable by table heading (eg. Title). It would be awesome if this was possible with ProcessWire, lister is great, however I find that it's quite advanced for average clients. If the bookmarks we create showed as filters? It could be quite nice. (I can do some mockups this weekend on UI/UX and illustrate my ideas). Don't get me wrong, I'm not saying that the backend admin isn't great. If it wasn't for my recent intense usage of Craft I wouldn't have noticed. I just feel like some attention to the UX/UI might improve the product. Mostly the consistency. Craft is incredibly consistent in its UI and that gives it just that little more polish.
  15. I'm also experiencing this in 3.0, I set the limit to 5 but it's showing 13. I guess it's ignoring the limit in 3.0?
  16. Any ideas on how to get around this?
  17. adding namespace ProcessWire; at the top of the file fixed this. Thank you very much tpr!
  18. Hello, I'm currently using wireRenderFile() for all the code that is repeated in the site. To keep the code as clean as possible. I have a nice folder structure that has blocks, snippets and items. Blocks being quite a large set of code, snippets that are small things such as outputting a formatted date from two variables and items being things that's often used in repeaters. A block can contain things from a repeater, for example lets say we have a related content block. I would do: <?=wireRenderFile('ui/blocks/related', array('tags' => $item->tags)?> This will create all the wrapper html for the block which may be used on multiple pages. Inside this I want to use the related content item so inside ui/blocks/related.php I might have something like: <?php $items = $pages->find("template=activity, tags=$tags"); ?> <div class="related"> <h1>Related Content</h1> <div class="uk-grid"> <?php foreach($items as $item): ?> <div class="uk-width-large-1-2"> <?=wireRenderFile('ui/items/activity', array('item' => $item)?> </div> <?php endforeach; ?> </div> </div> However it will throw an error saying the function wireRenderFile() doesn't exist. Is there anyway to stop this? I tried bootstrapping ProcessWire: include "{$config->paths->root}index.php"; At the top of the file however this didn't work.
  19. Hi Richard, Have you tried the following: http://snippi.com/s/bnx7cij
  20. Hello, I currently have a block system which you can select between large and small blocks. Between this there is an excerpt field that will only allow a string of a certain length. So I have a excerpt field (max length 100) and a excerpt_long (max length 200) field. To choose a large and small block is an option field and the only editable for the SuperUser as I don't want Moderators deciding on the sizes of the blocks. What excerpt field displays is based on that option field. It all works well, you set it to large, the max length is 200, if it's small it's 100. However, if you are logged in as a moderator where you don't have the option of setting the block size you also don't see the excerpt field. I've tried ticking this field is visible but not editable for those who can view it. However that doesn't work. Anyone got any ideas? Thanks, Tom
  21. Pushed to branch to fix some issues.
  22. I'm currently creating a homepage layout which is based on a Page Field as it's a complex block system using different types of blocks (Event, Activity and Categories). We want to remain control over how the homepage looks (drag and drop ordering) however let them have capabilities to edit the contents of them blocks. Using a Page Table allows us to easily modify the homepage in future without the need of messing around with all the code. I've already set permissions to disallow them from adding blocks by not allowing them to create the template. However I would also like to disallow them re-ordering the pages. Is this possible? - I can edit the module to do this if it doesn't already. I just want to know if there's a more native way.
  23. I've come across this problem recently too. I wanted to resize 3000 x [x] to 1920 x [x] but it wanted over 64MB to do that resize. I just increased the memory_limit to 254MB. I have no idea what's "normal" memory usage for an image resize of those large dimensions. I'm using PW3.0.5.
  24. Quick question on this - How do I make this visible only if it has results? It's set as a single page. I've tried a few things such as subcategory!='', subcategory!=0, subcategory.count>0 etc. I guess this isn't possible as the checks are based on the value of the field. Not the amount of pages returned. Based on that I tried category.children.count>0 however that always displayed the field. However I don't think this is possible either as I believe this only works on count at the moment?
  25. if($input->post->submit) { $page->of(false); foreach($page->fields as $field) { if($input->post($field->name)) { $page->get($field->name) = $input->post($field->name); } } $page->save(); $page->of(true); } echo "<form method='post' action=''>"; foreach($page->fields as $field) { echo "<label for='$field->id'>$field->label</label> <input type='$field->type' name='$field->name' id='$field->id'/>"; } echo "<input type='submit' value='Submit' name='submit'/>"; echo "</form>"; I have done no testing on this, just writing from the top of my head. The next step would be validation etc. Also many things like Auto-Completes will have to be manually programmed.
×
×
  • Create New...