(How to...) Add user avatar to the sidebar with Mys v1.3.3
Well this is a simple tutorial for admins to add user avatar as a module to their users, it assumes that you uses Mys v1.3.3. For earlier versions you may have to do this by editing script files, which can be a problem.
So to begin with, go to module manager in your ACP, create a new module with basic information as entered below: It does not matter what name you give to your avatar module, but the required userlevel can be tricky. Enter 'member' as suggested above, otherwise it may attempt to get avatars for guests and return an error message. The next thing to do is to enter the module's PHP code. The PHP code is evaluated by the script's internal code, but there are a few variables you may need to keep track of. One of them is $mysidia, which stores important system information. The other is $moduleContainer, which serves as container for your GUI module. Sounds complicated? Well for this tutorial you do not need to know how they work, since I will provide the actual code to get this avatar module done for you. However, you may want to learn a bit more about them if you plan to add some custom php code completely yourself. Anyway, in the field 'module php code' text area, enter the following code below: PHP Code:
This concludes my tutorial for how to add user avatars to your site, lemme know if you encounter any issues. Also you can change the display order for each sidebar module in ACP too, just in case you havent noticed yet. Have fun playing with the script, everyone. |
*Dances* Wonderful! I was just wondering about this too :D
Thanks, HoF ^_^ |
Coolio! I was wondering though, how do you change the alignment of the avatar, like center or something. :)
|
Yay! And it works with Mys v1.3.4 as well!
|
All times are GMT -5. The time now is 04:49 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.