Notifications
Clear all

wpForo 1.x.x [Closed] Attachments renamed

2 Posts
2 Users
2 Reactions
2,040 Views
Posts: 1602
Topic starter
(@anonymous20)
Noble Member
Joined: 9 years ago

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: 10591
Admin
(@robert)
Support Team
Joined: 9 years 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);