| Zobraziť predchádzajúcu tému :: Zobraziť nasledujúcu tému |
| Autor |
Správa |
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: št august 02, 2007 12:52 pm Predmet: Problem s blokom |
|
|
Caute,chcel som pridat na nasu stranku blok ktory by zobrazoval pocet chatujucich uzivatelov. Len problem je taky ze sa to zobrazuje nad blokom a pise ze v bloku sa nic nenachadza, v PHP sa nevyznam takze si s tym neviem poradit, preto vas prosim o pomoc.
Dakujem
Tu je ten kod:
| Kód: | ?php
/************************************************************************/
/* PHP-NUKE: Web Portal System */
/* =========================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi */
/* http://phpnuke.org */
/* */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License. */
/************************************************************************/
if (eregi("block-Sample_Block.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
// This script is an example of display, in another page of your website,
// the list or number of users connected to the chat
// Lines below must be at the top of your file and completed according
// to your settings
// relative path from this page to your chat directory
$ChatPath = "chat/";
// HTML link to launch the chat (used by constants below)
$ChatLaunch = "<A HREF="phpMyChat.php\" TARGET="_self\">chatting</A>";
$ShowPrivate = "0"; // 1 to display users even if they are in a private room,
// 0 else
$DisplayUsers = "0"; // 0 to display only the number of connected users
// 1 to display a list of users
define("NB_USERS_IN","users are ".$ChatLaunch." at this time."); // used if $DisplayUsers = 0
define("USERS_LOGIN","User ".$ChatLaunch." at this time:"); // used if $DisplayUsers = 1
define("NO_USER","Nobody is ".$ChatLaunch." at this time.");
require("./${ChatPath}/lib/connected_users.lib.php");
display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER);
?> |
|
|
| Návrat hore |
|
Sponzor
 |
|
 |
crapper Adept


Zaregistrovaný od: 13. 07. 2005 Príspevky: 62
|
Zaslal: št august 02, 2007 5:25 pm Predmet: |
|
|
vše co se má zobrazovat v bloku musí být uloženo do
takže | Kód: |
$content = " text nebo html kod ";
|
se zobrazí správně v bloku a ne nad ním. |
|
| Návrat hore |
|
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: št august 02, 2007 7:14 pm Predmet: |
|
|
| crapper napísal: | vše co se má zobrazovat v bloku musí být uloženo do
takže | Kód: |
$content = " text nebo html kod ";
|
se zobrazí správně v bloku a ne nad ním. |
Ano na to som prisiel ale neviem ako do toho zapisat php, html znacky a text tam pohode ide ale potrebujem tam dostat toto:
display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER); |
|
| Návrat hore |
|
deiky Hosting member


Zaregistrovaný od: 16. 10. 2006 Príspevky: 147 Bydlisko: Prešov
|
Zaslal: št august 02, 2007 11:06 pm Predmet: |
|
|
| Ked ti tam ide php tak by ti ta malo ist aj toto |
|
| Návrat hore |
|
drakeman Webmaster


Zaregistrovaný od: 30. 04. 2005 Príspevky: 4398 Bydlisko: Slovakia
|
|
| Návrat hore |
|
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: pia august 03, 2007 7:24 pm Predmet: |
|
|
No bohuzial cez to to nefunguje  |
|
| Návrat hore |
|
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: po august 06, 2007 9:20 am Predmet: |
|
|
| No co nikto nevie ako to mam vyriesit? |
|
| Návrat hore |
|
crapper Adept


Zaregistrovaný od: 13. 07. 2005 Príspevky: 62
|
Zaslal: po august 06, 2007 9:38 am Predmet: |
|
|
tohle nefunguje?
| Kód: | | $content = "display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER);"; |
|
|
| Návrat hore |
|
Sponzor
 |
|
 |
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: po august 06, 2007 11:47 am Predmet: |
|
|
| crapper napísal: | tohle nefunguje?
| Kód: | | $content = "display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER);"; |
|
Nie nefunguje, vypise to len ako text |
|
| Návrat hore |
|
crapper Adept


Zaregistrovaný od: 13. 07. 2005 Príspevky: 62
|
Zaslal: po august 06, 2007 2:14 pm Predmet: |
|
|
a co tohle | Kód: | | $content = display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER); |
|
|
| Návrat hore |
|
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: ut august 07, 2007 8:35 am Predmet: |
|
|
| crapper napísal: | a co tohle | Kód: | | $content = display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? USERS_LOGIN : NB_USERS_IN),NO_USER); |
|
Ani to nie teraz to funguje ale je to nad blokom ako predtym |
|
| Návrat hore |
|
Blassen Moderator


Zaregistrovaný od: 30. 05. 2005 Príspevky: 758
|
|
| Návrat hore |
|
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: st august 08, 2007 7:27 pm Predmet: |
|
|
| Blassen napísal: | a co tohle
| Kód: |
$content = "";
display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? $content .= "USERS_LOGIN"; : $content .= "NB_USERS_IN";),$content .= "NO_USER";);
|
|
No tak to je sranda ani toto nejde, pise ze sa mu nepaci znak ;  |
|
| Návrat hore |
|
Blassen Moderator


Zaregistrovaný od: 30. 05. 2005 Príspevky: 758
|
Zaslal: st august 08, 2007 7:55 pm Predmet: |
|
|
tak si s tim pohraj a zjisti kterej
| Kód: |
$content = "";
$userlogin = "USERS_LOGIN";
$useruinnb = "NB_USERS_IN";
$zadnyuseri = "NO_USER";
display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? $content .= $userlogin; : $content .= $useruinnb;),$content .= $zadnyuseri;);
|
| Kód: |
$content = "";
$userlogin = "USERS_LOGIN";
$useruinnb = "NB_USERS_IN";
$zadnyuseri = "NO_USER";
display_connected($ShowPrivate,$DisplayUsers) {
if ($DisplayUsers) { $content .= $userlogin; }
elseif { $content .= $useruinnb; }
else { $content .= $zadnyuseri; }
}
|
jak vypadá ta funkce display_connected ? _________________ BLASSENweb
Theme Demo System
Zvyšte si zdarma návštěvnost Vaší stránky ! |
|
| Návrat hore |
|
zawin Novice


Zaregistrovaný od: 15. 07. 2006 Príspevky: 49
|
Zaslal: st august 08, 2007 8:46 pm Predmet: |
|
|
V prvom pripad je chyba v riadku
| Kód: | | display_connected($ShowPrivate,$DisplayUsers,($DisplayUsers ? $content .= $userlogin; | :
a vypise
Parse error: syntax error, unexpected ';' in
a v druhom pripade bola chyba v riadku
| Kód: | | display_connected($ShowPrivate,$DisplayUsers) { |
a napisalo chybu
Parse error: syntax error, unexpected '{'
Navrchu co je ten zdrojak tak to je vsetko co mam k tomu neviem aku funkciu myslis |
|
| Návrat hore |
|
|