-
Posts
150 -
Joined
-
Last visited
Everything posted by strandoo
-
@kixe Thanks for the update. I'll check it out. @Can I'll pass for now, but thanks for the module.
-
Hi. Nice module, seems to work pretty well. A few suggestions about configuring/customising. I like to keep my css files to a minimum, so I'd like to move the styles to my site css file (rather than inserting it after the first <link>). But when I untick the 'inject modules stylesheet?' option, it removes classes from the markup and hides the top/bottom, dark/light options. How about keeping these options available and just letting the user know that the css must then be manually added to a stylesheet? I've done modified my installation to do that and it works well. Also, when I've changed the class prefix in the config file, I had to still manually change one class: I changed Line 104 of the module.php file from $cookieConsentForm .= "<p class='mCCF__message'>"; to $cookieConsentForm .= "<p class='{$classPrefix}__message'>"; You may want to update that. Thanks again for the module.
-
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
strandoo replied to ryan's topic in Modules/Plugins
Update: a couple of days later, the problem returned. I contacted support for this account and after a bit of back and forth, I gave up. I took a look at the hosting Plesk cp and saw that mod_sec is turned off. The PHP version was 5.3 (I'm pretty sure I had it at 5.6) so I changed it back to 5.6. I'm basically back where I started. Maybe I'll move the account to my reseller hosting. Everything works fine there... -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
strandoo replied to ryan's topic in Modules/Plugins
So, as PWaddict predicted, turning off mod_security did the trick, but I couldn't do it with the htaccess rule. I tried that first, but it didn't do anything, so I disabled it in the Plesk control panel. (It's under 'Web Application Firewall..'; I've set it to 'detection only' rather than 'on' or 'off'. If anyone knows of a downside to this or if I can target something more directly, please let me know). But the video now appears as it should. Thanks all. -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
strandoo replied to ryan's topic in Modules/Plugins
Ah, I should have mentioned that. Since this is alive site, and that's an upcoming gig, I needed a workaround. I'm not using the module there, just a special field that inserts the YouTube URL in an iframe. I prefer the responsiveness of Ryan's module. @netcarver I've run into that problem in the past, so I've checked. All clean text. @PWaddict That sound promising. I've had problems with mod_security before. I'll try it out a bit later today. Last night I created a local version of the site and the videos loaded fine, leading me to think it's a hosting/php/config thing. -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
strandoo replied to ryan's topic in Modules/Plugins
@artaylor I've tried different URLs with similar results. I just tested the embed URL and that didn't work. And as @adrian pointed out, but short form does work (on the 'good' site). I checked other text formatters to make sure they didn't conflict. One thing I just thought of is that they are served from different hosting companies (StableHost vs HostingUK) so differing server configs could be in play... -
Module: Video embed for YouTube/Vimeo (TextformatterVideoEmbed)
strandoo replied to ryan's topic in Modules/Plugins
Hi all. This has been driving me nuts: I've used this module previously and it worked perfectly. I've got it on 2 sites, but music-related. One works normally; I use the textformatter on the body text and videos display fine. The other only works if it's a Vimeo video; YouTube URLs slow the page loading then only displays the URL. I've tried a number of tests and different URLs and I can't figure this out. Both sites are not new and I'm pretty sure that it used to work where now it doesn't. Here are two samples (they are past gigs, so I can play around with them without messing up the live sites): Works: https://waveneyvalleyfolkcollective.co.uk/events/kirsty-merryn-jack-harris/ Doesn't Work: http://www.burstoncrown.com/events/sunday-sessions/falling-from-trees/ Any suggestions? -
As a follow-up: I had the same problem and tried everything – including the one recommended by prestoav. I am developing 3 sites running on a FastHosts reseller account. All running PW 3.0.42 on php 5.6. One is on an older server and had no problems uploading images. The other two are on their newer 'cluster' servers and those were the sites with problems uploading. Long story short, the FastHosts support investigated and said that turning debug OFF in the site config file would solve the problem. Sure enough, that's fixed the problem. I don't know if it is a problem with PW, FastHosts servers or what, but if anyone encounters this problem, it's worth checking your debug setting.
-
Thanks, Macrura. I just read that post and I like the idea of using selectors as arrays. I might try that after I redo my code the 'normal' way. My script works as is (with out using brand.name) because my input IS the brand name, not the page id... if I understand correctly. But I see from that post that maybe I should use the ID and do as you suggest. After my original post, I used rtrim for something else then slapped my head for not trying it here. Then I just need to read up on whitelists... Cheers.
-
Hi all. I'm building a product search page with a filter consisting of selects and checkboxes. It's based on Ryan's excellent Skyscraper demo, but I'm trying to add multiple checkbox fieldtypes. I've got it working, but it's not very elegant and I'm sure there's a better way to do it. Given the following checkboxes: [x] Adidas (15) [ ] Asics (10) [x] Nike (20) If only Adidas is checked, 15 shoes will be found; if both Adidas and Nike, 35 shoes will be found. The form field: foreach($pages->get("/brands/")->children() as $brand) { $selected = $brand->name == $input->whitelist->brand ? " checked='checked' " : ""; echo "<label><input $selected type='checkbox' name='brand[]' value='{$brand->name}'> {$brand->title}</label>"; } Here's what I've got for the select, based on the Skyscraper search: $selector = ''; ... if($input->get->brand) { $brands = $input->get->brand; $selector .= "brand="; foreach($brands as $brand) { $value = $brand; $selector .= "$value|"; $input->whitelist('brand', $value); } $selector .= ", "; } ... $selector = "template=product-page, limit=24, " . trim($selector, ", "); This sort of works (although pagination doesn't work because I don't know how to do the whitelist part -- bonus question!). The correct results are returned, but an echo of the selector string looks weird: "template=product-page, limit=24, brand=adidas|nike| " (there's a trailing pipe character that I don't know how to remove). Is there a better way to do this? Thanks in advance.
-
PW 3.0 + PHP 7 creates huge latency (but not if signed in as admin!)
strandoo replied to strandoo's topic in General Support
Thanks for the suggestions. I did do a fresh install with the default theme to a subfolder on the same server. No extra modules, no new pages. Same thing: fast/normal when logged into the admin; sloooooow when not. I did get another warning about 'Warning: set_time_limit() has been disabled for security reasons', so I'll probably contact the hosting company and see if they can suggest anything. I'd like to be able to set a time limit, just to rule that out; I can do it in htaccess for php5, but I can't figure out how to do it for php 7. I can work around the issue by reverting to php 5, but that's not great. -
Hello. I've come across strange behaviour under the following situation. Maybe someone can explain what's happening? PW 3.0.42 running on a FastHost php 7 server. Initial page loads have about a 6 second latency! At first I thought I had some bad code, but I stripped everything back to the most simplest of pages, still with a huge loading delay. Once I log in as a superuser, the pages load normally (150-200ms). This was happening on at 3 sites. All pages had a latency of about 6 sec. until I logged in to the admin panel. I also have one or two PW 3 sites running on an older php5.6 account, which runs normally. I downgraded one of the php 7 sites to php 5.6 and the pages loaded normally. One more thing that may or may not be related: I did get an error "WARNING: SET_TIME_LIMIT() HAS BEEN DISABLED FOR SECURITY". That took me down a path of setting the max_execution_time in .htaccess. Which also inspired me to downgrade from php7 to 5. The curious thing is how signing in as a superuser solves the problem. Thanks. - Paul
-
Work in progress modules Subscribers / WireMailChimp
strandoo replied to benbyf's topic in Module/Plugin Development
Ok, I got it. It turns out it's because this particular site is still using php v5.3.x which doesn't like the "Array Initialization Construct: []" I've worked around it by using "array(" instead: $result = $MailChimp->post("lists/$list_id/members", array( 'email_address' => $page->email, 'status' => 'subscribed', )); Cheers, Paul- 18 replies
-
- 1
-
- users
- subscribers
-
(and 1 more)
Tagged with:
-
Work in progress modules Subscribers / WireMailChimp
strandoo replied to benbyf's topic in Module/Plugin Development
Hi @benbyf. Well, I first got the error when I tried to install the module, so I never got far enough to enter a List ID (or any other settings). I then commented out lines 73-76 (and 82-85 when I got the same error) and was able to install the module and insert API and List ID. But when I uncommented the lines, I get the same error.- 18 replies
-
- users
- subscribers
-
(and 1 more)
Tagged with:
-
Work in progress modules Subscribers / WireMailChimp
strandoo replied to benbyf's topic in Module/Plugin Development
Hi. I'm trying to install the WireMailChimp module, but I'm getting an error when I install: "parse error (line 73 of /Users/paul/Sites/pw-projects/site/modules/WireMailChimp/WireMailChimp.module)" I'm using PW 2.7.2. Any ideas why?- 18 replies
-
- users
- subscribers
-
(and 1 more)
Tagged with:
-
(Slaps forehead) Thanks godmok. I read that page and looked through the list of options, but somehow missed that. Cheers.
-
Hi. I've got a client that wishes to see all the page links in the rendered pagination, without the separator (...). Is this possible? I know the page links may get reeeeally long, but that's what he wants. I know there are optional arguments that can be passed to renderPager(), but I can't see one for removing the separator. Any suggestions folks?
-
Multiple languages displayed on the same page
strandoo replied to strandoo's topic in Multi-Language Support
Thanks ukyo, that was quick! That looks pretty straightforward and it makes perfect sense. I'll give it a shot. -
Hello all. I'm planning a site that will include 5 languages. Processwire looks perfect for this. From what I can tell, the 'normal' behaviour is to have different urls for each language. But rather than having 5 parallel 'sites', each with a different language, my client needs to have each of the 5 languages displayed on the same page. The site is mostly in english, but news posts will be multi-lingual and appear together on one page, one after another. Is this possible? Does anyone have any suggestions for the best way to achieve this? Thanks in advance.
-
FormTemplateProcessor and FieldTypeOptions issue
strandoo replied to Kiwi Chris's topic in General Support
UPDATE: I just tried Kiwi Chris's code and it worked fine for me. I had previously used $this->contact->get($field->name->title) instead of this $this->contact->get($field->name)->title which worked. -
FormTemplateProcessor and FieldTypeOptions issue
strandoo replied to Kiwi Chris's topic in General Support
Hi Kiwi Chris. Did you ever solve this? I've got the same problem and have tried similar things with no luck. Any enlightenment would be useful. thanks. -
Thanks, Robin S! I'm using neither Page Fields nor the FormBuilder, but (relatively new) Options Field Type. But I just did a test with a Page Field to get my head around your code, and I think I get it. I've also read up on the Options field type and will take a stab at putting something together. Thanks for pointing me in the right directions.
-
Hi Folks, I've got a site with some contact and quote forms which get sent to my client and get saved as pages so the client has a record of the submitted forms. He'd like to analyse some of the form data. So for instance, there's a field that asks 'where did you hear about us?' with select options like 'Advertisement', 'Google', 'Recommendation', 'Magazine', etc. I'd like provide a page so the client could see how many respondents chose 'Google' vs 'Advertisement', etc. A simple tally would be fine, but then I could calculate percentages, maybe chart the results, etc. My first thought was to use $pages->count('selector') to count the pages with a certain answer. I'd know what percentage that was by comparing it to the total of saved pages for that form. But would I need to do this for each question? Is there a better way to tally/count all the answers for a given field?
-
Released: PadLoper (commercial eCommerce platform for ProcessWire)
strandoo replied to apeisa's topic in Modules/Plugins
Hi. I've just been trying out Padloper on a local demo site. It works fine with the 'ShippingFixed' module, but I've tried changing the the shipping module to 'PadProcessShipping' and I'm getting the following error when I add some items to my cart and load my checkout page: Error: Exception: Method PadProcessShipping::calculateShippingCost does not exist or is not callable in this context (in /Users/paul/Sites/processwire-2.7/wire/core/Wire.php line 358) Here's my Checkout page code: $checkout = $modules->get("PadOnePageCheckout"); //$checkout = $modules->get("PadCheckout"); //$checkout->setShippingModule("ShippingFixed"); $checkout->setShippingModule("PadProcessShipping"); echo $checkout->render(); Any ideas? I couldn't find a lot of documentation about the shipping module, but I really need to be able to customise my shipping zones. Thanks. Paul (other than that, I'm lovin' Padloper so far!)