News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Replace ' ' with '%20' in avatar URL

Started by Aaron10, August 13, 2014, 10:24:37 PM

Previous topic - Next topic

Aaron10

I have preset avatar galleries with spaces in them and in when viewing topics etc. the URL to the images aren't automatically putting a %20 in the URL making the page invalid. How would I make it so %20 is automatically replacing ' ' in avatar URLs?

Kindred

You should never ever ever use spaces in file names or urls for the web.  The %20 is a workaround, but should never be needed if the site is designed correctly.
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Hj Ahmad Rasyid Hj Ismail

#2
There are a lot of guides using css for avatar which you can simply learn and use. With regards to additional space, if so needed, the using of :: before and ::after can be applied via css as well.

Edited: Sorry I get it wrongly. I must be day dreaming again... :)

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

Aaron10

Yeah I just renamed the directories and everyones updated.

Just wonder though if it's an external URL and is out of my control, will the %20 be added if I have it set to download external avatars?

Arantor

Fairly sure it should handle that correctly. I seem to recall this was even tweaked in recent versions somewhere to make sure this was correctly handled.

In any case, if it gets downloaded the filename will be ignored and SMF will use its own.

Aaron10


Advertisement: