MyBB Community Forums

Full Version: DVZ Stream 2.2
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
(2020-04-16, 10:49 PM)Devilshakerz Wrote: [ -> ]
(2020-04-16, 10:25 PM)makpaolo Wrote: [ -> ]What would be the best way to update DVZ Stream without uninstalling/losing edited contents?

Try deactivating, overwriting files and activating again (which updates settings), then updating CSS and templates manually from new files (stylesheets/, templates/ in the plugin's directory).

Worked great. One thing that went away was the time it showed in the stream from "Minutes/Hours ago" to "Today 0:00". Not sure which file I should look in to fix that back to how it was.
(2020-04-18, 03:57 AM)makpaolo Wrote: [ -> ]One thing that went away was the time it showed in the stream from "Minutes/Hours ago" to "Today 0:00". Not sure which file I should look in to fix that back to how it was.

Try changing line inc/plugins/dvz_stream/core.php:18:
$event['date'] = \my_date($mybb->settings['dateformat'], $streamEvent->getDate(), null, true) . ', ' . \my_date($mybb->settings['timeformat'], $streamEvent->getDate(), null, true);
to:
$event['date'] = \my_date('relative', $streamEvent->getDate());
(2020-04-18, 01:09 PM)Devilshakerz Wrote: [ -> ]
(2020-04-18, 03:57 AM)makpaolo Wrote: [ -> ]One thing that went away was the time it showed in the stream from "Minutes/Hours ago" to "Today 0:00". Not sure which file I should look in to fix that back to how it was.

Try changing line inc/plugins/dvz_stream/core.php:18:
$event['date'] = \my_date($mybb->settings['dateformat'], $streamEvent->getDate(), null, true) . ', ' . \my_date($mybb->settings['timeformat'], $streamEvent->getDate(), null, true);
to:
$event['date'] = \my_date('relative', $streamEvent->getDate());

Yep that was all! Thanks
Hey there, I got an error on activation - not sure if this is code related or something I can fix... plugin looks really nice though!

2020/04/19 19:40:59 [error] 15545#15545: *1209 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught TypeError: Return value of dvzStream\getSettingValue() must be of the type string, null returned in {removed}/{removed}/inc/plugins/dvz_stream/core.php:268
Stack trace:
#0 {removed}/{removed}/inc/plugins/dvz_stream/core.php(275): dvzStream\getSettingValue()
#1 {removed}/{removed}/inc/plugins/dvz_stream/core.php(230): dvzStream\getCsvSettingValues()
#2 {removed}/{removed}/inc/plugins/dvz_stream/hooks_frontend.php(11): dvzStream\canView()
#3 {removed}/{removed}/inc/class_plugins.php(142): dvzStream\global_start()
#4 {removed}/{removed}/global.php(100): pluginSystem->run_hooks()
#5 {removed}/{removed}/index.php(18): require_once('{removed}...')
#6 {main}
  thrown in {removed}/{removed}/inc/plugins/dvz_stream/core.php on line 268" while reading response header from upstream, client: xx.xx.xx.xx, server: {removed}.{removed}, request: "GET / HTTP/2.0", upstream: "fastcgi://unix:/run/php/php7.4-fpm.sock:", host: "{removed}.{removed}"
(2020-04-19, 07:46 PM)Downfall Wrote: [ -> ]Hey there, I got an error on activation - not sure if this is code related or something I can fix... plugin looks really nice though!

Looks like a setting cannot be found - does the board have 10 settings for DVZ Stream after installation? Does the same happen after saving settings again in the ACP?
How can I set a maximum length for titles?
I upgraded the plugin to the latest version but now the stream shows all new posts to all members, even posts in subforums which they shouldn't be allowed to see. How can I get back the functionality of only posts you are allowed to see showing in the stream?
(2020-09-12, 03:05 PM)amanda_2011 Wrote: [ -> ]I upgraded the plugin to the latest version but now the stream shows all new posts to all members, even posts in subforums which they shouldn't be allowed to see. How can I get back the functionality of only posts you are allowed to see showing in the stream?

It looks like permissions may be checked incorrectly on the index page (https://github.com/mybb/mybb/issues/4142).

Try either removing/commenting out this line in MyBB's index.php file: https://github.com/mybb/mybb/blob/mybb_1...x.php#L417

or changing the index_end() function in inc/plugins/dvz_stream/hooks_frontend.php to:
function index_end()
{
    global $dvz_stream, $lang, $mybb, $theme, $permissioncache, $forumpermissions;

    // empty $permissioncache on index fix
    if ($permissioncache === ['-1' => '1']) {
        $permissioncache = $forumpermissions;
    }

    $dvz_stream = null;

    $javascript = null;

    if (canView()) {
        $data = getStreamEventsWithPointers(null, getSettingValue('limit_widget'));

        $html = getFormattedEvents($data['streamEvents']);

        $streamPageUrl = $mybb->settings['bburl'] . '/index.php?action=stream';

        if ((float)getSettingValue('interval_widget') > 0 && canUpdate()) {
            $javascript = javascript('widget', $data['streamEventIdPointers']);
        } else {
            $javascript = null;
        }

        eval('$dvz_stream = "' . tpl('widget') . '";');
    }
}

(2020-09-12, 05:11 PM)Devilshakerz Wrote: [ -> ]
(2020-09-12, 03:05 PM)amanda_2011 Wrote: [ -> ]I upgraded the plugin to the latest version but now the stream shows all new posts to all members, even posts in subforums which they shouldn't be allowed to see. How can I get back the functionality of only posts you are allowed to see showing in the stream?

It looks like permissions may be checked incorrectly on the index page (https://github.com/mybb/mybb/issues/4142).

Try either removing/commenting out this line in MyBB's index.php file: https://github.com/mybb/mybb/blob/mybb_1...x.php#L417

or changing the index_end() function in inc/plugins/dvz_stream/hooks_frontend.php to:

I commented out the line in index.php you suggested and it looks like it's working. Thanks!
Would it be possible to add a function to exclude specific threads from the stream? Some threads are being spammed and I'd like to exclude them from the stream.
Pages: 1 2 3 4 5 6