Member Awards (2.0 Compatible!)

Started by Spuds, September 18, 2006, 03:14:03 PM

Previous topic - Next topic

robinrobin

#1380
I install the mod with SMF 2.0 RC1 emulated, without any errors.
I create a new award called "One" with the description "First" in the Uncategorized category and upload a random, small image to that award and then save it.
I click on the "Assign" tab.
I choose "One" from the list.
I write my own and several other people's usernames and visible names into the "Choose member" text-field.
I still get "You must select a member and/or award in order to continue!".

THIS MOD DOES NOT WORK


For crying out loud. Why is it that you can't explain to people that they have to click on the name that you enter in the text field to add them? There is no other mod, anywhere, ever, in which you had to write something on the keyboard and then had to click on that text! There is no logic to it!

robinrobin

#1381
Idea: Make some indication for when awards are updated. As in; make people aware of when someone receives a reward, like in a small list or something down by the forum stats. What's the point of having awards if nobody ever hear anything about them?

Edit: I noticed that there are a few extra modifications to the Display.template.php file that aren't added automatically when installing the mod. Adding the top-most of them to the code in that file, between the posts and the signature space, makes a nice list of awards that each member has.

Chronomancer

Hmm, I get an error that is supposedly fixed with the latest patch of this Mod.

Quotehttp://www.---.com/index.php?action=profile;sa=awardsMembers;id=1
8: Undefined index: members
File: ---/languages/ManageAwards.english.php (eval?)
Line: 2348

The Mod works perfectly fine but it keeps flooding my errorlog.

Using 1.1.1 and SMF 1.1.10. Any hint on what caused this error before the supposed fix and how it was fixed would be appreciated, and my Errorlogs would thank you too.  ;D

Kindred

1- have you gone in and changed the settings and clicked SAVE at least once?
2- Have you created at least one award?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

ArkServer

Hi, the member award installed on 1.1.10 but i get an Unknown column 'a.id_category' in 'on clause' , Unknown column 'id_category' in 'field list' when i try to access the admin page. looks like the install.php didnt execute. can you give me the plain sql so i can do it manually?

Chronomancer

Quote from: Kindred on August 01, 2009, 09:20:03 AM
1- have you gone in and changed the settings and clicked SAVE at least once?
2- Have you created at least one award?

Was that a reply to my post?
If so:
Yes to both. There is an Award created and assigned to a Member for testing purposes. That's why I know it works fine. Displays the Award under the Avatar on posts, shows up on the profile page if clicked etc.

Skargon

So I had this for 1.1.10, and wanted it for 2.0 RC 1.2

I couldn't "Apply Mod", so I emulated RC 1, which then installed successfully.

I went to ADMIN > Configuration > Awards to start creating awards.

I got a bunch of errors  (One per Tab)

MAIN TAB:
Unknown column 'a.id_category' in 'on clause'
File: /home/content/dragon/forums/Sources/ManageAwards.php
Line: 97

ADD/MODIFY TAB:   (Note, this error came when I tried to "Submit" my award)
Unknown column 'award_name' in 'field list'
File: /home/content/dragon/forums/Sources/ManageAwards.php
Line: 164

CATAGORY TAB:
Unknown column 'id_category' in 'field list'
File: /home/content/dragon/forums/Sources/ManageAwards.php
Line: 700

ASSIGN TAB:
Unknown column 'award_name' in 'field list'
File: /home/content/dragon/forums/Sources/ManageAwards.php
Line: 423


Any thoughts?   I will not let me create a Catagory at all, and when I hit the "Submit" button on the Add/Modify, I receive error listed above.

I'm on a fresh copy of 2.0 RC1.2.  Default (Core) theme, no other mods installed yet

Fustrate

Chronomancer
Can you disable template eval (How to Enable / Disable eval()) and then tell me what the new error is?


ArkServer
just upload install.php to your forum's main directory (where index.php and /Sources/ and /Themes/ are) and go to it in your browser.


Skargon
Check your database for tables that match these basic structures...

smf_awards
-- id_award
-- award_name
-- description
-- time_added
-- filename
-- minifile
-- id_category
---- PRIMARY KEY id_award

smf_awards_members
-- uniq_id
-- id_award
-- id_member
-- date_received
-- favorite
---- PRIMARY KEY uniq_id
---- UNIQUE id_member, id_award

smf_awards_categories
-- id_category
-- category_name
---- PRIMARY KEY id_category
Steven Hoffman
Former Team Member, 2009-2012

Chronomancer

Quote from: Fustrate on August 07, 2009, 02:31:01 AM
Chronomancer
Can you disable template eval (How to Enable / Disable eval()) and then tell me what the new error is?

Aha, nice. I didn't know this eval function.

Error is:
Quote8: Undefined index: members
File: ---/Themes/default/Profile.template.php
Line: 2348

The corresponding line is in your template_awards_members() function, I bolded it:

Quote
function template_awards_members(){
   global $context, $scripturl, $txt;

   echo '
            <table width="100%" cellpadding="4" cellspacing="1" border="0" align="center" class="bordercolor">
               <tr class="titlebg">
                  <td colspan="', $context['columns'], '">', $txt['awards_members_with'], ': ', $context['award']['name'], '</td>
               </tr>
               <tr class="windowbg">
                  <td colspan="', $context['columns'], '" align="center">
                     <img src="', $context['award']['img'], '" alt="', $context['award']['name'], '" /><br />
                     <strong>', $context['award']['name'], '</strong><br />
                     ', $context['award']['description'], '
                  </td>
               </tr>
               <tr class="titlebg">
                  <td colspan="', $context['columns'], '">', $txt['members'], '</td>
               </tr>';

$txt['members'] runs into an error... doesn't surprise me since I can find no definition of it. Shouldn't it be in the ManageAwards.english.php bundled with the rest under //profile?

Fustrate

Ah, that should be $txt[19]

I'll push out a patch in a few hours when I'm at home
Steven Hoffman
Former Team Member, 2009-2012

Chronomancer

Quote from: Fustrate on August 07, 2009, 11:29:52 AM
Ah, that should be $txt[19]

I'll push out a patch in a few hours when I'm at home

Perfect. I manually fixed it and my Errorlog stays clean now.  ;)

Thank you very much. Also for the hint with the eval function, that might come in handy from time to time.

Fustrate

:) whenever it says (eval?) after the filename, try doing that and seeing where the real error is. Usually language files are the most recent things loaded, which throws everything off in terms of debugging.
Steven Hoffman
Former Team Member, 2009-2012

Skargon

Quote from: Fustrate on August 07, 2009, 02:31:01 AM
Skargon
Check your database for tables that match these basic structures...

smf_awards
-- id_award
-- award_name
-- description
-- time_added
-- filename
-- minifile
-- id_category
---- PRIMARY KEY id_award

smf_awards_members
-- uniq_id
-- id_award
-- id_member
-- date_received
-- favorite
---- PRIMARY KEY uniq_id
---- UNIQUE id_member, id_award

smf_awards_categories
-- id_category
-- category_name
---- PRIMARY KEY id_category

I have no idea what I'm supposed to do....

Fustrate

Using phpMyAdmin (What is phpMyAdmin?), look for smf_awards, smf_awards_members, and smf_awards_categories. Replace 'smf_' with your db_prefix if you changed it.

If you can't find them, open the mod's zip file and take out install.php. Upload it to your forum's main directory, next to index.php and /Themes/ and /Sources/, and go to it in your browser. That should fix the errors.

If you can't check the DB, just do the second thing :)
Steven Hoffman
Former Team Member, 2009-2012

C4G-TK

Hey Fustrate!

I'm trying to change some things, but I'm not really sure where I need to make the adjustment.  I'm trying to change the area of the post where the profile info is created.

#1  I've set that area to a specific width, and made my awards at a specific width as well in order to show 6 awards (currently showing 2 across & 3 high).  I'm trying to figure out how I can change the space between the border of the Awards in order to allow 3 across and only 2 high.  (I'm trying to make the post profile as small as possible and every little helps.)  I know that I could make the awards even smaller to do what I want, but I was hoping by alleviating a little bit of the padding on the border I could do it w/o having to change all of my awards.  (Especially since it is hard enough to make some things intelligible at such a small size anyway.)

#2  I never figured out how to change the word "Awards" that is shown at the top of the bordered area to something else.  I'm trying to change it to "Recognition".  I know they are similar in meaning, but I was trying to make it more aptly describe what I'm using the mod for on my forum.


Any help in pointing me in the right direction would be much appreciated.

Thanks, TK


-img removed-

Fustrate

#1 I'd need a link to your forum so that I could look at the CSS

#2 you need to change it in the language file. Find which $txt[''] it is in Display.template.php, and then find that $txt[''] in index.english.php and replace it. If you're on 2.0, go into the Admin panel and in Maintenance, flush the file cache.
Steven Hoffman
Former Team Member, 2009-2012

C4G-TK


-img removed-

Fustrate

Seems like you'll have to bump up to 195px instead of 185px... there's really nothing else to do to make them go 3 by 2 instead of 2 by 3
Steven Hoffman
Former Team Member, 2009-2012

C4G-TK

What if I eliminated the border around the awards?

-img removed-

Fustrate

That didn't seem to do anything in my testing... it only eliminates 1px, and even taking out the 5px padding didn't do anything visually.
Steven Hoffman
Former Team Member, 2009-2012

Advertisement: