1 (edited by Frank H 2005-06-28 21:37)

Topic: Image Awards Mod 1.0 by Frank H

##
##
##        Mod title:  Image Award Mod
##
##      Mod version:  1.0.0
##   Works on PunBB:  1.2.5
##     Release date:  2005-05-16
##           Author:  Frank Hagstrom (email removed, read my sig)
##
##      Description:  This mod will add the ability to assign image awards for
##                    users. That is shown below their avatar.
##
##   Affected files:  viewtopic.php
##
##       Affects DB:  Yes
##
##            Notes:  Well, having these things might be handy, a good way to
##                    show that a user has been warned for his actions, or just
##                    that the user is in some way special. The addition of new
##                    awards is very easy. Just create an image, save it with
##                    correct naming, upload, and then assign to the user.
##                    Description on how to name the files is in the admin
##                    plugin interface.
##                    The plugin part might be improved later, but typing in id
##                    I think is better than generating a list of users. As the
##                    userlist might grow to several thousands, and that's a
##                    hard list to find names in...
##                    
##                    Written by Frank H
##                    on: 2005-05-16 17:47
##
##       DISCLAIMER:  Please note that "mods" are not officially supported by
##                    PunBB. Installation of this modification is done at your
##                    own risk. Backup your forum database and any and all
##                    applicable files before proceeding.
##
##

Did a small mod today, mainly to show warnings on users. But you can use it to make all sort of awards wink

Shows a small image under the avatar, if avatars is displayed, othervise shown as text.

To add more awards (Warning, Warning Red & Banned is in the zip), just create an image, and follow the naming scheme when saving it. Upload and assign to user. smile
(Didn't want to create an dropdown for the users, as with thousands of users the dropdown would be huge. So no need to ask about it wink)


Have fun smile

Download

2

Re: Image Awards Mod 1.0 by Frank H

would it work in 1.2.4

3 (edited by Frank H 2005-05-16 21:05)

Re: Image Awards Mod 1.0 by Frank H

I suppose ... you need to alter the install_mod.php to allow it to be installed ... and the query where posts are selected in viewtopic.php, just make sure that the column is selected (imgaward) ... (the replace might not be ok, so make sure you just add the column in the select sql query instead of replacing the whole row)

Othervise I think it's ok ... it's a really easy mod, not that much can fail wink

Re: Image Awards Mod 1.0 by Frank H

Hi Frank,
its possible to insert this mod into the profil from member.....?

So, if u would war anyone, its show in the profil ...  But no one could see it, only the User!
Perhaps under the "change your password" also 1st page at the profil etc...
I try it, but it doesnt work.. big_smile

Greetings
Michaela

Re: Image Awards Mod 1.0 by Frank H

I suppose, but not by copy+paste from viewtopic, you'd have to write it properly ... but of course it's possible, just will need more code ... and more edited files ... and I haven't the time to look at it atm ... too busy with other stuff ...

Re: Image Awards Mod 1.0 by Frank H

wow nice mod smile

7 (edited by Frank H 2005-05-31 16:31)

Re: Image Awards Mod 1.0 by Frank H

thnx, the quickest mod I've done sofar I think wink

(btw, about why I haven't added the mod to profile etc, I took this decision for two reasons: 1. Fewer files to edit=faster&easer to do(less problems big_smile) 2. I never use profile, and if someone deserves an award they surely has at least one post wink)

(the plugin might get updated as soon as my exams are over, so that it can list all avaible awards, and list what users that has one, it's the plan at least smile)

8 (edited by Utchin 2007-02-18 12:47)

Re: Image Awards Mod 1.0 by Frank H

how would i be able to add multiple awards to one user?

Sorry. Unactive due to personal life.

Re: Image Awards Mod 1.0 by Frank H

bump. is there anyway to make this mod for multiple images on one person without edting the datebase

Sorry. Unactive due to personal life.

Re: Image Awards Mod 1.0 by Frank H

I had missed that message, sry about that. (odd, I thought I was subscribed to it, but obv I wasn't)


hmm, no not really, what you can do is to make a larger image (with both awards), and assign it to the person. I might look more into it when I rebuild the mod into an extension for PunBB ... to see if I can make it support more than one (but that also means more code, and slower board wink)

11

Re: Image Awards Mod 1.0 by Frank H

yea, thats a thought.. might do that.... i dont have much experince with this so i tohught, i could just duplicate the coding but change each table....in the mqsql database.... but for now, ill use the multiple image on one...thanks.

Sorry. Unactive due to personal life.

Re: Image Awards Mod 1.0 by Frank H

in admin_loader.php?plugin=AP_Image_Awards.php

Warning: is_dir(): open_basedir restriction in effect. File(..) is not within the allowed path(s): (/*****/httpdocs:/tmp) in /****/httpdocs/plugins/AP_Image_Awards.php on line 103

it show that error code in Image Awards page but this mod it work

can use


sorry my bad english

Re: Image Awards Mod 1.0 by Frank H

hmm ... Please try if this will work, replace line 103 with:

        if($awardmod_temp != '..' && !is_dir($awardmod_temp) && $awardmod_temp != 'index.html')

If it does not work, I think I know another thing to test aswell.

Re: Image Awards Mod 1.0 by Frank H

it work thank you smile

15

Re: Image Awards Mod 1.0 by Frank H

Is it possible to make this mod viewable in profile.php ...let´s say under "User activity"?

16

Re: Image Awards Mod 1.0 by Frank H

Yes it is.

with a bit of tweeking to the viewtopic code

Sorry. Unactive due to personal life.

17

Re: Image Awards Mod 1.0 by Frank H

Oki sounds great...anyone who could help me with this matter...my codingskills are 0 big_smile