Keyword
Please note that official support for commercial extensions & templates is provided in the Subscriber Help Desk.
Support requests should ONLY be directed there and require an active subscription plan.
This forum board is to be used for archive purposes and knowledge exchange ONLY.

Default Image File Naming Convention Issue

  • Rx Greenthumb
  • Rx Greenthumb's Avatar Topic Author
  • Offline
  • New Member
More
6 years 7 months ago #149319 by Rx Greenthumb
Default Image File Naming Convention Issue was created by Rx Greenthumb
I am using JomSocial along with K2 on our website

rxgreenthumb.com

The problem I am having is the naming convention of K2 for images. When I create an item in a K2 page, the thumbnails, small images xl images etc... are named with an upper case name... ie 2564r762rhgyhg_XL.jpg When I go to share the page on the JomSocial feed, it will not find the image because it has an upper case character(s). ie the extra large image gets named somthing24356_XL.jpg

Question: Where can I change the naming script to have K2 use only lower case and numeric characters? It must be in a php file somewhere.

Any help is appreciated.

Thanks
Rx

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #149322 by Lefteris
Replied by Lefteris on topic Default Image File Naming Convention Issue
Hi,

First of all you are posting a K2 related question to the SocialConnect category. SocialConnect is not JomSocial, it's a different extension.

K2 images names cannot be changed. However, i don't think that this is an issue. if the extension you are using does not support image names with uppercase characters, then this is an issue of that extension, not K2.

I suggest to contact JomSocial developers to ask them why uppercase filenames are not supported.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Rx Greenthumb
  • Rx Greenthumb's Avatar Topic Author
  • Offline
  • New Member
More
6 years 7 months ago #149324 by Rx Greenthumb
Replied by Rx Greenthumb on topic Default Image File Naming Convention Issue
All I need to know is which file is used to name the images by K2. It is also an issue with other components and extensions not just JomSocial.

Sorry if it's in the wrong category.

I'll find it myself and let you know.

Thanks

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #149341 by Lefteris
Replied by Lefteris on topic Default Image File Naming Convention Issue
Hacking the code is a really bad practice. I don't know any extension that has issues with uppercase filenames . In any case if you insist to hack K2 the images are generated in /administrator/components/com_k2/models/item.php .

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Rx Greenthumb
  • Rx Greenthumb's Avatar Topic Author
  • Offline
  • New Member
More
6 years 7 months ago #149348 by Rx Greenthumb
Replied by Rx Greenthumb on topic Default Image File Naming Convention Issue
Thanks. That's all I needed to know. Figured it out on my own. And I'm sorry to inform you several components have issues with upper case suffix from k2. Is it a problem to simply have k2 create images with lower case suffixes? Does k2 need to have upper case suffix?

Please Log in or Create an account to join the conversation.

More
6 years 7 months ago #149432 by Lefteris
Replied by Lefteris on topic Default Image File Naming Convention Issue
Changing the K2 images names will simply break your site. There are multiple files where K2 checks for filenames.

As i wrote before you should ask the developers of the extensions that are having this issue to fix it on their side since they claim support with K2.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Rx Greenthumb
  • Rx Greenthumb's Avatar Topic Author
  • Offline
  • New Member
More
5 years 9 months ago - 5 years 9 months ago #158005 by Rx Greenthumb
Replied by Rx Greenthumb on topic Default Image File Naming Convention Issue
Well, here's the latest update. Had to hack the files, changed all the php scripts that created the image files from upper case to lower case, since you guys won't address this simple issue, and everything worked fine.

This is NOT a Joom Social Issue, it is a K2 issue and it is a simple fix... create lower case characters only when naming image files... how hard is that?

Made a note to myself 10 months ago NOT TO UPDATE K2... I didn't, but another administrator did, so once again, I'll have to find those pesky php files and change the commands that make file names that end in upper case... i.e. 12345XL.jpg to create file names like 12345xl.jpg

This fixes the issue with images not posting in joomla components like joom social and also facebook. So either Joom Social AND Facebook have an issue... or K2 has an issue.

I really like your component, even bought a few extensions from you guys, but man how hard is it to change something so easy as creating random file names all lower case?

NOTE to your programmers... code writing 101... Case sensitivity is always a problem, especially with images and video players. ALWAYS, ALWAYS ALWAYS use lower case whenever possible when creating new files. Helps across different platforms and data management systems.

Site chugged along after hack just fine until K2 was updated.... more man hours lost.

Can you please simply post a list of the file names, and which folders I can find them in?
Sorry didn't make a note of it last year... geeks worst nightmare... I think it was about 6 files total. It's the ones that make the files from the uploads.

Thanks
Last edit: 5 years 9 months ago by Rx Greenthumb. Reason: added fb

Please Log in or Create an account to join the conversation.

  • Rx Greenthumb
  • Rx Greenthumb's Avatar Topic Author
  • Offline
  • New Member
More
5 years 9 months ago - 5 years 9 months ago #158006 by Rx Greenthumb
Replied by Rx Greenthumb on topic Default Image File Naming Convention Issue
Changed the following info in the following files:

Replaced

_XL with _xl
_L with _l
_M with _m
_S with _s
_XS with _xs

in files item.php and items.php in folder

/administrator/components/com_k2/models/

(Forgot you gave me that earlier... my bad.)

Problem solved once again can post to Joom Social AND Facebook and images come along just fine.

Thanks
Last edit: 5 years 9 months ago by Rx Greenthumb.

Please Log in or Create an account to join the conversation.

  • Krikor Boghossian
  • Krikor Boghossian's Avatar
  • Offline
  • Platinum Member
More
5 years 9 months ago #158011 by Krikor Boghossian
Replied by Krikor Boghossian on topic Default Image File Naming Convention Issue
Nice to hear that the issue has been resolved.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum