Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. Thanks for the nice words arjen
  2. Hi there, welcome to the forum! You're not getting away with the post being ignored just like that Glad you got it working. It's good to have such a detailed post, so it can help others who might have the same problem. Enjoy PW, and don't hesitate to call again for help, when needed.
  3. Thanks for the answers! Well, the white... we even tried with pictures on every page, but both of us immediately felt that this silence would make a stronger statement. The other pages with pictures were removing importance to the works page. But still, we showed both versions to the client, and fortunately she agreed with us Seriously, in this case it just makes sense to have the thumbnails there Thanks again for the comments guys
  4. Hey! I launched my second PW website. The design is again from Erika Göbel. http://www.bronislava.de/ Bronislava is an artist that lives and work in Karlsruhe/Germany. We decided for a very minimalistic approach. Everything is white, except for the works page (WERKE), where the pictures occupy all the screen. I didn't test a lot on mobile phones, and I guess I will still have to do some more work for them, particularly for touch screens. Soma's new module came just on time to make the admin even friendlier And again, it was a big pleasure to work with PW.
  5. true hm... quick solution would be adding it to config. The admin template could check for the existence of $config->siteName
  6. Very simple request. I think the name of the website should be somewhere well visible on the admin area. I use the default theme on all websites, and because of this they all look the same. I always have to look on the URL to make sure I'm editing the right one. What do you think? Edit: I reread my sentence and noticed it was a mess. Already corrected the mistakes.
  7. 1. True, I didn't find it on the API or on the cheatsheet... but to get the creation timestamp of page you use $page->created, so I tried $user->created, and it worked You can use it like this: $created = date('Y-m-d H:i:s', $user->created); edit: forgot the second part of 1. you can use $session->redirect($myPage->url); after the page creation code (this must be done before any markup output) 2. I guess it's possible to create the module, or maybe it's even easier to reproduce the repeaters on the frontend. But I will let others help you with that...
  8. Of course you can do it, given that the user creates the page. The code I posted would allow you to do what you asked even if the page wouldn't be created by this user. You can create a page on the fly like this $p = new Page(); $p->template = $templates->get("person"); $p->parent = $pages->find(1015); // whatever page you want to be the parent $p->name = $user->name; // I insist on this, like this you don't need the hidden field that you mentioned $p->title = $user->name . "'s personal page"; $p->content = "write here something"; $p->save(); creating the form on the front end is not that difficult, in your case you can do something like this: <?php $myPage = $pages->find("name=$user->name"); if ($input->post->content){ $value = $sanitizer->textarea($input->post->content); $myPage->content = $value; $myPage->setOutputFormatting(false); $myPage->save(); }?> <form name="form" method="post" action="<?php echo $page->url ?>"> <label for="content">Content</label> <textarea name="content" id="content"><?php echo $value ?></textarea> <input type="submit" value="Submit" /> </form>
  9. Hi there, welcome to the forum! This is easily achievable in ProcessWire. In PW, what are called pages, are not really pages. They are, more or less, what are called nodes in other CMSs. You can organize your content on the tree the way you want. In your website, would make sense to organize it just like in any regular website (about, why, gallery, menu, etc...). Then you call all the information from the homepage template. For this, you call the fields of individual pages like this: $pages->get("name=about")->body. So do, for instance: $about = $pages->get("name=about"); $gallery = $pages->get("name=gallery"); $name = $pages->get("name=menu"); $why = $pages->get("name=why"); and then use $about->body, instead of $page->body <div id="about"><?php echo $about->body; ?></div>
  10. For windows (the client uses windows, right?) this might be the simplest tool http://imageresizer.codeplex.com/
  11. If you do it on the backend, I'm not sure how to. If, on the frontend, you can easily put on your template some logic that only allows user with the same name as the page to see it: if($user->name === $page->name){ echo "you are allowed "; }else{ echo "you are NOT allowed "; }
  12. Ryan, forget the thumbnails thing... my testings where based on a very silly mistake. I assumed the 0x100 created for the thumbnail were the duplicated file that was appearing to Antti. Next time I will also check the names of the files, instead of just glancing at the thumbnails of the file manager :S I realized this right after I left for lunch, and was going to post as soon as I would come back to the computer. Glad you found out the problem before...
  13. The problem is on the "Display thumbnails in page editor" option. I looked for what was different in the original "images" field, and the ones that I just created, and this was one of those things. I tested all of them with and without the option checked, and it does make the difference.
  14. I was able to reproduce this, and did some tests. The duplication happened on the same page, but only for the "images" field that came on the original install... didn't happen for a image field that i created later. I created two more fields, one cloned from the original "images" and a new one with the default settings. Then, I created a new template, and populated it with all the four fields -- the two from the first test, and the newly created ones. On a new page with this template, the duplication happened on both, the "images" field and its clone (!), and not on the other two. Also, it only happened to files bigger than approximately 17KB. edit: tested with jpg, png and gif. they all behaved the same way
  15. This will happen in the backend or frontend? edit: I think I can deduce from your other post that you want to do it on the backend
  16. Hi and welcome! There is a type of field, "fieldsetTypeOpen" that allows you to do this. Just create a field of this type (first screenshot), with the name that you want for your tab. This will create two new fields on the "Add Field" dropdown of your templates "fieldname" and "fieldname_END", that you can drag to the field list to group the other fields in tabs (second screenshot).
  17. Hi, and welcome to the forum! What you are asking is not that simple because this is not the way that ProcessWire is designed to work. It's not impossible though, and if you have the skills to create a module you can do it. I can't help you a lot with this, but maybe someone who can will jump in the discussion. What I can do is help you to get started. Here it goes To make a page appear in the admin navigation, you just have to make sure that it is children of the admin page in the tree. You can do this with any page with any template. If you want this page to behave and look like the other admin pages, you will have to give it the admin template... go ahead an try it... when you do this, the page will simply say "This page has no Process assigned". This means, you will have to create a process module that does what you want and assign it to the page you created. If you edit the page and choose from the several processes that already exists, you can see how it works. The process modules are on the wire/modules/Process folder of your PW install, have a look at some of them to get a feel of how it works.
  18. Apeisa, I was testing your method for responsive images http://www.monoliitti.com/images/, and somehow, with screen.width it's not working in any browser. It always shows the larger image. When I replace screen.width by $(window).width(), it works perfectly...
  19. if you store every page in session, you can redirect them there on every template: $session->from = $page->url; on the login.php: $session->redirect($session->from);
  20. The $extra wasn't really an extra?
  21. You can get a random page from an array like this: $extra = $page->child->getRandom()
  22. I think that the login link will have to point to another page that does the login before any output. Or to itself, but in this case you have to put the login function on the top, inside a conditional that checks if you came from that link (with a get or a post). To do this without loading the page again, you will have to use ajax. I don't know if there is another way...
×
×
  • Create New...