Điều hành viên: Hỗ trợ NukeViet







hoatygon35 đã viết:Mình làm như vậy,lúc đầu tìm ra trang chủ tìm mãi ko thấy chổ nào,sau đó vào phần tin tức thì nó hiện ra. Mình không lấy modul news làm trang chủ nên ko thấy. Nó cũng chỉ hiển thị được trên modul new thôi,nó không hiển thị trên các modul khác được. Block đăng bài viết cũng vậy.Có ai hướng dẫn chuyển nó thành block của hệ thống không? Cảm ơn rất nhiều,modul hay nhưng chưa thực sự tốt


ldbienhac đã viết:hoatygon35 đã viết:Mình làm như vậy,lúc đầu tìm ra trang chủ tìm mãi ko thấy chổ nào,sau đó vào phần tin tức thì nó hiện ra. Mình không lấy modul news làm trang chủ nên ko thấy. Nó cũng chỉ hiển thị được trên modul new thôi,nó không hiển thị trên các modul khác được. Block đăng bài viết cũng vậy.Có ai hướng dẫn chuyển nó thành block của hệ thống không? Cảm ơn rất nhiều,modul hay nhưng chưa thực sự tốt
Đã có tại đây :http://nukeviet.vn/phpbb/viewtopic.php?f=103&t=20014#p102001
ldbienhac đã viết:Thể theo yêu cầu tại đây: http://nukeviet.vn/phpbb/viewtopic.php?f=103&t=18605
mình sẽ share cho những ai cần (nhất là site giáo dục ) block thông báo mới này, các bạn up lên host theo đường dẫn
modules/news/block và kích hoạt block lên nhé:
file ảnh :các bạn up lên thumucweb/images

hongthailha đã viết:Bị đụng với module album và module dccb thì sửa như thế nào đây bạn




vanlang đã viết:Đã nhắn nhở vàb thông báo lỗi rồi mà không dùng block dạng global mà cứ dùng Module?? là sao? Khi có module thì lại yêu cầu block Global, khi có block global thì không dùng. Đúng là chẳng hiểu làm sao.
<?php
/**
* @Author ldbienhac (hoanganhsell@gmail.com)
* @copyright Le Dien Bien
* @createdate 30/04/2011
*/
//////////////////////////////
if ( ! defined( 'NV_SYSTEM' ) ) die( 'Stop!!!' );
global $global_config, $global_array_cat;
$module_name ='news';
$module_data ='news';
$module_file ='news';
$limit = 5; //so ban tin
$Scroll = 1;//Co cho noi dung cua block chay tu duoi len tren hay khong. 0 - khong, 1 - dong y
$bgcolor1 = "red";//"#FFFFAA";
$bgcolor2 = "navy";//"#06FF83";
$bgcolor_2 = "#FFFFFF";//"#FFFFAA";
$bgcolor_1 = "#F2F2F2";//"#06FF83";
############### Het phan khai bao ##########################
$array_block_news = array();
$result1 = "SELECT id, listcatid, publtime, exptime, title, alias, homeimgthumb FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` WHERE `status`= 1 AND `publtime` < " . NV_CURRENTTIME . " AND (`exptime`=0 OR `exptime`>" . NV_CURRENTTIME . ")AND `listcatid` = 15 ORDER BY `publtime` DESC LIMIT 0 , 5";
$numstories = $db->sql_query( $result1 );
$a = 1;
$content = "";
if($numstories > 0) {
$content .= "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n<tr>\n<td>";
//Neu cho chay ban tin
if ($Scroll) {
$content .= "<marquee behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"150\" scrollamount= \"1\" scrolldelay= \"5\" onmouseover='this.stop()' onmouseout='this.start()'>";
}
//Bang chua tung ban tin
$content .= "<table width=\"100%\" border=\"0\" bordercolor=\"#000080\" cellpadding=\"0\" cellspacing=\"1\">\n";
while ($rowlast1 = $db->sql_fetchrow($numstories)) {
$id = intval($rowlast1['id']);
$catid = end( explode( ",", $rowlast1['listcatid'] ) );
$hometext = stripslashes($rowlast1['title']);
$alias =stripslashes($rowlast1['alias']);
$imgurl = "http://thso1hongthuy.edu.vn/images/new.gif";
//$imagesizex = $imagesizey = 0;
$homeimgthumb = $rowlast1['homeimgthumb'];
if ( $homeimgthumb != "" )
{
$arr_homeimgthumb = explode( "|", $homeimgthumb );
if ( isset( $arr_homeimgthumb[1] ) and ! empty( $arr_homeimgthumb[1] ) and file_exists( NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1] ) )
{
$imgurl = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1];
// $size = @getimagesize( NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1] );
// $imagesizex = $size[0];
// $imagesizey = $size[1];
}
}
$link = NV_BASE_SITEURL . "?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $global_array_cat[$catid]['alias'] . "/" . $alias . "-" . $id;
$bgcolor23 = $bgcolor1;
$bgcolor_23 = $bgcolor_1;
if ($a%2 == 1) { $bgcolor23 = $bgcolor2;$bgcolor_23 = $bgcolor_2; }
//$content .= "<tr>\n<td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\" width=\"100%\" bgcolor=\"$bgcolor23\"><tr>\n";
$content .= "<tr>\n<td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\" bgcolor=\"$bgcolor_23\"><tr>\n";
if ($imgurl !="")
$content .= "<td width=\"70%\" align=\"left\"><a href=\"$link\"><img src=\"$imgurl\" width =\"31\" height =\"16\"><font size=\"2\" color=\"$bgcolor23\">$hometext</a></font></td></tr></table></td>\n</tr>\n";
else
$content .= "<td width=\"1000%\" align=\"left\"><a href=\"$link\"><font size=\"2\" color=\"$bgcolor23\">$hometext</a></font></td></tr></table></td>\n</tr>\n";
$a=$a+1;
}
$content .= "</table>\n";
if ($Scroll) {
$content .= "</marquee>";
}
$content .= "</td>\n</tr>\n</table>\n";
}
?>
boylangthang1610 đã viết:
- Mã: Chọn tất cả
<?php
/**
* @Author ldbienhac (hoanganhsell@gmail.com)
* @copyright Le Dien Bien
* @createdate 30/04/2011
*/
//////////////////////////////
if ( ! defined( 'NV_SYSTEM' ) ) die( 'Stop!!!' );
global $global_config, $global_array_cat;
$module_name ='news';
$module_data ='news';
$module_file ='news';
$limit = 5; //so ban tin
$Scroll = 1;//Co cho noi dung cua block chay tu duoi len tren hay khong. 0 - khong, 1 - dong y
$bgcolor1 = "red";//"#FFFFAA";
$bgcolor2 = "navy";//"#06FF83";
$bgcolor_2 = "#FFFFFF";//"#FFFFAA";
$bgcolor_1 = "#F2F2F2";//"#06FF83";
############### Het phan khai bao ##########################
$array_block_news = array();
$result1 = "SELECT id, listcatid, publtime, exptime, title, alias, homeimgthumb FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` WHERE `status`= 1 AND `publtime` < " . NV_CURRENTTIME . " AND (`exptime`=0 OR `exptime`>" . NV_CURRENTTIME . ")AND `listcatid` = 15 ORDER BY `publtime` DESC LIMIT 0 , 5";
$numstories = $db->sql_query( $result1 );
$a = 1;
$content = "";
if($numstories > 0) {
$content .= "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n<tr>\n<td>";
//Neu cho chay ban tin
if ($Scroll) {
$content .= "<marquee behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"150\" scrollamount= \"1\" scrolldelay= \"5\" onmouseover='this.stop()' onmouseout='this.start()'>";
}
//Bang chua tung ban tin
$content .= "<table width=\"100%\" border=\"0\" bordercolor=\"#000080\" cellpadding=\"0\" cellspacing=\"1\">\n";
while ($rowlast1 = $db->sql_fetchrow($numstories)) {
$id = intval($rowlast1['id']);
$catid = end( explode( ",", $rowlast1['listcatid'] ) );
$hometext = stripslashes($rowlast1['title']);
$alias =stripslashes($rowlast1['alias']);
$imgurl = "http://thso1hongthuy.edu.vn/images/new.gif";
//$imagesizex = $imagesizey = 0;
$homeimgthumb = $rowlast1['homeimgthumb'];
if ( $homeimgthumb != "" )
{
$arr_homeimgthumb = explode( "|", $homeimgthumb );
if ( isset( $arr_homeimgthumb[1] ) and ! empty( $arr_homeimgthumb[1] ) and file_exists( NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1] ) )
{
$imgurl = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1];
// $size = @getimagesize( NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1] );
// $imagesizex = $size[0];
// $imagesizey = $size[1];
}
}
$link = NV_BASE_SITEURL . "?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $global_array_cat[$catid]['alias'] . "/" . $alias . "-" . $id;
$bgcolor23 = $bgcolor1;
$bgcolor_23 = $bgcolor_1;
if ($a%2 == 1) { $bgcolor23 = $bgcolor2;$bgcolor_23 = $bgcolor_2; }
//$content .= "<tr>\n<td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\" width=\"100%\" bgcolor=\"$bgcolor23\"><tr>\n";
$content .= "<tr>\n<td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\" bgcolor=\"$bgcolor_23\"><tr>\n";
if ($imgurl !="")
$content .= "<td width=\"70%\" align=\"left\"><a href=\"$link\"><img src=\"$imgurl\" width =\"31\" height =\"16\"><font size=\"2\" color=\"$bgcolor23\">$hometext</a></font></td></tr></table></td>\n</tr>\n";
else
$content .= "<td width=\"1000%\" align=\"left\"><a href=\"$link\"><font size=\"2\" color=\"$bgcolor23\">$hometext</a></font></td></tr></table></td>\n</tr>\n";
$a=$a+1;
}
$content .= "</table>\n";
if ($Scroll) {
$content .= "</marquee>";
}
$content .= "</td>\n</tr>\n</table>\n";
}
?>
Các bạn xem giúp thế có đúng không ? Mình để ở localhost thì nó chạy ( cuộn lên ) nhưng khi up lên hosting thì nó cứ đứng trơ ra không cuộn. Không biết vì sao ?
Hay là do hosting ????
AND `publtime` < " . NV_CURRENTTIME . " AND (`exptime`=0 OR `exptime`>" . NV_CURRENTTIME . ")`listcatid` = 15


boylangthang1610 đã viết:Đã sữa lại như bác chỉ nó vẫn nhận tin mực mục thông báo của mình nhưng nó không cuộn !
demo: http://www.thnguthuybac.edu.vn
cái thông điệp cuộn nhưng lại bị lỗi không như ở locahost híc !
<?php
/**
* @Author ldbienhac (hoanganhsell@gmail.com)
* @copyright Le Dien Bien
* @createdate 30/04/2011
*/
//////////////////////////////
if ( ! defined( 'NV_SYSTEM' ) ) die( 'Stop!!!' );
global $global_config, $global_array_cat;
$module_name ='news';
$module_data ='news';
$module_file ='news';
$limit = 10; //so ban tin
$Scroll = 1;//Co cho noi dung cua block chay tu duoi len tren hay khong. 0 - khong, 1 - dong y
$bgcolor1 = "red";//"#FFFFAA";
$bgcolor2 = "navy";//"#06FF83";
$bgcolor_2 = "#FFFFFF";//"#FFFFAA";
$bgcolor_1 = "#F2F2F2";//"#06FF83";
############### Het phan khai bao ##########################
$array_block_news = array();
$result1 = "SELECT id, listcatid, publtime, exptime, title, alias, homeimgthumb FROM `" . NV_PREFIXLANG . "_" . $module_data . "_rows` WHERE `status`= 1 AND `listcatid` = 2 ORDER BY `publtime` DESC LIMIT 0 , 10";
$numstories = $db->sql_query( $result1 );
$a = 1;
$content = "";
if($numstories > 0) {
$content .= "<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n<tr>\n<td>";
//Neu cho chay ban tin
if ($Scroll) {
$content .= "<marquee behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"150\" scrollamount= \"1\" scrolldelay= \"5\" onmouseover='this.stop()' onmouseout='this.start()'>";
}
//Bang chua tung ban tin
$content .= "<table width=\"100%\" border=\"0\" bordercolor=\"#000080\" cellpadding=\"0\" cellspacing=\"1\">\n";
while ($rowlast1 = $db->sql_fetchrow($numstories)) {
$id = intval($rowlast1['id']);
$catid = end( explode( ",", $rowlast1['listcatid'] ) );
$hometext = stripslashes($rowlast1['title']);
$alias =stripslashes($rowlast1['alias']);
$imgurl = "http://thcsttgiolinh.edu.vn/images/new.gif";
$homeimgthumb = $rowlast1['homeimgthumb'];
if ( $homeimgthumb != "" )
{
$arr_homeimgthumb = explode( "|", $homeimgthumb );
if ( isset( $arr_homeimgthumb[1] ) and ! empty( $arr_homeimgthumb[1] ) and file_exists( NV_UPLOADS_REAL_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1] ) )
{
$imgurl = NV_BASE_SITEURL . NV_UPLOADS_DIR . '/' . $module_name . '/' . $arr_homeimgthumb[1];
}
}
$link = NV_BASE_SITEURL . "?" . NV_LANG_VARIABLE . "=" . NV_LANG_DATA . "&" . NV_NAME_VARIABLE . "=" . $module_name . "&" . NV_OP_VARIABLE . "=" . $global_array_cat[$catid]['alias'] . "/" . $alias . "-" . $id;
$bgcolor23 = $bgcolor1;
$bgcolor_23 = $bgcolor_1;
if ($a%2 == 1) { $bgcolor23 = $bgcolor2;$bgcolor_23 = $bgcolor_2; }
$content .= "<tr>\n<td><table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"3\" bgcolor=\"$bgcolor_23\"><tr>\n";
if ($imgurl !="")
$content .= "<td width=\"70%\" align=\"left\"><a href=\"$link\"><img src=\"$imgurl\" width =\"31\" height =\"16\"><font size=\"2\" color=\"$bgcolor23\">$hometext</a></font></td></tr></table></td>\n</tr>\n";
else
$content .= "<td width=\"1000%\" align=\"left\"><a href=\"$link\"><font size=\"2\" color=\"$bgcolor23\">$hometext</a></font></td></tr></table></td>\n</tr>\n";
$a=$a+1;
}
$content .= "</table>\n";
if ($Scroll) {
$content .= "</marquee>";
}
$content .= "</td>\n</tr>\n</table>\n";
}
?>$Scroll = 1

khi lên hosting thì không hoạt động.
thật không hiểu nổi vì sao ?

boylangthang1610 đã viết:Mình đã thay code của bạn vào nhưng vẫn không cuôn được !
Mình thấy thế này
1. Thẻ <marquee> chỉ hoạt đông tốt với nội dung trong thẻ là nội dung tỉnh ( không truy xuất dữ liêu ) như cái Block Quảng cáo - Liên kết của mình.
2. Thẻ này hoạt động tốt ở localhost của mình !?khi lên hosting thì không hoạt động.
3. Block thông điệp nó vẫn cuộn nhưng bị lỗi !thật không hiểu nổi vì sao ?
Và mình đang đang ký hosting free để up lên test nếu bên free chạy thì hosting mình mua bị lỗi ! còn không thì ???? vì sao ?




Đang xem chuyên mục này: Không có thành viên nào đang trực tuyến và 4 khách