New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Logo with svg format #484
Comments
You have to try out!!! |
I already use logo SVG Format with helix framework on this website: https://www.techno.rn.tn/fr/ |
I will add this feature in the next version. Please waiting for update. Thank you for suggestion. Best Regards, |
Thank you, Sonny, it will be another improvement option. Good luck! |
@Joomlaplates @salahjaafar Astroid currently supports SVG Logos. I added it here 2ee58ff Thanks & Best Regards, |
Hi Sonny, |
Well done, I'll give it a try; you're putting in a great effort. |
@sonvnn I tried the modified version and added a logo in SVG format, but an error occurred, blocking the site display: ERROR 0 - Call to undefined method Joomla\Filesystem\File::getExt() in /opt/lampp/htdocs/joomla/libraries/astroid/framework/frontend/logo.php:118 I attempted to fix the error by replacing File::getExt with JFile::getExt, and it worked correctly. |
@Joomlaplates @salahjaafar Opp! I forgot this function works on Joomla 5 only. I replaced it with Best Regards, |
@sonvnn Replace |
@salahjaafar JFile is deprecated in Joomla 5. If you turn off Backward Compatible Plugin in Joomla 5. All functions (JFactory, JFile, JFilter, etc) will raise error. Astroid now work stabled with Joomla 5 even admin turn B/C plugin off.
Thanks & Best Regards, |
@sonvnn you can configure conditions based on the Joomla version using the JVERSION constant so that the framework works with all versions of Joomla |
Yes I just wanted to ask if there is no option like: |
Description: @sonvnn @Joomlaplates This code snippet is designed to retrieve the major version of the Joomla CMS using the Code Explanation: use Joomla\CMS\Version;
// Get the Joomla CMS version
$joomlaVersion = Version::MAJOR_VERSION;
if (strpos($joomlaVersion, '5') !== false) {
echo 'Joomla 5';
} elseif (strpos($joomlaVersion, '4') !== false) {
echo 'Joomla 4';
} else {
echo 'Unknown Joomla version';
}
Usage: You can incorporate this code into your Joomla extension or wherever you need to determine the Joomla CMS version dynamically. |
@salahjaafar @Joomlaplates It's not necessary. We can not use both of them in one file like this
It will raise error. We can |
@sonvnn Well done and to be continued... |
You CAN! use Joomla\CMS\Filesystem\File as CMSFile;
use Joomla\Filesystem\File; |
@dgrammatiko @salahjaafar @Joomlaplates Yes I know it. Actually, I don't want to mess up my code with this stupid option. I think instead of arguing which function should be used. Why don't we ask Joomla team to fix it. Please follow me on joomla/joomla-cms#42460 |
@sonvnn Alright, you're right, it's an optional feature. However, maybe if you add a textarea field to easily insert the SVG code, as seen in the template at https://github.com/C-Lodder/lightning, that could be a good idea. |
Hi everyone, @sonvnn @dgrammatiko @Joomlaplates I wanted to share an interesting find regarding a version comparison function in Joomla. While digging into the source code of a plugin I'm currently using, I came across a noteworthy use of the This function is employed to compare the Joomla version with a specified value, and in this particular case, the comparison is made against version 4. The idea is to ensure that the plugin remains compatible with the latest Joomla versions. If this piques your interest, the plugin in question is the "Simple Image Gallery" developed by JoomlaWorks. You can learn more about its functionality by following this link: Simple Image Gallery. I find the use of Happy exploring, everyone! |
In the new version, it is necessary to allow the logo to be added in svg format
The text was updated successfully, but these errors were encountered: