|
Reply #79 polaris_girlz's post
No, bukan dua-dua URL... just tambah satu line (yg ada "@import..." tu jer kat stylesheet (nama_stylesheet.css) tu.
Yang part 2. Shoutbox output teramat penting ko letak line bawah ni kat exactly mana ko nak shoutbox/chat tu to appear:
- <div style="width:200px;"><?php echo getShoutBoxContent(); ?></div>
Copy the Code
Yang part 2. Shoutbox function ni tak kisah sangat mana ko nak letak dalam file page mana ko nak letak shoutbox/chat tu:
Add the following function to your PHP code:
- <?php
- function getShoutBoxContent() {
- // URL to the chat directory:
- if(!defined('AJAX_CHAT_URL')) {
- define('AJAX_CHAT_URL', './chat/');
- }
-
- // Path to the chat directory:
- if(!defined('AJAX_CHAT_PATH')) {
- define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
- }
-
- // Validate the path to the chat:
- if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
-
- // Include Class libraries:
- require_once(AJAX_CHAT_PATH.'lib/classes.php');
-
- // Initialize the shoutbox:
- $ajaxChat = new CustomAJAXChatShoutBox();
-
- // Parse and return the shoutbox template content:
- return $ajaxChat->getShoutBoxContent();
- }
-
- return null;
- }
- ?>
Copy the Code
Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory. |
|
|
|
|
|
|
|
Reply #80 polaris_girlz's post
No... yg nak tambah line yg ada "@import..." tu kat template phpBB nyer stylesheet. |
|
|
|
|
|
|
|
Reply #81 0001's post
Ok..bos paham.....
yg Shoutbox function tu camne nak letak kat PHP?
kurang paham la
letak kat css tu gak ek? |
|
|
|
|
|
|
|
Reply #83 polaris_girlz's post
Yg Shoutbox function tu letak the entire set of codes tu kat page phpBB tu... bukan kat CSS dia. Pastikan SEMUA instances of "AJAX_CHAT_URL" and "AJAX_CHAT_PATH" tu di gantikan dan point ke tempat sepatutnya. |
|
|
|
|
|
|
|
Reply #84 0001's post
ya ampun.....
gue enggak ngerti....
apa ke lembap aku ni :cry:
entire set of codes tu kat page phpBB
maksud dia camne?
create file PHP baru...masukkan code tu?
letak kat phpbb?
kat phpbb tu manyak file :cry:
manyak code :cry: |
|
|
|
|
|
|
|
Reply #85 polaris_girlz's post
Dah malam ni kot... semua cel2 otak dah nak tido (termasuk aku nyer).
Maksud aku hanya tambah codes yg berikut kat dalam page mana u nak letak shoutbox tu:
- <?php
- function getShoutBoxContent() {
- // URL to the chat directory:
- if(!defined('AJAX_CHAT_URL')) {
- define('AJAX_CHAT_URL', './chat/');
- }
-
- // Path to the chat directory:
- if(!defined('AJAX_CHAT_PATH')) {
- define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
- }
-
- // Validate the path to the chat:
- if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
-
- // Include Class libraries:
- require_once(AJAX_CHAT_PATH.'lib/classes.php');
-
- // Initialize the shoutbox:
- $ajaxChat = new CustomAJAXChatShoutBox();
-
- // Parse and return the shoutbox template content:
- return $ajaxChat->getShoutBoxContent();
- }
-
- return null;
- }
- ?>
Copy the Code
Lagi sekali, make sure text berikut (dalam codes atas tu):
AJAX_CHAT_URL
dan
AJAX_CHAT_PATH
diganti dengan the correct paths ke tempat2 yg sepatutnya. |
|
|
|
|
|
|
|
Reply #87 polaris_girlz's post
Codes atas tu tak diletakkan dalam css template. Kalau tak silap aku, letak dalam index.php. Also tengok kalau ada 'includes' kat dalam tu... kalau tempat ko nak tepek chat tu dari an 'included' file, then code utk placement chat tu kena letak dalam file tersebut.
AJAX_CHAT_URL = full address chat tu... "http://www.polaris_girlz.com/....."
AJAX_CHAT_PATH = kat mana file/folder tu terletak berdasarkan ngan current file... katakan current file tu kat root directory, and chat tu kat folder 'MYCHAT' kat dalam folder 'CHAT' yg terletak dalam root directory juga, then path nyer = CHAT/MYCHAT
Nak bukak file php tu bukak jer dalam Dreamweaver... atau even Notepad pun boleh.
Ok... otak aku dah kering dah ni... tido time. Nanti kalau ada apa2, kita sambung besok. Good night and semoga berjaya. |
|
|
|
|
|
|
|
Reply #89 polaris_girlz's post
Pasal nak save in Notepad, bila ko nak save, pilih SAVE AS, then type ni kat filename "nama_file.php" << semua sekali yg merah tu termasuk quotation marks. Then tekan ENTER key.
Pasal AJAX_CHAT_PATH tu... berdasarkan folder setup ko, cuba yg ni:
|
|
|
|
|
|
|
|
Reply #90 0001's post
AJAX_CHAT_PATH tu just taip /chat/ tu je ek
// Shoutbox
<?php
function getShoutBoxContent() {
// URL to the chat directory:
if(!defined('www.polaris_girlz.com/forum/chat')) {
define('www.polaris_girlz.com/forum/chat', './chat/');
}
// Path to the chat directory:
if(!defined('/chat/')) {
define('/chat/', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
}
// Validate the path to the chat:
if(@is_file(/chat/.'lib/classes.php')) {
// Include Class libraries:
require_once(/chat/.'lib/classes.php');
// Initialize the shoutbox:
$ajaxChat = new CustomAJAXChatShoutBox();
// Parse and return the shoutbox template content:
return $ajaxChat->getShoutBoxContent();
}
return null;
camni ker? |
|
|
|
|
|
|
|
dah try buat camtu kat index.php
kuar error la..
Parse error: syntax error, unexpected '<' in bal...bla.....bla....bl.a...../forum/index.php on line 133
patutnyer letak kat file mana ek?
commom.php
config.php
cron.php
faq.php
index.php
mcp.php
memberlist.php
posting.php
report.php
search.php
style.php
ucp.php
viewforum.php
viewonline.php
viewtopic.php |
|
|
|
|
|
|
|
Reply #91 polaris_girlz's post
bukan /chat/ jer... kena ada ../chat/
Error kat line #133...
Cuba buka index.php tu kat dalam dreamweaver... then gi line #133 and tengok apa yg pelik kat situ. |
|
|
|
|
|
|
|
Reply #93 0001's post
dreamweaver tarak
kalo guna easyphp leh tak...
ari tu baca majalah pc, dia kata senang guna Easyphp je |
|
|
|
|
|
|
|
Reply #94 polaris_girlz's post
Sebenarnya boleh guna apa2 text software... aku personally guna ONLY dreamweaver... selain features lain yg aku suka, software tu ada line numbers kat tepi. Cubalah guna EasyPHP tu... kalau ada line numbers kat tepi, then senang nak cari line #133 tu... kalau tak kena berkira satu2 laine lah ko. |
|
|
|
|
|
|
|
Reply #96 polaris_girlz's post
Check PM. |
|
|
|
|
|
|
|
Reply #98 polaris_girlz's post
Make sure tukar menu tiap2 hari ko kenduri tu... aku gerenti gi tenggek sana 7 hari/7 malam. |
|
|
|
|
|
|
| |
|