MyBB Community Forums

Full Version: OUGC Unlocked Content Log
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
[Image: cover_preview_25096_1592979055_a0b96bd11...452d27.png]

Description
Display unlocked content list in UserCP and ModCP for the Hide Content and OUGC Lock plugins.

Download
Download from the MyBB Extend page.

Check the official page for more information.
helps you keep track of what you have unlocked Big Grin
Wow...Worked Perfectly.
Thanks Omar G.
Repped.

I can not found unlocked content log in mod CP.

I added <!--OUGC_UNLOCKED_CONTENT_LOG--> in modcp_nav template and it works.
Omar G.you missed that code to be placed in modcp templates.
(2020-06-24, 12:28 PM)Dr_The_One Wrote: [ -> ]I added <!--OUGC_UNLOCKED_CONTENT_LOG--> in modcp_nav template and it works.
Omar G.you missed that code to be placed in modcp templates.

Hi.

The string is meant to be added during activation:
https://github.com/Sama34/OUGC-Unlocked-...n.php#L126

It was probably not added to your custom template for some reason.
No it is not added while activation. I have no any custom templates.
I don't know much more. But I have to add manually to work.
Hello, I got MyBB Internal Error after install & activate this plugin.

Error Type:
Catchable Fatal Error (4096)

Error Message:
Argument 1 passed to OUGCUnlockedContentLog\Core\addHooks() must be an instance of OUGCUnlockedContentLog\Core\string, string given, called in inc/plugins/ougc_unlocked_content_log.php on line 49 and defined

Location:
File: inc/plugins/ougc_unlocked_content_log/core.php
Line: 67

Code:
64.    }
65. }
66.
67. function addHooks(string $namespace)
68. {
69.    global $plugins;
70.

[attachment=43986]

MyBB version 1.8.26
PHP Version 5.6.40

Will this be the php version problem? I saw you in another post said that some of your plugins needed higher than PHP 7.0 version.

I used phan to check the compatible between PhP 5 and 7.
And it showed that "In PHP 5.6, scalar types such as string in type signatures are treated like class names"
, and this line "function addHooks(string $namespace)" is the only compatible problem that phan had detected.
Is it possible to adjust this line to PHP5 format so that the whole plugin might be worked in PHP5 system?
Most likely, find the following:
https://github.com/Sama34/OUGC-Unlocked-...re.php#L67

Change to:
function addHooks($namespace)

It might be possible that you find these problems across my plugins or plugins from different authors so I would suggest to update your PHP version.
(2021-04-06, 03:22 AM)Omar G. Wrote: [ -> ]Most likely, find the following:
https://github.com/Sama34/OUGC-Unlocked-...re.php#L67

Change to:
function addHooks($namespace)

It might be possible that you find these problems across my plugins or plugins from different authors so I would suggest to update your PHP version.

It worked!
Also "OUGC Points Activity Rewards" and "OUGC Coupon Rewards" and be used in PHP 5 system by changing that line in their core.php.

Yeah, I also hope my PHP version can be updated to 7. But the NAS company didn't support the new  firmware with PHP 7. They wanted us to buy a new product. And it is ridiculous to purchase a new NAS just to be able to update PHP version...

That's the reason I am looking for an alternative way to use those PHP 7 plugins. Fortunately they can be worked with just a little change in PHP 5 system.