SimR Posted November 4, 2020 Report Share Posted November 4, 2020 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. Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted November 4, 2020 Administrators Report Share Posted November 4, 2020 Post line 17 from lib/skins/iCrewLITE/popupnews/popupnews_list.php Quote Link to comment Share on other sites More sharing options...
SimR Posted November 4, 2020 Author Report Share Posted November 4, 2020 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. Quote Link to comment Share on other sites More sharing options...
Administrators ProAvia Posted November 4, 2020 Administrators Report Share Posted November 4, 2020 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 @LeonardIGO4036 has a fix. Quote Link to comment Share on other sites More sharing options...
SimR Posted November 6, 2020 Author Report Share Posted November 6, 2020 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 @LeonardIGO4036 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.