Hacks: XOOPS 2.2.4 Profile Photo Hack

Posted by: m0ntyOn 2005/11/30 23:12:29 12866 reads
This hack adds photo upload ability to Xoops 2.2.4 User Profile


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 avatars are.

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


i presume no hacks have already been made to xoops, in particular any additional profile fields you may have added after install.

this hack is tested on Xoops 2.2.4, it may work on later versions but iT has not been tested on any others. it will NOT work on previous xoops versions.

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 inside the upload folder 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 run photoinstall.php from your browser by going to yourdomain.com/photoinstall.php (delete after completed)


Changelog:

files affected:

misc.php

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

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

modules/profile/edituser.php
modules/profile/userinfo.php
modules/profile/register.php
modules/profile/xoops_version.php
modules/profile/language/english/admin.php
modules/profile/language/english/main.php
modules/profile/language/english/modinfo.php
modules/profile/templates/profile_userinfo.html

themes/default/navigation/theme_adminnav.html
themes/xmt/navigation/theme_adminnav.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

------------------------------------

you can download from HERE

link updated 03/05/06