Jump to content

apeisa

Moderators
  • Posts

    4,632
  • Joined

  • Last visited

  • Days Won

    55

Everything posted by apeisa

  1. Thumbnails module shouldn't affect file uploading. I remember there seems to be about 7 or 8 mb limit on ajax uploads currently - how large are your files? Also there are php settings for max filesize.
  2. It would be great to have native pw implementation for file uploads. Peter: you should definitely do some more validation for the file. At least check for file extension (and match them against whitelist), rename the uploaded file etc.. there are plenty of tutorials for how to secure php file uploads. You can also first upload file anywhere you want on your server, ->add($file) will do the final copying for you.
  3. Do you have debug on? If so, do you get any kind of error message? Do you allow one or multiple images on that field?
  4. Superb job Pete, looks great. I especially like the Databank -> Games section.
  5. While developing, it is good practice to put debug mode on from /site/config.php - that way you see error messages directly on the screen. Are you sure you are using image field and not file field? Because if ->url works but resize doesn't, then it seems to behave just like file field. So check that your fieldtype is set to image instead of file?
  6. Inside loop. What kind of problems you are having?
  7. Visible only in advanced mode, which is meant mainly for core & module building.
  8. Not sure what you are after, but no matter have you resized the image or not, you can access it's width and height easily: <?php $img = $page->test_image; ?> <img src="<?= $img->url; ?>" width="<?= $img->width(); ?>" height="<?= $img->height(); ?>" alt="" /> Also if you need images in specific width or height you can resize them like this: $img = $page->test_image->width(200); OR $img = $page->test_image->height(200);
  9. Parent and child can have separate templates. You can even specify what kind of children/parent pages are allowed from family tab. If I have situation where parent doesn't have content of it's own, I usually do some of these: just redirect it to first child list all children with links (just in case and for search engines
  10. Not sure if this is valid in your case Alan, but you need to have limit=n in your selector. Limit needs to be larger than 1 and less than your total elements to pagination to show up.
  11. onjegolder: thanks for your kind words and welcome aboard. Very much appreciated. I agree, this is among the top communities around there. We all do our best to maintain the polite and helpful atmosphere here as we grow in popularity. People tend to follow each others behavior, and Ryan has set the exactly right course for our community. It is also amazing how fast newcomers start contributing and help others.
  12. Just getting this topic up. If someone wonders if channel is still active - yes it is. Also seems to be a great support channel. We have had many great discussions already. Welcome!
  13. I tried to allow iframes. Worked fine but tinymce stripped width and height. Other attributes were fine.
  14. Marc: It is possible, but I think that if you want to do that, then pages are probably better way to go. If only reason is nicer ui, then you better watch this development: http://processwire.com/talk/topic/988-new-page-from-inputfield/
  15. There are at least two clear indicators when repeaters are no go: 1. You need url for each item 2. You need hundreds or thousands items Performance wise (in my knowledge) repeaters are pretty much same as having one page reference and you access the values of that other page. That is what repeaters does under the hood. So while you could create news-template and have news-items as repeater field there, I don't think that is a good idea. No urls for each news item, not fully scalable (on UI side, from db/api it is the same) and you lose lots of flexibility on API side, ie. $pages->find("template=news-item, limit=10, sort=-created");
  16. One thing to remember: find does user access checking: so to make sure you have rights to see those pages, login as superuser.
  17. I think only permission that PW uses but is not on the list is page-publish. PW will use that if you add it.
  18. You get very nice solution already using auto complete page field and using this feature:
  19. Pete: similar to this http://processwire.com/talk/topic/337-session-cleaning/page__hl__sessions__fromsearch__1 We don't have this problem anymore and I don't remember actual solution, but maybe @vsulin will drop in and tell? It was something about server settings and ubuntu defaults anyway...
  20. Hmm.. now that I think of: you can probably add those pages as children for users. Edit user template and allow user-file as children. Then you can remove that user reference, since they are always under correct user. I have never expanded user profiles this way, but I don't believe there are any nasty side-effects for doing so.
  21. Reno: with the current file field it is not possible to create relation to other pages. If you don't want to dive into building your own fieldtype (allowing multiple files + page references for each file) your option is to keep files in some other branch. Then you would have this kind of setup: user-file template Template has fields user, categories and file User is single page reference for user. Categories is multiple page reference for your categories. File is single file.
  22. There is one big drawback using this method: after this if you edit image, tinyMCE/PW loses the image width/height setting you have gave it, and image has it's original size again.
  23. With huge amount of pages you could run scalability issues on some file systems (due the fact that PW automatically creates a folder for each page). Though this has been discussed and fix is coming at some point (can't find the topic now).
  24. I started building our first shop week ago and I was pretty happy how well this functioned. Probably will add few commits while developing this further. It is pretty basic shop and I am not sure if that will require much feature wise. But at least after that we will have first live shop using 100% pw as a commerce solution. But what I think that will come in "near" future are things like: Taxes Reporting (monthly sales etc) Different shipping methods Cleaner code with hookable methods Product variations (I will probably wait for repeater to go stable) Better documentation
  25. Welcome to the forums stardog. Those are all very easy and basic stuff for Processwire. I'll translate your pseudo-tag examples to php (which PW uses as template language also): <PW:ShowStuffFromThisPage page="blog" limit="10" sort="descending"> <li><PW:title/></li> </PW> foreach ($pages->find("template=blog-post, limit=10, sort=-created") as $p) { echo "<li>$p->title</li> } <PW:ShowStuffFromThisPage page="portfolio" limit="4" sort="descending"> <PW:title/> <PW:image/> </PW> foreach ($pages->find("template=portfolio-item, limit=4, sort=-created") as $p { echo $p->title; echo "<img src='{$p->image->url}' alt='' />"; } <PW:ShowStuffFromThisPage page="blog" limit="10" sort="descending"> <div class="blog-post"> <h2><PW:title/></h2> <PW:body/> </div> </PW> Since blog-posts are probably children of "blog" page, then no need for template checking on selector: foreach($page->children as $p) { if ($p == $page->children->first()) $class = 'first'; //this is for differentiation of the first post else $class = ''; echo "<div class='blog-post $class'>"; echo "<h2>$p->title</h2>"; echo $p->body; echo "</div>"; }
×
×
  • Create New...