Add manual award mod and images
@ -1012,6 +1012,25 @@ function loadMemberData($users, $is_name = false, $set = 'normal')
|
||||
$user_profile[$row['id_member']] = $row;
|
||||
}
|
||||
$smcFunc['db_free_result']($request);
|
||||
|
||||
// xxx Load the member's awards.
|
||||
$request = $smcFunc['db_query']('', '
|
||||
SELECT mem.id_member, mg.stars
|
||||
FROM {db_prefix}membergroups AS mg, {db_prefix}members AS mem
|
||||
WHERE (FIND_IN_SET(mg.id_group, mem.additional_groups) OR ( mg.id_group=mem.id_post_group AND mem.id_group != 0 ))
|
||||
AND mg.showAddBadge=1
|
||||
AND id_member' . (count($new_loaded_ids) == 1 ? ' = {int:loaded_ids}' : ' IN ({array_int:loaded_ids})'),
|
||||
array(
|
||||
'loaded_ids' => count($new_loaded_ids) == 1 ? $new_loaded_ids[0] : $new_loaded_ids,
|
||||
)
|
||||
);
|
||||
|
||||
while ($row = $smcFunc['db_fetch_assoc']($request))
|
||||
{
|
||||
$user_profile[$row['id_member']]['stars'] .= ';'.$row['stars'];
|
||||
}
|
||||
$smcFunc['db_free_result']($request);
|
||||
// xxx end Load the member's awards.
|
||||
}
|
||||
|
||||
if (!empty($new_loaded_ids) && $set !== 'minimal')
|
||||
@ -1108,7 +1127,33 @@ function loadMemberContext($user, $display_custom_fields = false)
|
||||
$profile['signature'] = parse_bbc($profile['signature'], true, 'sig' . $profile['id_member']);
|
||||
|
||||
$profile['is_online'] = (!empty($profile['show_online']) || allowedTo('moderate_forum')) && $profile['is_online'] > 0;
|
||||
$profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']);
|
||||
|
||||
// xxx changed for awards
|
||||
// orig:
|
||||
// $profile['stars'] = empty($profile['stars']) ? array('', '') : explode('#', $profile['stars']);
|
||||
if(empty($profile['stars'])){
|
||||
$group_stars = '';
|
||||
}else{
|
||||
$stars = array();
|
||||
$count = 0;
|
||||
foreach (explode(';', $profile['stars']) as $star){
|
||||
$star = explode('#', $star);
|
||||
if($count == 0){ // original stars
|
||||
$group_stars = str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />', empty($star[0]) || empty($star[1]) ? 0 : $star[0]);
|
||||
}else{ // awards
|
||||
// # $star[0] is number of images
|
||||
// but in this case, it specifies whether the award is to be shown
|
||||
// on mitb.com, mscp.org, or both
|
||||
// 1 = both, 2 = mscp, 3 = mitb
|
||||
// otherwise it will be equal to $award_id
|
||||
//if( ($star[0] == 1) || ($star[0] == 2 && defined('MSCP')) || ($star[0] == 3 && !defined('MSCP')) || $star[0] == $award_id)
|
||||
$group_stars .= "</li>\n\t\t\t\t\t\t".'<li><img src="' . str_replace('$language', $context['user']['language'], isset($star[1]) ? $settings['images_url'] . '/' . $star[1] : '') . '" alt="*" border="0" />';
|
||||
}
|
||||
++$count;
|
||||
}
|
||||
}
|
||||
// xxx end changed for awards
|
||||
|
||||
// Setup the buddy status here (One whole in_array call saved :P)
|
||||
$profile['buddy'] = in_array($profile['id_member'], $user_info['buddies']);
|
||||
$buddy_list = !empty($profile['buddy_list']) ? explode(',', $profile['buddy_list']) : array();
|
||||
@ -1212,7 +1257,11 @@ function loadMemberContext($user, $display_custom_fields = false)
|
||||
'group_id' => $profile['id_group'],
|
||||
'post_group' => $profile['post_group'],
|
||||
'post_group_color' => $profile['post_group_color'],
|
||||
'group_stars' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars'][1]) ? $settings['images_url'] . '/' . $profile['stars'][1] : '') . '" alt="*" />', empty($profile['stars'][0]) || empty($profile['stars'][1]) ? 0 : $profile['stars'][0]),
|
||||
// xxx last awards edit
|
||||
// orig:
|
||||
// 'group_stars' => str_repeat('<img src="' . str_replace('$language', $context['user']['language'], isset($profile['stars'][1]) ? $settings['images_url'] . '/' . $profile['stars'][1] : '') . '" alt="*" />', empty($profile['stars'][0]) || empty($profile['stars'][1]) ? 0 : $profile['stars'][0]),
|
||||
'group_stars' => $group_stars,
|
||||
// xxx end last awards edit
|
||||
'warning' => $profile['warning'],
|
||||
'warning_status' => !empty($modSettings['warning_mute']) && $modSettings['warning_mute'] <= $profile['warning'] ? 'mute' : (!empty($modSettings['warning_moderate']) && $modSettings['warning_moderate'] <= $profile['warning'] ? 'moderate' : (!empty($modSettings['warning_watch']) && $modSettings['warning_watch'] <= $profile['warning'] ? 'watch' : (''))),
|
||||
'local_time' => timeformat(time() + ($profile['time_offset'] - $user_info['time_offset']) * 3600, false),
|
||||
|
1
Themes/core/images/awards
Symbolic link
@ -0,0 +1 @@
|
||||
../../default/images/awards
|
BIN
Themes/default/images/awards/Flare.gif
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
Themes/default/images/awards/Kakuna.gif
Normal file
After Width: | Height: | Size: 615 B |
BIN
Themes/default/images/awards/SOTWWinner.png
Normal file
After Width: | Height: | Size: 52 KiB |
BIN
Themes/default/images/awards/arccup.gif
Normal file
After Width: | Height: | Size: 736 B |
BIN
Themes/default/images/awards/batman.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
BIN
Themes/default/images/awards/builder.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
Themes/default/images/awards/bulbasaur.gif
Normal file
After Width: | Height: | Size: 891 B |
BIN
Themes/default/images/awards/c.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Themes/default/images/awards/caterpie.gif
Normal file
After Width: | Height: | Size: 792 B |
BIN
Themes/default/images/awards/charmander.gif
Normal file
After Width: | Height: | Size: 900 B |
BIN
Themes/default/images/awards/codeguru.png
Normal file
After Width: | Height: | Size: 6.0 KiB |
BIN
Themes/default/images/awards/csharp.png
Normal file
After Width: | Height: | Size: 5.0 KiB |
BIN
Themes/default/images/awards/dragonite.gif
Normal file
After Width: | Height: | Size: 1.9 KiB |
BIN
Themes/default/images/awards/dragonite.orig.gif
Normal file
After Width: | Height: | Size: 802 B |
BIN
Themes/default/images/awards/duke3d.gif
Normal file
After Width: | Height: | Size: 1.1 KiB |
BIN
Themes/default/images/awards/duke3dchristmas.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Themes/default/images/awards/goldbars.png
Normal file
After Width: | Height: | Size: 5.3 KiB |
BIN
Themes/default/images/awards/irishbulbasaur.gif
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
Themes/default/images/awards/irishpika.gif
Normal file
After Width: | Height: | Size: 655 B |
BIN
Themes/default/images/awards/javacoder.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
Themes/default/images/awards/lapras.gif
Normal file
After Width: | Height: | Size: 797 B |
BIN
Themes/default/images/awards/lisp.png
Normal file
After Width: | Height: | Size: 6.1 KiB |
BIN
Themes/default/images/awards/lpotm.png
Normal file
After Width: | Height: | Size: 7.1 KiB |
BIN
Themes/default/images/awards/mcwaward.png
Normal file
After Width: | Height: | Size: 5.8 KiB |
BIN
Themes/default/images/awards/mdgsharp.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
Themes/default/images/awards/mgd_winner.gif
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
Themes/default/images/awards/moparcraft.gif
Normal file
After Width: | Height: | Size: 3.1 KiB |
BIN
Themes/default/images/awards/moparcraft_admin.png
Normal file
After Width: | Height: | Size: 5.9 KiB |
BIN
Themes/default/images/awards/news.gif
Normal file
After Width: | Height: | Size: 2.1 KiB |
BIN
Themes/default/images/awards/onix.gif
Normal file
After Width: | Height: | Size: 1.7 KiB |
BIN
Themes/default/images/awards/persian.gif
Normal file
After Width: | Height: | Size: 837 B |
BIN
Themes/default/images/awards/pika.gif
Normal file
After Width: | Height: | Size: 638 B |
BIN
Themes/default/images/awards/pikaadmin.gif
Normal file
After Width: | Height: | Size: 754 B |
BIN
Themes/default/images/awards/pikagmod.gif
Normal file
After Width: | Height: | Size: 822 B |
BIN
Themes/default/images/awards/pikastaff.gif
Normal file
After Width: | Height: | Size: 651 B |
BIN
Themes/default/images/awards/pikastaff36.gif
Normal file
After Width: | Height: | Size: 645 B |
BIN
Themes/default/images/awards/pinan2.gif
Normal file
After Width: | Height: | Size: 771 B |
BIN
Themes/default/images/awards/pvper.png
Normal file
After Width: | Height: | Size: 3.7 KiB |
BIN
Themes/default/images/awards/python.png
Normal file
After Width: | Height: | Size: 6.3 KiB |
BIN
Themes/default/images/awards/redstone_engineer.png
Normal file
After Width: | Height: | Size: 4.3 KiB |
BIN
Themes/default/images/awards/santabulbasaur.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
Themes/default/images/awards/santapika.gif
Normal file
After Width: | Height: | Size: 670 B |
BIN
Themes/default/images/awards/scarcup.gif
Normal file
After Width: | Height: | Size: 697 B |
BIN
Themes/default/images/awards/scarmod.gif
Normal file
After Width: | Height: | Size: 779 B |
BIN
Themes/default/images/awards/simba.gif
Normal file
After Width: | Height: | Size: 1.8 KiB |
BIN
Themes/default/images/awards/sotw.png
Normal file
After Width: | Height: | Size: 5.4 KiB |
BIN
Themes/default/images/awards/spleef.png
Normal file
After Width: | Height: | Size: 6.2 KiB |
BIN
Themes/default/images/awards/squirtle.gif
Normal file
After Width: | Height: | Size: 765 B |
BIN
Themes/default/images/awards/srldev.gif
Normal file
After Width: | Height: | Size: 797 B |
BIN
Themes/default/images/awards/srldevold.gif
Normal file
After Width: | Height: | Size: 800 B |
BIN
Themes/default/images/awards/togepi.gif
Normal file
After Width: | Height: | Size: 692 B |
BIN
Themes/default/images/awards/tutauth.png
Normal file
After Width: | Height: | Size: 4.1 KiB |
BIN
Themes/default/images/awards/valentinemscpmod.png
Normal file
After Width: | Height: | Size: 5.7 KiB |
BIN
Themes/default/images/awards/valentinepika.gif
Normal file
After Width: | Height: | Size: 739 B |
BIN
Themes/default/images/awards/vulpex.gif
Normal file
After Width: | Height: | Size: 857 B |
BIN
Themes/default/images/awards/yohelp.png
Normal file
After Width: | Height: | Size: 5.8 KiB |