Problem z pluginem instalacja dvz_stream

Założony przez  DaFi.

Witaj problem jest taki 

Parse error: syntax error, unexpected ':', expecting '{' in /home/p507136/public_html/fabryka-skilla.pl/inc/plugins/dvz_stream/core.php on line 5

czy ktoś mógby naprawić to 
<?php



namespace dvzStream;



function defaultFormatHandler(StreamEvent $streamEvent): string

{

   global $mybb;



   $event = [];



   $user = $streamEvent->getUser();



   $event['id'] = $streamEvent->getId();

   $event['stream_name'] = \htmlspecialchars_uni($streamEvent->getStream()->getName());

   $event['title'] = $streamEvent->getStream()->getEventTitle();

   $event['date'] = \my_date($mybb->settings['dateformat'], $streamEvent->getDate(), null, true) . ', ' . \my_date($mybb->settings['timeformat'], $streamEvent->getDate(), null, true);

   $event['user_associated'] = $user ? 1 : 0;

   $event['user'] = $user

       ? \build_profile_link(\format_name($user['username'], $user['usergroup'], $user['displaygroup']), $user['id'])

       : null;

   $event['user_avatar_url'] = \format_avatar($user['avatar'])['image'];

   $event['location'] = $streamEvent->getLocation()

       ? $streamEvent->getLocation() . ($streamEvent->getItem() ? ' &rarr; ' : null)

       : null;

   $event['item'] = $streamEvent->getItem()

       ? $streamEvent->getItem()

       : null;



   if ($event['user_avatar_url']) {

       eval('$event[\'user_avatar\'] = "' . tpl('event_user_avatar') . '";');

   } else {

       $event['user_avatar'] = null;

   }



   $eventDetails = null;

   $eventAppendix = null;



   foreach ($streamEvent->getStream()->getPostFormatHandlers() as $handler) {

       $handler($streamEvent, $event, $eventDetails, $eventAppendix);

   }



   $templateName = $streamEvent->getStream()->getCustomTemplateName() ?? 'event';



   eval('$html = "' . tpl($templateName) . '";');



   return $html;

}



function getFormattedEvents(array $streamEvents)

{

   $html = null;



   foreach ($streamEvents as $streamEvent) {

       foreach ($streamEvent->getStream()->getProcessHandlers() as $handler) {

           $handler($streamEvent);

       }



       if ($handler = $streamEvent->getStream()->getCustomFormatHandler()) {

           $html .= $handler();

       } else {

           $html .= defaultFormatHandler($streamEvent);

       }



       foreach ($streamEvent->getStream()->getPostProcessHandlers() as $handler) {

           $handler($streamEvent);

       }

   }



   return $html;

}



function javascript(string $location, array $streamPointers)

{

   global $mybb;



   $html = null;



   if ($streamPointers) {

       $limit = (int)getSettingValue('limit_' . $location);



       $attributes = [

           'interval' => canUpdate() ? (float)getSettingValue('interval_' . $location) : 0,

           'limit' => (int)$limit,

           'items' => (int)$limit,

           'lazyMode' => in_array(getSettingValue('lazyload'), ['off', 'start', 'always']) ? getSettingValue('lazyload') : 'off',

       ];



       $attributesString = null;



       foreach ($attributes as $name => $value) {

           $attributesString .= ' data-' . $name . '="' . $value . '"';

       }



       $streamPointersEncoded = json_encode(

           array_combine(

               array_map('\htmlspecialchars_uni', array_keys($streamPointers)),

               array_values($streamPointers))

       );



       $html .= '<script src="' . $mybb->asset_url . '/jscripts/dvz_stream.js" async defer' . $attributesString . '></script>' . PHP_EOL;

       $html .= '<script type="application/json" id="dvz_stream_streamPointers">' . $streamPointersEncoded . '</script>';

   }



   return $html;

}



// stream handling

function addStream(Stream $stream)

{

   global $dvzStreamStreams;



   $dvzStreamStreams[ $stream->getName() ] = $stream;

}



function loadActiveStreams()

{

   $streamNames = getActiveStreamNames();



   foreach ($streamNames as $streamName) {

       include_once MYBB_ROOT . 'inc/plugins/dvz_stream/streams/' . pathinfo($streamName, PATHINFO_FILENAME) . '.php';

   }

}



function getStreamEventsWithPointers(array $streamEventIdPointers = null, int $limit = null): array

{

   global $mybb, $dvzStreamStreams;



   $streamEvents = [];



   loadActiveStreams();



   // get all streams

   if ($streamEventIdPointers === null) {

       $streamEventIdPointers = array_fill_keys(array_keys($dvzStreamStreams), 0);

   }



   foreach ($streamEventIdPointers as $streamName => $lastEventId) {



       if (isset($dvzStreamStreams[$streamName])) {



           $localStreamEvents = fetchStreamEvents($streamName, $limit, $lastEventId);



           if ($localStreamEvents) {

               $streamEventIdPointers[$streamName] = $localStreamEvents[0]->getId();

           }



           $streamEvents = array_merge($streamEvents, $localStreamEvents);

       }



   }



   // sort descending

   usort($streamEvents, function ($a, $b) {

       return $b->getDate() - $a->getDate();

   });



   // limit items

   $streamEvents = array_slice($streamEvents, 0, $limit);



   return [

       'streamEventIdPointers' => $streamEventIdPointers ?? [],

       'streamEvents' => $streamEvents,

   ];

}



function fetchStreamEvents(string $streamName, int $limit, int $lastEventId = null): array

{

   global $dvzStreamStreams;



   $streamEvents = $dvzStreamStreams[$streamName]->getFetchHandler()($limit, $lastEventId);



   return $streamEvents;

}



function getActiveStreamNames(): array

{

   return getCsvSettingValues('active_streams');

}



// permissions

function canView(): bool

{

   $array = getCsvSettingValues('groups_view');



   return (isset($array[0]) && $array[0] == -1) || \is_member($array);

}



function canUpdate(): bool

{

   $array = getCsvSettingValues('groups_update');



   return (isset($array[0]) && $array[0] == -1) || \is_member($array);

}



function getInaccessibleForumIds(): array

{

   global $mybb, $cache;



   $ids = [];



   $forums = $cache->read('forums');

   $forumPermissions = $cache->read('forumpermissions');



   foreach ($forums as $fid => $forumData) {

       $localForumPermissions = $forumPermissions[ $fid ];



       $permissions = [
           'canview' => false,
           'canviewthreads' => false,
           'canonlyviewownthreads' => null, // any "false" supersedes "true"
       ];



       $groups = array_merge([$mybb->user['usergroup']], explode(',', $mybb->user['additionalgroups']));



       foreach ($groups as $gid) {

           if (isset($localForumPermissions[ $gid ])) {

               // get forum-specific group permissions

               $groupPermissions = $localForumPermissions[ $gid ];

           } else {

               // default to global group permissions

               $groupPermissions = $cache->read('usergroups')[ $gid ];

           }



           if ($groupPermissions['canview']) {

               $permissions['canview'] = true;

           }



           if ($groupPermissions['canviewthreads']) {

               $permissions['canviewthreads'] = true;

           }



           if ($groupPermissions['canonlyviewownthreads']) {

               if ($permissions['canonlyviewownthreads'] == null) {

                   $permissions['canonlyviewownthreads'] = true;

               }

           } else {

               $permissions['canonlyviewownthreads'] = false;

           }

       }



       if (!$permissions['canview'] || !$permissions['canviewthreads']) {

           $ids[] = $fid;

       }



       if ($permissions['canonlyviewownthreads']) {

           $ids[] = $fid;

       }

   }



   return $ids;

}



// common

function getSettingValue(string $name): string

{

   global $mybb;

   return $mybb->settings['dvz_stream_' . $name] ?? null;

}



function getCsvSettingValues(string $name): array

{

   global $mybb;



   return array_filter(explode(',', getSettingValue($name)));

}



function loadTemplates(array $templates, string $prefix = null)

{

   global $templatelist;



   if (!empty($templatelist)) {

       $templatelist .= ',';

   }

   if ($prefix) {

       $templates = preg_filter('/^/', $prefix, $templates);

   }



   $templatelist .= implode(',', $templates);

}



function tpl(string $name)

{

   global $templates;



   if (DEVELOPMENT_MODE) {

       return str_replace(

           "\\'",

           "'",

           addslashes(

               file_get_contents(MYBB_ROOT . 'inc/plugins/dvz_stream/templates/' . $name . '.tpl')

           )

       );

   } else {

       return $templates->get('dvzstream_' . $name);

   }

}
Szogi1910 napisał 27.06.2017, 16:56:
Nazwa tematu powinna być krótkim opisem problemu, popraw ją i zapoznaj się z Zapoznaj się z i popraw stopkę forum.
        Jak mam poprawić stópkę jak ona cały czas jest taka sama jak ma być i jest napisane ze tłumaczył mybb ?

wystaczy kliknąć + i wszystko sie ma :D
No to chyba każdy patrzy na inne forum ;)
Widzisz tu gdzieś stopkę o naszym tłumaczeniu? Bo ja nie.
   
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
musisz miec takie cos jak widzisz < stopke      pierw trzeba w to białe kliknąć potem pokazuje sie stópka     
ukryta czyli niewidoczna, popraw stopkę tak aby była widoczna bez żadnych działań
(27.06.2017, 17:47)Patryk Stefański napisał(a): ukryta czyli niewidoczna, popraw stopkę tak aby była widoczna bez żadnych działań
to nie moja winna ze stópka jest ukryta tylko autora stylu ze tak kijowo zrobił :D
To bądź mądrzejszy niż autor i nie ukrywaj stopki ;)
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
(27.06.2017, 17:55)Conors napisał(a): To bądź mądrzejszy niż autor i nie ukrywaj stopki ;)
juz poprawiłem mozna sprawdzić

to teraz ktoś mi pomoże ? jak poprawiłem ta stópke ?
Zmień wersję PHP na 7.0 lub wyższą ;)
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.
(27.06.2017, 18:00)Conors napisał(a): Zmień wersję PHP na 7.0 lub wyższą ;)
a jest jakiś podobny plugin do tego co potrzebuje wersje php 5.5 ?
Wersję php możesz ustawić, różną na poszczególne katalogi, pokaż nam swój plik htaccess
Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]

<IfModule mod_env.c>
SetEnv SEO_SUPPORT 1
</IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/html application/xhtml+xml text/xml application/xml text/plain text/x-component application/javascript application/x-javascript application/rss+xml application/atom+xml application/json application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject application/font-sfnt application/font-woff application/font-woff2 image/svg+xml image/x-icon
</IfModule>

# Note: You are able to choose a different name in the Admin CP. If you've done that you need to change it here too
<Files "error.log">
Order Deny,Allow
Deny from all
</Files>

Mam Nadzieje ze o to ci chodzi . ale ja wersje 5.5 potrzebuje bo mam zainstalowany na niej sklep . ktory na wiekszej wersji nie dziala
Options -MultiViews +FollowSymlinks -Indexes

#
# If mod_security is enabled, attempt to disable it.
# - Note, this will work on the majority of hosts but on
#   MediaTemple, it is known to cause random Internal Server
#   errors. For MediaTemple, please remove the block below
#
<IfModule mod_security.c>
# Turn off mod_security filtering.
SecFilterEngine Off

# The below probably isn't needed, but better safe than sorry.
SecFilterScanPOST Off
</IfModule>

#
# MyBB "search engine friendly" URL rewrites
# - Note, for these to work with MyBB please make sure you have
#   the setting enabled in the Admin CP and you have this file
#   named .htaccess
#
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteRule ^forum-([0-9]+)\.html$ forumdisplay.php?fid=$1 [L,QSA]
RewriteRule ^forum-([0-9]+)-page-([0-9]+)\.html$ forumdisplay.php?fid=$1&page=$2 [L,QSA]

RewriteRule ^thread-([0-9]+)\.html$ showthread.php?tid=$1 [L,QSA]
RewriteRule ^thread-([0-9]+)-page-([0-9]+)\.html$ showthread.php?tid=$1&page=$2 [L,QSA]
RewriteRule ^thread-([0-9]+)-lastpost\.html$ showthread.php?tid=$1&action=lastpost [L,QSA]
RewriteRule ^thread-([0-9]+)-nextnewest\.html$ showthread.php?tid=$1&action=nextnewest [L,QSA]
RewriteRule ^thread-([0-9]+)-nextoldest\.html$ showthread.php?tid=$1&action=nextoldest [L,QSA]
RewriteRule ^thread-([0-9]+)-newpost\.html$ showthread.php?tid=$1&action=newpost [L,QSA]
RewriteRule ^thread-([0-9]+)-post-([0-9]+)\.html$ showthread.php?tid=$1&pid=$2 [L,QSA]

RewriteRule ^post-([0-9]+)\.html$ showthread.php?pid=$1 [L,QSA]

RewriteRule ^announcement-([0-9]+)\.html$ announcements.php?aid=$1 [L,QSA]

RewriteRule ^user-([0-9]+)\.html$ member.php?action=profile&uid=$1 [L,QSA]

RewriteRule ^calendar-([0-9]+)\.html$ calendar.php?calendar=$1 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)\.html$ calendar.php?calendar=$1&year=$2&month=$3 [L,QSA]
RewriteRule ^calendar-([0-9]+)-year-([0-9]+)-month-([0-9]+)-day-([0-9]+)\.html$ calendar.php?action=dayview&calendar=$1&year=$2&month=$3&day=$4 [L,QSA]
RewriteRule ^calendar-([0-9]+)-week-(n?[0-9]+)\.html$ calendar.php?action=weekview&calendar=$1&week=$2 [L,QSA]

RewriteRule ^event-([0-9]+)\.html$ calendar.php?action=event&eid=$1 [L,QSA]
AddType application/x-httpd-php71 .php




<IfModule mod_env.c>
SetEnv SEO_SUPPORT 1
</IfModule>
</IfModule>

#
# If Apache is compiled with built in mod_deflade/GZIP support
# then GZIP Javascript, CSS, HTML and XML so they're sent to
# the client faster.
#
<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/css text/html application/xhtml+xml text/xml application/xml text/plain text/x-component application/javascript application/x-javascript application/rss+xml application/atom+xml application/json application/manifest+json application/x-web-app-manifest+json application/vnd.ms-fontobject application/font-sfnt application/font-woff application/font-woff2 image/svg+xml image/x-icon
</IfModule>

# Note: You are able to choose a different name in the Admin CP. If you've done that you need to change it here too
<Files "error.log">
Order Deny,Allow
Deny from all
</Files>
Prośby na PW dotyczące wsparcia z problemami będą ignorowane. Pomoc poza forum - odpłatna.



Użytkownicy przeglądający ten wątek:

1 gości