Ctrl+V
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Ctrl+VLog in

Phát triển ứng dụng forumotion

Lorem ipsum dolor sit amet.
Zzbaivong: Minim veniam, quis nostrud exercitation ullamco.
Duis aute irure dolor Devs Forumvi.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
jQuery Plugin announcement
By Zzbaivong

Sử dụng "Variables" ở mọi nơi trong forum

power_settings_newLogin to reply

20100405
Sử dụng "Variables" ở mọi nơi trong forum

Bài viết này hướng dẫn các bạn có thể sử dụng Variables
ở mọi nơi trên forum như trong template, trang
html
.
Bước 1: Download file dưới đây và upload
lại lên host của bạn (host phải hỗ trợ link trực tiếp).
file : http://www.box.net/shared/5stak7o3ed
Sau khi upload link của file có dạng

Code:

[url=http://host_c/]http://host_c[/url]ủa_bạn/FMvar.js

Bước 2: Chèn đoạn sau vào overall_header hoặc
overall_footer

Code:

<script type="text/javascript"
src="http://host_của_bạn/FMvar.js"></script>


Nếu muốn hiệu lực "Variables" ở trang html - thì chèn vào
trang html
của bạn.
Bước 3: Sau đó, ta đã có thể chèn
"Variables", nhưng có 1 chút khác biệt.
Thay vì sử dụng dấu ngoặc
{USER...} hay {FORUM...} như bình thường, bạn phải Chèn như 1 tag html.
với classtên Variables
Ví dụ:

Code:

<span class="USERNAME"></span>

sẽ hiển thị

Code:

(tên người đang xem)


Code:

<span class="USERNAME">Bạn là: </span>

Sẽ hiển thị

Code:

Bạn là: (tên người đang xem)

Một ví dụ khác:

Code:

<ul>
<li class="FORUMAGE">Ngày hoạt động :
</li>
<li class="FORUMCOUNTFORUM">Số bài viết :
</li>
<li class="FORUMCOUNTOPIC">Số topic : </li>
</ul>
 

Sẽ hiển thị như :

Code:

<ul>
<li>Ngày hoạt động : 726</li>
<li>Số
bài viết : 92</li>
<li>Số topic : 4952</li>
</ul>

Comments

No Comment.
power_settings_newLogin to reply
remove_circleSimilar topics
privacy_tip Permissions in this forum:
You cannot reply to topics in this forum