Jump to content

diogo

Moderators
  • Posts

    4,296
  • Joined

  • Last visited

  • Days Won

    79

Everything posted by diogo

  1. The error message doesn't look like a problem with the host to me... maybe there was some problem when copying or unzipping the files? edit: just noticed that this was my thousandth post
  2. I came back to this thread because of this other one http://processwire.c...portfolio-site/. As I remember, the need of adding extra information to the images and files fields was already mentioned some times. Ryan, are you still planning to extend the core fields with this? It would be actually a great feature to do this in the field config options!!
  3. This thread reminded me of another one that might interest you http://processwire.com/talk/topic/417-extending-image-field/
  4. Playing the devil's advocate: was Joomla's version the most recent?
  5. About the repository: I think a good way to do this would be to have some kind of social bookmarking here in the forum. This would make it pretty easy for people, when they have some free time, to go a bit back in the forums and start collecting the useful snippets and share it with everyone. This would avoid all the copy/pasting to the wiki, and make the collecting work a lot simpler. If IP.Board doesn't offer this kind of functionality, maybe we can prepare a simple page on the PW site and build a bookmarklet for this.
  6. If you create a template without a file they won't be accessible on the site or search engines, they will only exist as database content. You're safe to just leave them like this.
  7. Try this: $page->import_page->title
  8. Don't forget to sanitize and validate everything before storing on the database http://processwire.com/api/variables/sanitizer/
  9. I know, but this is how choices work in PW. You'll get used to it
  10. You don't have to bootstrap PW, and you can use $pages instead of $wire->pages. I think page field with radios input would be better for this. You will have to create a page "fonts" with a page for each font inside, and define has parent for the page field.
  11. I don't know the drawbacks of this, but I just managed to do make the dynamic stylesheet proposed on css tricks work has a pw template. So, this is how to do it (someone stop me if this is a bad bad thing to do): 1. Create a template file css.php and put all your css code inside. On the top of the file put this code <?php header("Content-type: text/css"); ?>. 2. Create a "css" PW template with that file. 3. Create a "css" page and give it the "css" template. 4. Link to the stylesheet like this <link rel="stylesheet" href="<?php echo $pages->get('/css/')->url; ?>">. 5. use the PW API on your stylesheet Extra: 6. put some fields on the "css" template and use them on your css Examples: the color picker field for colors; an image field with your style pictures (background, logo, etc). edit: onjegolders was faster! edit2: not the same answer. Mine is more interesting
  12. correction: They are not inline styles. These are inline styles <p style="background:#ccc; color:#fff; border: solid black 1px;"> edit: Anyway, have a look at this http://css-tricks.com/css-variables-with-php/, I think you could even use a pw template to achieve it.
  13. Hm, I guess it should work... have you tried with == instead of ===? In despair, you can always do this: $i = 1; foreach ($galleries as $gallery) { if ($i==1) { $class .= " active"; $i++; } oops... Soma was faster and better
  14. See here how you can create the variables with pw data to use in javascript http://processwire.com/talk/topic/803-tinymce-insert-image-modal-window/#entry20546
  15. People should be careful when doing this. Make sure that your website is truly responsive when you use something like this.
  16. Concerning the pixlr module, I just wanted to add aviary to the discussion. I always liked aviary tools, and their web widget does seem nice http://www.aviary.com/web
  17. What you can do is forget the segments and create the categories as a pages inside /blog/categories/. blog -categories --news --.. -posts --post1 --post2 --.. Like this you would have URLs like /blog/posts/my-first-post and /blog/categories/news
  18. The answer is on the foot.inc of the default theme: // If the page is editable, then output a link that takes us straight to the page edit screen: if($page->editable()) { echo "<a class='nav' id='editpage' href='{$config->urls->admin}page/edit/?id={$page->id}'>Edit</a>"; } This is the small EDIT button that appears on the upper-left corner of every page. To do exactly what you want, you can change your code based on it: if($input->urlSegments[1] == 'edit') $session->redirect($config->urls->admin . "page/edit/?id=" . $page->id);
  19. It's not a strange reason. Has I understood, what's happening is that the page url has precedence over the parent page segment. So, when you give the name "category" to a page children of "blog", that's the page that will be accessed from /blog/category/, and if you try to access /blog/category/news/, the system will look for a page called "news" children of "category", or, in case it doesn't exist, the first segment of "children", if activated on it's template. I'm supposing all this stuff. maybe Ryan can confirm if I'm correct.
  20. One file field for each category, maybe...
  21. I'm not sure I understand your question completely, but you could use the page field for choosing files by having one file per page. You can do this by creating a field of the type "file" (let's name it "myFile"), and a template with only this field besides "title". Than, create a page "files", and the pages that use this new template as children of it. Now you can create a field of the type "page" (let's name it "myFiles") and choose the page "files" as the "Parent of selectable page(s)" on the input tab. To display the files chosen for a page you just have to do in the page template: foreach($page->myFile->myFiles as $f) echo $f->url;
  22. You're right, I didn't close the $(document).ready(function() { I'll do it now
  23. diogo

    Houghton Academy

    Ryan, you don't lose the formatting if you copy the code and paste it back while editing
  24. You are selecting twice the same element, and defining twice the same attribute. Not very efficient... Try this: $(document).ready(function() { $(".body_copy a:has(img)").addClass('fancy').attr({ rel: pageName, title: function() { return $(this).find("img").attr("alt"); } }); }); note: I didn't test it
×
×
  • Create New...