News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Member Awards (2.0 Compatible!)

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

Previous topic - Next topic

hcfwesker

according to the install.php file, the limit is 80 characters.  Go adjust that number in the database to how high you want it.  that'd be my guess.

phpMyAdmin > awards database > structure > edit the value for description's length

Skaty


TiPsY

Quote from: TiPsY on March 17, 2013, 05:50:57 PM
Hello,
I've used this modification, everything is great during the install without errors but when I'm trying to access any topic I get this error message:

Unknown column 'aw.award_name' in 'field list'
File: /home/myhostname/public_html/mysite/forum/Sources/Load.php
Line: 1106

Note: It appears that your database may require an upgrade. Your forum's files are currently at version SMF 2.0.4, while your database is at version 2.0.2. The above error might possibly go away if you execute the latest version of upgrade.php.


I've repaired my db from mysql, was the only solution that came up with searches but still nothing.
Any info how to fix it?
bump on this, it was ignored

Kindred

did you have another award mod before this one?  Does that table/column actually exist?

if not, you will have to remove the incorrect database tables and re-run the database install portion of the mod
Сл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."

Nuttcaze

Quick question, I installed the mod a while ago, works fine except for the fact that only I (administrator) can give awards to people. I used to have one of my forum moderators do it but when I updated from the old style of SMF, my moderators where no longer able to give out awards. It wont even show up for them. I have a video embed mod installed and the options for the Member Awards only shows up in the drop down menu for the video mod. Any ideas?                                              Thanks in advance :D

Kindred

sounds like mods with conflicting or duplicate javascripts....
Сл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."

biohazard388

I'm having the same problem as Nuttcaze. Only Admins are allowed to even view the assignment area. I've checked the file/database, and the file only seems to check "isAllowedTo('manage_awards')" which is set to 1 in the permissions table in the database correctly. It seems to hinge on the user having the ability to view the 'admin' area or something similar. We do have a lot of mods installed, but I wouldn't even begin to know where to look for a conflict. Any help would be greatly appreciated. I'm on the latest 2.0.4 version.

hcfwesker

Try this, which will put the Awards admin menu all by itself. ( think I had to do something similar to get award permissions for non-admins to work)

Admin.php

Find

'awards' => array(
'label' => $txt['awards'],
'file' => 'ManageAwards.php',
'function' => 'Awards',
'icon' => 'awards.gif',
'permission' => array('manage_awards'),
'subsections' => array(
'main' => array($txt['awards_main']),
'modify' => array($txt['awards_modify']),
'assign' => array($txt['awards_assign']),
'categories' => array($txt['awards_categories']),
'settings' => array($txt['awards_settings']),
),
),
),
),
'layout' => array(


Replace with

),
),
'awards' => array(
'label' => $txt['awards'],
'file' => 'ManageAwards.php',
'function' => 'Awards',
'icon' => 'awards.gif',
'permission' => array('manage_awards'),
'subsections' => array(
'main' => array($txt['awards_main']),
'modify' => array($txt['awards_modify']),
'assign' => array($txt['awards_assign']),
'categories' => array($txt['awards_categories']),
'settings' => array($txt['awards_settings']),
),
),
),
),
'layout' => array(

biohazard388

Quote from: hcfwesker on April 22, 2013, 11:53:20 PM
Try this, which will put the Awards admin menu all by itself. ( think I had to do something similar to get award permissions for non-admins to work)

Admin.php

Find

'awards' => array(
'label' => $txt['awards'],
'file' => 'ManageAwards.php',
'function' => 'Awards',
'icon' => 'awards.gif',
'permission' => array('manage_awards'),
'subsections' => array(
'main' => array($txt['awards_main']),
'modify' => array($txt['awards_modify']),
'assign' => array($txt['awards_assign']),
'categories' => array($txt['awards_categories']),
'settings' => array($txt['awards_settings']),
),
),
),
),
'layout' => array(


Replace with

),
),
'awards' => array(
'label' => $txt['awards'],
'file' => 'ManageAwards.php',
'function' => 'Awards',
'icon' => 'awards.gif',
'permission' => array('manage_awards'),
'subsections' => array(
'main' => array($txt['awards_main']),
'modify' => array($txt['awards_modify']),
'assign' => array($txt['awards_assign']),
'categories' => array($txt['awards_categories']),
'settings' => array($txt['awards_settings']),
),
),
),
),
'layout' => array(



Hmm, no dice. At first I got an error that there were too many " ), " at the end of that section. Removed those two and it didn't break, but I still couldn't access that area as a non-admin with permissions. At least, I couldn't access it through "?action=admin;area=awards;" I realize this may change after we change the code like you suggested. If that's the case, what would the new 'action' be to access that area?

What's the most perplexing about this (to me at least) is how non-admins with permissions can work with our EZportal system without problem by going through the admin area, but this mod somehow requires you to be an admin? Our EZpages are listed in the admin area, and when I give permission to edit EZpages, they have no problem getting in there (but can only see that one option). I think your suggested edit is definitely in the right direction - but I wonder if I have to do something else, like edit the action= sections of the awards template files so that it isn't leading to the admin area anymore?

Unlike our EZportal and EZ Store sections, the Awards doesn't have a custom URL defined in this array structure. Could that be part of the problem?



I really appreciate the help. I'm a programming student myself, so I understand a lot of what is going on here, it's just I haven't gotten used to the SMF system just yet. lol

biohazard388

Fixed it for our forum, at least. For those who may have a similar problem of not being able to edit/assign awards even when the permission is checked, do this:


admin.php

Find

'awards' => array(
'label' => $txt['awards'],
'file' => 'ManageAwards.php',
'function' => 'Awards',
'icon' => 'awards.gif',
'permission' => array('manage_awards'),
'subsections' => array(
'main' => array($txt['awards_main']),
'modify' => array($txt['awards_modify']),
'assign' => array($txt['awards_assign']),
'categories' => array($txt['awards_categories']),
'settings' => array($txt['awards_settings']),
),
),
),
),



Replace with:


             ),
),
'awards' => array(
'title' => "Awards",
'permission' => array('manage_awards'),
'areas' => array(
'awards' => array(
'label' => $txt['awards'],
'file' => 'ManageAwards.php',
'function' => 'Awards',
'icon' => 'awards.gif',
'permission' => array('manage_awards'),
'subsections' => array(
'main' => array($txt['awards_main']),
'modify' => array($txt['awards_modify']),
'assign' => array($txt['awards_assign']),
'categories' => array($txt['awards_categories']),
'settings' => array($txt['awards_settings']),
),
),
),
),




What does is, as 'hcfwesker' suggested, creates a new 'area' in the admin menu for these functions to exist. This is essentially creating a new section / drop menu for the Awards menu to live in.


Thanks so much for the help! It led me in the right direction to mess around and learn a bit more about SMF. :D

hcfwesker

That's exactly what my edit was meant to do, but I was going by the parser install page, so you may of have another admin menu added in that position which wouldn't have made the edit i supplied work.  Thats how we got passed the glitch so good deal you got it figured out as well. 

Also, if you're interested, I made this custom edit, which puts "Manage Awards" under the 'Moderate' tab on every page, so "awards moderators" can get there without having to goto the Admin menu then select awards.  (preview in attachment below)

http://www.simplemachines.org/community/index.php?topic=114701.msg3107712;topicseen#msg3107712

ara_is_sweet

Quote from: biohazard388 on April 23, 2013, 04:35:23 PM
Fixed it for our forum, at least.   ..snip...

Thanks, this helped me aswell.

CBG

Hi,

Has anyone moved the awards and put them below the signature area?
If so what did you do, to do it?
SMF version: 2.0.7

Regards,
Garry

hcfwesker

Quote from: CBG on May 04, 2013, 10:00:40 AMHas anyone moved the awards and put them below the signature area?
If so what did you do, to do it?

typing in 'signature' up in the search box would have done what you asked ;)

http://www.simplemachines.org/community/index.php?topic=114701.msg3122589#msg3122589  <-- move to signatures

http://www.simplemachines.org/community/index.php?topic=114701.msg3503463#msg3503463  <-- add to Profile

Dhayzon


FireDitto

Quote from: hcfwesker on May 04, 2013, 07:16:29 PM
Quote from: CBG on May 04, 2013, 10:00:40 AMHas anyone moved the awards and put them below the signature area?
If so what did you do, to do it?

typing in 'signature' up in the search box would have done what you asked ;)

http://www.simplemachines.org/community/index.php?topic=114701.msg3122589#msg3122589  <-- move to signatures

http://www.simplemachines.org/community/index.php?topic=114701.msg3503463#msg3503463  <-- add to Profile


Or, alternatively! (SMF 2.0.4)

Preview Image

-> ../Themes/default/Profile.template.php make sure you do backups!

Code (FIND) Select
                    <dd>', $context['member']['last_login'], '</dd>
                </dl>';

    // Are there any custom profile fields for the summary?


Code (REPLACE) Select
                    <dd>', $context['member']['last_login'], '</dd>';
               
            echo '
                </dl>';
   
    echo '
                <dl class="noborder">';
            // Show their awards?
            if (!empty($context['member']['awards']) && $modSettings['awards_in_post'] > 0){
                echo '
                                <hr></ br></ br><dt>', $txt['awards'], ': </dt>
                                <dd>', $contxt['member']['awards'], '</dd>';


  // Couldn't limit it in Load.php, so let's do it here.
                $awards = 0;
                foreach ($context['member']['awards'] as $award){
                    if($awards < $modSettings['awards_in_post'])
                        echo '
                                    <a href="', $scripturl, $award['more'], '"><img src="', dirname($scripturl), $award['img'], '" alt="', $award['description'], '" title="', $award['description'], '" /></a> ';
                    $awards++;
                }

                echo '
                                </fieldset>
                                <br /><br />';
              '</dl>';

  }

  echo '
                <dl class="noborder">';
               
    // Are there any custom profile fields for the summary?
Second Pass Weyr<br />An AU Pernse RPG<br /><br />SMF 2.0.6 with SP 2.3.5

Skaty

Can't find where was the codes for pm send when assign a award.

How can i change the pm sender and how can i delete award's description for my content.

Dzonny

Heya guys ;)

Great mod but i'm having a small problem few weeks after i installed it.

Apperently whenever i try to assign some award to member there's no drop-down box with suggested members, so whatever i type there i just got "You must select a member and/or award in order to continue!".

Error log:
Invalid argument supplied for foreach()
File: /homepages/26/d465986696/htdocs/Sources/ManageAwards.php
Line: 451

Lines from 450 - 453:

// Make sure that they picked an award and members to assign it to...
foreach($_POST['recipient_to'] as $recipient)
if($recipient != '{MEMBER_ID}')
$members[] = (int) $recipient;


Any suggestions please? :)

Thanks! :)

hcfwesker

Quote from: Dzonny on May 26, 2013, 10:04:43 AMApperently whenever i try to assign some award to member there's no drop-down box with suggested members, so whatever i type there i just got "You must select a member and/or award in order to continue!".

see if this post helps at all.  http://www.simplemachines.org/community/index.php?topic=114701.msg3208645#msg3208645


Advertisement: