Jump to content

adrian

PW-Moderators
  • Posts

    11,175
  • Joined

  • Last visited

  • Days Won

    371

Everything posted by adrian

  1. Hi bwakad, Do you mean the name of the child template suffix? That is configurable in the module settings, but there is also no reason why you can't change the name of the template itself after creation - like any other template, go to the Advanced Tab > Rename Template. The parent page for the list of options (the child pages) is created on the fly - it matches the field name. If you are referring to the page selector called Parent Page - I don't think it makes sense to be able to create this on the fly - it can be the Home page, or a hidden options or tools, or selects page - somewhere where to store a whole range of pages that aren't part of the site tree. I would recommend filling out the fields in the module and you can see exactly what happens. You'll end up with a field (such as Province) that you can then add to your required template and the content for the select will automatically be linked to it. Try it out and then me know if you still have questions or suggestion for improvements.
  2. You have a good point about the head and foot inc files. It looks like Ryan used the text from the default PW profile which does use that approach. His Foundation profile however actually uses a different approach using _main.php Take a look at: https://github.com/ryancramerdesign/FoundationSiteProfile/blob/master/templates/_main.php Notice that this file contains the entire structure needed for an html page. The content from the PW pages is echoed in various places in this template. For example: <div id="bodycopy" class="large-8 columns" role="content"> <?php echo renderBreadcrumbs($page->parents); echo $body; ?> </div><!--/#bodycopy--> PW lets you work exactly how you want, which can be confusing for some users at first, but you'll come to appreciate it.
  3. Here's a bootstrap 3 profile from phillip: http://modules.processwire.com/modules/process-wire-bootstrap3/
  4. There are two profiles linked to and they are both in the first post of this thread. gebeer's is the one most similar to the Foundation 4 profile created by Ryan (basically exactly the same except that it is running on v5).
  5. This is a replacement profile for PW, rather than a module in the strict sense. Because you this, you must replace those folders before installing, just like it says in the Readme. Good luck.
  6. Bootstrap: http://modules.processwire.com/modules/bootstrap-admin-theme/ https://github.com/jsanglier/Bootwire-Starter-Profile Zurb Foundation: http://processwire.com/talk/topic/5293-zurb-foundation-5-profiles/
  7. Sometimes you gotta do what you gotta do
  8. Well I am not sure I understand - the stuff inside the foreach ($related_id as $key => $val) { will only get displayed if the $related_id array has entries in it so perhaps you need to figure out why there are page ids in that array in the first place if there are no related pages. EDIT: I had some code here that I thought made sense, but then realized it didn't
  9. Also, even though the client is "always right", the reality is that they're actually not always right Unfortunately given them the ability to style fonts in an RTE field is usually a recipe for ending up with a site that looks like it's from the 90's. Sometimes you just have to be confident and tell them No!
  10. Agreed horst - we need to make GD the best it can be. I do like the idea of a drop-in IM replacement though. There are so many settings that developers could tweak with IM. One thing that should be tried straight off is using: adaptiveResizeImage instead of ResizeImage, which is what I used in the module to start with. Anyway, as I said, no time right now, but perhaps if enough people are keen and think the benefits are worth the effort, perhaps we could collaborate on this?
  11. I am not sure on the whole GD vs Imagemagick quality issue. I know years ago IM was ahead, but not sure if that is still the case. From reading around it sounds like they each have their strengths and weaknesses. That said I have always used IM until I started using PW. For the sake of experimenting, I quickly threw this module together as a way to test IM within PW. It replaces the resize method, so it will work from the admin and also template calls like: $image->size(400,0) It doesn't do anything more than the resizing at the moment - it currently ignores all quality settings, cropping etc. I doesn't try to do any sharpening either, but it's a starting point that we can play with. I need to get back to real work, but thought one of you guys might be keen to play around with and tweak settings and see what you can come up with. Obviously you need imagemagick on your server and also the iMagick extension. ImagickResizer.module
  12. Why not just change "modified" to "created"?
  13. If I understand correctly, would counting related_id work? if(count($related_id)>0){
  14. Put these lines in your htaccess: RewriteCond %{HTTP_HOST} !^sharespost.com$ [NC] RewriteRule ^(.*)$ http://sharespost.com/$1 [L,R=301]
  15. Here is a link to a post that links to several others on creating a custom front-end login: http://processwire.com/talk/topic/5121-frontend-users-validation-processing/?p=49360 Here's a great thread on creating a custom front-end form: http://processwire.com/talk/topic/2089-create-simple-forms-using-api/ PW may lack some inbuilt functionality, but it more than makes up for it in flexibility.
  16. Hi Melissa and welcome to the forums! Not exactly what you are asking for, but this might suffice for your needs: http://processwire.com/talk/topic/5835-lister/
  17. You could always place the script outside the PW templates folder and bootstrap it to processwire so you still have access to PW pages and fields for grabbing the validation messages. http://processwire.com/api/include/
  18. Usually the problem with using a PW page for processing a form is the HTML that is included in that page. You need a way to not have this extra stuff sent when requesting the page. How you do this depends on how you structure your PW pages - are you using head.inc and foot.inc includes, or are you using a main.inc? or are you making using of the before and after includes in config.php? You can make use of $config->ajax to see if the page was called via ajax, but then again, if it's just a form processing page, then you probably don't ever need to display it normally, so probably not relevant here. So, call that process page directly and make sure nothing gets rendered. Also, you mention that there is a redirect - is this coming from the process page to somewhere else? I don't think you want that when processing a form via ajax. You want the result of the processing to come back to the page on success. You can echo something back if you want. Here's a pretty decent tutorial: http://code.tutsplus.com/tutorials/submit-a-form-without-page-refresh-using-jquery--net-59
  19. What you have done echoing the url like that in the JS is fine, although you are missing the semi-colon at the end. Look at the page source code to confirm that the final jquery snippet looks as you expect.
  20. Your simplest option might be to use an iframe in the modal - that way when the form submits, it is the content in the iframe that will reload, instead of the whole page. Note that not all modal JS scripts support iframe, but lots do. If you want to go ajax, just google: jquery ajax form submission Good luck.
  21. When you say you have a tmp directory at the root, do you mean the root of your site, or the root of your server? It needs to be the latter. Otherwise, have you tried following those instructions? Create this folder: /site/assets/uploads/ and set its permissions appropriately. Then in your config.php file, enter this: $config->uploadTmpDir = dirname(__FILE__) . '/assets/uploads/'; That should work - let us know how you go. PS alternatively, you could point that config directive to the /tmp directory if it is at the root of your site.
  22. I think the issue is just your single quotes - it is looking for "$answer_text" as a string, rather than "Yes". EDIT: Have a good read through some of these links to get a better understanding of the differences between single and double quotes: https://www.google.com/search?q=php+single+vs+double+quotes
  23. I would suggest that you should store it in this format : 2014-03-19 17:20:10 which is the standard datetime format in mysql. PW does all its conversions from this and you can easily do the same with PHP's date function. Keep in mind that you need to convert from this to unixtime using strtotime before using php date. So, you can convert from RFC3339 to store in PW like this: $pw_date_format = date('Y-m-d H:i:s', strtotime("2014-03-27T17:00:00.000+01:00")); and then take that and add 30 minutes and convert to RFC3339 $RFC3339 = date("Y-m-d\TH:i:sP", strtotime('+30 minutes', $pw_date_format)); You could also make use of PHP's DateTime class: http://www.php.net/manual/en/class.datetime.php
  24. Another pretty major update! There is now an "Edit Imported Content" option during the import process that lets you determine exactly which fields and pages (from the JSON) get imported. This should come in especially handy when importing the one of the Shared JSON packages. I have added a new one that is a good test for this, called "person" (maybe needs a more detailed name), that creates a person template with a complete range of contact/address fields. So, on import you can easily choose only the fields you want from the package. I think this should be really handy for distributing standard templates, but with easy customization for each use case.
  25. If you google that error there are a few possible php.ini settings that might help. Certainly not an issue specific to PW. If you're still having trouble after trying some of the google advice, then this is a question for your host.
×
×
  • Create New...