Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

build_dash_tile_list()

Description

@var path is the real ResourceSpace path (regardless if RS is installed under web root or in a subfolder)
Example:
For http://localhost/trunk/pages/edit.php?ref=-[userref]&uploader=plupload the real path is pages/edit.php as
RS handles this via its baseurl when generating absolute paths.

$path = str_replace("{$baseurl}/", "", $link);
$path = str_replace("?{$query}", "", $path);

$link = str_replace($path, "pages/upload_plupload.php", $link);
}

return $link;
}

/
Dash Admin Display Functions

#Build dash listfunction

Parameters

ColumnTypeDefaultDescription
$dtiles_available

Location

include/dash_functions.php lines 1322 to 1408

Definition

 
function build_dash_tile_list($dtiles_available)
    {
    global 
$lang,$baseurl_short,$baseurl;
    foreach(
$dtiles_available as $tile)
          {
          
$checked false;
          if(!empty(
$tile["dash_tile"]))
              {
$checked=true;}

          
$buildstring explode('?',$tile["url"]);
        
parse_str(str_replace("&","&",$buildstring[1]),$buildstring);
          
?>
          <tr id="tile echo $tile["ref"];?> if(isset($buildstring["tltype"]) && $buildstring["tltype"]=="conf") {echo "class=\"conftile\"";} ?>>
              <td>
                  <input 
                      type="checkbox" 
                      class="tilecheck" 
                      name="tiles[]" 
                      value=" echo $tile["ref"];?>
                      onChange="changeTile( echo $tile["ref"];?>, echo $tile["all_users"];?>);"
                       echo $checked?"checked":"";?> 
                  />
              </td>
              <td>
                   
                  
if(isset($buildstring["tltype"]) && $buildstring["tltype"]=="conf" && $buildstring["tlstyle"]!="custm" && $buildstring["tlstyle"]!="pend" && isset($lang[$tile["title"]]))
                      {echo 
htmlspecialchars(i18n_get_translated($lang[$tile["title"]]));}
                  else 
                      {echo 
htmlspecialchars(i18n_get_translated($tile["title"]));}
                  
?>
              </td>
              <td>
                   
                  
if(isset($buildstring["tltype"]) && $buildstring["tltype"]=="conf" && $buildstring["tlstyle"]!="custm" && $buildstring["tlstyle"]!="pend")
                      {
$tile["txt"] = text($tile["title"]);}
                  else if(isset(
$buildstring["tltype"]) && $buildstring["tltype"]=="conf" && $buildstring["tlstyle"]=="pend")
                      {
                    if(isset(
$lang[strtolower($tile['txt'])]))
                        {
                        
$tile['txt'] = htmlspecialchars($lang[strtolower($tile["txt"])]);
                        }
                    else
                        {
                        
$tile['txt'] = htmlspecialchars($tile['txt']);
                        }
                    }
                  
                  if(
strlen($tile["txt"])>75)
                      {
                      echo 
htmlspecialchars(substr(i18n_get_translated($tile["txt"]),0,72)."...");
                      }
                  else
                      {
                      echo 
htmlspecialchars(i18n_get_translated($tile["txt"]));
                      }
                  
?>
              </td>
              <td>
                  <a 
                      href=" echo (mb_strtolower(substr($tile["link"],0,4))=="http")? htmlspecialchars($tile["link"]): $baseurl."/".htmlspecialchars($tile["link"]);?>"
                      target="_blank"
                  >
                       echo htmlspecialchars($lang["dashtilevisitlink"]); ?>
                  </a>
              </td>
              <td> echo $tile["resource_count"]? $lang["yes"]: $lang["no"];?></td>
              <td>
                  
                  
if  (    
                          
$tile["allow_delete"]
                          &&
                          (
                              (
$tile["all_users"] && checkPermission_dashadmin()) 
                              || 
                              (!
$tile["all_users"] && (checkPermission_dashuser() || checkPermission_dashadmin()))
                          )
                      )
                      { 
?>
                      <a href=" echo $baseurl_short?>pages/dash_tile.php?edit= echo $tile['ref'];?>" > echo $lang["action-edit"];?></a>
                      
                      
}
                  
?>
              </td>
          </tr>
          
          
}
      }

This article was last updated 13th July 2020 16:35 Europe/London time based on the source file dated 24th June 2020 14:38 Europe/London time.