问题
Followed by my last question: Automatically create pages in phpfox
Now I'm trying to assign a list of pre-uploaded images to some pages as their profile picture in phpfox.
After checking data changes in the database, I only realized changes in these two fields:
image_path
in table ofphpfox_pages
(which take a an address to the image file)
user_image
in table ofphpfox_user
(which take a string of "user_id+%s".file_extension)
But by inserting data in these two fields in records for a page that has a default profile pic, it's profile pic would not change.
Is there any other fields or options that I should change?
回答1:
Look at the file /module/pages/include/service/process.class.php In there look for the function update and around line 442 find this
if ($this->_bHasImage)
This piece of code handles setting an image for the page, notice how it creates three thumbnails, maybe the problem you're having is that you didn't create all the needed thumbs. You also need to update the column image_server_id
.
Hope it helps
回答2:
look phpfox_photo
table in that you will find is_profile_photo
attribute that is always 1 for the profile picture
来源:https://stackoverflow.com/questions/16657912/automatically-assign-profile-pics-to-pages-in-phpfox