Fixing bxslider see BT#3069

skala
Julio Montoya 13 years ago
parent 9777ed25fb
commit 17c8480300
  1. 10
      main/css/base.css
  2. 192
      main/inc/lib/javascript/bxslider/bx_styles/bx_styles.css
  3. 92
      main/inc/lib/system_announcements.lib.php
  4. 4
      main/inc/lib/userportal.lib.php
  5. 7
      news_list.php

@ -3513,16 +3513,6 @@ div.admin_section h4 {
padding:5px;
}
#container-slider {
margin: 0 auto;
min-height: 310px;
padding: 15px 0 0 6%;
width: 560px;
z-index: 0;
}
.userportal-order-courses-link {
background-color: #F9F9F9;
border-radius: 10px 10px 10px 10px;

@ -1,107 +1,127 @@
/* @override http://localhost/bxslider_v3_plugin/css/styles.css */
/*
* To change the color scheme of slider change each
* background property for each of the five styles below
*/
samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li{
border: 0 none;
font-family: inherit;
font-size: 100%;
font-style: inherit;
font-weight: inherit;
margin: 0;
outline: 0 none;
padding: 0;
vertical-align: baseline;
}
#bx-wrapper {
text-shadow: 0 1px 0 rgba(255, 255, 255, 0.8);
}
/*next button*/
#container-slider {
margin: 15px auto;
min-height: 310px;
padding: 0 0 0 6%;
width: 560px;
z-index: 0;
}
.bx-next {
position:absolute;
top:40%;
right:-50px;
z-index:999;
width: 30px;
height: 30px;
text-indent: -999999px;
background: url(gray_next.png) no-repeat 0 -30px;
background: url("gray_next.png") no-repeat scroll 0 -30px transparent;
height: 30px;
position: absolute;
right: -50px;
text-indent: -999999px;
top: 40%;
width: 30px;
z-index: 999;
}
/*previous button*/
.bx-prev {
position:absolute;
top:40%;
left:-50px;
z-index:999;
width: 30px;
height: 30px;
text-indent: -999999px;
background: url(gray_prev.png) no-repeat 0 -30px;
background: url("gray_prev.png") no-repeat scroll 0 -30px transparent;
height: 30px;
left: -50px;
position: absolute;
text-indent: -999999px;
top: 40%;
width: 30px;
z-index: 999;
}
/*pager links*/
.bx-pager a {
margin-right: 5px;
color: #fff;
padding: 3px 8px 3px 6px;
font-size: 12px;
zoom:1;
background: url(gray_pager.png) no-repeat 0 -20px;
background: url("gray_pager.png") no-repeat scroll 0 -20px transparent;
color: #FFFFFF;
font-size: 12px;
margin-right: 5px;
padding: 3px 8px 3px 6px;
text-decoration: none;
}
/*auto start button*/
.bx-auto .start {
background: url(gray_auto.png) no-repeat 0 2px;
padding-left: 13px;
background: url("gray_auto.png") no-repeat scroll 0 2px transparent;
padding-left: 13px;
}
/*auto stop button*/
.bx-auto .stop {
background: url(gray_auto.png) no-repeat 0 -14px;
padding-left: 13px;
background: url("gray_auto.png") no-repeat scroll 0 -14px transparent;
padding-left: 13px;
}
/*
* End color scheme styles
*/
/*next/prev button hover state*/
.bx-next:hover,
.bx-prev:hover {
background-position: 0 0;
.bx-next:hover, .bx-prev:hover {
background-position: 0 0;
}
/*pager links hover and active states*/
.bx-pager .pager-active,
.bx-pager a:hover {
background-position: 0 0;
.bx-pager .pager-active, .bx-pager a:hover {
background-position: 0 0;
text-decoration: none;
}
/*pager wrapper*/
.bx-pager {
text-align:center;
padding-top: 7px;
font-size:12px;
color:#666;
color: #666666;
font-size: 12px;
padding-top: 7px;
text-align: center;
}
/*captions*/
.bx-captions {
text-align:center;
font-size: 12px;
padding: 7px 0;
color: #666;
color: #666666;
font-size: 12px;
padding: 7px 0;
text-align: center;
}
/*auto controls*/
.bx-auto {
text-align: center;
padding-top: 15px;
padding-top: 15px;
text-align: center;
}
.bx-auto a {
color: #666;
font-size: 12px;
color: #666666;
font-size: 12px;
}
#slider {
line-height: 120%;
}
#slider h1 {
font-size: 1.6em;
line-height: 150%;
}
#slider li p {
font-size: 1.1em;
}
#slider .strng {
font-weight: 600;
}
#slider .signatured {
color: #3183B1;
font-size: 1.3em;
line-height: 200%;
text-decoration: none;
}
#slider strong {
font-size: 1.1em;
}
#slider li a {
color: #3183B1;
font-size: 1.1em;
text-decoration: none;
}
.bx-colored {
color: #3183B1;
text-decoration: none;
}
#slider .notice {
color: #3183B1;
font-size: 1em;
text-decoration: none;
}
#slider .laucherlink {
color: #3183B1;
cursor: pointer;
font-size: 1.1em;
text-decoration: none;
}

@ -106,18 +106,18 @@ class SystemAnnouncementManager {
$user_selected_language = api_get_interface_language();
$start = intval($start);
$tbl_announcement_group = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS);
$temp_user_groups = GroupPortalManager::get_groups_by_user(api_get_user_id(),0);
$groups =array();
foreach ($temp_user_groups as $user_group) {
$groups = array_merge($groups, array($user_group['id']));
$groups = array_merge($groups, GroupPortalManager::get_parent_groups($user_group['id']));
}
//checks if tables exists to not break platform not updated
$ann_group_db_ok =false;
if( Database::num_rows(Database::query("SHOW TABLES LIKE 'announcement_rel_group'")) > 0)
$ann_group_db_ok =true;
$groups_string = '('.implode($groups,',').')';
$tbl_announcement_group = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS);
$temp_user_groups = GroupPortalManager::get_groups_by_user(api_get_user_id(),0);
$groups =array();
foreach ($temp_user_groups as $user_group) {
$groups = array_merge($groups, array($user_group['id']));
$groups = array_merge($groups, GroupPortalManager::get_parent_groups($user_group['id']));
}
//checks if tables exists to not break platform not updated
$ann_group_db_ok =false;
if( Database::num_rows(Database::query("SHOW TABLES LIKE 'announcement_rel_group'")) > 0)
$ann_group_db_ok =true;
$groups_string = '('.implode($groups,',').')';
$db_table = Database :: get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS);
$now = api_get_utc_datetime();
@ -136,10 +136,10 @@ class SystemAnnouncementManager {
$sql .= " AND visible_teacher = 1 ";
break;
}
if (count($groups) > 0 and $ann_group_db_ok ) {
$sql .= " OR id IN (SELECT announcement_id FROM $tbl_announcement_group "
." WHERE group_id in $groups_string) ";
}
if (count($groups) > 0 and $ann_group_db_ok ) {
$sql .= " OR id IN (SELECT announcement_id FROM $tbl_announcement_group "
." WHERE group_id in $groups_string) ";
}
global $_configuration;
$current_access_url_id = 1;
@ -154,45 +154,46 @@ class SystemAnnouncementManager {
$sql .= " ORDER BY date_start DESC LIMIT ".($start+1).",20";
}
$announcements = Database::query($sql);
$content = '';
if (Database::num_rows($announcements) > 0) {
$query_string = ereg_replace('announcement=[1-9]+', '', $_SERVER['QUERY_STRING']);
$query_string = ereg_replace('&$', '', $query_string);
$url = api_get_self();
echo '<div class="system_announcements">';
echo '<h3>'.get_lang('SystemAnnouncements').'</h3>';
echo '<table align="center">';
echo '<tr>';
echo '<td>';
SystemAnnouncementManager :: display_arrow($user_id);
echo '</td>';
echo '</tr>';
echo '</table>';
echo '<table align="center" border="0" width="900px">';
$content .= '<div class="system_announcements">';
$content .= '<h3>'.get_lang('SystemAnnouncements').'</h3>';
$content .= '<table align="center">';
$content .= '<tr>';
$content .= '<td>';
$content .= SystemAnnouncementManager :: display_arrow($user_id);
$content .= '</td>';
$content .= '</tr>';
$content .= '</table>';
$content .= '<table align="center" border="0" width="900px">';
while ($announcement = Database::fetch_object($announcements)) {
$display_date = api_convert_and_format_date($announcement->display_date, DATE_FORMAT_LONG);
echo '<tr><td>';
echo '<a name="'.$announcement->id.'"></a>
$content .= '<tr><td>';
$content .= '<a name="'.$announcement->id.'"></a>
<div class="system_announcement">
<div class="system_announcement_title">'.$announcement->title.'</div><div class="system_announcement_date">'.$display_date.'</div>
<h2>'.$announcement->title.'</h2><div class="system_announcement_date">'.$display_date.'</div>
<br />
<div class="system_announcement_content">'
.$announcement->content.'
</div>
</div><br />';
echo '</tr></td>';
$content .= '</tr></td>';
}
echo '</table>';
echo '<table align="center">';
echo '<tr>';
echo '<td>';
SystemAnnouncementManager :: display_arrow($user_id);
echo '</td>';
echo '</tr>';
echo '</table>';
echo '</div>';
}
$content .= '</table>';
$content .= '<table align="center">';
$content .= '<tr>';
$content .= '<td>';
$content .= SystemAnnouncementManager :: display_arrow($user_id);
$content .= '</td>';
$content .= '</tr>';
$content .= '</table>';
$content .= '</div>';
}
return $content;
}
public static function display_arrow($user_id) {
@ -200,17 +201,18 @@ class SystemAnnouncementManager {
$nb_announcement = SystemAnnouncementManager :: count_nb_announcement($start,$user_id);
$next = ((int)$_GET['start']+19);
$prev = ((int)$_GET['start']-19);
$content = '';
if(!isset($_GET['start']) || $_GET['start'] == 0) {
if($nb_announcement > 20) {
echo '<a href="news_list.php?start='.$next.'">'.get_lang('NextBis').' >> </a>';
$content .= '<a href="news_list.php?start='.$next.'">'.get_lang('NextBis').' >> </a>';
}
} else {
echo '<a href="news_list.php?start='.$prev.'"> << '.get_lang('Prev').'</a>';
if ($nb_announcement > 20) {
echo '<a href="news_list.php?start='.$next.'">'.get_lang('NextBis').' >> </a>';
$content .= '<a href="news_list.php?start='.$next.'">'.get_lang('NextBis').' >> </a>';
}
}
return $content;
}
public static function count_nb_announcement($start = 0, $user_id = '') {

@ -105,13 +105,13 @@ class IndexManager {
if ($show_slide) {
$announcements = SystemAnnouncementManager :: display_announcements_slider($visibility, $announcement);
} else {
$announcements = SystemAnnouncementManager :: get_all_announcements($visibility, $announcement);
$announcements = SystemAnnouncementManager :: display_all_announcements($visibility, $announcement);
}
} else {
if ($show_slide) {
$announcements = SystemAnnouncementManager :: display_announcements_slider(VISIBLE_GUEST, $announcement);
} else {
$announcements = SystemAnnouncementManager :: get_all_announcements(VISIBLE_GUEST, $announcement);
$announcements = SystemAnnouncementManager :: display_all_announcements(VISIBLE_GUEST, $announcement);
}
}
return $announcements;

@ -31,12 +31,5 @@ if (api_is_platform_admin()) {
}
$start = isset($_GET['start']) ? (int)$_GET['start'] : $start = 0;
/*
if (isset($_user['user_id'])) {
$visibility = api_is_allowed_to_create_course() ? VISIBLE_TEACHER : VISIBLE_STUDENT;
SystemAnnouncementManager :: display_all_announcements($visibility, $announcement, $start, $_user['user_id']);
} else {
SystemAnnouncementManager :: display_all_announcements(VISIBLE_GUEST, $announcement, $start);
}*/
SystemAnnouncementManager ::display_announcements_slider($visibility);
Display::display_footer();
Loading…
Cancel
Save