Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
tabWidth option and plugins tooltip
Browse files Browse the repository at this point in the history
tabWidth option now saved as a setting
Plugins show tooltip now on hover via title attribute
  • Loading branch information
mattpass committed Jun 17, 2012
1 parent 21cdcb2 commit 98a08fd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function generateHash($plainText,$salt=null) {
$allowedIPs = 'array("'.str_replace(', ','","',$_POST['allowedIPs']).'")';
$plugins = 'array('.PHP_EOL.' array('.PHP_EOL.' '.str_replace('====================','),'.PHP_EOL.' array(',$_POST['plugins']).'))';
$theme = $_POST['theme'];
$tabWidth = $_POST['tabWidth']*1;

$settingsNew = '$tabsIndent = '.$tabsIndent.';'.PHP_EOL;
$settingsNew .= '$checkUpdates = '.$checkUpdates.';'.PHP_EOL;
Expand All @@ -51,6 +52,7 @@ function generateHash($plainText,$salt=null) {
$settingsNew .= '$allowedIPs = '.$allowedIPs.';'.PHP_EOL;
$settingsNew .= '$plugins = '.$plugins.';'.PHP_EOL;
$settingsNew .= '$theme = "'.$theme.'";'.PHP_EOL;
$settingsNew .= '$tabWidth = '.$tabWidth.';'.PHP_EOL;

// Compile our new settings
$settingsContents = substr($settingsContents,0,$repPosStart).$settingsNew.substr($settingsContents,($repPosEnd),strlen($settingsContents));
Expand All @@ -69,7 +71,7 @@ function generateHash($plainText,$salt=null) {
// Do we need a file manager refresh?
if ($_POST['changedFileSettings']=="true") {$refreshFM="true";} else {$refreshFM="false";};
// With all that worked out, we can now hide the settings screen and apply the new settings
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$tabsIndent.",".$codeAssist.",".$lockedNav.",".$visibleTabs.",".$refreshFM.");</script>";
echo "<script>top.ICEcoder.settingsScreen('hide');top.ICEcoder.useNewSettings('".$themeURL."',".$tabsIndent.",".$codeAssist.",".$lockedNav.",".$visibleTabs.",".$tabWidth.",".$refreshFM.");</script>";
}

// Save the currently opened files for next time
Expand Down Expand Up @@ -154,7 +156,7 @@ function generateHash($plainText,$salt=null) {
$pluginsDisplay = "";
for ($i=0;$i<count($plugins);$i++) {
$target = explode(":",$plugins[$i][4]);
$pluginsDisplay .= '<a href="'.$plugins[$i][3].'" target="'.$target[0].'"><img src="'.$plugins[$i][1].'" style="'.$plugins[$i][2].'" alt="'.$plugins[$i][0].'"></a>';
$pluginsDisplay .= '<a href="'.$plugins[$i][3].'" title="'.$plugins[$i][0].'" target="'.$target[0].'"><img src="'.$plugins[$i][1].'" style="'.$plugins[$i][2].'" alt="'.$plugins[$i][0].'"></a>';
};

// If we're updating, replace the plugin display with our newly established one
Expand Down

0 comments on commit 98a08fd

Please sign in to comment.