AI Search
Classic Search
 Search Phrase:
 Search Type:
Advanced search options
 Search in Forums:
 Search in date period:

 Sort Search Results by:

AI Assistant
Notifications
Clear all

[Closed] Attachments renamed

2 Posts
2 Users
2 Reactions
2,677 Views
Posts: 1593
Topic starter
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@anonymous20)
Noble Member
Joined: 10 years ago
[#6839]

Hello.

I see that all attachments are renamed and that is ok. But is there any reason for wpForo to remove underscores (for example) ?

I mean if the photo (for example) is named "this_is_a_test_photo" it becomes "a number"-thisisatestphoto". That creates an unmeaningful file name for google.

 

Thanks


1 Reply
Robert
Posts: 10741
Admin
Translate
English
Spanish
French
German
Italian
Portuguese
Russian
Chinese
Japanese
Korean
Arabic
Hindi
Dutch
Polish
Turkish
Vietnamese
Thai
Swedish
Danish
Finnish
Norwegian
Czech
Hungarian
Romanian
Greek
Hebrew
Indonesian
Malay
Ukrainian
Bulgarian
Croatian
Slovak
Slovenian
Serbian
Lithuanian
Latvian
Estonian
(@robert)
Support Team
Joined: 3 months ago

Thank you for letting us know @anonymous20. This will be fixed in next version. You can use "-" instead of "_" chars. As a temporary solution you also can edit wp-content/plugins/wpforo/wpf-includes/wpf-hooks.php file.

Find this line:

$fnm = preg_replace("/[^-a-zA-Z0-9]/", "", $fnm);

Change to this:

$fnm = preg_replace("/[^-a-zA-Z0-9_]/", "", $fnm);

Share: