3.0.5 ja Ajax/Shoutbox

MODien asennus ja omat muokkaukset.
markov
Aloittelija
Aloittelija
Viestit:9
Liittynyt:14 Huhti 2009, 22:19
3.0.5 ja Ajax/Shoutbox

Viesti Kirjoittaja markov » 18 Heinä 2009, 14:57

Päivitin foorumin äskettäin 3.0.5-versioon ja asensin sen jälkeen Ajax Chatin- kaikki ok. Shoutboxin asentamiseen kaipaisin vähän lisäselvennystä: mitä mihinkin tiedostoon ja missä muodossa polut on oltava (AJAX_CHAT_PATH / AJAX_CHAT_URL). Jos joku pysty tarkemmin sanomaan tästä tai tietää muualla asiaa jo käsitellyn, niin please! Ilmeisesti Shoutbox kuitenkin on asennettavissa tähänkin versioon?

Kiitoksia!

_____________________________________
Shoutbox:
=========
AJAX Chat is also usable as shoutbox - this is a short guide on how to set it up:

1. Shoutbox stylesheet
----------------------

Add the following line to the stylesheet (CSS) of all pages displaying the shoutbox:

@import url("http://example.org/path/to/chat/css/shoutbox.css");

Replace http://example.org/path/to/chat/ with the URL to the chat.
Modify css/shoutbox.css to your liking.


2. Shoutbox function
--------------------

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;
}
?>

Make sure AJAX_CHAT_URL and AJAX_CHAT_PATH point to the chat directory.


2. Shoutbox output
------------------

Display the shoutbox content using the shoutbox function:

<div style="width:200px;"><?php echo getShoutBoxContent(); ?></div>

____________________________________________

Avatar
Peetra
phpBB Bitch
phpBB Bitch
Viestit:1169
Liittynyt:04 Kesä 2007, 16:45
Paikkakunta:Kokkola
Viesti:

Re: 3.0.5 ja Ajax/Shoutbox

Viesti Kirjoittaja Peetra » 19 Heinä 2009, 14:32

Ne ovat kaikki nimeltään jokin AJax Chat, voitko antaa urlia mistä nimenomaisesta chatista puhut?
muista backuppi!
hyvä copy/paste monen kannan dumpille: http://www.patrickpatoray.com/?Page=30 // ei tartte omaa ohjelmistoa.
hyvä ison kannan dumpeille http://www.mysqldumper.net/ //Selkeä käyttöliittymä! Asentuu palvelimelle kuin itsestään. :ugeek:

Viestiketju Lukittu

Paikallaolijat

Käyttäjiä lukemassa tätä aluetta: Ei rekisteröityneitä käyttäjiä ja 63 vierailijaa