Jump to content

Recommended Posts

Posted

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.

 

 

Posted
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. 

  • Administrators
Posted

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.

Posted
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 :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...