Previous Thread
Next Thread
Print Thread
Rate Thread
#323591 04/01/2021 7:44 PM
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
WebP is an image format developed and first released by Google in 2010. It supports encoding images in both lossless and lossy formats, making it a versatile format for any type of visual media, and a great alternative format to both PNG or JPEG. WebP’s visual quality is often comparable to more ubiquitous formats.

This Custom Tag allows you to embed them within your posts in UBB.threads.

Example at VNC Web Services.

CustomTags.txt
Code
<?php
$export_tags = array (
  0 => 
  array (
    'tag' => 'webp',
    'descrip' => 'Embed WebP Image',
    'prompt' => 'Image URL; eg: https://www.example.com/images/image.webp',
    'regex' => '([a-zA-Z0-9-_.&:/]+)',
    'markup' => '<img src="\\\\1" style="max-width:100%;">',
  ),
);
?>


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links
Joined: Jan 2000
Posts: 254
Likes: 4
Beta Tester
Beta Tester
Joined: Jan 2000
Posts: 254
Likes: 4
I knew you could do it Giz.
Works perfect.
I have one question
Why does the name show as [new]Embed WebP Image?

Is there a way to get rid of new?


There is no such thing as stupid questions.
Just stupid answers.
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Because it is a newly imported tag, rename it.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Joined: Jan 2000
Posts: 254
Likes: 4
Beta Tester
Beta Tester
Joined: Jan 2000
Posts: 254
Likes: 4
That is what I did but was confused where the new came from it was not in the import script.


There is no such thing as stupid questions.
Just stupid answers.
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
It's just appended through the import process.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
Sponsored Links
Joined: Aug 2014
Posts: 14
Likes: 2
Newbie
Newbie
Joined: Aug 2014
Posts: 14
Likes: 2
Gizmo

https://www.virtualnightclub.net/forum/ubbthreads.php/topics/3119/webp-image-tag.html
Feedback, I tested your example link above using Safari and chrome

Safari failed to open the image but in chrome I noticed the good looking car image.

Last edited by Morgan; 04/02/2021 11:42 AM.
Joined: Jul 2001
Posts: 1,157
Likes: 82
coffee and code
coffee and code
Joined: Jul 2001
Posts: 1,157
Likes: 82
Originally Posted by Morgan
Safari failed to open the image but in chrome I noticed the good looking car image.

That is an Apple issue. Safari only provides partial support for the WebP image format, and is limited to macOS 11 Big Sur and later.

https://caniuse.com/webp

[Linked Image]


Current developer of UBB.threads PHP Forum Software
Current Release: UBBT 7.7.5 // Preview: UBBT 8.0.0
isaac @ id242.com // my forum @ CelicaHobby.com
Joined: Jan 2000
Posts: 5,833
Likes: 20
UBBDev / UBBWiki Owner
Time Lord
UBBDev / UBBWiki Owner
Time Lord
Joined: Jan 2000
Posts: 5,833
Likes: 20
Simplifying Isaac's post, Safari doesn't support it; there's nothing wrong with the code.


UBB.Dev - Putting Dev into UBB.threads
Company: VNC Web Services - UBB.threads Scripts and Scripting, Install and Upgrade Services, Site and Server Maintenance.
Forums: A Gardeners Forum, Scouters World, and UGN Security
UBB.Threads: My UBB Themes, My UBB Scripts
1 member likes this: isaac
Joined: Aug 2014
Posts: 14
Likes: 2
Newbie
Newbie
Joined: Aug 2014
Posts: 14
Likes: 2
Thanks for the info
I only posted feedback and now I know.
My old Imac use Safari version 11.1.2 (11605.3.8.1).
Am using Chrome a lot more nowadays.

Cheers


Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Posts: 70
Joined: January 2007
Forum Statistics
Forums63
Topics37,573
Posts293,925
Members13,849
Most Online5,166
Sep 15th, 2019
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,833
Greg Hard 4,625
Top Posters(30 Days)
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2024 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.0
(Preview build 20221218)