Improving forum layout + CSS updates

skala
Julio Montoya 15 years ago
parent 0d3404c3bd
commit 7acc94a1ae
  1. 63
      main/css/academica/default.css
  2. 62
      main/css/baby_orange/default.css
  3. 71
      main/css/blue_lagoon/default.css
  4. 102
      main/css/chamilo/default.css
  5. 70
      main/css/chamilo_electric_blue/default.css
  6. 64
      main/css/chamilo_green/default.css
  7. 64
      main/css/chamilo_orange/default.css
  8. 64
      main/css/chamilo_red/default.css
  9. 63
      main/css/cool_blue/default.css
  10. 64
      main/css/corporate/default.css
  11. 64
      main/css/cosmic_campus/default.css
  12. 64
      main/css/delicious_bordeaux/default.css
  13. 66
      main/css/dokeos_blue/default.css
  14. 72
      main/css/dokeos_classic/default.css
  15. 66
      main/css/dokeos_classic_2D/default.css
  16. 65
      main/css/empire_green/default.css
  17. 65
      main/css/fruity_orange/default.css
  18. 65
      main/css/medical/default.css
  19. 64
      main/css/public_admin/default.css
  20. 67
      main/css/royal_purple/default.css
  21. 65
      main/css/silver_line/default.css
  22. 65
      main/css/sober_brown/default.css
  23. 65
      main/css/steel_grey/default.css
  24. 65
      main/css/tasty_olive/default.css
  25. 4
      main/forum/editpost.php
  26. 4
      main/forum/forumfunction.inc.php
  27. 380
      main/forum/index.php
  28. 23
      main/forum/viewforum.php
  29. 28
      main/forum/viewforumcategory.php
  30. 42
      main/forum/viewthread.php
  31. 18
      main/forum/viewthread_flat.inc.php
  32. 2
      main/forum/viewthread_threaded.inc.php

@ -3368,3 +3368,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head {
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3197,7 +3197,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3299,3 +3299,63 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head {
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -1443,7 +1443,7 @@ tr.forum_category_header a {
}
/* **** FORUM **** */
.forum_header {
background-color: #EFEFEF;
background-color: #EEF;
}
/* **** THREAD **** */
.forum_threadheader {
@ -1519,7 +1519,10 @@ a.forum_group_link {
}
.forum_description {
color: #000;
font-weight: normal;
font-weight: normal;
}
.forum_description p{
font-size: 11px;
}
.forum_title {
color: #000;
@ -3978,3 +3981,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -1841,7 +1841,7 @@ tr.forum_category_header a {
}
/* **** FORUM **** */
.forum_header {
background-color: #a0e5fc;
background-color: #EEF;
}
/* **** THREAD **** */
.forum_threadheader {
@ -1925,6 +1925,10 @@ a.forum_group_link {
.forum_description {
color: #000;
font-weight: normal;
font-size: 11px;
}
.forum_description p{
font-size: 11px;
}
.forum_title {
color: #000;
@ -4402,21 +4406,21 @@ span.form_required {
}
.categories-block-course {
-moz-border-radius-topleft:8px;
-moz-border-radius-topright:8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
-moz-box-shadow:0 -1px 10px 2px #CCCCCC;
-Webkit-box-shadow: 0 -1px 10px 2px #CCCCCC;
box-shadow: 0 -1px 10px 2px #CCCCCC;
border:1px solid #CCCCCC;
float:left;
margin:10px;
padding:9px;
width:240px;
min-height:132px;
-moz-border-radius-topleft:8px;
-moz-border-radius-topright:8px;
-webkit-border-top-left-radius: 8px;
-webkit-border-top-right-radius: 8px;
border-top-left-radius: 8px;
border-top-right-radius: 8px;
-moz-box-shadow:0 -1px 10px 2px #CCCCCC;
-Webkit-box-shadow: 0 -1px 10px 2px #CCCCCC;
box-shadow: 0 -1px 10px 2px #CCCCCC;
border:1px solid #CCCCCC;
float:left;
margin:10px;
padding:9px;
width:240px;
min-height:132px;
}
@ -4440,4 +4444,68 @@ padding-top:10px;
.categories-course-links {padding-top:10px;text-align:right;}
.categories-course-links span {margin-right:10px;padding-top:10px;text-align:right;}
.categories-course-links span {margin-right:10px;padding-top:10px;text-align:right;}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -1736,7 +1736,7 @@ tr.forum_category_header a {
}
/* **** FORUM **** */
.forum_header {
background-color: #a0e5fc;
background-color: #EEF;
}
/* **** THREAD **** */
.forum_threadheader {
@ -1821,6 +1821,10 @@ a.forum_group_link {
color: #000;
font-weight: normal;
}
.forum_description p{
font-size: 11px;
}
.forum_title {
color: #000;
font-size: 14px;
@ -4349,3 +4353,67 @@ span.form_required {
.attendance-calendar-table td {
/* height:66px; */
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -4364,3 +4364,67 @@ span.form_required {
.attendance-calendar-table td {
/* height:66px; */
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -4343,3 +4343,67 @@ span.form_required {
.attendance-calendar-table td {
/*height:66px; */
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -4353,3 +4353,67 @@ span.form_required {
.attendance-calendar-table td {
/*height:66px;*/
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3853,3 +3853,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3321,3 +3321,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3381,3 +3381,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3840,3 +3840,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3720,7 +3720,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3888,3 +3888,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -1194,6 +1194,9 @@ span.form_error {
text-align:left;
padding-left:5px;
} /* header cell in data table in tools */
.data_table {
border-collapse: collapse;
width: 100%;
@ -1448,6 +1451,8 @@ div.system_announcement {
-moz-border-radius-bottomleft : 5px;
min-height:20px;
}
.system_announcement {
background: #eee url('images/headertables.jpg') repeat-x top center;
font: bold 100% arial, sans-serif, sans;
@ -3598,6 +3603,7 @@ div.image-social-content center.friend {
margin:20px;
}
.social-menu-group-member {
float:left;
height:120px;
@ -3998,7 +4004,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -4109,3 +4115,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -4013,7 +4013,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -4116,3 +4116,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3726,7 +3726,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3828,3 +3828,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3728,7 +3728,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3831,3 +3831,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -4183,7 +4183,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -4285,3 +4285,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -4034,3 +4034,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3723,7 +3723,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3818,6 +3818,7 @@ span.form_required {
height: 40px;
}
.attendance-users-table td {
height:66px;
}
@ -3825,3 +3826,67 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head {
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3670,7 +3670,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3772,3 +3772,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3879,7 +3879,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3981,3 +3981,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3727,7 +3727,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3829,3 +3829,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -3729,7 +3729,7 @@ span.form_required {
}
.userportal-session-category-item {
-webkit-border-radius: 10px.session_box {
-webkit-border-radius: 10px;
background-color: #efefef;
border: 1px solid #666;
font-weight: bold;
@ -3831,3 +3831,66 @@ span.form_required {
.attendance-calendar-table td {
height:66px;
}
/* New forum table */
.forum_table_title {
border-collapse: collapse;
width: 100%;
padding: 5px;
border-left: 1px solid gray;
border-top: 1px solid gray;
border-right: 1px solid gray;
padding:5px;
}
.forum_table_title th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table {
border-collapse: collapse;
width: 100%;
padding: 5px;
border: 1px solid gray;
margin-bottom:15px;
}
.forum_table .forum_head{
padding:5px;
text-align: left;
font-size:14px;
}
.forum_table th {
padding-right: 12px;
/*border: 1px solid gray;*/
background-color: #E5EDF9;
}
.forum_table tr.row_odd {
background-color: #F2F2F2;
}
.forum_table tr.row_odd:hover, .data_table tr.row_even:hover {
background-color: #E5EDF9;
}
.forum_table tr.row_even {
background-color: #fff;
}
.forum_table td {
padding: 5px;
vertical-align: top;
border-bottom: 1px solid #b0b0b0;
border-right: 1px dotted #e1e1e1;
border-left: 1px dotted #e1e1e1;
}
.post {
border: 1px solid gray;
margin-bottom:5px;
}

@ -195,9 +195,9 @@ if ($origin!='learnpath') {
/*
Display Forum Category and the Forum information
*/
echo "<table class=\"data_table\" width='100%'>\n";
echo "<table class=\"forum_table\" width='100%'>\n";
// the forum category
echo "\t<tr>\n\t\t<th align=\"left\" colspan=\"2\">";
echo "<tr><th class=\"forum_head\" colspan=\"2\">";
echo '<a href="viewforum.php?&origin='.$origin.'&forum='.$current_forum['forum_id'].'" '.class_visible_invisible($current_forum['visibility']).'>'.prepare4display($current_forum['forum_title']).'</a><br />';
echo '<span class="forum_description">'.prepare4display($current_forum['forum_comment']).'</span>';echo "</th>\n";
echo "</th>\n";

@ -127,7 +127,7 @@ function show_add_forumcategory_form($inputvalues=array()) {
$form->addElement('text', 'forum_category_title', get_lang('Title'),'class="input_titles" id="category_title"');
//$form->applyFilter('forum_category_title', 'html_filter');
$form->addElement('html_editor', 'forum_category_comment', get_lang('Comment'), null, array('ToolbarSet' => 'Forum', 'Width' => '98%', 'Height' => '200'));
$form->addElement('html_editor', 'forum_category_comment', get_lang('Description'), null, array('ToolbarSet' => 'Forum', 'Width' => '98%', 'Height' => '200'));
//$form->applyFilter('forum_category_comment', 'html_filter');
$form->addElement('style_submit_button', 'SubmitForumCategory', get_lang('CreateCategory'), 'class="add"');
@ -185,7 +185,7 @@ function show_add_forum_form($inputvalues=array()) {
//$form->applyFilter('forum_title', 'html_filter');
// The comment of the forum
$form->addElement('html_editor', 'forum_comment', get_lang('Comment'), null, array('ToolbarSet' => 'Forum', 'Width' => '98%', 'Height' => '200'));
$form->addElement('html_editor', 'forum_comment', get_lang('Description'), null, array('ToolbarSet' => 'Forum', 'Width' => '98%', 'Height' => '200'));
//$form->applyFilter('forum_comment', 'html_filter');
// dropdown list: Forum Categories

@ -189,10 +189,15 @@ if (isset($_GET['action']) && $_GET['action'] == 'notify' AND isset($_GET['conte
/*
Display Forum Categories and the Forums in it
*/
echo '<table class="data_table">';
// Step 3: we display the forum_categories first
if(is_array($forum_categories_list)) {
if (is_array($forum_categories_list)) {
foreach ($forum_categories_list as $forum_category_key => $forum_category) {
// the forums in this category
$forums_in_category=get_forums_in_category($forum_category['cat_id']);
echo '<table class="forum_table">';
//validacion when belongs to a session
$session_img = api_get_session_image($forum_category['session_id'], $_user['status']);
@ -202,8 +207,8 @@ if (isset($_GET['action']) && $_GET['action'] == 'notify' AND isset($_GET['conte
} else {
$session_displayed = '';
}
echo "<tr><th style=\"padding-left:5px;\" align=\"left\" colspan=\"5\">";
echo '<thead>';
echo '<tr><th class="forum_head" colspan="5">';
echo '<a href="viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.prepare4display($forum_category['cat_id']).'" '.class_visible_invisible(prepare4display($forum_category['visibility'])).'>'.prepare4display($forum_category['cat_title']).$session_displayed.'</a>'. $session_img .'<br />';
if ($forum_category['cat_comment']<>'' AND trim($forum_category['cat_comment'])<>'&nbsp;') {
@ -220,10 +225,13 @@ if (isset($_GET['action']) && $_GET['action'] == 'notify' AND isset($_GET['conte
display_up_down_icon('forumcategory',prepare4display($forum_category['cat_id']), $forum_categories_list);
}
echo '</th>';
echo "</tr>";
echo '</tr>';
echo '</thead>';
if (!empty($forums_in_category)) {
// step 4: the interim headers (for the forum)
echo "<tr class=\"forum_header\">";
echo '<tr class="forum_header">';
echo "<td colspan=\"2\">".get_lang('Forum')."</td>";
echo "<td>".get_lang('Topics')."</td>";
echo "<td>".get_lang('Posts')."</td>";
@ -231,189 +239,195 @@ if (isset($_GET['action']) && $_GET['action'] == 'notify' AND isset($_GET['conte
echo "<td>".get_lang('Actions')."</td>";
echo "</tr>";
// the forums in this category
$forums_in_category=get_forums_in_category($forum_category['cat_id']);
// step 5: we display all the forums in this category.
$forum_count=0;
foreach ($forum_list as $key=>$forum) {
// Here we clean the whatnew_post_info array a little bit because to display the icon we
// test if $whatsnew_post_info[$forum['forum_id']] is empty or not.
if (!empty($whatsnew_post_info)) {
if (is_array(isset($whatsnew_post_info[$forum['forum_id']])?$whatsnew_post_info[$forum['forum_id']]:null)) {
foreach ($whatsnew_post_info[$forum['forum_id']] as $key_thread_id => $new_post_array) {
if (empty($whatsnew_post_info[$forum['forum_id']][$key_thread_id])) {
unset($whatsnew_post_info[$forum['forum_id']][$key_thread_id]);
unset($_SESSION['whatsnew_post_info'][$forum['forum_id']][$key_thread_id]);
}
}
}
}
// note: this can be speeded up if we transform the $forum_list to an array that uses the forum_category as the key.
if ($forum['forum_category'] == $forum_category['cat_id']) {
// the forum has to be showed if
// 1.v it is a not a group forum (teacher and student)
// 2.v it is a group forum and it is public (teacher and student)
// 3. it is a group forum and it is private (always for teachers only if the user is member of the forum
// if the forum is private and it is a group forum and the user is not a member of the group forum then it cannot be displayed
//if (!($forum['forum_group_public_private']=='private' AND !is_null($forum['forum_of_group']) AND !in_array($forum['forum_of_group'], $groups_of_user)))
//{
$show_forum=false;
// SHOULD WE SHOW THIS PARTICULAR FORUM
// you are teacher => show forum
if (api_is_allowed_to_edit(false,true)) {
//echo 'teacher';
$show_forum=true;
} else {
// you are not a teacher
//echo 'student';
// it is not a group forum => show forum (invisible forums are already left out see get_forums function)
if ($forum['forum_of_group']=='0') {
//echo '-gewoon forum';
$show_forum=true;
} else {
// it is a group forum
//echo '-groepsforum';
// it is a group forum but it is public => show
if ($forum['forum_group_public_private']=='public') {
$show_forum=true;
//echo '-publiek';
} else if ($forum['forum_group_public_private']=='private') {
// it is a group forum and it is private
//echo '-prive';
// it is a group forum and it is private but the user is member of the group
if (in_array($forum['forum_of_group'],$groups_of_user)) {
//echo '-is lid';
$show_forum=true;
} else {
//echo '-is GEEN lid';
$show_forum=false;
}
} else {
$show_forum=false;
}
}
}
if ($show_forum) {
$form_count++;
$mywhatsnew_post_info=isset($whatsnew_post_info[$forum['forum_id']]) ? $whatsnew_post_info[$forum['forum_id']]: null;
echo '<tr class="forum">';
// Showing the image
if(!empty($forum['forum_image'])) {
$image_path = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/forum/images/'.$forum['forum_image'];
$image_size = api_getimagesize($image_path);
$img_attributes = '';
if (!empty($image_size)) {
if ($image_size[0] > 100 || $image_size[1] > 100) {
//limit display width and height to 100px
$img_attributes = 'width="100" height="100"';
}
echo "<img src=\"$image_path\" $img_attributes>";
}
}
echo "</td>";
echo "<td width=\"20\">";
if ($forum['forum_of_group']!=='0') {
if (is_array($mywhatsnew_post_info) and !empty($mywhatsnew_post_info)) {
echo icon('../img/forumgroupnew.gif');
} else {
echo icon('../img/forumgroup.gif', get_lang('GroupForum'));
}
} else {
if (is_array($mywhatsnew_post_info) and !empty($mywhatsnew_post_info)) {
echo icon('../img/forum.gif', get_lang('Forum'));
} else {
echo icon('../img/forum.gif');
}
}
echo "</td>";
//validacion when belongs to a session
$session_img = api_get_session_image($forum['session_id'], $_user['status']);
if ($forum['forum_of_group'] <> '0') {
$my_all_groups_forum_name = isset($all_groups[$forum['forum_of_group']]['name']) ? $all_groups[$forum['forum_of_group']]['name'] : null;
$my_all_groups_forum_id = isset($all_groups[$forum['forum_of_group']]['id']) ? $all_groups[$forum['forum_of_group']]['id'] : null;
$group_title = api_substr($my_all_groups_forum_name, 0, 30);
$forum_title_group_addition = ' (<a href="../group/group_space.php?'.api_get_cidreq().'&gidReq='.$forum['forum_of_group'].'" class="forum_group_link">'.get_lang('GoTo').' '.$group_title.'</a>)' . $session_img;
} else {
$forum_title_group_addition = '';
}
if((!isset($_SESSION['id_session']) || $_SESSION['id_session']==0) && !empty($forum['session_name'])) {
$session_displayed = ' ('.$forum['session_name'].')';
} else {
$session_displayed = '';
}
$forum['forum_of_group']==0?$groupid='':$groupid=$forum['forum_of_group'];
echo "<td><a href=\"viewforum.php?".api_get_cidreq()."&gidReq=".intval($groupid)."&forum=".intval($forum['forum_id'])."\" ".class_visible_invisible(prepare4display($forum['visibility'])).">";
//Forum title
echo prepare4display($forum['forum_title']).$session_displayed.'</a>'.$forum_title_group_addition.'<br />'.prepare4display($forum['forum_comment']);
echo '</td>';
//$number_forum_topics_and_posts=get_post_topics_of_forum($forum['forum_id']); // deprecated
// the number of topics and posts
$number_threads=isset($forum['number_of_threads']) ? $forum['number_of_threads'] : null;
$number_posts =isset($forum['number_of_posts']) ? $forum['number_of_posts'] : null;
echo "<td>".$number_threads."</td>";
echo "<td>".$number_posts."</td>";
// the last post in the forum
if ($forum['last_poster_name']<>'') {
$name=$forum['last_poster_name'];
$poster_id=0;
} else {
$name = api_get_person_name($forum['last_poster_firstname'], $forum['last_poster_lastname']);
$poster_id=$forum['last_poster_id'];
}
echo "<td nowrap=\"nowrap\">";
if (!empty($forum['last_post_id'])) {
echo api_convert_and_format_date($forum['last_post_date'], null, date_default_timezone_get())."<br /> ".get_lang('By').' '.display_user_link($poster_id, $name);
}
echo "</td>";
echo "<td nowrap=\"nowrap\" align=\"center\">";
if (api_is_allowed_to_edit(false,true) && !($forum['session_id']==0 && intval($session_id)!=0)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&gradebook=$gradebook&action=edit&amp;content=forum&amp;id=".$forum['forum_id']."\">".icon('../img/edit.gif',get_lang('Edit'))."</a>";
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&gradebook=$gradebook&action=delete&amp;content=forum&amp;id=".$forum['forum_id']."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("DeleteForum"),ENT_QUOTES,$charset))."')) return false;\">".icon('../img/delete.gif',get_lang('Delete'))."</a>";
display_visible_invisible_icon('forum',$forum['forum_id'], $forum['visibility']);
display_lock_unlock_icon('forum',$forum['forum_id'], $forum['locked']);
display_up_down_icon('forum',$forum['forum_id'], $forums_in_category);
}
$iconnotify = 'send_mail.gif';
$session_forum_noti=isset($_SESSION['forum_notification']['forum']) ? $_SESSION['forum_notification']['forum'] : false;
if (is_array($session_forum_noti)) {
if (in_array($forum['forum_id'],$session_forum_noti)) {
$iconnotify = 'send_mail_checked.gif';
}
}
if (!api_is_anonymous() && api_is_allowed_to_session_edit(false,true) ) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&gradebook=$gradebook&action=notify&amp;content=forum&amp;id=".$forum['forum_id']."\">".icon('../img/'.$iconnotify,get_lang('NotifyMe'))."</a>";
}
echo "</td>";
echo "</tr>";
}
}
}
if (count($forum_list)==0) {
foreach ($forum_list as $key=>$forum) {
// Here we clean the whatnew_post_info array a little bit because to display the icon we
// test if $whatsnew_post_info[$forum['forum_id']] is empty or not.
if (!empty($whatsnew_post_info)) {
if (is_array(isset($whatsnew_post_info[$forum['forum_id']])?$whatsnew_post_info[$forum['forum_id']]:null)) {
foreach ($whatsnew_post_info[$forum['forum_id']] as $key_thread_id => $new_post_array) {
if (empty($whatsnew_post_info[$forum['forum_id']][$key_thread_id])) {
unset($whatsnew_post_info[$forum['forum_id']][$key_thread_id]);
unset($_SESSION['whatsnew_post_info'][$forum['forum_id']][$key_thread_id]);
}
}
}
}
// note: this can be speeded up if we transform the $forum_list to an array that uses the forum_category as the key.
if ($forum['forum_category'] == $forum_category['cat_id']) {
// the forum has to be showed if
// 1.v it is a not a group forum (teacher and student)
// 2.v it is a group forum and it is public (teacher and student)
// 3. it is a group forum and it is private (always for teachers only if the user is member of the forum
// if the forum is private and it is a group forum and the user is not a member of the group forum then it cannot be displayed
//if (!($forum['forum_group_public_private']=='private' AND !is_null($forum['forum_of_group']) AND !in_array($forum['forum_of_group'], $groups_of_user)))
//{
$show_forum=false;
// SHOULD WE SHOW THIS PARTICULAR FORUM
// you are teacher => show forum
if (api_is_allowed_to_edit(false,true)) {
//echo 'teacher';
$show_forum=true;
} else {
// you are not a teacher
//echo 'student';
// it is not a group forum => show forum (invisible forums are already left out see get_forums function)
if ($forum['forum_of_group']=='0') {
//echo '-gewoon forum';
$show_forum=true;
} else {
// it is a group forum
//echo '-groepsforum';
// it is a group forum but it is public => show
if ($forum['forum_group_public_private']=='public') {
$show_forum=true;
//echo '-publiek';
} else if ($forum['forum_group_public_private']=='private') {
// it is a group forum and it is private
//echo '-prive';
// it is a group forum and it is private but the user is member of the group
if (in_array($forum['forum_of_group'],$groups_of_user)) {
//echo '-is lid';
$show_forum=true;
} else {
//echo '-is GEEN lid';
$show_forum=false;
}
} else {
$show_forum=false;
}
}
}
if ($show_forum) {
$form_count++;
$mywhatsnew_post_info=isset($whatsnew_post_info[$forum['forum_id']]) ? $whatsnew_post_info[$forum['forum_id']]: null;
echo '<tr class="forum">';
// Showing the image
if(!empty($forum['forum_image'])) {
$image_path = api_get_path(WEB_COURSE_PATH).api_get_course_path().'/upload/forum/images/'.$forum['forum_image'];
$image_size = api_getimagesize($image_path);
$img_attributes = '';
if (!empty($image_size)) {
if ($image_size[0] > 100 || $image_size[1] > 100) {
//limit display width and height to 100px
$img_attributes = 'width="100" height="100"';
}
echo "<img src=\"$image_path\" $img_attributes>";
}
}
echo "</td>";
echo "<td width=\"20\">";
if ($forum['forum_of_group']!=='0') {
if (is_array($mywhatsnew_post_info) and !empty($mywhatsnew_post_info)) {
echo icon('../img/forumgroupnew.gif');
} else {
echo icon('../img/forumgroup.gif', get_lang('GroupForum'));
}
} else {
if (is_array($mywhatsnew_post_info) and !empty($mywhatsnew_post_info)) {
echo icon('../img/forum.gif', get_lang('Forum'));
} else {
echo icon('../img/forum.gif');
}
}
echo "</td>";
//validacion when belongs to a session
$session_img = api_get_session_image($forum['session_id'], $_user['status']);
if ($forum['forum_of_group'] <> '0') {
$my_all_groups_forum_name = isset($all_groups[$forum['forum_of_group']]['name']) ? $all_groups[$forum['forum_of_group']]['name'] : null;
$my_all_groups_forum_id = isset($all_groups[$forum['forum_of_group']]['id']) ? $all_groups[$forum['forum_of_group']]['id'] : null;
$group_title = api_substr($my_all_groups_forum_name, 0, 30);
$forum_title_group_addition = ' (<a href="../group/group_space.php?'.api_get_cidreq().'&gidReq='.$forum['forum_of_group'].'" class="forum_group_link">'.get_lang('GoTo').' '.$group_title.'</a>)' . $session_img;
} else {
$forum_title_group_addition = '';
}
if((!isset($_SESSION['id_session']) || $_SESSION['id_session']==0) && !empty($forum['session_name'])) {
$session_displayed = ' ('.$forum['session_name'].')';
} else {
$session_displayed = '';
}
$forum['forum_of_group']==0?$groupid='':$groupid=$forum['forum_of_group'];
echo "<td><a href=\"viewforum.php?".api_get_cidreq()."&gidReq=".intval($groupid)."&forum=".intval($forum['forum_id'])."\" ".class_visible_invisible(prepare4display($forum['visibility'])).">";
//Forum title
echo prepare4display($forum['forum_title']).$session_displayed.'</a>'.$forum_title_group_addition.'<br />';
echo '<span class="forum_description">'.prepare4display($forum['forum_comment']).'</span>';
echo '</td>';
//$number_forum_topics_and_posts=get_post_topics_of_forum($forum['forum_id']); // deprecated
// the number of topics and posts
$number_threads=isset($forum['number_of_threads']) ? $forum['number_of_threads'] : null;
$number_posts =isset($forum['number_of_posts']) ? $forum['number_of_posts'] : null;
echo "<td>".$number_threads."</td>";
echo "<td>".$number_posts."</td>";
// the last post in the forum
if ($forum['last_poster_name']<>'') {
$name=$forum['last_poster_name'];
$poster_id=0;
} else {
$name = api_get_person_name($forum['last_poster_firstname'], $forum['last_poster_lastname']);
$poster_id=$forum['last_poster_id'];
}
echo "<td nowrap=\"nowrap\">";
if (!empty($forum['last_post_id'])) {
echo api_convert_and_format_date($forum['last_post_date'], null, date_default_timezone_get())."<br /> ".get_lang('By').' '.display_user_link($poster_id, $name);
}
echo "</td>";
echo "<td nowrap=\"nowrap\" align=\"center\">";
if (api_is_allowed_to_edit(false,true) && !($forum['session_id']==0 && intval($session_id)!=0)) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&gradebook=$gradebook&action=edit&amp;content=forum&amp;id=".$forum['forum_id']."\">".icon('../img/edit.gif',get_lang('Edit'))."</a>";
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&gradebook=$gradebook&action=delete&amp;content=forum&amp;id=".$forum['forum_id']."\" onclick=\"javascript:if(!confirm('".addslashes(api_htmlentities(get_lang("DeleteForum"),ENT_QUOTES,$charset))."')) return false;\">".icon('../img/delete.gif',get_lang('Delete'))."</a>";
display_visible_invisible_icon('forum',$forum['forum_id'], $forum['visibility']);
display_lock_unlock_icon('forum',$forum['forum_id'], $forum['locked']);
display_up_down_icon('forum',$forum['forum_id'], $forums_in_category);
}
$iconnotify = 'send_mail.gif';
$session_forum_noti=isset($_SESSION['forum_notification']['forum']) ? $_SESSION['forum_notification']['forum'] : false;
if (is_array($session_forum_noti)) {
if (in_array($forum['forum_id'],$session_forum_noti)) {
$iconnotify = 'send_mail_checked.gif';
}
}
if (!api_is_anonymous() && api_is_allowed_to_session_edit(false,true) ) {
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&gradebook=$gradebook&action=notify&amp;content=forum&amp;id=".$forum['forum_id']."\">".icon('../img/'.$iconnotify,get_lang('NotifyMe'))."</a>";
}
echo "</td>";
echo "</tr>";
}
}
}
} else {
//if (count($forum_list)==0) {
echo "<tr><td>".get_lang('NoForumInThisCategory')."</td>".(api_is_allowed_to_edit(false,true)?'<td colspan="6"></td>':'<td colspan="6"></td>')."</tr>";
}
//}
}
echo '</table>';
}
}
echo "</table>";
//echo "</table>";
/*
FOOTER

@ -308,22 +308,33 @@ if ($origin!='learnpath') {
/*
Display
*/
echo "<table class=\"data_table\" >";
echo '<table class="forum_table" >';
// the current forum
if ($origin != 'learnpath') {
echo "<tr><th align=\"left\" colspan=\"7\">";
if ($origin != 'learnpath') {
echo '<thead>';
echo "<tr><th class=\"forum_head\" colspan=\"7\">";
if (!empty ($current_forum_category['cat_title'])) {
//echo '<span class="forum_low_description">'.prepare4display($current_forum_category['cat_title'])."</span><br />";
}
echo '<span class="forum_title">'.prepare4display($current_forum['forum_title']).'</span>';
if (!empty ($current_forum['forum_comment'])) {
echo '<br><span class="forum_description">'.prepare4display($current_forum['forum_comment']).'</span>';
}
if (!empty ($current_forum_category['cat_title'])) {
echo '<br /><span class="forum_low_description">'.prepare4display($current_forum_category['cat_title'])."</span><br />";
}
echo "</th>";
echo "</tr>";
echo '</thead>';
}
echo "</th>";

@ -60,25 +60,19 @@ include_once (api_get_path(LIBRARY_PATH).'groupmanager.lib.php');
$nameTools=get_lang('ToolForum');
/*
-----------------------------------------------------------
Including necessary files
-----------------------------------------------------------
*/
require 'forumconfig.inc.php';
require_once 'forumfunction.inc.php';
/*
==============================================================================
MAIN DISPLAY SECTION
==============================================================================
*/
/*
-----------------------------------------------------------
Header and Breadcrumbs
-----------------------------------------------------------
*/
if (isset($_SESSION['gradebook'])){
$gradebook= $_SESSION['gradebook'];
@ -214,13 +208,24 @@ if ($action_forums!='add') {
Display Forum Categories and the Forums in it
-----------------------------------------------------------
*/
echo "<table class=\"data_table\" width='100%'>";
echo '<table class="forum_table" width="100%">';
$my_session=isset($_SESSION['id_session']) ? $_SESSION['id_session'] : null;
if((!isset($_SESSION['id_session']) || $_SESSION['id_session']==0) && !empty($forum_category['session_name'])) {
$session_displayed = ' ('.Security::remove_XSS($forum_category['session_name']).')';
} else {
$session_displayed = '';
}
$forum_categories_list='';
echo "<tr><th align=\"left\" ".(api_is_allowed_to_edit(null,true)?"colspan='5'":"colspan='6'").">";
echo '<span class="forum_title">'.prepare4display($forum_category['cat_title']).'</span><br />';
echo '<thead>';
echo "<tr><th class=\"forum_head\" ".(api_is_allowed_to_edit(null,true)?"colspan='5'":"colspan='6'").">";
echo '<a href="viewforumcategory.php?'.api_get_cidreq().'&forumcategory='.prepare4display($forum_category['cat_id']).'" '.class_visible_invisible(prepare4display($forum_category['visibility'])).'>'.prepare4display($forum_category['cat_title']).$session_displayed.'</a>'. $session_img .'<br />';
echo '<span class="forum_description">'.prepare4display($forum_category['cat_comment']).'</span>';
echo "</th>";
if (api_is_allowed_to_edit(false,true) && !($forum_category['session_id']==0 && intval($my_session)!=0)) {
echo '<th style="vertical-align: top;" align="center" >';
echo "<a href=\"".api_get_self()."?".api_get_cidreq()."&forumcategory=".Security::remove_XSS($_GET['forumcategory'])."&amp;action=edit&amp;content=forumcategory&amp;id=".$forum_category['cat_id']."\">".icon('../img/edit.gif',get_lang('Edit'))."</a>";
@ -240,6 +245,9 @@ if ($action_forums!='add') {
echo "<td>".get_lang('LastPosts')."</td>";
echo "<td>".get_lang('Actions')."</td>";
echo "</tr>";
echo '</thead>';
// the forums in this category
$forums_in_category=get_forums_in_category($forum_category['cat_id']);

@ -49,9 +49,7 @@ $current_forum_category = get_forumcategory_information($current_forum['forum_ca
$whatsnew_post_info = $_SESSION['whatsnew_post_info']; //this variable should be deprecated?
/*
-----------------------------------------------------------
Header and Breadcrumbs
-----------------------------------------------------------
*/
@ -77,7 +75,7 @@ if ($origin=='group') {
$interbreadcrumb[] = array("url"=>"viewthread.php?forum=".Security::remove_XSS($_GET['forum'])."&gradebook=".$gradebook."&amp;thread=".Security::remove_XSS($_GET['thread']),"name" => Security::remove_XSS($current_thread['thread_title']));
Display :: display_header('');
api_display_tool_title($nameTools);
//api_display_tool_title($nameTools);
} else {
@ -92,13 +90,11 @@ if ($origin=='group') {
$message = isset($message) ? $message : '';
// the last element of the breadcrumb navigation is already set in interbreadcrumb, so give empty string
Display :: display_header('');
api_display_tool_title($nameTools);
//api_display_tool_title($nameTools);
}
}
/*
-----------------------------------------------------------
Is the user allowed here?
-----------------------------------------------------------
*/
// if the user is not a course administrator and the forum is hidden
// then the user is not allowed here.
@ -110,9 +106,7 @@ if (!api_is_allowed_to_edit(false,true) AND ($current_forum['visibility']==0 OR
}
/*
-----------------------------------------------------------
Actions
-----------------------------------------------------------
*/
$my_action = isset($_GET['action']) ? $_GET['action'] : '';
if ($my_action=='delete' AND isset($_GET['content']) AND isset($_GET['id']) AND api_is_allowed_to_edit(false,true)) {
@ -126,9 +120,7 @@ if ($my_action=='move' AND isset($_GET['post'])) {
}
/*
-----------------------------------------------------------
Display the action messages
-----------------------------------------------------------
*/
$my_message = isset($message) ? $message : '';
if ($my_message) {
@ -140,9 +132,7 @@ if ($my_message<>'PostDeletedSpecial') {
// this increases the number of times the thread has been viewed
increase_thread_view($_GET['thread']);
/*
-----------------------------------------------------------
Action Links
-----------------------------------------------------------
Action Links
*/
if ($origin=='learnpath') {
echo '<div style="height:15px">&nbsp;</div>';
@ -188,9 +178,6 @@ if ($my_message<>'PostDeletedSpecial') {
}
}
// the different views of the thread
if ($origin != 'learnpath') {
$my_url = '<a href="viewthread.php?'.api_get_cidreq().'&amp;gidReq='.Security::remove_XSS($_GET['gidReq']).'&amp;forum='.Security::remove_XSS($_GET['forum']).'&amp;origin='.$origin.'&amp;gradebook='.$gradebook.'&amp;thread='.Security::remove_XSS($_GET['thread']).'&amp;search='.Security::remove_XSS(urlencode($my_search));
@ -230,20 +217,25 @@ if ($my_message<>'PostDeletedSpecial') {
// we are getting all the information about the current forum and forum category.
// note pcool: I tried to use only one sql statement (and function) for this
// but the problem is that the visibility of the forum AND forum cateogory are stored in the item_property table
echo "<table class=\"data_table\" width='100%'>";
echo "<table class=\"forum_table_title\" width='100%'>";
// the thread
echo "<tr><th style=\"padding-left:5px;\" align=\"left\" colspan=\"6\">";
echo '<span class="forum_title">'.prepare4display($current_thread['thread_title']).'</span><br />';
echo "<tr><th style=\"padding:5px;\" align=\"left\" colspan=\"6\">";
echo '<div class="forum_title">';
echo '<a href="viewforum.php?forum='.Security::remove_XSS($_GET['forum']).'&amp;gidReq='.$session_toolgroup.'&origin='.$origin.'">'.$current_forum['forum_title'].'</a><br />';
echo '<span class="forum_description">';
echo $current_forum['forum_comment'];
echo '</span>';
echo '</div>';
if ($origin!='learnpath') {
echo '<span class="forum_low_description">'.prepare4display($current_forum_category['cat_title']).' - ';
}
echo prepare4display($current_forum['forum_title']).'<br />';
//echo '<span class="forum_low_description">'.prepare4display($current_forum_category['cat_title']).' ';
}
echo "</th>";
echo "</tr>";
echo '<span>'.prepare4display(isset($current_thread['thread_comment'])?$current_thread['thread_comment']:'').'</span>';
echo "</tr>";
echo "</table>";
switch ($viewmode) {

@ -19,7 +19,7 @@ if (isset($current_thread['thread_id'])){
$clean_thread_id = intval($_GET['thread']);
foreach ($rows as $row) {
echo '<table width="100%" class="post" cellspacing="5" border="0">';
echo '<table width="100%" class="forum_table" cellspacing="5" border="0">';
// the style depends on the status of the message: approved or not
if ($row['visible']=='0') {
$titleclass='forum_message_post_title_2_be_approved';
@ -30,9 +30,16 @@ if (isset($current_thread['thread_id'])){
$messageclass='forum_message_post_text';
$leftclass='forum_message_left';
}
echo '<thead>';
echo '<tr>';
echo '<th class="forum_head" colspan="2">'.prepare4display($row['post_title'])."</th>";
echo '</tr>';
echo '</thead>';
echo "<tr>";
echo "<td rowspan=\"3\" class=\"$leftclass\">";
//echo "<td rowspan=\"3\" class=\"$leftclass\">";
echo "<td rowspan=\"2\" class=\"$leftclass\">";
if ($row['user_id']=='0') {
$name=prepare4display($row['poster_name']);
} else {
@ -53,8 +60,9 @@ if (isset($current_thread['thread_id'])){
// The user who posted it can edit his thread only if the course admin allowed this in the properties of the forum
// The course admin him/herself can do this off course always
if (($current_forum['allow_edit']==1 AND $row['user_id']==$_user['user_id']) or (api_is_allowed_to_edit(false,true) && !(api_is_course_coach() && $current_forum['session_id']!=$_SESSION['id_session']))) {
if (api_is_allowed_to_session_edit(false,true))
if (api_is_allowed_to_session_edit(false,true)) {
echo "<a href=\"editpost.php?".api_get_cidreq()."&amp;gidReq=".Security::remove_XSS($_GET['gidReq'])."&forum=".$clean_forum_id."&amp;thread=".$clean_thread_id."&amp;post=".$row['post_id']."&origin=".$origin."&edit=edition&id_attach=".$id_attach."\">".icon('../img/edit.gif',get_lang('Edit'))."</a>";
}
}
if ($origin != 'learnpath') {
@ -113,7 +121,7 @@ if (isset($current_thread['thread_id'])){
$post_image.=icon('../img/forumnotification.gif',get_lang('YouWillBeNotified'));
}
// The post title
echo "<td class=\"$titleclass\">".prepare4display($row['post_title'])."</td>";
echo "</tr>";
// The post message

@ -170,7 +170,7 @@ else
// we mark the image we are displaying as set
unset($whatsnew_post_info[$current_forum['forum_id']][$current_thread['thread_id']][$rows[$display_post_id]['post_id']]);
echo "<table width=\"100%\" class=\"post\" cellspacing=\"5\" border=\"0\">";
echo "<table width=\"100%\" class=\"forum_table\" cellspacing=\"5\" border=\"0\">";
echo "<tr>";
echo "<td rowspan=\"3\" class=\"$leftclass\">";
if ($rows[$display_post_id]['user_id']=='0') {

Loading…
Cancel
Save