Simple Awards System

Started by Windy, November 14, 2006, 09:01:54 PM

Previous topic - Next topic

Paracelsus

Quote from: Save on August 20, 2009, 02:05:49 PM
I have a problem.. 

when i see PROFILE it's show error like this..


Fatal error: Cannot redeclare template_awards() (previously declared in C:\AppServ\www\sgcp\webboard\Sources\Load.php(1994) : eval()'d code:2273) in C:\AppServ\www\sgcp\webboard\Sources\Load.php(1994) : eval()'d code on line 2425

if somebody know how to repair please help me..  :'(


ps. sorry for my english..

I'm getting a similar error... Windy, any clue about this?

Windy

Quote from: Paracelsus on February 01, 2010, 12:56:35 PM
Quote from: Save on August 20, 2009, 02:05:49 PM
I have a problem.. 

when i see PROFILE it's show error like this..


Fatal error: Cannot redeclare template_awards() (previously declared in C:\AppServ\www\sgcp\webboard\Sources\Load.php(1994) : eval()'d code:2273) in C:\AppServ\www\sgcp\webboard\Sources\Load.php(1994) : eval()'d code on line 2425

if somebody know how to repair please help me..  :'(


ps. sorry for my english..

I'm getting a similar error... Windy, any clue about this?
This usually indicates that its been installed more than once, template_awards is declared in Profile.template.php somewhere near the end, I would recommend removing the top most one.  If you run into any more issues I would suggest going to the page for this mod and get the manual install instructions for the version you're using and check to see if things have doubled up elsewhere.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

HodikA

sorry bro but it can installed in my smf. i have 1.1.11 and it say that package is too <big> for my smf.

Paracelsus

Quote from: Windy on February 01, 2010, 05:55:10 PM
Quote from: Paracelsus on February 01, 2010, 12:56:35 PM
Quote from: Save on August 20, 2009, 02:05:49 PM
I have a problem.. 

when i see PROFILE it's show error like this..


Fatal error: Cannot redeclare template_awards() (previously declared in C:\AppServ\www\sgcp\webboard\Sources\Load.php(1994) : eval()'d code:2273) in C:\AppServ\www\sgcp\webboard\Sources\Load.php(1994) : eval()'d code on line 2425

if somebody know how to repair please help me..  :'(


ps. sorry for my english..

I'm getting a similar error... Windy, any clue about this?
This usually indicates that its been installed more than once, template_awards is declared in Profile.template.php somewhere near the end, I would recommend removing the top most one.  If you run into any more issues I would suggest going to the page for this mod and get the manual install instructions for the version you're using and check to see if things have doubled up elsewhere.

Absolutely right... corrected it and now the mod is working perfectly. Tkx.

winloze99

There is one thing i miss with this.
Admin should be able to upload Awards so the users got a list of useable awards.

I belive the users dosent take the time to open a picture in a gfx soft and resize it to the size Admin has set.

Please make it this way.

Admin can upload awards to the server, then the user can use them or take the time to convert own picture and then upload it. Maybe the users Award should be in a specific folder, and the script could take them and add to the Award list.
I hope you know what i mean.

becometa

Quote from: winloze99 on February 04, 2010, 06:08:51 PM
There is one thing i miss with this.
Admin should be able to upload Awards so the users got a list of useable awards.

I belive the users dosent take the time to open a picture in a gfx soft and resize it to the size Admin has set.

Please make it this way.

Admin can upload awards to the server, then the user can use them or take the time to convert own picture and then upload it. Maybe the users Award should be in a specific folder, and the script could take them and add to the Award list.
I hope you know what i mean.

Yep, if this has been added mod will be completly best.
Windy, if you can add this to new wersion, it will be great!  :)

Bugo

Please add the ability to disable the output text "Awards:" (see first attachment).
Example find block in file Display.template.php:
// Any custom fields for standard placement?
if (!empty($message['member']['custom_fields']))
{
foreach ($message['member']['custom_fields'] as $custom)
if (empty($custom['placement']) || empty($custom['value']))
echo '
<li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
}

and replace it:
// Any custom fields for standard placement?
if (!empty($message['member']['custom_fields']))
{
foreach ($message['member']['custom_fields'] as $custom)
if (empty($custom['placement']) || empty($custom['value']))
{
if ($custom['title'] != $txt['awards'])
echo '
<li class="custom">', $custom['value'], '</li>';
else
echo '
<li class="custom">', $custom['title'], ': ', $custom['value'], '</li>';
}
}


And I would like to be able to show the rewards over the signature (see second attachment).

Windy

Adding an option of that nature to me would add extra overhead and I haven't seen any demand for it.

for both things i believe you would have to modify display.php, search for 'title' => 'Awards' if you don't know where to find the related code and where placement is replace false with 1 for the first thing, or 2 for the second.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

Bugo

I tried to do as you suggested...

For the one case the description "Awards" disappears, but remains a colon (":").

For the second case awards placed under the profile and above the signature. But I want them to have been ONLY under the signature.

Windy

Have you made any changes to the theme at all? AFAIK it shouldn't be doing that.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

Bugo

I tested it on a freshly installed forum, without other mods.

Windy

I've tested it and I'm not experiencing the same issues that you getting.
Would you be able to post an excerpt from your display template specifically the section under
// Any custom fields for standard placement?

And also from the display source file, the contents of this if statement
if(!empty($modSettings['award_show_display']) && !empty($memberContext[$message['id_member']]['awards']) && empty($memberContext[$message['id_member']]['custom_fields']['awards']))
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

Bugo

You don't understand. I do not complain about the mistakes, I just wonder if I realize that laid out above, in the screenshots :) For example, I want does not display the label "Awards" before awards. Or that the awards were not under the avatar, and under the signature of the user. So I ask you, how it can be done. And maybe you can even add this option in a future version of the mod.

Windy

Well then it's as I said before.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

tbk22

I started using this theme and it seems great... Now I have a few questions for you...

Could you allow me to translate it to portuguese? just need to give me the files to translate and i will do it...

And other thing... Is it possible to show a  statistics of members with more awards  or sort them in the member list?
=)

Windy

Quote from: tbk22 on February 13, 2010, 05:16:58 AM
I started using this theme and it seems great... Now I have a few questions for you...

Could you allow me to translate it to portuguese? just need to give me the files to translate and i will do it...

And other thing... Is it possible to show a  statistics of members with more awards  or sort them in the member list?
Sure, feel free to translate it, you can find the strings in Modifications.english.php in the language directory.

Secondly, it would be possible, how it's done will depend on the version of smf you're using.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

KensonPlays

Is there a way to make it so you could use a URL for the award image? That way I could make a dir on my site and use that to award users easier!

Owner of Mesozoic Haven

Windy

Quote from: Kcmartz on February 16, 2010, 01:49:30 AM
Is there a way to make it so you could use a URL for the award image? That way I could make a dir on my site and use that to award users easier!
It's possible, but it would require a fair amount of code modification.
All unsolicited PM's will be ignored.  Any support requests should go in their topics.

My Mods


Image Zoom Tag
Image Quote Removal
Color Picker
Additional Polls
Simple Awards System

Mods are only updated to the latest same major version of smf on request.

KensonPlays

Oh. Then I might have to wait for another mod for awards... and uninstall this one on my forum...

Owner of Mesozoic Haven

Bugo

Russian translation:

// Simple Awards Mod
$txt['awards_for'] = 'Награды для ';
$txt['awards'] = 'Награды';
$txt['showAwards'] = 'Показать награды';
$txt['award_add'] = 'Добавить награду';
$txt['award_add_button'] = 'Добавить';
$txt['award_max_height'] = 'Максимальная высота награды<div class="smalltext" style="font-weight: bold">(0 — без ограничений)</div>';
$txt['award_max_width'] = 'Максимальная ширина награды<div class="smalltext" style="font-weight: bold">(0 — без ограничений)</div>';
$txt['award_limit'] = 'Лимит на кол-во отображаемых наград в сообщениях<div class="smalltext" style="font-weight: bold">(0 — без ограничений)</div>';
$txt['award_show_display'] = 'Показывать награды в сообщениях';
$txt['award_file_types'] = 'Типы файлов изображений, допустимых для загрузки в качестве иконок наград<div class="smalltext" style="font-weight: bold">(разделяются запятыми)</div>';
$txt['awards_per_page'] = 'Кол-во наград, отображаемых в профиле пользователя';
$txt['award_image'] = 'Картинка';
$txt['award_no_exist'] = 'Награда, которую Вы пытаетесь удалить, не существует.';
$txt['awards_no_write'] = 'Директория для загрузки наград не имеет прав на запись. Поэтому награда не может быть сохранена.';
$txt['award_timeout'] = 'Награда не была сохранена. Это могло произойти из-за того, что размер файла изображения превысил максимальный размер, установленный сервером.<br /><br />Пожалуйста, проконсультируйтесь с администратором для получения дополнительной информации.';
$txt['award_title'] = 'Заголовок награды';
$txt['cannot_give_awards'] = 'У Вас нет привилегий на выдачу наград.';
$txt['no_awards'] = 'У Вас нет наград';
$txt['permissionname_give_awards'] = 'Вручение наград';
$txt['permissionhelp_give_awards'] = 'Разрешить пользователям вручать награды друг другу.';
$txt['profile_error_award_large_image'] = 'Размеры предоставленного изображения не соответствуют установленному лимиту (' . $modSettings['award_max_width'] . 'x' . $modSettings['award_max_height'] . ')';
$txt['profile_error_award_invalid_image'] = 'Предоставленное изображение имеет неправильный формат';
$txt['profile_error_award_invalid_type'] = 'Предоставленное изображение не относится к допустимому типу наград (должно быть одним из ' . $modSettings['award_file_types'] . ')';
$txt['profile_error_award_no_title'] = 'Не указан заголовок для выдаваемой награды';
$txt['award_list_title'] = 'Заголовок';
$txt['award_list_given_date'] = 'Дата вручения';
$txt['award_list_given_by'] = 'Кем выдана';
$txt['award_list_icon'] = 'Значок';
$txt['mods_cat_modifications_award'] = 'Мод наград';


And replace it in file modification2.xml:
$memberContext[$message['id_member']]['custom_fields']['awards'] = array(
'title' => 'Awards',
'value' => '<br/><span class="awards">' . $award_str . '</span>',
'placement' => false,
);

on this:
$memberContext[$message['id_member']]['custom_fields']['awards'] = array(
'title' => $txt['awards'],
'value' => '<br/><span class="awards">' . $award_str . '</span>',
'placement' => false,
);

Advertisement: