News:

Want to get involved in developing SMF? 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

TechnoDragon

Quote from: katers on October 09, 2006, 07:02:18 PM
I installed this package and everything installed fine except that there are no awards.  Do they not come with the mod?  If not where can I find some icons/avatars for this?

A good place for images is to go to any clipart site and do a search for various images...that or create your own (I chose the clipart way, using royalty free clipart of course!)
Don't tell me to get into shape...I have a shape...It is round!


char39

Thank you I will get searching.

xcrazyxfrogx

#102
QuoteFatal error: Cannot redeclare template_awards() (previously declared in /mnt/w0000/d23/s30/b0280754/www/nitinsir/smf/Sources/Load.php(1702) : eval()'d code:2597) in /mnt/w0000/d23/s30/b0280754/www/nitinsir/smf/Sources/Load.php(1702) : eval()'d code on line 2878

what i did i forgot to uninstall .01 and installed ur .02 and yes i have 1.1RC3 i got above error now and also i tried to uninstall .01 it went successfull but still i see and can go in Award section Admin. where is the problem????? and now i have uninstalled both still the section is there and  i can assign user badges and awards   :-\ :-\ :-\ :-\

I loaded Load.php in Dreamweaver to see error but there is no line 2878 i have line limited at 21xx i always run in pain  :'( lol however installation and uninst was successfull  :-\


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

JayBachatero

Delete the duplicate functions in Profile.php and Profile.template.php.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

xcrazyxfrogx

i did thanx it seems working but i am seeing 3 entries in Profile

VIEW MEMBER's BADGES ALBUM
VIEW MEMBER's BADGES ALBUM
VIEW MEMBER's BADGES ALBUM

like this what to do?????


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

JayBachatero

You installed the mod 3 times.  Open Profile.php and Profile.template.php and delete the duplicate entries.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

xcrazyxfrogx

ok thanx i give try and let u know !  :D


Money... my obsession... Wealth... my addiction... Fear... my weapon... Crazy people... don't you understand... from the smokes of fear... who I am?

YelleN

How do you add this mod to a different template than the default? I am Using a custom template and I would really want to use this mod.

JayBachatero

Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

YelleN


YelleN

Okay, I went and set the theme back to the default theme to see how it works. but when I installed the mod, the award creation is only visible on creation.

since on the mod page it says that if one uses the global announcement mod on has to install the Admin Modification Menu Section, so I uninstalled the member awards, I installed both mods then again reinstalled the members award but I still dont see the award creation anywhere. I would have thought that they would be displayed under the modifications section that was added by Admin Modification Menu Section.

am I missing something?

btw I can see the award link under peoples profile, but not the award creation thingy...

JayBachatero

Check to see that the language string is there.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

YelleN

could you be more specific?

I checked:
<file name="$languagedir/Modifications.english.php">
<file name="$languagedir/ManagePermissions.english.php">
<file name="$languagedir/Errors.english.php">

the modifs in those files as described in install.xml are there... and yes I am using the default theme

JayBachatero

Modifications.english.php.  Also post your Subs.php.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

YelleN

Modifications.english.php

<?php
// Version: 1.1 RC3; Modifications

/* Stream */
$txt['stream'] = 'Add Windows media sound or movies to your posts!';
$txt['real'] = 'Add Real media sound or movies to your posts!';
$txt['quick'] = 'Add QuickTime media sound or movies to your posts!';
$txt['gv'] = 'Add Google video to your posts!';
$txt['yt'] = 'Add YouTube stream to your posts!';
$txt['enableEmbeddedStream'] = 'Embed stream into posts';
$txt['enableEmbeddedReal'] = 'Embed real into posts';
$txt['enableEmbeddedQuick'] = 'Embed QuickTime into posts';
$txt['enableGoogleVideo'] = 'Embed Google video into posts';
$txt['enableYouTube'] = 'Embed YouTube stream into posts';
//Global Announcements adminIndex text strings.
$txt['global_announcements_admin'] = 'Global Announcements';
$txt['global_announcements_mods'] = 'Mods';
$txt['whoallow_globalAnnouncementsAdmin'] = 'Managing the <a href="' . $scripturl . '?action=globalAnnouncementsAdmin">Global Announcements</a>.';
$txt['whoall_globalAnnouncements'] = 'Viewing a Global Announcement';


// Pogo Awards adminIndex text strings.
$txt['awards'] = 'Awards';
$txt['pa_view_album'] = 'View member\'s badge album.';
$txt['pa_mods'] = 'Mods';
$txt['whoallow_pogoawards'] = 'Managing <a href="' . $scripturl . '?action=awards">Awards</a>.';

?>

YelleN

Subs.php

some code...

if (!empty($modSettings['modlog_enabled']))
$context['admin_areas']['maintenance']['areas']['view_moderation_log'] = '<a href="' . $scripturl . '?action=modlog">' . $txt['modlog_view'] . '</a>';
}

// Category for admin panel.  Pogo Awards
if ((isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 1) && allowedTo('manage_awards'))
{
$context['admin_areas']['other']['areas']['awards_admin'] = '<a href="' . $scripturl . '?action=awards">' . $txt['awards'] . '</a>';
}
elseif (!isset($modSettings['admin_areas_other']) || (isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 0) && allowedTo('manage_awards'))
{
$context['admin_areas']['awards_admin'] = array(
'title' =>  $txt['pa_mods'],
'areas' => array(
'awards_admin' => '<a href="' . $scripturl . '?action=awards">' . $txt['awards'] . '</a>',
),
);
}


//A new mods section for the Global Announcements.
if ((isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 1) && allowedTo('global_announcements_admin'))
{
$context['admin_areas']['other']['areas']['ga_admin'] = '<a href="' . $scripturl . '?action=globalAnnouncementsAdmin">' . $txt['global_announcements_admin'] . '</a>';
}
elseif (!isset($modSettings['admin_areas_other']) || (isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 0) && allowedTo('global_announcements_admin'))
{
$context['admin_areas']['ga_admin'] = array(
'title' =>  $txt['global_announcements_mods'],
'areas' => array(
'ga_admin' => '<a href="' . $scripturl . '?action=globalAnnouncementsAdmin">' . $txt['global_announcements_admin'] . '</a>',
),
);
}
...some code...
$context['allow_admin'] .= allowedTo(array('global_announcements_admin'));

$context['allow_admin'] .= allowedTo('manage_awards');

$context['in_maintenance'] = !empty($maintenance);
...some code

JayBachatero

Umm everything looks ok.  Can you PM me a test admin account?
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

YelleN

Done, thanks for the help. the account will be active this weekend.

JayBachatero

YelleN can you post the whole function in Subs.php for the elft menu.  It's called adminIndex.
Follow me on Twitter

"HELP!!! I've fallen and I can't get up"
This moment has been brought to you by LifeAlert

YelleN

Subs.php

// Set up the administration sections.
function adminIndex($area)
{
global $txt, $context, $scripturl, $sc, $modSettings, $user_info, $settings;

// Load the language and templates....
loadLanguage('Admin');
loadTemplate('Admin');

// Admin area 'Main'.
$context['admin_areas']['forum'] = array(
'title' => $txt[427],
'areas' => array(
'index' => '<a href="' . $scripturl . '?action=admin">' . $txt[208] . '</a>',
'credits' => '<a href="' . $scripturl . '?action=admin;credits">' . $txt['support_credits_title'] . '</a>',
)
);

if (allowedTo(array('edit_news', 'send_mail', 'admin_forum')))
$context['admin_areas']['forum']['areas']['news'] = '<a href="' . $scripturl . '?action=news">' . $txt['news_title'] . '</a>';

if (allowedTo('admin_forum'))
$context['admin_areas']['forum']['areas']['manage_packages'] =  '<a href="' . $scripturl . '?action=packages">' . $txt['package1'] . '</a>';

// Admin area 'Configuration'.
if (allowedTo('admin_forum'))
{
$context['admin_areas']['config'] = array(
'title' => $txt[428],
'areas' => array(
'edit_mods_settings' => '<a href="' . $scripturl . '?action=featuresettings">' . $txt['modSettings_title'] . '</a>',
'edit_settings' => '<a href="' . $scripturl . '?action=serversettings;sesc=' . $sc . '">' . $txt[222] . '</a>',
'edit_theme_settings' => '<a href="' . $scripturl . '?action=theme;sa=settings;th=' . $settings['theme_id'] . ';sesc=' . $sc . '">' . $txt['theme_current_settings'] . '</a>',
'manage_themes' => '<a href="' . $scripturl . '?action=theme;sa=admin;sesc=' . $sc . '">' . $txt['theme_admin'] . '</a>',
)
);
}

// Admin area 'Forum'.
if (allowedTo(array('manage_boards', 'admin_forum', 'manage_smileys', 'manage_attachments', 'moderate_forum')))
{
$context['admin_areas']['layout'] = array(
'title' => $txt['layout_controls'],
'areas' => array()
);

if (allowedTo('manage_boards'))
$context['admin_areas']['layout']['areas']['manage_boards'] =  '<a href="' . $scripturl . '?action=manageboards">' . $txt[4] . '</a>';

if (allowedTo(array('admin_forum', 'moderate_forum')))
$context['admin_areas']['layout']['areas']['posts_and_topics'] = '<a href="' . $scripturl . '?action=postsettings">' . $txt['manageposts'] . '</a>';
if (allowedTo('admin_forum'))
{
$context['admin_areas']['layout']['areas']['manage_calendar'] = '<a href="' . $scripturl . '?action=managecalendar">' . $txt['manage_calendar'] . '</a>';
$context['admin_areas']['layout']['areas']['manage_search'] = '<a href="' . $scripturl . '?action=managesearch">' . $txt['manage_search'] . '</a>';
}
if (allowedTo('manage_smileys'))
$context['admin_areas']['layout']['areas']['manage_smileys'] = '<a href="' . $scripturl . '?action=smileys">' . $txt['smileys_manage'] . '</a>';

if (allowedTo('manage_attachments'))
$context['admin_areas']['layout']['areas']['manage_attachments'] = '<a href="' . $scripturl . '?action=manageattachments">' . $txt['smf201'] . '</a>';
}

// Admin area 'Members'.
if (allowedTo(array('moderate_forum', 'manage_membergroups', 'manage_bans', 'manage_permissions', 'admin_forum')))
{
$context['admin_areas']['members'] = array(
'title' => $txt[426],
'areas' => array()
);

if (allowedTo('moderate_forum'))
$context['admin_areas']['members']['areas']['view_members'] = '<a href="' . $scripturl . '?action=viewmembers">' . $txt[5] . '</a>';

if (allowedTo('manage_membergroups'))
$context['admin_areas']['members']['areas']['edit_groups'] = '<a href="' . $scripturl . '?action=membergroups;">' . $txt[8] . '</a>';

if (allowedTo('manage_permissions'))
$context['admin_areas']['members']['areas']['edit_permissions'] = '<a href="' . $scripturl . '?action=permissions">' . $txt['edit_permissions'] . '</a>';

if (allowedTo(array('admin_forum', 'moderate_forum')))
$context['admin_areas']['members']['areas']['registration_center'] = '<a href="' . $scripturl . '?action=regcenter">' . $txt['registration_center'] . '</a>';

if (allowedTo('manage_bans'))
$context['admin_areas']['members']['areas']['ban_members'] = '<a href="' . $scripturl . '?action=ban">' . $txt['ban_title'] . '</a>';
}

// Admin area 'Maintenance Controls'.
if (allowedTo('admin_forum'))
{
$context['admin_areas']['maintenance'] = array(
'title' => $txt[501],
'areas' => array(
'maintain_forum' => '<a href="' . $scripturl . '?action=maintain">' . $txt['maintain_title'] . '</a>',
'generate_reports' => '<a href="' . $scripturl . '?action=reports">' . $txt['generate_reports'] . '</a>',
// !!! Why?  Don't you want to take care of errors in the order they happened, like normal people and programmers?  Seeing them backwards helps no one, and only increases confusion.
// !!! You know I've argued this before.
'view_errors' => '<a href="' . $scripturl . '?action=viewErrorLog;desc">' . $txt['errlog1'] . '</a>'
)
);

if (!empty($modSettings['modlog_enabled']))
$context['admin_areas']['maintenance']['areas']['view_moderation_log'] = '<a href="' . $scripturl . '?action=modlog">' . $txt['modlog_view'] . '</a>';
}

// Category for admin panel.  Pogo Awards
if ((isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 1) && allowedTo('manage_awards'))
{
$context['admin_areas']['other']['areas']['awards_admin'] = '<a href="' . $scripturl . '?action=awards">' . $txt['awards'] . '</a>';
}
elseif (!isset($modSettings['admin_areas_other']) || (isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 0) && allowedTo('manage_awards'))
{
$context['admin_areas']['awards_admin'] = array(
'title' =>  $txt['pa_mods'],
'areas' => array(
'awards_admin' => '<a href="' . $scripturl . '?action=awards">' . $txt['awards'] . '</a>',
),
);
}


//A new mods section for the Global Announcements.
if ((isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 1) && allowedTo('global_announcements_admin'))
{
$context['admin_areas']['other']['areas']['ga_admin'] = '<a href="' . $scripturl . '?action=globalAnnouncementsAdmin">' . $txt['global_announcements_admin'] . '</a>';
}
elseif (!isset($modSettings['admin_areas_other']) || (isset($modSettings['admin_areas_other']) && $modSettings['admin_areas_other'] == 0) && allowedTo('global_announcements_admin'))
{
$context['admin_areas']['ga_admin'] = array(
'title' =>  $txt['global_announcements_mods'],
'areas' => array(
'ga_admin' => '<a href="' . $scripturl . '?action=globalAnnouncementsAdmin">' . $txt['global_announcements_admin'] . '</a>',
),
);
}


// Other.  This is shown w/o permissions so that it works with other mods.
$context['admin_areas']['other'] = array(
'title' => $txt[5000],
'areas' => array(),
);
// Make sure the administrator has a valid session...
validateSession();

// Figure out which one we're in now...
foreach ($context['admin_areas'] as $id => $section)
if (isset($section[$area]))
$context['admin_section'] = $id;
$context['admin_area'] = $area;

// obExit will know what to do!
$context['template_layers'][] = 'admin';
}

Advertisement: