Jump to content

onjegolders

Members
  • Posts

    1,147
  • Joined

  • Last visited

  • Days Won

    4

Everything posted by onjegolders

  1. Strange I'm getting this as my img url: http://localhost/pw_template/admin/repeaters/for-field-134/for-page-1/1354274914-77-1/-/full_hands.jpg which is showing when logged in but giving me a 404 when not If I output normally with url, I still get blank images
  2. Hi Diogo, thanks for replying. Yes the other repeater content outputs just fine.
  3. Cheers Arjen, that's a good point. Think I have it though with cookies At top: <?php $settings = $pages->get("template=settings"); $info_bar = ""; if ($settings->info_bar) { $info_bar = $settings->info_bar; setcookie("InfoBar", $info_bar, time()+3600); /* expire in 1 hour */ } ?> To output <?php if ($settings->info_bar) { if ($input->cookie->InfoBar == $settings->info_bar) { } else { ?> <div id="info_bar"> <div class="container"> <?php echo $settings->info_bar; ?> <a class="close" href="javascript:void(0)">x</a> </div> </div> <?php } } ?> Am sure there's a million ways to improve that but it seems to be working for now...
  4. Also wondering if there's a way of resetting it so that if the field is changed, then the message will show again but I don't think field->modified is accesible. Perhaps I could set a cookie with the value of the message and then if that message changes then the cookie will no longer be valid?
  5. Just realised that if I'm not logged in, then my images for my homepage slider (which is a repeater field with its images using the Crop module) don't show. I'm using the latest dev version of PW and am thinking this may well be to do with the new protected file system? My home template is accessible though so not to sure on where to go next?
  6. Thanks Arjen This thread has got it working Basically setting a session if the user has already visited the/a page. It works nicely but not sure, maybe I should use a cookie instead... Do you remember how you handled closing the div if user has no js? Or did you just leave it until page refresh?
  7. Sorry about the somewhat confusing title! I'm trying to set up an "info bar" where the client can add a bit of information right at the top of the screen which can be closed using jQuery. Despite my awful jQuery skills, I've managed that part. I'm just a bit confused as to the best way to handle subsequent pages. Could I do this in PW alone using cookies or session? Or would I need to trigger something else in JS when the close button is pressed? Also is there any acceptable CSS fallback for closing the info bar if there's no JS (I'm guessing maybe just refresh the page?) Thanks in advance if anyone has any ideas how they'd handle this. Screenshot attached
  8. Good job. Really nice and clean.
  9. I think that's a matter of opinion. You could always create two templates which are allowed to be children of its parent. Eg: project_brief and project_full then let the client select which they want for each "project". Or, you could provide the client with checkboxes to determine if they want to show/hide certain elements on each page. Eg: if ($page->show_breadcrumbs == 1) { include("./breadcrumbs.inc"); } Ultimately PW gives you ultimate control over what you (the developer/designer) want to do with the site. You can go many ways about displaying the content. "views" using urlSegment, different templates or even giving the client choices by way of checkboxes. There are probably many more too. EDIT: Perhaps you can give us an example of what you are trying to achieve ADB and I'm sure there's some really easy ways to achieve it. I've yet to find something in PW that isn't easy to implement or that someone already hasn't provided code for.
  10. Thanks Ryan! Can I just replace the module? Will I need to reenter the fields (not that big a deal, if so)?
  11. Just found a possible issue. I can't seem to get colorpicker fields to work from within a fieldset tab? When I click on the colour, nothing comes up, but the same field works fine outside of a fieldset? I'm on the latest dev version of PW - not sure if that's relevant.
  12. Would be great as it's a great module, pretty important to most of my sites!
  13. Am just in the process of going over my new profile and making it as user friendly as possible. I'vs started putting things into fieldset tabs as I think it makes things look a lot neater and less overwhelming. I was just interested if any of you have noticed whether or not clients can sometimes miss these? Do you only really store fields in there that are not critical? I'm thinking of mainly using it for media but on a portfolio item for example, I don't really want them forgetting to upload an image or two...
  14. I'm not 100% sure if I know what you're asking. If you want to display things differently, (a different view of the page content), you can turn on urlSegments for a particular template so that if the user goes to mysite.com/projects/my-project/photos where "photos" would be urlSegment1 of the "project" template, you could then output just the photos attached to that page. So, on your "photo" template you could check the url: if ($input->urlSegment1 == "photos" && count($page->images)) { include("./project_photos.inc"); } elseif ($input->urlSegment1) { throw new Wire404Exception(); } else { // do normal page stuff here } And in your "project_photos.inc" file: echo "<h3>Photos for $page->title</h3>; foreach ($page->images as $image) { echo '<img src="$image->url" alt="$image->description">'; } If this is what you want to do, go to "Urls" in your chosen template and turn on urlSegments.
  15. I posted in general forum but thought it may be more relevant here. Have been having a few issues with this playing nicely with Apeisa's crop module. Ryan's fix sorted out to an extent but upon trying to save the thumbnails, I get an empty image icon and the images in the template look stretched so not sure it's working properly. Love the new additions though!
  16. Hi Christoph, Your english is very good, don't worry. Not sure I understand exactly what you want to do but serving "views" is relatively easy to achieve by allowing urlSegments in the template settings. You can then serve different views dependent on the urlSegment (which you will append to your "a" tags). Eg: if ($input->urlSegment1 == "category") { include("./categories.inc"); } You can then create categories.inc where you will test for the urlSegment2 and show the relevant category. So if your link goes to "blog/category/news", your template would help you output just the pages linked to the "news" category. // categories.inc <?php $name = $sanitizer->pageName($input->urlSegment2); $category = $pages->find("template=category, name=$name"); $articles = $pages->find("template=article, category=$category"); ?> Hope this makes sense, if not I can try and show you in more detail
  17. Yep Joss, Just go ahead and create new fields as normal. I normally create "first_name" and "second_name" then you can add those fields to the "user" template. To see "user" template just do as Nico says. Then output like normal fields: echo "<h3>Hey! $user->first_name $user->last_name</h3>"; You can then attach any type of fields to the user (photos etc)
  18. I think it's nice, I think the old look was nice too but the new look definitely fits modern web design much more in my opinion. Not a huge fan of vertical menus but am sure I'll get used to them. Am I the only one to like the forum?!
  19. Update: I'm actually having a problem with it when using Apeisa's crop module. Upon editing the crop, the default image icon is back Edit: It's also opening in a new window, which I don't think it did before? (May be wrong)
  20. Thanks Ryan, apologies for not replying sooner, that appears to have fixed it for me (I just replaced the Process module).
  21. Hi Arjen, thanks yep I have 90GB! I'm also not getting the same issue with normal image fields. Strange... Could you reproduce it?
  22. Hi guys, am having a problem with uploading images within a repeater field. I'm just getting a little image icon and the fields aren't getting populated. I'm using the latest dev branch, so not sure if it's a possible issue with that. Can anyone else replicate this? I have included a screenshot. Thanks!
×
×
  • Create New...