CariDotMy

 Forgot password?
 Register

ADVERTISEMENT

Author: polaris_girlz

Terjemahkan CSS ni tuk aku..plsss

[Copy link]
Post time 28-3-2008 10:39 PM | Show all posts

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:

  1. <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:

  1. <?php
  2. function getShoutBoxContent() {
  3.         // URL to the chat directory:
  4.         if(!defined('AJAX_CHAT_URL')) {
  5.                 define('AJAX_CHAT_URL', './chat/');
  6.         }
  7.       
  8.         // Path to the chat directory:
  9.         if(!defined('AJAX_CHAT_PATH')) {
  10.                 define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
  11.         }
  12.       
  13.         // Validate the path to the chat:
  14.         if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
  15.                
  16.                 // Include Class libraries:
  17.                 require_once(AJAX_CHAT_PATH.'lib/classes.php');
  18.                
  19.                 // Initialize the shoutbox:
  20.                 $ajaxChat = new CustomAJAXChatShoutBox();
  21.                
  22.                 // Parse and return the shoutbox template content:
  23.                 return $ajaxChat->getShoutBoxContent();
  24.         }
  25.       
  26.         return null;
  27. }
  28. ?>
Copy the Code


Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory.
Reply

Use magic Report


ADVERTISEMENT


Post time 28-3-2008 10:40 PM | Show all posts

Reply #80 polaris_girlz's post

No... yg nak tambah line yg ada "@import..." tu kat template phpBB nyer stylesheet.
Reply

Use magic Report

 Author| Post time 28-3-2008 10:50 PM | Show all posts

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

Use magic Report

Post time 28-3-2008 10:54 PM | Show all posts

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

Use magic Report

 Author| Post time 28-3-2008 11:01 PM | Show all posts

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

Use magic Report

Post time 28-3-2008 11:14 PM | Show all posts

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:

  1. <?php
  2. function getShoutBoxContent() {
  3.         // URL to the chat directory:
  4.         if(!defined('AJAX_CHAT_URL')) {
  5.                 define('AJAX_CHAT_URL', './chat/');
  6.         }
  7.       
  8.         // Path to the chat directory:
  9.         if(!defined('AJAX_CHAT_PATH')) {
  10.                 define('AJAX_CHAT_PATH', realpath(dirname($_SERVER['SCRIPT_FILENAME']).'/chat').'/');
  11.         }
  12.       
  13.         // Validate the path to the chat:
  14.         if(@is_file(AJAX_CHAT_PATH.'lib/classes.php')) {
  15.                
  16.                 // Include Class libraries:
  17.                 require_once(AJAX_CHAT_PATH.'lib/classes.php');
  18.                
  19.                 // Initialize the shoutbox:
  20.                 $ajaxChat = new CustomAJAXChatShoutBox();
  21.                
  22.                 // Parse and return the shoutbox template content:
  23.                 return $ajaxChat->getShoutBoxContent();
  24.         }
  25.       
  26.         return null;
  27. }
  28. ?>
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

Use magic Report

Follow Us
 Author| Post time 28-3-2008 11:20 PM | Show all posts

Reply #86 0001's post

nak letak kat front page portal tu..
jadi nyer code tu letak kat css template tu lah kan?

xpon kena letak dlm file php kat dlm phpbb tu? xkisah lah file apapon ek?
tp ada byk....yg mana satu   
style.php? viewforum.php? index.php?
camno lak mo buka file php tu?
kn install easyphp lah kan?

apa beza nyer
AJAX_CHAT_URL
dgn
AJAX_CHAT_PATH




waaaaa aku ni betul2 zer0 basic mende2 camni

[ Last edited by  polaris_girlz at 28-3-2008 11:28 PM ]
Reply

Use magic Report

Post time 28-3-2008 11:36 PM | Show all posts

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

Use magic Report


ADVERTISEMENT


 Author| Post time 29-3-2008 12:34 AM | Show all posts

Reply #88 0001's post

ok....sy try letak dl dlm index.php....
buka pakai notepad...nak save lak camne?
dia dah jadi dlm bentuk notepad lak....xmcm yg asal...

AJAX_CHAT_URL = www.polaris_girlz.com/forum/chat <-- tul ker

AJAX_CHAT_PATH = huh xpaham

info :
folder chat sy berada sperti dlm gambarrajah di bawah :-




jadi nyer?

* Gud Nite
Reply

Use magic Report

Post time 29-3-2008 09:01 AM | Show all posts

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:

  1. ../chat/
Copy the Code
Reply

Use magic Report

 Author| Post time 29-3-2008 10:05 AM | Show all posts

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?
Reply

Use magic Report

 Author| Post time 29-3-2008 10:21 AM | Show all posts
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

Use magic Report

Post time 29-3-2008 10:30 AM | Show all posts

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

Use magic Report

 Author| Post time 29-3-2008 10:36 AM | Show all posts

Reply #93 0001's post

dreamweaver tarak
kalo guna easyphp leh tak...
ari tu baca majalah pc, dia kata senang guna Easyphp je
Reply

Use magic Report

Post time 29-3-2008 10:48 AM | Show all posts

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

Use magic Report

 Author| Post time 29-3-2008 10:54 AM | Show all posts

Reply #95 0001's post

masalahnyer nak guna pon xreti ni arrghhhh
adehhh majalah tu kat opis lak....sbb dlm majalah tu ada tutorial

nak try dload dreamweaver lak
Reply

Use magic Report


ADVERTISEMENT


Post time 29-3-2008 11:02 AM | Show all posts

Reply #96 polaris_girlz's post

Check PM.
Reply

Use magic Report

 Author| Post time 29-3-2008 11:13 AM | Show all posts

Reply #97 0001's post

TQ
nanti try guna yg tu lak.....

susahnyer nak build wsite sndrik
kalo leh buat ni...mmg teror la...kena wat kenduri kesyukuran 7hari 7mlm
Reply

Use magic Report

Post time 29-3-2008 11:19 AM | Show all posts

Reply #98 polaris_girlz's post

Make sure tukar menu tiap2 hari ko kenduri tu... aku gerenti gi tenggek sana 7 hari/7 malam.
Reply

Use magic Report

 Author| Post time 29-3-2008 12:15 PM | Show all posts

Reply #99 0001's post

nasi putih + air paipsi; P

mende tu dah install....
so camne nak guna?

sy dah paste code index.php tu kat sana...
pastu tgk error dia kat line dia yg kat tepi tu.....
bistu nak buat pe..... sbb dia xtujuk pun apa2 error kat situ....

[ Last edited by  polaris_girlz at 29-3-2008 12:21 PM ]
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

 

ADVERTISEMENT



 

ADVERTISEMENT


 


ADVERTISEMENT
Follow Us

ADVERTISEMENT


Mobile|Archiver|Mobile*default|About Us|CariDotMy

22-1-2025 01:35 PM GMT+8 , Processed in 0.119602 second(s), 30 queries , Gzip On, Redis On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

Quick Reply To Top Return to the list