Mass Edit Icons for Resource Manager

The Dark Wizard

Well-known member
Is there a way to give a bunch of resources the same icon?

We have a bunch of old resources past a certain age(since we used Chris Deeming's date changer to bring stuff over) and no one is going to come back and give those an icon so we just want to give them all the same icon.

Any help would be appreciated.

I assume a way to do this would be with an SQL query.
 
The difficulty is, the only thing that tells XenForo that there is a resource icon is the resource having an icon_date in the xf_resource table.

If there is a date in that field in the xf_resource table, then XenForo expects there to be an icon in the relevant folder...

e.g. data/resource_icons/0/1.jpg

Where data is the external data path, 0 is the resource ID divided by 1000 rounded down to the nearest whole number and 1 is the resource ID.

So if your resources are all IDs 1 to 100 you would need to update the xf_resource table like this:

Code:
UPDATE xf_resource SET icon_date = 1 WHERE resource_id <= 100

And then you would need to populate the data/resource_icons/0 directory with 1.jpg, 2.jpg, 3.jpg etc. all the way to 100.jpg.

That would have the desired effect.
 
The difficulty is, the only thing that tells XenForo that there is a resource icon is the resource having an icon_date in the xf_resource table.

If there is a date in that field in the xf_resource table, then XenForo expects there to be an icon in the relevant folder...

e.g. data/resource_icons/0/1.jpg

Where data is the external data path, 0 is the resource ID divided by 1000 rounded down to the nearest whole number and 1 is the resource ID.

So if your resources are all IDs 1 to 100 you would need to update the xf_resource table like this:

Code:
UPDATE xf_resource SET icon_date = 1 WHERE resource_id <= 100

And then you would need to populate the data/resource_icons/0 directory with 1.jpg, 2.jpg, 3.jpg etc. all the way to 100.jpg.

That would have the desired effect.

I'll give it a shot.
 
Back
Top Bottom