Jump to content

kongondo

PW-Moderators
  • Posts

    7,379
  • Joined

  • Last visited

  • Days Won

    139

Everything posted by kongondo

  1. Then, maybe do as I have suggested. Install it as per instructions, then edit it in small chunks and testing as you go along. Btw, ideally, I think, you should try to develop your sites locally (WAMP, XAMPP, etc..)
  2. There you go. Is it the whole functionality of the Skyscrapers profile that you are interested in or is it the theme itself (html and css)? If the former, then install the profile as per the instructions then edit it in small chunks, testing along the way that you haven't broken anything. If the latter, then you can grab that from the "view source" in your web browser or by grabbing what you want from the template files..
  3. What about error.txt; what does it report?
  4. Turn debug on (in dev site only) or check in /site/assets/logs/errors.txt. What messages do you get? Have you checked your paths are correct? In Firebug or other web console, what errors do you see? Did you follow all the instructions listed here? I couldn't see anything in your link above; I mean, I don't know what am supposed to be looking at. Link to site maybe?
  5. I think I have read somewhere in the forums people say if it is fixed and won't change, why waste PHP resources? Stick it in the template file . Up to you ultimately...
  6. Peter, Have you had a look at /wire/templates-admin/default.php ? That's where the magic happens, I believe. Copy the contents of that folder to /site/templates-admin/ so that PW will serve /site/templates-admin/default.php instead. I'm not sure about your requirements but you can pretty much redirect non-admins to other places by editing default.php, I think. I could be wrong. I'm not sure if there will be effects on the rest of the system though. Have a look at this admin theme switcher that I was tinkering with. Basically, I edited /site/templates-admin/default.php to redirect to an admin theme depending on the value of a Page Reference Field. Edit: Have a look at this as well: http://processwire.com/talk/topic/3617-managing-users-and-related-pages/
  7. Definitely dev branch . (Diogo's optimization). Have a nice day too!
  8. Is that a dev site by the way? The slider image sizes are massive (parliament-1.png is 4MB; cliff-1.png is 5.8MB!) and are taking time to load. Just wondering...Beautiful site btw
  9. Out of curiosity, try this instead <?php echo "<img src='{$slide->image->url}'/>";?> But your code above should also work actually Edited code above to add {}
  10. @Horst: I thought he was using a PHP file outside the PW system (i.e., I didn't know it was a template file). @Svitcov: What is $slide? How does your other code look like just before what you have shown us above?
  11. Welcome to the forums Svitcov! Looks like you are trying to directly access the assets folder using a PHP file that is not a template file? If that is the case, PW will block you from directly accessing that and other folders, e.g. /site/templates/ using your own PHP files.
  12. Even these: $next = $siblings->getNext($page); $prev = $siblings->getPrev($page); are verbose I think? PW already has $page->next(); and $page->prev(); Can't those be used in this case? See these (answer for you in first link): http://processwire.com/talk/topic/3133-detect-first-and-last-sibling-page/ http://processwire.com/talk/topic/3714-how-to-do-this/ http://processwire.com/api/types/nullpage/
  13. @Ryan, You might want to have a look at zyON's other post. There is a question about formatting the URL...
  14. if ($page->id==1) {echo "you are on the home page"};// if the ID of this page is 1, then it is the homepage OR if(!$page->parent->id) echo "You are on the homepage";//Means, if this page has no parent, then it must be the homepage Actually, there is a lot of useful information in the documentation: http://processwire.com/api/variables/page/. It's worth having a look at
  15. Three times I started to post my comments after the review but gave up. If you can describe PW API as only "decent" then you clearly haven't used the system! Anyway, could be a matter of language. Wanted also to comment on the issue of pages which we know is an abstract term. Also, wanted to say you can save other stuff in db if you don't care about urls. In addition, there are PW projects that have >100k pages! It's not just for small projects. Was tickled by "updating PW requires tinkering with the system" . Anyway, I'm now preaching to the choir . You are right though; the exposure's good. There have been many re-tweets about the post.
  16. I'm afraid I can't help with the URL bit Am sure s'one will chime in pretty soon.
  17. Yeah. We can start by raiding Soma's Gist
  18. Assuming 1 product => 1 brand Brands Armani (child pages of brands) Canali Magee Lambretta Men Suit 1 (child page of Men) Suit 2 Suit 3 Suit pages will have a single Page Reference Field referencing their brand, e.g. Suit 1 => Armani Suit 2 => Lambretta, etc. Is this what you want? I'm not sure I got you correctly. You then want to search and display, e.g. all men's suits by, e.g. Armani? Not tested but I think either of these should work $pages->find("template=suittemplate, parent=123, brand=armani");// brand is the Page Reference Field; 123 = ID of men page // OR $pages->find(123)->children("brand=armani");//123 = ID of men page Edit; Selector above, is of course wrong, brand=armani...will not give you what you want. You will want to create a variable that can reference armani (title of the value of the brand page reference field.)
  19. Just to clarify, do you mean you want brand and collection to also appear in the URL or you are wondering how to use them in your selectors? If the latter, then you can use Page Reference Fields. Depending on your setup, these can be single Page Reference Fields or Multiple. For instance, I assume a product can only belong to one brand? Can a product belong to multiple collections?
  20. zyON, Welcome to PW! Please write down your site pages hierarchy here. E.g: Home Products Stuff Other stuff Even more stuff Etc. It is easier to see their relationships that way. I have tried to look at the other tried and am not sure what you finally selected. We can then take it from there
  21. Galaxy, What don't you get? Do you want to output a single image? Random images? Is it working for you now?
  22. It depends on your needs. I am no coder myself; I could probably do a simple module that says hello world! and that's it . A module is good in that it can be shared and reused easily on multiple sites. Just click and install and you are off. But, in some cases, you just need something custom using something familiar to $page API....so you use ACP. Of course you can share (if you wanted to) the code in your ACP (child) template file if others want something similar or if you want to reuse it on some other site. No need to make a module if you can't, at the moment....we will get there eventually, I believe.
  23. Looking forward to your creation! Of course, I do not need to remind you that if you want something modular, better to create a module
  24. Hehe The .com redirects to .net
  25. @Ovi, Excuse my ignorance. I am not sure I get why you need to hook into any method? If a comment is submitted, it is saved to the db (directly if it does not require approval and later if it does require approval by Admin). In that case, why not just count the comments in the db directly? Since comments are related to their pages, you will know how many comments there are per page(?) I'm probably not getting it (I usually don't many times, hehe) and you are far way a better coder than I am, so would request your indulgence to unravel this for me please Edit: Useful? http://processwire.com/talk/topic/1205-comment-counting-returns-odd-number/ OR: Just use PW API in your template file: In my tests, this code sorts my posts (pages) in a list according to number of comments (and echoes the number of comments per post). Since there is a page refresh after each comment submission, the sorting is always up to date... foreach ($pages->find("template=post, sort=-comments.count") as $reviews ){ echo "<li>{$reviews->title} - " . count($reviews->comments) . "</li>"; } Other topics: http://processwire.com/talk/topic/594-how-can-i-use-pagination-with-comments/ http://processwire.com/talk/topic/357-creating-comments-via-api/ http://processwire.com/talk/topic/1930-comments-question/ http://processwire.com/talk/topic/1624-comments-module-multi-pages-display/
×
×
  • Create New...