Welcome,
Guest
.
Please
login
or
register
.
Did you miss your
activation email
?
News:
Convert
Wordpress to Elxis
with
Elxis importer
!
Home
Help
Login
Register
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
About image folders
« previous
next »
Print
Pages: [
1
]
Author
Topic: About image folders (Read 3587 times)
armpouniotis
Sr. Member
Posts: 377
About image folders
«
on:
April 26, 2023, 14:41:43 »
hi there !
I have an online newspaper, and I have noticed this:
Everytime I am uploading an image to an article, the system uploads this image to a folder named "articles1".
After a few weeks, the system creates some other folders named "articles2", "articles3", "articles4" etc.
Now, it has reached "articles200", and it doesn't create other folders.
Since "articles200" is very "heavy" with lots of images, is it possible to fix it ?
I think it should continue create more other folder like "articles201", "articles202", "articles203" etc
Any help will be appreciated
Christos
Logged
Christos Armpouniotis
datahell
Elxis Team
Hero Member
Posts: 10356
Re: About image folders
«
Reply #1 on:
April 26, 2023, 22:18:04 »
Hmm, you reached folder 200, interesting... There are 300 images in each folder, so
you have at least 60.000 images...
You should have mentioned this issue in Elxis 5.4 requests topic, we would have already a solution now for this.
I write it in TODO list for the next Elxlis 5.4 release. Till then, if you want, do the following to solve the problem
temporary
.
Open file:
components/com_content/controllers/base.php
Change lines 682 - 696 from this:
if (is_dir($base.'articles20/')) {
$nums = array(150, 100, 80, 60, 40, 20);
foreach($nums as $num) {
if (is_dir($base.'articles'.$num.'/')) {
$start = $num;
$last = $num + 20;
if ($num == 100) {
$last = 150;
} else if ($num == 150) {
$last = 200;
}
break;
}
}
}
To this:
if (is_dir($base.'articles20/')) {
$nums = array(250, 200, 150, 100, 80, 60, 40, 20);
foreach($nums as $num) {
if (is_dir($base.'articles'.$num.'/')) {
$start = $num;
$last = $num + 20;
if ($num == 100) {
$last = 150;
} else if ($num == 150) {
$last = 200;
} else if ($num == 200) {
$last = 250;
} else if ($num == 250) {
$last = 300;
}
break;
}
}
}
The change above will enable the creation of folders from 201 to 300 and you will be able to upload 30.000 more images...
«
Last Edit: April 26, 2023, 22:21:41 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
armpouniotis
Sr. Member
Posts: 377
Re: About image folders
«
Reply #2 on:
April 27, 2023, 14:20:50 »
It works !
thank you datahell !
P.S. So If I continue the code like this:
else if ($num == 250) {
$last = 300;
}else if ($num == 300) {
$last = 400;
}
the directories will count to 400... Right ?
Logged
Christos Armpouniotis
datahell
Elxis Team
Hero Member
Posts: 10356
Re: About image folders
«
Reply #3 on:
April 27, 2023, 20:46:24 »
Yes, but you must also
put the numbers into the array
. However don't do anything as whatever you do will be overwritten in a next update. This is a
temporary solution
. I noted this problem and it will be fixed permanently with a better system. When ever you see an updated version of Elxis 5.4 available do the update.
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
armpouniotis
Sr. Member
Posts: 377
Re: About image folders
«
Reply #4 on:
April 27, 2023, 23:31:35 »
okey !
Thank you for this solution, I am waiting for the next update !
Christos
Logged
Christos Armpouniotis
datahell
Elxis Team
Hero Member
Posts: 10356
Re: About image folders
«
Reply #5 on:
April 29, 2023, 21:05:42 »
Done! Update to
Elxis 5.4 Calypso rev2517
. The new system is faster and doesn't have limits.
For more click here
«
Last Edit: April 29, 2023, 21:08:47 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Rentals | IOS AERO
Print
Pages: [
1
]
« previous
next »
Elxis CMS Forum
»
Support
»
General
(Moderators:
Ivan Trebješanin
,
Farhad Sakhaei
) »
About image folders