rejetto forum

decodeuri doesn't always work correctly, how can I fix?

D · 9 · 7423

0 Members and 1 Guest are viewing this topic.

Offline D

  • Occasional poster
  • *
    • Posts: 28
    • View Profile
I am using a script for displaying folder previews
Code: [Select]
{. if|{. exists|%item-folder%{.decodeuri|%item-url%.}.jpg .}| <img src="%item-url%.jpg" /> |  .}It doesn't work for some folders using cyrillic names. What can I do about it?
« Last Edit: September 09, 2023, 05:07:58 PM by D »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
try to have on screen the result, so maybe the problem will be clearer.
The easier way is to have {.decodeuri|%item-url%.} duplicated, after your code. That should make it visible.

Did you consider using HFS 3?


Offline D

  • Occasional poster
  • *
    • Posts: 28
    • View Profile
Quote
The easier way is to have {.decodeuri|%item-url%.} duplicated, after your code. That should make it visible.
Only worked for already good folders.
Quote
Did you consider using HFS 3?
What scares me is that I'll need to rebuild everything from scratch.
« Last Edit: September 08, 2023, 06:13:14 PM by D »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
Only worked for already good folders (attached a pic)

ok but what do you see on "bad" folders ?

Quote
What scares me is that I'll need to rebuild everything from scratch.
if you want I can try to help you with that


Offline D

  • Occasional poster
  • *
    • Posts: 28
    • View Profile
Quote
ok but what do you see on "bad" folders ?
Nothing at all.
Quote
if you want I can try to help you with that
How?
« Last Edit: September 08, 2023, 06:13:31 PM by D »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
what is the URL of the folder?
you can omit the server/IP part, to keep it private

How?
You can contact me on telegram or gmail chat, and we can have a closer look at what you need


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
Did you try removing the decodeuri? like this
{.exists|%item-folder%%item-url%.jpg .}

but command "exists" works both with url and with path on disk, so you can also try
{.exists|%item-resource%.jpg .}
or something like this, i'm not sure if item-resource has a final \


Offline D

  • Occasional poster
  • *
    • Posts: 28
    • View Profile
Quote
Did you try removing the decodeuri? like this
{.exists|%item-folder%%item-url%.jpg .}
Yes, it's even worse, almost no pics appear.
Quote
but command "exists" works both with url and with path on disk, so you can also try
{.exists|%item-resource%.jpg .}
or something like this, i'm not sure if item-resource has a final \
Yes it does: {.exists|%item-resource%\.jpg.} - this one works perfectly, thank you.
Quote
You can contact me on telegram or gmail chat, and we can have a closer look at what you need
Telegram - @rejetto ?
« Last Edit: September 09, 2023, 05:07:43 PM by D »


Offline rejetto

  • Administrator
  • Tireless poster
  • *****
    • Posts: 13523
    • View Profile
this one works perfectly, thank you.
nice. btw, are you using 2.3 or 2.4?

Quote
Telegram - @rejetto ?
yes, if you'd like to use version 3 in the future, consider contacting me anyway, as I'm interested in understanding what are real customization needs, I'm still "shaping" version 3.