Nagtegaal
Member
Just because I love Fabric so much, I would like to contribute as well. It is a simple solution to be able to Whatsapp people without the use of PHP. Perhaps this is helpful for other users:
1. I created a view like:
#CREATE OR REPLACE VIEW kan_vw_test_whatsapp AS
SELECT
`t1`.`id` AS `ID`,
`t1`.`name` AS `NAME`,
`t2`.`tekst` AS `tekst`,
REPLACE
(
CONCAT(
'https://wa.me/31',
SUBSTR(`t1`.`telephone`, 2, 9),
'?text= Hi, ', `t1`.`name`,' ',
`t2`.`tekst`
),
' ',
'%20'
) AS `WhatsApp`
FROM
(
`37248kaneeltje`.`kan_klanten` `t1`
JOIN `37248kaneeltje`.`kan_tekst` `t2`
ON
(`t2`.`id` = 3)
)
obviously you have to adjust this to your needs/tables.
2. create a new list using this view 'kan_vw_test_whatsapp' as your database table
3. edit the element 'Whatsapp' to input type URL
4. set Guess link type to Yes
5. Add a Whatsapp button image to your images. I named it 'whatsapp_small'
6. Use the image. Set Replace with icons to Yes. Enter the name of the image in Static icon file
7. Add the list to your Menu
8. Result on my iPhone:
And after touching the button:
A bit strange to send the message to myself, but you got the idea
1. I created a view like:
#CREATE OR REPLACE VIEW kan_vw_test_whatsapp AS
SELECT
`t1`.`id` AS `ID`,
`t1`.`name` AS `NAME`,
`t2`.`tekst` AS `tekst`,
REPLACE
(
CONCAT(
'https://wa.me/31',
SUBSTR(`t1`.`telephone`, 2, 9),
'?text= Hi, ', `t1`.`name`,' ',
`t2`.`tekst`
),
' ',
'%20'
) AS `WhatsApp`
FROM
(
`37248kaneeltje`.`kan_klanten` `t1`
JOIN `37248kaneeltje`.`kan_tekst` `t2`
ON
(`t2`.`id` = 3)
)
obviously you have to adjust this to your needs/tables.
2. create a new list using this view 'kan_vw_test_whatsapp' as your database table
3. edit the element 'Whatsapp' to input type URL
4. set Guess link type to Yes
5. Add a Whatsapp button image to your images. I named it 'whatsapp_small'
6. Use the image. Set Replace with icons to Yes. Enter the name of the image in Static icon file
7. Add the list to your Menu
8. Result on my iPhone:
And after touching the button:
A bit strange to send the message to myself, but you got the idea