Jump to content

Joss

PW-Moderators
  • Posts

    2,862
  • Joined

  • Last visited

  • Days Won

    47

Everything posted by Joss

  1. No, reloading just shows an empty field - and nothing in assets. So, it is actually not getting uploaded at all. I am just going to try and create a new field with just the default setting and see what happens.
  2. Sorry, I am lying, it is NOT working. I have two image fields right next to each other, and I was trying with the wrong one. So, whatever I try, it is not uploading images - they are just registering as deleted, or something. Sorry! Joss
  3. Okay, just to check (I am a beginner at this stuff) I am trying to put together a shortcode that will render a little boring gallery - the shortcode allowing it to be placed anywhere in the main text. 1. Start by calling the module: $shortcode = $modules->get('MarkupShortcodes'); 2. Add a shortcode: $shortcode->add('quickgallery', function($atts){ $quickimages = $page->post_quick_gallery_image; echo "<div class='row-fluid'>"; echo "<ul class='thumbnails'>"; foreach ($quickimages as $quickimage) { echo "<li class='span3'>"; echo "<a href='{$quickimage->url}' class='thumbnail fancybox'>"; echo "<img src='{$quickimage->getThumb("quickthumbnail")->url}'>"; echo "</a>"; echo "</li>"; } echo "</ul>"; echo "</div>" }); 3. Render my short code - which is the point I am not sure about. Also, can I create a whole list of shortcodes then render them all in one go, or do I have to treat each separately? Oh, one other thing - is there anyway of limiting which field a short code can be used with? Sorry for all the questions! Joss
  4. Okay, That is interesting. I had set it up with different thumbnail values and it didn't work. But you are right - re-saving the field makes it work. I thought I had already tried that, mostly because I had changed the default values for three others. But perhaps just changing the values immediately after creating the field and then saving was not enough - it had to be saved again. having now got it working, I have tried changing values again, but this is okay - one save is enough. So it must be down to that first save after creating the field
  5. Thank goodness! I mean, not thank goodness, but I am glad I am not going mad all on my own.
  6. Well, you can do various things. When I do galleries or slide shows I sometimes like complicated overlays. So I might have a couple of text fields (one for image title and one for some text) and maybe a secondary image or using the image thumbnail module so that I can create a small, cropped thumbnail to use as a detail image. And then I wrap that whole lot up in a repeater field You can get too complicated of course .... Oh, and don't forget you can set whether a field is required or not on a template-to-template basis.
  7. Joss

    Code Dreams

    Well, lets think about this. It has a lot of wires in it ... It has lots of objects that you can apply processes to It allows you to create mockups and to be able to manipulate it easily and then connect all the bits together ... So, that is processes and wire and ... Well, it is obvious! Ui-Mock!!
  8. Well, now you have it installed - go have fun with it!
  9. Oh, not sure if that is possible. You can always create a separate field for description and make that required (then set the existing description field to 0 rows so it does not show).
  10. Nothing like being certain about something .....
  11. Can I misquote you on that? "We have already done it, so it must have been easy!" As good a marketing line for using PW as a site builder as any I can think of.
  12. Oh, theming is... well, whatever you want. Since there is no template engine as such, its a case of inventing your own way of doing it. Just for fun, I knocked up the html and css for the basic website tutorial in an old copy of Dreamweaver - just to make the point. You can use Bootstrap or any of the CSS frameworks out there, just as if you were building a static site. Just stick in the PW bits to add your content (okay, I over simplified that a little, but not by much!) This is why PW is fun. You might have to learn some very, very basic PHP just to make sure you don't do anything idiotic (but you can learn it as you go by copying and pasting), but you don't have to learn a whole complicated template system, which is normally the really hard bit. As long as you can write basic HTML and CSS, you have what you need.
  13. Something I am doing at the moment is a very basic theming system for posts on a blog. Basically, all posts are wrapped in a nice obvious div class "posts" and there is a separate style sheet for all the markup within that div container. Then, on every post, you can select from a theme. This just adds a style sheet where you can override anything in the posts.css file. You can create a whole pile of these and create matching selectors. I might also throw a few extra things in there like reversing sidebars and so on. But at the end of the day, all the styling is in a style sheet and not inline - all the author is doing is selecting from a list determined by the developer. (Note: I am also building in a site-wide version, though having added the functionality, I have yet to work out how I will use it! )
  14. I am having one little problem, which may be unrelated, to do with the Thumbnails module. For me uploading images breaks with 2.2.13 See here: http://processwire.com/talk/topic/643-release-thumbnails/page-8#entry27367 Just in case something has changed that might affect other modules too...
  15. Oh, sorry, stupid question: Where do I actually put the markup? In the template file? (Or included file..)
  16. Ah, great! I will now add it to my list of things in my new blog thingy I am doing! You are dutifully forgiven.
  17. I am putting together a blog solution at the moment and the way I am doing it is this: (remembering that this is just one way) Main Menu: Home (er, obviously) Category 1 -- subcat ---- subcat Category 2 -- subcat ---- subcat Category 3 -- subcat ---- subcat ---- subcat ---- subcat ------ subcat Category 4 -- subcat ---- subcat So, those could for instance be Sport, Politics, Media and so on with a category tree underneath of any complexity. Articles are actually just being added as children to a hidden page called Articles and have a page field to select one category. They are all in one list (as with things like WordPress) though you could break them up if you wanted for management purposes. It does help for development purposes, if all your articles have either the same parent OR the same template (one or the other). It makes dealing with them easier. In my case, because I have very different post types (and therefore associated templates) I have gone for a common parent approach and will rely on the search or the front end to find things Then... I have a pile of tags under a hidden page called Tags. These are also selected by the article using a page field, but you can select multiple tags and add new ones. I also have Topics, again under a hidden page. You can make any article select several topics, but not add new ones. Topics are being used as cross references. So you may have a topic called "Politics in sport." This would be used for an article about sport that had a political bent that you want listed primarily in the Sport category. I also have authors, which can be yet another sort method. EDIT: Almost forgot, I have several article types - Video, Photoblog, Standard Blog, and so on. So articles can be filtered and listed using that criteria (basically which template is being used). Second Menu I have a top bar that has dropdowns for all topics and all categories as a quick link/cross link system. You can also search just as normal or filter the search by category and/or topic. The top bar also will have links to About and Contact so that the main menu is very much dedicated to just the articles. That is the basic skeleton. After that, it is down to useful tools. For instance I have created a widget that lists recent posts in the same category as the post you are viewing is in. I could also create one that worked on topics. You could use the categories as either single entities where each category only lists those articles that belong to it, or you could use them as filters. So, a top level category would list all articles belonging to it and any sub categories, a subcat likewise and so on down the tree. There are rather a lot of ways to skin the ProcessWire pet cat, to be honest. The main thing with news (which is nothing to do with ProcessWire as such) is that you have to allow quick and random browsing through main areas (like you would with a printed newspaper so your home page (and other pages) should lay out your wares nice and clearly, and you need to make sure you have some sort of editorial control with different groups allowed to do different things. In principle, my approach is similar to Ryan's. but with some variations that suit my brain!
  18. Hi Crownofthorns Depending on what your experience level is, you may want to try one of these tutorials (or both!) http://wiki.processwire.com/index.php/Small_Project_Walkthrough http://wiki.processwire.com/index.php/Basic_Website_Tutorial The first is a really good introduction to the system, the second is more about getting you started.
  19. HI Apeisa I have just tested Thumbnails with a standard install of 2.2.13 on a normal shared server, and it is coming up with the same problem - just not uploading images. Here is a screenshot As soon as the file seems to upload, the error in red appears, and the file has not uploaded. Working fine in 2.2.12 Edit: still not working with 2.2.14
  20. If you look through this: http://processwire.com/api/selectors/ It has just about everything you could want about sorting stuff and finding stuff. So, assuming your current (category) page is in a variable called $currentpage, then $posts = $pages->find("template=post, category_field=$currentpage"); or something like that! You will get better information from the page about selectors than from me!
  21. Joss

    Code Dreams

    $nightmares = $pages->get("/no/bloody/sleep/")->bad_dreams; foreach($nightmares as $nightmare) { if($nightmare->solution){ echo $nightmare->solution; }else{ echo "<em>Wake up and make coffee</em>"; }
  22. Joss

    Code Dreams

    The only problem is I keep finding that I am solving problems in my sleep that I only invented in my sleep in the first place. "Can you look at this code and work out why there is a glitch in the page?" In my sleep I rack my brain, trying to see what the problem is and what the solution might be. When I wake, not only has the solution slipped away, but the problem doesn't seem to exist either, nor the email relating to it, or even the client. Unfortunately, it seems the invoice will also have to remain imaginary.
  23. Joss

    I love ProcessWire

    Jennifer, I once wrote a little something about pages http://processwire.com/talk/topic/2296-confused-by-pages/ You may appreciate it.
  24. Okay, Soma just gave an answer that was almost as silly as the one I was going to give! I think the logic is: $page - that is the current page $page->image_field - that is the name of our image field belonging to the current page $page->image_field->url - that is the url belonging to the image field belonging to the current page and of course $page->image_field->description - that is the description belonging to the image field belonging to the current page where we started the conversation. So, there is a logic to it!
×
×
  • Create New...