Browse Source

Make styled tooltips mandatory

spaghetti 8 years ago
parent
commit
f03a371d58

+ 0
- 1
classes/top10view.class.php View File

@@ -65,7 +65,6 @@ class Top10View {
65 65
 
66 66
   private static function render_list($Url, $Name, $Image) {
67 67
     if (!empty($Image)) {
68
-      $UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster'];
69 68
       $Image = ImageTools::process($Image);
70 69
       $Title = "title=\"<img class="large_tile" src="$Image" alt="" />\"";
71 70
       $Name = display_str($Name);

+ 2
- 3
classes/view.class.php View File

@@ -30,9 +30,8 @@ class View {
30 30
       require(SERVER_ROOT.'/design/publicheader.php');
31 31
     } else {
32 32
       // HTTP/2 Server Push headers for cloudflare
33
-      $TT = (!isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster']);
34
-      $Scripts = array_merge(['jquery', 'script_start', 'ajax.class', 'global', 'jquery.autocomplete', 'autocomplete'], ($TT ? ['tooltipster', 'tooltipster_settings'] : []), explode(',', $JSIncludes));
35
-      $Styles = array_merge(($TT ? ['tooltipster'] : []), explode(',', $CSSIncludes));
33
+      $Scripts = array_merge(['jquery', 'script_start', 'ajax.class', 'global', 'jquery.autocomplete', 'autocomplete', 'tooltipster', 'tooltipster_settings'], explode(',', $JSIncludes));
34
+      $Styles = array_merge(['tooltipster'], explode(',', $CSSIncludes));
36 35
       foreach ($Scripts as $Script) {
37 36
         if (trim($Script) == '') { continue; }
38 37
         header('Link: </'.STATIC_SERVER.'functions/'.$Script.'.js?v='.filemtime(SERVER_ROOT.'/static/functions/'.$Script.'.js').'>; rel=preload;', false);

+ 1
- 9
design/privateheader.php View File

@@ -1,7 +1,6 @@
1 1
 <?
2 2
 
3 3
 define('FOOTER_FILE', SERVER_ROOT.'/design/privatefooter.php');
4
-$UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster'];
5 4
 
6 5
 ?>
7 6
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
@@ -55,11 +54,8 @@ if (isset(G::$LoggedUser['Notify'])) {
55 54
       title="<?=SITE_NAME?> - Other Torrents" />
56 55
   <link rel="stylesheet" type="text/css"
57 56
       href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>" />
58
-<?
59
-if ($UseTooltipster) { ?>
60 57
   <link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/tooltipster/style.css')?>" type="text/css" media="screen" />
61 58
 <?
62
-}
63 59
 if (empty(G::$LoggedUser['StyleURL'])) {
64 60
 ?>
65 61
 <link rel="stylesheet" type="text/css" title="<?=G::$LoggedUser['StyleName']?>" media="screen"
@@ -95,11 +91,7 @@ foreach ($ExtraCSS as $CSS) {
95 91
   </script>
96 92
 <?
97 93
 
98
-$Scripts = array_merge(array('jquery', 'script_start', 'ajax.class', 'global', 'jquery.autocomplete', 'autocomplete'), explode(',', $JSIncludes));
99
-if ($UseTooltipster) {
100
-  $Scripts[] = 'tooltipster';
101
-  $Scripts[] = 'tooltipster_settings';
102
-}
94
+$Scripts = array_merge(array('jquery', 'script_start', 'ajax.class', 'global', 'jquery.autocomplete', 'autocomplete', 'tooltipster', 'tooltipster_settings'), explode(',', $JSIncludes));
103 95
 foreach ($Scripts as $Script) {
104 96
   if (trim($Script) == '') {
105 97
     continue;

+ 0
- 7
sections/user/edit.php View File

@@ -163,13 +163,6 @@ echo $Val->GenerateJS('userform');
163 163
           <input type="text" size="40" name="styleurl" id="styleurl" value="<?=display_str($StyleURL)?>" />
164 164
         </td>
165 165
       </tr>
166
-      <tr id="site_tooltips_tr">
167
-        <td class="label tooltip" title="Use styled tooltips instead of the browser's default when hovering elements with extra information (such as this one)."><strong>Styled tooltips</strong></td>
168
-        <td>
169
-          <input type="checkbox" name="usetooltipster" id="usetooltipster"<?=!isset($SiteOptions['Tooltipster']) || $SiteOptions['Tooltipster'] ? ' checked="checked"' : ''?> />
170
-          <label for="usetooltipster">Enable styled tooltips</label>
171
-        </td>
172
-      </tr>
173 166
 <?  if (check_perms('users_mod')) { ?>
174 167
       <tr id="site_autostats_tr">
175 168
         <td class="label tooltip" title="This is a staff-only feature to bypass the &quot;Show stats&quot; button for seeding, leeching, snatched, and downloaded stats on profile pages."><strong>Profile stats</strong></td>

+ 0
- 1
sections/user/take_edit.php View File

@@ -221,7 +221,6 @@ $Options['ShowTorFilter']       = (empty($_POST['showtfilter']) ? 0 : 1);
221 221
 $Options['ShowTags']            = (!empty($_POST['showtags']) ? 1 : 0);
222 222
 $Options['AutoSubscribe']       = (!empty($_POST['autosubscribe']) ? 1 : 0);
223 223
 $Options['DisableSmileys']      = (!empty($_POST['disablesmileys']) ? 1 : 0);
224
-$Options['Tooltipster']         = (!empty($_POST['usetooltipster']) ? 1 : 0);
225 224
 $Options['AutoloadCommStats']   = (check_perms('users_mod') && !empty($_POST['autoload_comm_stats']) ? 1 : 0);
226 225
 $Options['DisableAvatars']      = db_string($_POST['disableavatars']);
227 226
 $Options['Identicons']          = (!empty($_POST['identicons']) ? (int)$_POST['identicons'] : 0);

Loading…
Cancel
Save