Hacks: Profile Photo Hack

Posted by: m0ntyOn 2005/4/15 6:52:35 13092 reads
This hack adds photo upload ability to Xoops 2 User Profile

you can download the hack HERE

see Demo HERE

to test the upload > username = demouser - password = demouser2005

It utilises the same function as the Avatar section but they are both seperate. This means that the photo settings can be customised in exactly the same way as the Avatars are, an extra menu has been added to the system menu in admin which
works exactly the same as the avatar manager.



Photo's can also be controlled by admin in the user settings similar to the way avatrs are.

you can control image size, image width, image height, user post (how many posts are needed before users are allowed to upload)

this hack is tested on Xoops 2.0.9.2 & 2.0.9.3, it may work on earlier/later versions but i have not tested on any others.

if you don't want to risk overwriting existing files, then you can open the files up in an editor and copy the code yourself into your installation. (useful if you have made many hacks already)

all modified code is commented in the files (just search for ' added by m0nty ') and you should be able to identify affected edits.

instructions:

to install this hack, you need to upload all the files in the archive to your root xoops folder and overwrite all existing. (be sure to backup old files as i take no responsibility for errors)

then find the file mysql.txt in the package, open it up in an editor and run each query in phpmyadmin or whatever tool you use for mysql management, this will create 2 new tables and add 1 row to current xoops_users table, and 5 new rows to xoops_config table.


files affected:

edituser.php
userinfo.php
misc.php

class/xoopslists.php
kernel/user.php
language/english/global.php
language/english/user.php
language/english/misc.php

modules/system/menu.php
modules/system/constants.php
modules/system/admin/users/main.php
modules/system/admin/users/users.php
modules/system/language/english/modinfo.php
modules/system/language/english/admin.php
modules/system/language/english/admin/preferences.php
modules/system/language/english/admin/users.php
modules/system/templates/system_userinfo.html

Newly Added Files:

kernel/photo.php

modules/system/admin/photos/
modules/system/admin/photos/main.php
modules/system/admin/photos/xoops_version.php
modules/system/language/admin/photos.php