alan
Members-
Posts
854 -
Joined
-
Last visited
-
Days Won
1
Everything posted by alan
-
Possibly not fully on-topic but I have to thank @bramwolf and @arjen for asking and answering this and showing me what appears to be incorrect info in the official docs (can't quite believe that, hence seeking opinion here). @arjen kindly shows how to set and get a PW $session variable here. This syntax has finally stopped me going round in circles, it works (yay ) I was going round because in the docs under $session function reference the syntax is different. For example: // @arjen $session->product = 1234; // set a var echo $session->product; // read a var // docs $session->set($name, $value) // set a var $session->get($name) // read a var Am I missing something basic here (probably am (probably will be embarrassed for asking))?
- 6 replies
-
- variables
- user action
-
(and 1 more)
Tagged with:
-
Module FrontendUser: login, logout and register users / members
alan replied to pwFoo's topic in Modules/Plugins
Thanks pwFoo, I'd tried with a pre-save hook but had used the wrong construction, I'll try your version—thanks for the fast reply -
Module FrontendUser: login, logout and register users / members
alan replied to pwFoo's topic in Modules/Plugins
Hi pwFoo, thanks VERY much for this great module Please could you let me know if there is an easy way to prepopulate the username with a value I have in a variable? I see I can use the code $fu->register(array('username', 'email', 'password')); but I can't work out how modify it to not offer the visitor a Username field but for it instead to be prepopulated so at time of submission the username field gets the prepoulated value. Thanks for any pointers and sorry if this is obvious and I've missed it in my searches. Cheers, -Alan -
@justb3a Thanks, I'm glad to know this facility is not something I missed I will certainly let you know if I find a solution.
-
Thanks very much @justb3a for this module, a valuable addition to PW and looks ideal for solving a usability + presentation requirement I have I can see from your blog page how to access the additional attributes via the API and have that working AOK in a template but for an image inserted in a textarea field that uses CkEditor do you know how I can get CkEditor or PW to output the extra attribute I have added? Thanks in advance for any pointers or help
-
Sorry folks if I missed this in the docs and threads.., but is there a way to get a regular PW template to o/p a Hanna, sort of like a Hanna being an include? $out .= "<div id='clientCard'>"; $out .= "<h2>Client card</h2>"; $out .= wire('modules')->get('[[client_card_intro]]'); $out .= "</div>"; I am trying to see if I can do this so I can build a DRY (don't repeat yourself) collection of items that I can use either in the Admin in a rich text field via the usual [[the_name_of_the_hanna]] or from the API in a template via a correct version of the code above. Thanks for any comments, cheers, -Alan Edit: It looks as if Ryan recommends this is not done (if I read this right) for reasons of security.
-
Thanks @ceberlin & @Doug. Looks like I need to speak to CodeKit... I too stopped using .local an OS X version or two ago (since I found it behaving oddly), switched to other TLDs and hadn't noticed the TLD that CodeKit creates for me was back to .local... My MAMP TLD is .here but CodeKit runs it's own webserver and serves the MAMP pages via it's own URL and it seems that is hard-coded to .local :/ Will talk to the dev who is usually very responsive and helpful.
-
On a 2.6.2 site I am finding that a local site at biggie.local:5757 with a $config->httpHosts setting of $config->httpHosts = array( 'biggie.local:5757' // Local site on MAMP via CodeKit.app ); is reported as an error at the top of Admin: The site is hosted via MAMP Pro plus CodeKit. Is perhaps Processwire expecting hosts to have 1, 2 or 3 character TLDs (and 5 ('local') is breaking the code)? PS: If I should report this elsewhere please let me know, ta.
-
Currently 2.6.1 but that's because I've been using the in-PW Upgrade option, I am not sure what version I started at but I think it was a 2.5.x. I was adapting the PW Profile that has the cartoons (Copyright by Austin Cramer).
-
Media query not working [sorry if this is not the best venue for this comment or indeed if the comment is deemed a "Like DUH! This should not need pointing out"] I was experimenting with a site using one of the default profiles and noticed it was not supporting media queries. After some faffing around I finally asked Google and they said ...And sure enough I hadn't. Thought I'd post this in case it helps anyone and also to suggest this should be added to the standard PW Profiles (if no one can see a problem with that).
-
Welcome muzzer. So far I've used Horst's module for SMTP connection but this module looks interesting and is clearly aimed at API connection rather than SMTP—looking forward to trying it out.
-
I was put on to Mandrill by Pete (thank you Pete). In my experience if your website sends emails to people, for example you have a booking app and people get confirmations, then the confirmation emails may, sometimes, get rejected as spam, regardless of the fact that they're not. TL;DR Whenever in the PW admin there is a field to do with delivery of email from PW, there ought to be a note / link to an article about the benefits of sending email via Mandrill (or similar service) rather than direct. Boring rant version I had tried to solve this lack of 100% reliable email delivery with DKIM and SPF records (good things in their own right) tuning the content of the email so perhaps it would be less likely to apparently trigger some spam pattern recognition code (for example having few(er) HTML links banging my head shouting Nothing worked. I would appear to have a period of reliability where all emails were getting through, relax... Then BAM! Another spam rejection. The only variance? The receiving email systems. As visitors to the site were many and varied so were their email systems and some of those email systems spam detection algorithms were simply too sensitive for their own good. So it was not my fault but nevertheless my client whose website used the booking system kept gettings infrequent but repeated 'lost' email confirmations. So I made one other change, I sent email via SMTP to Mandrill rather than directly to the client. Mandrill then sent it to the client. This resulted in an unprecedented (and continuing) period of 100% success—zero false positive spam rejections. The reason is simple: my client's domain (or your client's domain) has a reputation as a source of email. It is probably average or good. Whereas Mandrill, who send (Mandrill is part of MailChimp and these are the overall numbers) with this many emails have to have an exceptional reputation, and they do. Nothing I can do on a domain or in DNS can compete with this firehose of good reputation provided by Mandrill. Recommendation If I were a newbie to emailing from PW to people then I could well go through this learning curve myself. To help others I would like to suggest that perhaps wherever there is a field in PW that is responsible for sending email that one of those helpful 'Notes' be auto populated with a link to an article on on the benefits of sending email via an intermediary such as Mandrill.
-
This is great Craig, thanks. These guys certainly note the benefits of using their system via API rather than SMTP: Not tried their system but it looks good, like another Mandrill. The benefits of using Mandrill as an intermediary for sending email are many. For me, switching to Mandrill (using Horst's excellent Wire Mail SMTP module) meant that all emails got through—I no longer had occasional false spam fails.
-
Thanks Manol. I know lots of bits of sysadmin type stuff that would get me some way to being able to do that, just not enough (yet) to actually dive in and try it. But very interesting to know (that you ssh in and set it all up from there). One day if I pluck up the courage I might try..!
-
That's cool Manol. I need to go do some Googling. Does this keep hosting costs low compared to a traditional VPS running Centos w/ Mysql etc if you don't mind me asking? Any compromises, perhaps a lack of SSH access? Or lack of WHM/cPanel to help non-admins like me easily install SSL certificates etc? Sorry to bombard you with Q's—intrigued by the thought of possibly cloud hosting.
-
Wow o_O impressed. This is probably a bad question but, does that mean you run PW sites, their files and MySQL, from Amazon resources (so effectively Amazon is the hosting Co.)?
-
This looks pretty relevant
-
Sorry to suggest something obvious - still happens when trying on an alternate browser not previously used for the site (so guaranteed no old cached stuff)? Craig beat me to it
-
horst, you're a star Thank you. I was tempted to drop the table but being unfamiliar I was reticent. I found I could not delete it's rows as phpmyadmin came back with an error. However I selected the table and deleted it via phpmyadmin and then used the SQL you provided. The table was re-created and after logging in and doing a check for new modules the table now has some healthy looking rows and data. Also now the remote backup via Navicat works. Thank you!
-
Sorry to bother you clever people... TL;DR I need to re-create or fix somehow the caches table in PW Detail I have a site [PW v 2.5.3] with a database table that is clearly unwell. If I go to Admin > Modules and click 'Refresh' then this error is reported: SQLSTATE[HY000]: General error: 144 Table './tsspw/caches' is marked as crashed and last (automatic?) repair failed I have tried using phpmyadmin, selecting the table and using 'Repair' but it fails. Also, if I try to backup the database over SSH with Navicat.app (a very good MySQL app for Mac) then it reports: [Msg] [Bak] Starting backup... [Msg] [Bak] Gather Information [Err] [Bak] Get Table `caches` Row Count: Table './tsspw/caches' is marked as crashed and last (automatic?) repair failed [Msg] [Bak] Finished unsuccessfully Thanks for any pointers as to how I can solve this, cheers, -Alan
-
+1 for Craig's use of incognito mode. Such a quick test too.
- 12 replies
-
- Developer Tools
- Chrome
-
(and 1 more)
Tagged with:
-
Weird. I only use Chrome (sorry Firefox and although I have not got into specifically setting caching settings everything else you're doing I have done before and I've never seen anything like that. My Occam's razor powered guess is: it's the step of setting caching that is somehow upsetting something that Chrome Dev tools do. Presumably you could set caching to default/out-the-box PW settings and try again and if all OK then that at least allows all dev to be done and Caching to be turned on when in production only perhaps? Will be interested to see if a more specific answer to this one surfaces—good luck!
- 12 replies
-
- Developer Tools
- Chrome
-
(and 1 more)
Tagged with:
-
I've had slow load times before but can't remember why :/ The only thing that rings a bell was perhaps it being to do with DNS. This Google seems to find a few hits that may be of some help.