Thứ Ba, 27 tháng 10, 2015

NukeViet: Tạo kiểu cho Block

Như mục <Tin mới> và <Tin nổi bật> trong bài trước có màu đỏ và xanh.
1. Mở folder: themes/default/layout/ tạo file block.kieu_block_moi.tpl, với nội dung:
<!-- BEGIN: mainblock -->
<div class="kieu_block_moi">
    <h3 class="header"><strong>&bull;</strong>{BLOCK_TITLE}</h3>
{BLOCK_CONTENT}
</div>


<!--  END: mainblock -->
2. Thêm vào file template.css:
div.box .kieu_block_moi strong,
.kieu_block_moi.header{
    background: #E04343;
height:28px;line-height:28px;color:#000;text-indent:10px}
.kieu_block_moi{
    background: #ECF3F7;border: 1px solid #FFFFFF;
}
**** xong ****

NukeViet: Thêm block/ Chia nhỏ giao diện thành nhiều block


Ví dụ như mục <Tin mới> và <Tin nổi bật> được tạo ra như hình dưới:


Cách làm:
1. Mở file themes/default/config.ini, thêm các block mới vào:
<position>
<name>block moi1</name>
<tag>[BLOCK_MOI1]</tag>
</position>
        
        <position>
                        <name>block moi2</name>
<tag>[BLOCK_MOI2]</tag>
</position>
2. Giả sử thay đổi ở giao diện layout left-body-right thì mở file layout.left-body-right.tpl trong themes/default/layout, thêm các block vào vị trí nào mình muốn. Như hình trên thì thêm vào dưới TOP:
        [TOP]        
      <div class="BLOCK_MOI1" >
         [BLOCK_MOI1]
      </div>
      <div class="BLOCK_MOI2" >
         [BLOCK_MOI2]
      </div>        
        {MODULE_CONTENT}
        [BOTTOM]
3. Vào template.css  trong themes/default/css để thêm:
 a.  Thêm sau  .span-23,.span-24, .span-25 chuỗi: ,.BLOCK_MOI1, .BLOCK_MOI2
 Kết quả thành: .span-23,.span-24, .span-25,.BLOCK_MOI1, .BLOCK_MOI2
b. Thiết đặt style cho nó:
.BLOCK_MOI1{
      width: 245px; //bề rộng
      overflow-y: scroll; //cho phép cuộn dọc trục y
      height: 400px; //chiều cao 
}
.BLOCK_MOI2{
      width: 245px;
      overflow-y: scroll;
      height: 400px;
}

Lưu lại, vào  Admin -> Dọn dẹp hệ thống -> Xóa cache 
F5 để xem kết quả.
****** hết *****




Chủ Nhật, 25 tháng 10, 2015

NukeViet chèn iframe youtube

Cách 1: dùng block global html của hệ thống:
 file /includes/constants.php , sửa dòng :
// Ma HTML duoc chap nhan
define( 'NV_ALLOWED_HTML_TAGS', 'embed, object, param, a, b, blockquote, br, caption, col, colgroup, div, em, h1, h2, h3, h4, h5, h6, hr, i, img, li, p, span, strong, sub, sup, table, tbody, td, th, tr, u, ul' );

Nếu vẫn chưa được thì mở file includes\class\request.class.php xóa iframe trong đoạn:
private $disabletags = array( 
        "applet", "body", "basefont", "head", "html", "id", "meta", "xml", "blink", "link", "style", "script", "iframe", "frame", "frameset", "ilayer", "layer", "bgsound", "title", "base" 
    );
và xóa đoạn code chuyển youtube thành swfplayer.

Cách 2: dùng block iframe.

NUKEVIET - Slide ảnh demo

NUKEVIET - Slide ảnh demo, đã test tên nukeviet3.4 cả local và host!
//Theo http://forum.nukeviet.vn/viewtopic.php?f=103&t=16686
**************************
Bỏ hiện số 1,2,3 thì vào file style.css và tìm :
.nivo-controlNav {
   position:absolute;
   left:260px;
   bottom:-42px;
}
thêm visibility:hidden; vào như sau:
.nivo-controlNav {
   position:absolute;
   left:260px;
   bottom:-42px;

   visibility:hidden;
}
****************************
Còn nút next thì bạn xem trong file style.css có 2 cái này chưa :
a.nivo-nextNav {
   background-position:-30px 0;
   right:15px;
}
a.nivo-prevNav {
   left:15px;
}
*********************
Link tải :
https://drive.google.com/file/d/0B3MbGKsNEy3ANkZJcTZLU1d2TXc/view?usp=sharing
Huong dan:

Copy File global.anhdemo.php vao: includes\blocks...

Copy thu muc: demo vao trong theme ma ban dang su dung:


Vao: layout mo theme: header.tpl
Them: 
        <link rel="stylesheet" type="text/css" media="screen" href="{NV_BASE_SITEURL}themes/{TEMPLATE}/demo/nivo-slider.css" />
<link rel="stylesheet" type="text/css" media="screen" href="{NV_BASE_SITEURL}themes/{TEMPLATE}/demo/style.css" />


    <script type="text/javascript" src="{NV_BASE_SITEURL}themes/{TEMPLATE}/demo/scripts/jquery-1.4.3.min.js"></script>
    <script type="text/javascript" src="{NV_BASE_SITEURL}themes/{TEMPLATE}/demo/scripts/jquery.nivo.slider.pack.js"></script>
    <script type="text/javascript">
    $(window).load(function() {
        $('#slider').nivoSlider();
    });

    </script>

Thứ Hai, 12 tháng 10, 2015

Tuyển cộng tác viên phát triển Game trên Unity

Hiện nay Team chúng tôi đang có nhu cầu tuyển cộng tác viên phát triển game trên nền tảng UNITY:

* Số lượng: 02.

* Yêu cầu:

- Biết ít nhất 1 ngôn ngữ lập trình: C/C++/C#/Java...

- Yêu thích phát triển game.

* Ưu tiên các ứng viên:

- Sinh viên hoặc vừa tốt nghiệp.

- Có kiến thức về lập trình hướng đối tượng, sử dụng được C#.

- Có chút năng khiếu mỹ thuật, đồ họa.

- Biết Unity.

- Có mục tiêu, hoài bão và có khát vọng thành công.

- Có kỹ năng làm việc nhóm.

- Có niềm đam mê!

* Quyền lợi:

- Được đào tạo 1 tháng về phát triển game trên Unity trước khi làm việc.

- Môi trường làm việc sáng tạo, thân thiện, cởi mở.

- Sẽ là những người tiên phong trong Team nên khi Team phát triển lên sẽ có cơ hội trở thành Leader.

- Làm việc tại văn phòng K356/60 Hoàng Diệu, Đà Nẵng.

- Được sử dụng wifi và cafe miễn phí.

* Chi tiết công việc sẽ trao đổi cụ thể hơn trong quá trình phỏng vấn.

* Ứng viên quan tâm vui lòng liên hệ:

- Email: truongnguyendev@gmail.com
- Mobile: 0914.570.789



Chủ Nhật, 26 tháng 7, 2015

Unity share FB, TWiter

string facebookshare = "https://www.facebook.com/sharer/sharer.php?u=" + Uri.EscapeUriString(link);
Application.OpenURL(facebookshare);
string twittershare = "http://twitter.com/home?status=" + Uri.EscapeUriString(link);
Application.OpenURL(twittershare);

Thứ Bảy, 25 tháng 7, 2015

Lấy ArmatureNode từ CocosStudio

1/ Header:
#include "cocostudio/CocoStudio.h"
#include "UI/CocosGUI.h"
#include "editor-support/cocostudio/CocoStudio.h"
using namespace cocostudio::timeline;
using namespace cocostudio;

2/ Dùng 1 trong các cách sau:

C1: (cách này ko removeChild và không tạo được >1 đối tượng):
Node *armature = rootNode->getChildByName("ArmatureNode_1");
// cocostudio::Armature *armature = (cocostudio::Armature *)rootNode->getChildByName("ArmatureNode_1");
// Node *armature = rootNode->getChildByTag(11);
// cocostudio::Armature *armature = (cocostudio::Armature *)rootNode->getChildByTag(11);

Dùng cách sau thì có thể removeChild và tạo nhiều đối tượng:

cocostudio::Armature *armature;
cocostudio::Armature *armature1;
//get object:
ArmatureDataManager::sharedArmatureDataManager()->addArmatureFileInfo("shooter0.png", "shooter0.plist", "shooter.ExportJson");
armature = Armature::create("shooter");
armature->setPosition(Point(visibleSize.width *0.7, visibleSize.height*0.7));
armature->getAnimation()->playByIndex(2);
armature->setScale(0.25);
this->addChild(armature,15);

armature1 = Armature::create("shooter");
armature1->setPosition(Point(visibleSize.width *0.2, visibleSize.height *0.7));
armature1->getAnimation()->playByIndex(2);
armature1->setScale(0.25);
this->addChild(armature1, 15);

3/ Thử đặt lên màn hình:
armature->setPosition(Vec2(15, 15));