Can I make this Squarespace phone number click-to-call enabled? - phone-call

I'm not one for code beyond very simple basics. I'm helping a friend with his site (http://www.lacherconstruction.com/) and am trying to figure out if I can make the phone number in the header clickable on mobile.
The template used doesn't allow it in a predetermined field (disables characters such as <> so can't insert an there).
EDIT: I can't insert a tel: either.
My question: Is there an option I can do in Squarespace to force the phone number in the site header to have a tel: so click-to-call is enabled?
Some thoughts I've had:
I was thinking of using code injection, but am not sure the best way to do it. For reference, this site is using the Montauk template, but what I've seen on the template didn't seem helpful (such as https://support.squarespace.com/hc/en-us/articles/115000629628-Adding-buttons-to-headers)
I know the field is div class="site-phone" but that's about all I've got. Haven't seen anything helpful in Squarespace support forum that seemed to answer my question.
Thank you in advance!

If you can insert the value tel: inside the link destination than iOS will make that link tappable and will prompt the user if they want to invoke the call / dialing app.
See this documentation for reference:
https://developer.apple.com/library/archive/featuredarticles/iPhoneURLScheme_Reference/PhoneLinks/PhoneLinks.html

Related

Big Cartel - adding a note section before checkout

I have a big cartel website - Im trying to add a 'leave a note' section before payment but with absolutely no knowledge about html etc im finding it very difficult.
I know I have to go into custom mode and edit it but cant seem to find out what to input?
Any ideas?
Thanks
Unfortunately there's not currently a way to include a "notes" section for your customer with Big Cartel, even with customization. Right now your only option is to use PayPal for checkout and take advantage of the Notes To Seller field they provide.

stopping spam bots in coldfusion

I am blocking a huge number of bots, except the ones from search engines, and then only allowing 2seconds of session management.
However, spam bots are still able to by-pass these measure and create a huge number of requests which is 'killing' the server.
I have read other articles on this site but none seem to directly answer this issue.
A bot probably behaves faster than a human. You could time how long it takes them to fill out the form. Anything less than a second or two is a bot.
A bot probably doesn't have JavaScript turned on. You could use that to your advantage.
You could hide a link via css (or not give it any text) that takes the bot to a bot.cfm page, which could then set a session value.
There are some open source projects but I can't remember the names of them off the top of my head.
CF10 has a new validation function.
Ben Nadel has written some useful posts in his blog regarding spiders/bots.
http://www.bennadel.com/blog/1083-ColdFusion-Session-Management-And-Spiders-Bots.htm
http://www.bennadel.com/blog/154-ColdFusion-Session-Management-Revisited-User-vs-Spider-III.htm
For forms, I use <cfimage> to create a captcha image. I have found that stuffing the captcha phrase in a session variable can cause problems (I can't remember what the problems were though). So, I now use <cfencrypt> to include an encrypted phrase in the form itself. The action page decrypts the phrase and compares it to what the user put in the captcha form field.
I've found CFSPAMProtect to be very useful at blocking automated form fillers.
It bases its SPAM/HAM test on an aggregate score of a number metrics including time on page, mouse movement (via JS) as well as the classic hidden form fields that shouldn't be filled in (but are filled in by dumb robots).
You can assign your own weightings and monitor the SPAM catch via email to allow you to tailor things.
It can work on its own or link to some third party SPAM tools such as Akismet.
So far I've found that it's good enough on it's own.
It's a custom tag and easy to implement in existing forms too which is nice.
Give it a go...

How do I force new users to fill out their User: page when they create a new account on a MediaWiki wiki?

The unnecessary new user mistakes I'm having to revert on the wiki are getting annoying.. Is there any way for me to preload their User:Username with instructions on finding any help they may need and links to places to ask questions, further-more, is there any way to require new users to make three User:Username / User_talk:Username / User_talk:SomeAdmin page edits before editing other pages?
I don't know how to force it, but here is a trick I use:
Download and install the MyVariables extension.
Create a template to use it called {{User name}} - code below.
Include this template in a welcome message on your main page. The user will then see either Welcome <their name> if they have filled it in or Welcome enter your user name if they have not.
Two points on this template:
if they have not entered their name, the text links to a page explaining how to do that (you will need to create this),
if they have entered their name, the text links to MY PREFERENCES where they can update their user data.
Of course, you can change this if that is overkill.
The code:
{{#if:{{CURRENTUSERREALNAME}}|[[MY PREFERENCES|{{CURRENTUSERREALNAME}}]]|[[How to create your user profile on this wiki|enter your user name]]}}<noinclude>
<Add text here explaining the template, or just link to this stackoverflow page!>
[[Category:Template]]
</noinclude>
Another "trick" I've used is using the NewUserMessage extension to ask users to add this information.
Since I have no power to install/remove extensions on this wiki, I had to go with what I have. The wiki has Extension:InputBox installed.. So, I set up Template:Welcome, created a preload, and set up MediaWiki:Welcomecreation with a simple button that does most of the heavy lifting so to speak... It does not actually force anything, but gives all of the needed information and has a similar final output to what I was looking for.

New invoice not showing up in ubercart

I'll make this quick because I'm hoping to get it fixed as quickly as possible!
Basically, after making multiple posts asking for assistants creating a invoice template for ubercart, non of which got a reply, I decided to tackle my problam myself.
And that's what I've done. I've uploaded it to "/sites/all/modules/ubercart/uc_order/templates" with the name "uc_order-custom.tpl.php" ( like everyone says on the internet) but when I go to select which template I want to use only 'admin' and 'customer' appear (no 'custom')!
Any idea's why?
It appears, now, that the problem is with the dropdown menu's on the pages; the will not updte! Even if I delete the standard customer template from the directory, the option still appears in the menu but the email is just blank, for obvious reasons! So, I just wondered if it was possible for me to manually code/tell ubercart which template to use for the invoice, instead of relaying on the drop down menu's (if we can't figure out how to update them)?
Thanks in Advance, Andy
Try clearing Drupal's cache. New template files only get loaded when the template cache is cleared.
You need also to copy uc_order.tpl.php to your templates folder.

How can I prevent automatic form submission by bots?

I am running ColdFusion MX, so I don't have the possibility of using the built-in cfimage Captcha functionality in my application, before form submitting.
But the problem is without captcha the bots submit the forms.
What will be best way to prevent automatic submitting?
Captchas don't have to be images!
Try one of the following solutions:
Most bots don't understand CSS. Create two submit buttons, the first with a value that will be rejected by the server, the second with a value that will be accepted by the server. Hide the first one using CSS.
Ask the user to answer a simple math problem. This will require you to create the math problem and store the expected solution somewhere (like the user's session), then compare the user's submitted answer with the stored answer. For extra protection, you can create simple addition, subtraction and multiplication questions. Avoid division, remainders are a pain for some users.
Bots read the names of form elements, and tend to ignore text labels. Try creating a checkbox named "optout" (like a newsletter), checked by default. Next to the checkbox, ask the user to uncheck the checkbox if they are a human. The opposite technique also works (unchecked checkbox that you ask the user to check).
All of these solutions can be done without third party code or API calls.
That being said, reCAPTCHA is pretty good and easy to integrate into almost any environment.
Take a look at cfformprotect - it will work with CFMX 6 and all later engines.
It aims to be fully accessible - and invisible to most users - with an assortment of methods to stop bots and spammers.
Also you might want to look at a CF wrapper for reCaptcha, which is compatible with CFMX 7.
A technique I used with a different technology was to use image buttons. Your POST handler gets the x,y co-ordinates where the images were clicked. I found the bots (which are just generating post requests) were passing 0,0 and by dropping those requests on the floor I brought the spam posts down to less than the real ones. Sorry that I don't know how to do that in CF but I hope the technique is useful to you.
Its always a good idea to do data validation on the server side before processing no matter which solution you use.
This post may help: http://www.bennadel.com/blog/405-Fully-Accessible-Spam-Form-Submission-Blocking-Using-ColdFusion-And-X-HTML-Version-III-.htm
How about using calculation method? Just like 8 + 5 = ?
OR
how about using ColdFusion.Ajax.submitForm?