MyXoops Forum

Aw:: Probleme mit eigenem Block [XOOPS-Themes u. Grafik für XOOPS 2.3] - myXOOPS German Support

Gast

Gepostet am:25.03.2009 15:36
Gast
Gast Offline (Show more)
Posts: 0
Since:
#5

Aw:: Probleme mit eigenem Block

So, hab das ganze mal getestet und mir einfach etwas ohne zu ändern rauskopiert, funzt trotzdem noch nicht. Hier meine Datei:


<?php
global $xoopsUser, $xoopsConfig;
if (!$xoopsUser) {
$block = array();
$block['lang_username'] = _USERNAME;
$block['unamevalue'] = "";
$block['lang_password'] = _PASSWORD;
$block['lang_login'] = _LOGIN;
$block['lang_lostpass'] = _MB_SYSTEM_LPASS;
$block['lang_registernow'] = _MB_SYSTEM_RNOW;
//$block['lang_rememberme'] = _MB_SYSTEM_REMEMBERME;
if ($xoopsConfig['use_ssl'] == 1 && $xoopsConfig['sslloginlink'] != '') {
$block['sslloginlink'] = "<a href=\"javascript:openWithSelfMain('".$xoopsConfig['sslloginlink']."', 'ssllogin', 300, 200);\">"._MB_SYSTEM_SECURE."</a>";
} elseif ($xoopsConfig['usercookie']) {
$block['lang_rememberme'] = _MB_SYSTEM_REMEMBERME;
}
return $block;
}
return false;

?>

Hätte von euch noch jemand eine Idee, zudem stand ich mit dem Rat von alfred etwas auf dem Schlauch mit den PHP-Tags, könntest du mir nochmal erklären.

Der Aufruf für den eigenen Block lautet:

include (XOOPS_ROOT_PATH . '/themes/sd-011-violette-xoops/markus.php') ;

Hoffe der ist richtig, habe bei Inhaltstyp php-Skript verwendet.

alfred

Administrator
Gepostet am:24.03.2009 21:33
alfred
alfred Offline (Show more)
Administrator
Posts: 7619
Since: 06.12.2004
#4

Aw:: Probleme mit eigenem Block

jaein, es gibt schon die Smartys, ist aber etwas umständlich Schau dir die modules/system/blocks/system_block.php an, darin sollten genügend Beispiele für deinen Block sein. Und wichtig, der Block darf nicht mit den PHP-Tags () beginnen/beenden, also ohne diese Tags!

Advertisement

Gepostet am:0
Advertisement (Show more)
Posts: 0
Since: 0


Hier könnten Sie Ihre Anzeige aufgeben!
Bitte kontaktieren Sie uns, um mehr darüber zu erfahren.

Gast

Gepostet am:24.03.2009 20:27
Gast
Gast Offline (Show more)
Posts: 0
Since:
#3

Aw:: Probleme mit eigenem Block

Du meinst wenn ich das alles umstelle auf normale Variablen müsste das gehen?

Hättest du vielleicht mal ein Beispiel?

mcleines

"myXOOPs"-Master
Gepostet am:24.03.2009 19:15
mcleines
mcleines Offline (Show more)
"myXOOPs"-Master
Posts: 1627
Since: 05.10.2004
#2

Aw:: Probleme mit eigenem Block

Das liegt daran, dass in der Html-Datei Smarty-Template-Variablen vorhanden sind. Im eigenen Block gibt es diese Variablen aber nicht.

Gast

Gepostet am:24.03.2009 14:03
Gast
Gast Offline (Show more)
Posts: 0
Since:
#1

Probleme mit eigenem Block

Hallo,

hab ein Problem mit einem eigenen Block. Versuche die unten stehende Datei in einem eigenen Block anzuzeigen. Wenn ich die Datei z.B. in der theme.html aufrufe funktioniert es einwandfrei, rufe ich sie in einem eigenen Block auf kommt nur wildes Textdurcheinander (ich sehe den Quelltext).

Hier die Datei die aufgerufen wird:

<div id="xo-userbar">
<{if !$xoops_isuser}>
<!-- menu in anonymous mode-->
<form method="post" action="<{xoAppUrl /user.php op=login}>">
<input name="uname" type="text" value="loginname" onfocus="this.value=(this.value=='<{$smarty.const.THEME_PSEUDO}>')? '' : this.value ;" title="Loginname" size="15" />
&nbsp;&nbsp;
<input name="pass" type="password" onfocus="this.value=(this.value=='<{$smarty.const.THEME_PASSWORD}>')? '' : this.value ;" title="Passwort" size="15" />
&nbsp;
<input type="hidden" name="xoops_redirect" value="<{$smarty.server.REQUEST_URI}>" />
<{if $lang_siteclosemsg}>
<input type="hidden" name="xoops_login" value="1" />
<{/if}>
<button type="submit"><img src="<{xoImgUrl icons/users/home.png}>" alt="Login" width="22" height="22" title="Login" /></button>
</form>
<p style="text-align: right; padding-right: 2em; font-size: .8em;"><a href="<{xoAppUrl /register.php}>" class="register" title="register">Registrieren</a></p>
<p style="text-align: right; padding-right: 2em; font-size: .8em;"><a href="<{$xoops_url}>/user.php#lost>" class="register" title="lost password">Passwort vergessen?</a></p>
<{else}>
<!-- menu in recorded mode -->
<p class="right">Willkommen <a id="xo-uname" href="<{xoAppUrl /user.php}>" title="profile"><{$xoops_uname}></a></p>
<{xoInboxCount assign=pmcount}>
<a href="<{xoAppUrl viewpmsg.php}>">
<{if $pmcount}>
<img src="<{xoImgUrl icons/users/inbox-full.png}>" title="inbox-full" alt="(<{$pmcount}>) Ungelesene Nachrichten"/>
<{else}>
<img src="<{xoImgUrl icons/users/inbox.png}>" title="Posteingang" alt="new message>"/>
<{/if}>
</a>
<a href="<{xoAppUrl /notifications.php}>" title="Notifications"><img src="<{xoImgUrl icons/users/note_view.png}>" alt="Benachrichtigungen"/></a>
<a href="<{xoAppUrl /user.php}>" title="My Account"><img src="<{xoImgUrl icons/users/profile.png}>" alt="Konto"/></a>
<{if $xoops_isadmin}>
<a href="<{xoAppUrl /admin.php}>" title="Control Panel"><img src="<{xoImgUrl icons/users/configuration.png}>" alt="Administration" /></a>
<{/if}>
<a href="<{xoAppUrl /user.php op=logout}>" title="Logout" ><img src="<{xoImgUrl icons/users/exit.png}>" alt="Logout"/></a>
<{/if}>
</div>

Der Aufruf in meinem eigenen Block lautet wie folgt:
include( XOOPS_ROOT_PATH . '/themes/sd-011-violette-xoops/userbar.html' ) ;

Könnte mir jemand sagen ob das grundsätzlich funktioniert und wenn ja wo ich den Fehler gemacht habe?

Gruß

Meier
Diesen Thread durchsuchen:  1 Anonyme Benutzer

Aktuell aus dem Forum

Forum Thema Antworten Views Letzter Beitrag
OffOffTopic [Wichtig] Übernahme myXOOPS 0 593 11.12.2023 18:57
alfred Gehe zum letzten Beitrag
Die Installation und Administration von XOOPS 2.5.X [Offen] Upgrade 2.5.11 3 2339 07.05.2023 07:03
Goffy Gehe zum letzten Beitrag