SimR
November 4, 2020, 9:22pm
1
Hi,
Im new here so if this is the wrong place I apologise in advance, I just tried to install the popupnews plugin for my va via the plugin manager for the iCrewLite skin and followed the installation manual and the the plugin works locally but when deploying it live I get this problem showing,
Parse error: syntax error, unexpected ‘[’, expecting ‘)’ in lib/skins/iCrewLITE/popupnews/popupnews_list.php on line 17
and it completely destroys the dashboard but when I disable it the styling comes back as intended.
any ideas what I have to change to make it work?
Thank you in advance.
Have a nice evening.
Post line 17 from lib/skins/iCrewLITE/popupnews/popupnews_list.php
SimR
November 4, 2020, 9:55pm
3
11 minutes ago, ProAvia said:
Post line 17 from lib/skins/iCrewLITE/popupnews/popupnews_list.php
Hi ProAvia
<li><?php
foreach($news as $item) {
}
$hashtag_string = str_replace([‘!’, ‘\’, ‘/’, ‘*’, ’ ‘], ‘’,$item->subject); // Line 17 in the file
$lowercase = strtolower($hashtag_string);
echo ‘<a href="’.SITE_URL.’/index.php/PopUpNews/popupnewsitem/‘.$item->id.’"><font color=“white”>#‘.$lowercase.’</font></a>';
$posted_month = date(m, $item->postdate);
$current_month = date(‘m’);
if($posted_month == $current_month)
{
echo ‘<span class=“pull-right”>
<i class=“material-icons”>trending_up</i>
</span>’;
}
else
{
‘’;
}
?></li>
this is the code and I posted the function and highlighted the line 17.
it works fine locally but not live.
ProAvia
November 4, 2020, 11:25pm
4
Save a copy of popupnews_list.php first, then
replace
$hashtag_string = str_replace([‘!’, ‘\’, ‘/’, ‘*’, ’ '], ‘’,$item->subject); // Line 17 in the file
with
$hashtag_string = str_replace(‘[’!', ‘\’, ‘/’, ‘*’, ’ ‘]’, ‘’,$item->subject); // Line 17 in the file
or
$hashtag_string = str_replace((‘!’, ‘\’, ‘/’, ‘*’, ’ '), ‘’,$item->subject); // Line 17 in the file
And see if that resolves it or not. I don’t use that skin and my popupnews_list file is slightly different. Maybe has a fix.
SimR
November 6, 2020, 11:31pm
5
On 11/5/2020 at 12:25 AM, ProAvia said:
Save a copy of popupnews_list.php first, then
replace
$hashtag_string = str_replace([‘!’, ‘\’, ‘/’, ‘*’, ’ '], ‘’,$item->subject); // Line 17 in the file
with
$hashtag_string = str_replace(‘[’!', ‘\’, ‘/’, ‘*’, ’ ‘]’, ‘’,$item->subject); // Line 17 in the file
or
$hashtag_string = str_replace((‘!’, ‘\’, ‘/’, ‘*’, ’ '), ‘’,$item->subject); // Line 17 in the file
And see if that resolves it or not. I don’t use that skin and my popupnews_list file is slightly different. Maybe has a fix.
Hi,
thank you for the suggestion but it didn’t work for me but I changed skin to suit my va’s styling a bit more.
have a nice weekend and I appreciate your time