Browse Source

Make styled tooltips mandatory

spaghetti 8 years ago
parent
commit
f03a371d58

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

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

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

30
       require(SERVER_ROOT.'/design/publicheader.php');
30
       require(SERVER_ROOT.'/design/publicheader.php');
31
     } else {
31
     } else {
32
       // HTTP/2 Server Push headers for cloudflare
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
       foreach ($Scripts as $Script) {
35
       foreach ($Scripts as $Script) {
37
         if (trim($Script) == '') { continue; }
36
         if (trim($Script) == '') { continue; }
38
         header('Link: </'.STATIC_SERVER.'functions/'.$Script.'.js?v='.filemtime(SERVER_ROOT.'/static/functions/'.$Script.'.js').'>; rel=preload;', false);
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
 <?
1
 <?
2
 
2
 
3
 define('FOOTER_FILE', SERVER_ROOT.'/design/privatefooter.php');
3
 define('FOOTER_FILE', SERVER_ROOT.'/design/privatefooter.php');
4
-$UseTooltipster = !isset(G::$LoggedUser['Tooltipster']) || G::$LoggedUser['Tooltipster'];
5
 
4
 
6
 ?>
5
 ?>
7
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
6
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
55
       title="<?=SITE_NAME?> - Other Torrents" />
54
       title="<?=SITE_NAME?> - Other Torrents" />
56
   <link rel="stylesheet" type="text/css"
55
   <link rel="stylesheet" type="text/css"
57
       href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>" />
56
       href="<?=STATIC_SERVER?>styles/global.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/global.css')?>" />
58
-<?
59
-if ($UseTooltipster) { ?>
60
   <link rel="stylesheet" href="<?=STATIC_SERVER?>styles/tooltipster/style.css?v=<?=filemtime(SERVER_ROOT.'/static/styles/tooltipster/style.css')?>" type="text/css" media="screen" />
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
 if (empty(G::$LoggedUser['StyleURL'])) {
59
 if (empty(G::$LoggedUser['StyleURL'])) {
64
 ?>
60
 ?>
65
 <link rel="stylesheet" type="text/css" title="<?=G::$LoggedUser['StyleName']?>" media="screen"
61
 <link rel="stylesheet" type="text/css" title="<?=G::$LoggedUser['StyleName']?>" media="screen"
95
   </script>
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
 foreach ($Scripts as $Script) {
95
 foreach ($Scripts as $Script) {
104
   if (trim($Script) == '') {
96
   if (trim($Script) == '') {
105
     continue;
97
     continue;

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

163
           <input type="text" size="40" name="styleurl" id="styleurl" value="<?=display_str($StyleURL)?>" />
163
           <input type="text" size="40" name="styleurl" id="styleurl" value="<?=display_str($StyleURL)?>" />
164
         </td>
164
         </td>
165
       </tr>
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
 <?  if (check_perms('users_mod')) { ?>
166
 <?  if (check_perms('users_mod')) { ?>
174
       <tr id="site_autostats_tr">
167
       <tr id="site_autostats_tr">
175
         <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>
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
 $Options['ShowTags']            = (!empty($_POST['showtags']) ? 1 : 0);
221
 $Options['ShowTags']            = (!empty($_POST['showtags']) ? 1 : 0);
222
 $Options['AutoSubscribe']       = (!empty($_POST['autosubscribe']) ? 1 : 0);
222
 $Options['AutoSubscribe']       = (!empty($_POST['autosubscribe']) ? 1 : 0);
223
 $Options['DisableSmileys']      = (!empty($_POST['disablesmileys']) ? 1 : 0);
223
 $Options['DisableSmileys']      = (!empty($_POST['disablesmileys']) ? 1 : 0);
224
-$Options['Tooltipster']         = (!empty($_POST['usetooltipster']) ? 1 : 0);
225
 $Options['AutoloadCommStats']   = (check_perms('users_mod') && !empty($_POST['autoload_comm_stats']) ? 1 : 0);
224
 $Options['AutoloadCommStats']   = (check_perms('users_mod') && !empty($_POST['autoload_comm_stats']) ? 1 : 0);
226
 $Options['DisableAvatars']      = db_string($_POST['disableavatars']);
225
 $Options['DisableAvatars']      = db_string($_POST['disableavatars']);
227
 $Options['Identicons']          = (!empty($_POST['identicons']) ? (int)$_POST['identicons'] : 0);
226
 $Options['Identicons']          = (!empty($_POST['identicons']) ? (int)$_POST['identicons'] : 0);

Loading…
Cancel
Save