-
Posts
2,236 -
Joined
-
Last visited
-
Days Won
47
Everything posted by netcarver
-
I'm sorry to hear of your problems - but this forum is dedicated to support of the ProcessWire CMS/CMF platform. There seem to be answers to this sort of question already available. You might also try asking in DNSBL related forums or perhaps in DNSBL IRC channels (if there are any) or even on ServerFault. As this is not PW related and it is your first post on the forums I'm locking this thread. If you have PW specific questions, feel free to ask them in these forums; they will be most welcomed.
-
Is your server running ProcessWire?
-
Just spotted this in a post by Ryan (here); Although my own use-case for this module is for an invoicing system that is not publicly accessible - I can see that this might be the case if this is used on public facing PW pages. Unless anyone can suggest a better way, I'll look at adding a method to allow the locale to be set after the module is loaded (either from a template file or perhaps ready.php.) This should allow a site to control its own URL-to-locale mapping and still use this module as a textformatter if desired.
-
TextformatterCurrency A locale-aware currency formatter module for ProcessWire. The module reads a formatted string, splits it and formats each valid monetary amount according to the locale defined in the module settings. The module is capable of using the visiting browser's headers to determine which locale to use when formatting monetary amounts of various currencies. Internally, the module uses PHPs Internationalization extension (intl) to do the formatting. Input money format The input money format is made up of any number of currency-amount pairs. Each input money pair is made up of 3-letter ISO 4217 currency code and a numeric amount. These are always separated by at least one space with the code coming first. (eg. "GBP 50.99" or "JPY 100000") No thousands separators are allowed in the input. A full-stop '.' character is the only acceptable decimal separator. Each money pair is separated by a configurable character string ('|' by default.) You can change the character used to split the incoming string into currency-amount pairs in the module settings page. Output format Each currency-amount pair is formatted using the defined locale or that supplied by the browser and thus appears localised in the output of the formatter. If the input text has more than one currency-amount money pair then the formatter will join the localised outputs for each pair using the output glue string defined in the module settings. Negative amounts are prettified by substituting ascii '-' characters with the more typographically pleasing minus glyph '−'. Examples Using Module Defaults Input "GBP 50.99 | EUR 100" gives "£50.99 + €100.00" when viewed in browser set to British English but gives "50,99 £GB + 100,00 €" using a browser set to French. Availability On github. In the module repository, here.
-
Checking for multiple page ids if statement not working.
netcarver replied to bowenac's topic in General Support
Your logic looks strange to me. I'd expect such a check to take a form more like one of the following; if ($page->id == 1021 || $page->id == 1105) { echo "I get run if the page id is 1021 or 1105"; } if ($page->id != 1021 && $page->id != 1105) { echo "I get run if page id is not 1021 and it is not 1105"; echo "ie (In English) I get run if page id is not 1021 or 1105"; } Does that help? -
I've seen a similar error when I used a an old-style Textformatter module. Updating the module fixed the error for me.
-
Actually, we could just start a thread (and pin it) in the modules forum that collects all known "non-repo'd" modules shown up by a google search of the forum and github. Might be more appropriate.
-
@adrian Any chance of adding this (and any other non-repo'd modules) to the module repo? Would make them easier to find.
-
Module Adopt field values as defaults from parents
netcarver replied to blynx's topic in Modules/Plugins
@all Great ideas - I'll be adopting this - thank you! -
@heldercervantes For images, look at removeAll() for getting rid of everything in the field or just removeVariations() to kill off the size variations.
-
@felix, @Beluga, @Martijn Geerts, @JoZ3, @WinnieB, @benbyf (and any other interested parties), My apologies for messing up this thread - I inadvertently kicked off my link checker when I was reading this thread last night. This ended up visiting all the links on the page, including the topic moderation, "like this" and other buttons. I've undone as much damage as I can, but have basically messed-up the page. I've un-installed my link checker to prevent this from happening again and offer my apologies. To preserve the state of this thread at the point of disaster, I attach a screenshot of Google's cache for the page, starting with the first reply.
-
Hi Adrian, Thank-you for this module - I've been looking forward to trying it out for over a week and now have my chance. I just installed it in a PW 2.7.3 site and have given it a cursory try. Unfortunately, it seems to conflict with horst's WireQueue module. I have several queues set up and they all use the WireQueueFile queue type. When I installed AutoContent, the WireQueue children become inaccessible in the page tree, and via the API. Removing your module restored everything to working order, so I enabled Tracy and re-installed AutoContent to find out why. In the end, it turned out to be the auto-content generator getting called for the fields in the WireQueue templates. I changed the AutoContent hook code to the following and all started working with my site again. public function autoContent($event) { $p = $event->arguments(0); if($p->template == "admin") return; if($p->template == "wire-queue-tools") return; // Added for WireQueue compatibility if($p->template == "wire-queue-storage") return; // ditto $field = $event->arguments("field"); $value = $event->arguments("value"); //if not empty then display available real content if(!is_object($event->return) && $event->return != '') return; if(is_object($event->return) && count($event->return) > 0) return; //if MapMarker set to default then exit if(isset($event->return->lat) && $event->return->lat != '0.000000') return; $event->return = $this->generateContent($p, $field, $value); } Not sure what the best approach to handling this kind of needed exclusion might be, perhaps a multi-select of templates to be excluded from auto-content generation? Now, on with the trial of this module!
-
Alan, have you had a look at sendy?
-
Just bookmarking, not sure if this will help.
-
@Robin, You might be able to get most of what you need from the $_SERVER['REQUEST_URI'] value. You may have to prepend the scheme and host.
-
Unfortunately, I zapped the entire Tracy log directory with a `sudo rm -rf blahblahblah` ... there's nothing left. I did, however, look at the permissions on the file. Owner and Group were set to the HTTP server's user and group; the permissions on the file itself were `rw` for the owner, `r` for the group and `r` for others. I did not look at permissions on Tracy's log folder. I'd like to spend more time helping debug this - but I need a working Tracy setup at the moment. When I can afford to break it, I'll happily partake Edited to add: I also looked at the content of the log file and it opened up in my text editor just fine. Looked like good, clean, text output.
-
Ok, I tracked this down. Basically, the downgrade has the same issue. I used the Tracy log call last night while debugging (concurrent with an update to 1.3.0) and that's when the problems started. I just deleted the log file and all is well again. Not sure why Tracy was having trouble reading the file, it had the correct permissions (as far as I can see.) Hope that helps! Edited to add: Removing the TracyLog panel from the panel list still reproduces the problem from the second screenshot in my post above.
-
Hi Adrian, Thanks for all your work on this module - it's becoming highly useful. I have to admit, I miss it, now it's broken. Here's what I know. * My PHP version check is getting me the branch of Tracy. * I'm using a fresh install of Tracy 1.3.0 on PW 2.7.3 (PHP 7) on a Linux box running a straight LAMP stack. * Every page (front or admin) that includes Tracy hangs while Tracy loads until the script timeout limit is hit. * If I then turn off panel labels I can get it to load but it then looks like this; I'm going to downgrade to the previous version and see if I can get it going again.
-
Hi Adrian, I updated to the latest version and it broke :-( I'll post errors this afternoon.
-
Custom Pages in Admin with custom permissions
netcarver replied to chrizz's topic in API & Templates
Hello again KienNguyen, I'm guessing a little from your description, but you could try removing the permission from the permission requirements in the module settings and explicitly check for it in the portion of the module's code that handles display of the custom admin page instead. This should make the module usable from the front end. In your code that handles admin pages, you'd do something like; if (!wire('user')->hasPermission('my-module-permission-name')) return; Hope that helps. -
Hi Alxndre', I suspect this will require a core change to support. The %= selector maps through to a MySQL LIKE statement - which is a string comparison operator. Edit: Perhaps you could store a text field (let's say: controlnumber_string) which stores the string version of the value of the controlnumber field. You could make it hidden and have a hook populate it whenever controlnumber was changed. You could then use controlnumber_string in your selector.
- 3 replies
-
- 2
-
-
- selector
- partial match
-
(and 1 more)
Tagged with:
-
Could Processwire Be Causing FB Share To Randomly Fail with 404?
netcarver replied to John W.'s topic in General Support
Curious, though this might not be the issue for you; but did you manage to figure out (as DaveP suggested) why the scrape timestamp is so far behind reality? Are they all way out when you look at the debug page? -
New created field type cannot store float values
netcarver replied to Juergen's topic in General Support
I think that sforsman's FieldtypeDecimal uses the SQL Decimal type in the DB Schema, and does explicit ',' -> '.' conversion. Have you had a look at his module? -
Is the site you refer to above running ProcessWire?
-
Wireinput only allows one-dimensional arrays - why?!
netcarver replied to Rob's topic in API & Templates
I, too, would like to see this added. Maybe with a config setting to control maximum depth of recursion.