MyBB Community Forums

Full Version: OUGC Awards
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
(2021-04-12, 10:56 PM)Omar G. Wrote: [ -> ]Hi, I think you are correct, please replace your task file with the following:
https://github.com/Sama34/OUGC-Awards/bl...awards.php

68dec49#diff-41d95629128da1b19de4489be9a484c71f349ce2792220d80e10e47a32cb12de

Only difference is this and a similar issue fixed some months ago with the time spend online rule, so simple replace of this file should work for your issue.

Yes, it really fixed the issue! I appreciate your help very much.

(2021-04-12, 10:56 PM)Omar G. Wrote: [ -> ]For anyone interested: The develop branch as a new feature, this new feature allows users to create awards presets that display awards in the selected order in posts and profiles, all managed from the UserCP.

If somebody is willing to test and report back I might release it soon. To use the develop branch, simply follow the official update instructions found in the official page (deactivate -> replace files -> activate). Or simply try in a fresh board before updating your live one.

I am willing to test this new feature because it's really important to allow users to rank their awards.
Otherwise, it seemed so messy when they get a lot of awards.
(2021-04-12, 11:30 PM)timelord Wrote: [ -> ]Hello there! Thanks for this awesome plugin, appreciate your hard work and use your plugins all the time. Just a little suggestion or may be a request to improve/upgrade the plugin further more. It'd be really amazing if we could see the explanation of the award when hovering mouse on it.

Something like this (taken from Simtropolis.com);

[...]

Hope that makes sense to you and hope you can make it happen, it'd be truly wonderful! Thanks in advance!

There should be enough templates and variables within them to style your theme to look similar to this. If you find some lacking feel free to suggest new variables or templates.

It would be nice to style the plugin somehow like that, yes. But for 1.8 I won't be delivering this kind of _superflous_ changes on any of my current plugins. I will see to get more creative when updating my plugins for 1.9, so that it is more intuitive to final users with modern expectations of user experience.

(2021-04-13, 01:28 AM)RealSelf Wrote: [ -> ]I am willing to test this new feature because it's really important to allow users to rank their awards.
Otherwise, it seemed so messy when they get a lot of awards.

Just download from the develop branch and update your setup as noted, the feature should be stable as it was coded on request weeks ago and haven't received reports yet. I did fix one single issue while testing for capturing the attached images.
(2021-04-13, 11:38 PM)Omar G. Wrote: [ -> ]Just download from the develop branch and update your setup as noted, the feature should be stable as it was coded on request weeks ago and haven't received reports yet. I did fix one single issue while testing for capturing the attached images.

There is a parse error as soon as I upload the files.

Parse error: syntax error, unexpected '(' in ../inc/plugins/ougc_awards.php on line 1836
(2021-04-14, 09:01 AM)RealSelf Wrote: [ -> ]There is a parse error as soon as I upload the files.

Parse error: syntax error, unexpected '(' in ../inc/plugins/ougc_awards.php on line 1836

I figure out this may just be another PHP version compatibility issue.

And this time it may be more than just a little adjustment.

line 1836 : "})($presets_cache);"

PHP 5 doesn't understand why ($presets_cache) can be placed here.

The same issue at line 2222: })($_awards) as $award)

and line 2299: })($_awards);

I have to delete these three codes ($presets_cache), ($_awards), ($_awards) to make the plugin work again, but it does not function properly after these moves.
I updated the develop branch, please download again.
(2021-04-18, 01:12 AM)Omar G. Wrote: [ -> ]I updated the develop branch, please download again.

Thank you for your updating! But the problem remains the same.

It seems that PHP5 can not unterstand  ($ xxxxxx) to be placed right after (function).

i.e.
(function {*****})  ($ xxxxxx) 

for PHP5:  PHP Parse error: syntax error, unexpected '('
for PHP7:  No problem.

Sorry to bother you so much.
The develop branch no longer has these anonymous functions, please share the exact lines if you still see errors.

Ideally, you should update to PHP 7.
Nevermind, I just pushed a new commit, please try again.
The plugin finally works!

And here's some reports:

1.There are three warning messages in postbit, profile, private message reading page:
[attachment=44022]
[attachment=44023]
[attachment=44024]

2.This function is working properly.
[attachment=44025]

3."View Presets" exists some problems:
This setting has no effect.
[attachment=44026]

The result of "Set as default" is as follows:
[attachment=44027]


4.And I remember there was a Profile Error before and you have updated the code at:
https://community.mybb.com/thread-227052...pid1346357

But line 2126 in ougc_awards.php remains the old code, I am not sure if it will cause the same problem.
You need to set a preset as default for any preset to be used, so the second image in #3 is how it is meant to work.

Quote:But line 2126 in ougc_awards.php remains the old code, I am not sure if it will cause the same problem.

I pushed a different fix instead.

Regarding the PHP error, open the plugin file, find:
if($awards->query_limit_preset_postbit && is_member($mybb->settings['ougc_awards_presets_groups'], $post))

Add before:
var_dump($post['usergroup'], $post['additionalgroups']);

Then please share what you get printed in your postbit, it seems to me like somehow the $post['additionalgroups'] variable is an array (probably because of other plugin) but it should be a string (which is true in a stock install).
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49