Jump to content

MadHatter

Members
  • Posts

    68
  • Joined

  • Last visited

Contact Methods

  • Website URL
    http://www.matthewsimpson.net

Profile Information

  • Gender
    Male
  • Location
    Shetland, United Kingdom

Recent Profile Visitors

2,706 profile views

MadHatter's Achievements

Full Member

Full Member (4/6)

27

Reputation

  1. Oh yeah, good point. I'll probably do that then.
  2. Can images be used as configuration options in modules? I'm trying to develop a module and I'd like the option to set an image to use, but so far I haven't had any success. Currently the images I upload to test are declared invalid (the debugger doesn't show a width so it throws an exception). SVG files work, but nothing is stored in the data value of the config field (returns an empty array). I've set the upload directory to a new directory inside assets and the images are uploaded, but not unlinked when image fails. Am I trying to do something that's not going to work? I feel like I'm close but can't seem to figure out what's missing. Thanks, MadHatter
  3. @netcarver I'm finding that the script is timing out on a large site I'm working on (there are ~1800 pages). I've tweaked the code to only find pages in which the found fields are in use and are not empty: ... // collect fields and cropsetting names $collection = array(); echo "<ul>"; foreach ($fields as $f) { if ($f->type != 'Fieldtype' . $oldFieldtype) { continue; } $collection[$f->name] = array(); echo "<li>{$f->type} : {$f->name}</li>"; $thumbSettings = preg_match_all('#(.*?),.*?\n#msi', trim($f->thumbSetting) . "\n", $matches, PREG_PATTERN_ORDER); if (!$thumbSettings) { continue; } $collection[$f->name] = $matches[1]; echo "<ul>"; foreach ($collection[$f->name] as $suffix) { echo "<li>{$suffix}</li>"; } echo "</ul>"; $field_names[] = $f->name; } echo "</ul>"; echo "<hr />"; $pages_visited = 0; $images_visited = 0; $variations_visited = 0; $variations_copied = 0; // now iterate over all pages and rename or copy the crop variations echo "<ul>"; $selector = implode("|", $field_names) . "!='',include=all"; $found_pages = $pages->find($selector); foreach ($found_pages as $p) { ...
  4. Does TextFormatterHannaCode need to be so large? The bundled version of Ace contains all 4 versions of the Javascript files, but in ProcessHannaCode.module I can only see the src-min version being called in. Removing these and the demo directory would reduce the size of the module by around 38MB. Are there licensing issues which require that these files must be present?
  5. Hi, We've just recently moved a ProcessWire site from our development server to its new location and seem to be running into an issue with uploading large files. After a while (we've timed it at 30 seconds) the upload resets to 0% and then starts again. We figured that it must be a php/apache issue so we added in a few extra settings in our .htaccess file <IfModule mod_php5.c> php_value max_execution_time 200 php_value max_input_time 200 php_value upload_max_filesize 300M php_value post_max_size 300M php_value memory_limit 512M </IfModule> Despite these changes (which we confirmed using phpinfo()) we still cannot seem to get the uploads to go past a certain point. What other issues could be causing this? I wondered if our /tmp directory needed to be bigger but as the files are only 10MB or so I'm doubtful that this would be the issue. Has anyone else encountered a similar issue?
  6. Thanks mr-fan, I'll give this a go, I was thinking that some sort of hook would be the safest options, but I wasn't sure where the best place to implement it would be. EDIT: Works perfectly, thanks!
  7. That seems like there may end up being issues with data going out of sync. A sensible solution would be to add an option to the template settings to hide pages of that type from counts and searches.
  8. Hi, I've been trying to return the number of children that a page has that are viewable but I'm just getting back the total number of pages. The pages aren't viewable because there is no related template file. $page->numChildren() does not work (both true and false returns the same value). The current method we've been using it to run a command in the _init.php file that checks for pages that use that template and set them to hidden. I'm concerned there will be performance penalties for this.
  9. It's just occurred to me that it would be nice to set the output format of images (when resizing etc). I've just had to upload a load of magazine covers that were sent to me as png files. Considering the magazine covers are fairly complex images then a jpeg would be a better format for these. My client will be handling the uploading once the site is live so I cannot control what format they upload the images as (without adding some rules to my fields). Being able to set the resized image format could potentially save on some bandwidth.
  10. Is anyone else using this module combination? I've been trying to get the PayPal payment method to work but I haven't been able to get a VERIFIED response yet. I've up-ended the code several times now, and tried as many ways as I can think of to get a result. PayPal seems to have absolutely no method of debugging INVALID responses so I have no idea where the script is going wrong. Has anyone else had a similar problem and what was the solution you finally came up with? I've been banging my head on a wall for 2 days now, I just want to get my script working and move on to other things.
  11. I've installed the ShoppingCart module into ProcessWire and have set up most of the shopping process. I've reached an issue though where when I select to update the cart item quantities or to remove an item from the cart then I am redirected back to the homepage of the site (which has nothing to do with the shopping pages). The same is true for the "Proceed and review your order" button at the end of the address and contact information step. I'm guessing the issue is something to do with the form action for each being "./" but I can't seem to find anywhere that this address can be updated (I would have assumed that the page should redirect to itself at the very least. It should be noted that I am currently working on a development version of the site on m y Windows 7 machine, the site is usually run on a Linux server and I have had issues it dot-slashes ("./") in include paths in PHP. This may or may not be related to the issue I am experiencing. EDIT: Figured it out, the base href was set in the head of the site pages, this caused issues with the relative links to pages.
  12. Does the Shopping Cart module support shipping costs per item? There appears to be a fixed price options but my client wants to have the shipping calculated per item (I have suggested several times to put the shipping cost on the item and promote it as "free shipping" but they seem to be uninterested in this). It there a method of calculating postage? EDIT: I figured it out, I needed to create a module to handle the shipping calculations.
  13. Cool, thanks for that. I'm sure I tried soemthing similar but got an error on the input field in the manager. I'll refer to this when I look over it again tonight.
×
×
  • Create New...