Automatically assign profile pics to pages in phpfox

我与影子孤独终老i 提交于 2019-12-12 03:04:23

问题


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 of phpfox_pages (which take a an address to the image file)

user_image in table of phpfox_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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!