Demo

Probiere ClanSphere aus und teste daran herum. Demo


Antworten: 3
Seite [1]
Leitwolf


Try to beat me





Beiträge: 188
# Thema - 27.03.2010 um 00:47 Uhr
Hallo zusammen,

ich verwende ein Template das folgende navlogin.php benötigt um korrekt angezeigt zu werden:

navlogin.php des Templates... +-

<?php
// ClanSphere 2009 - www.clansphere.net
// $Id: navlogin.php 2392 2009-03-25 23:47:11Z hajo $

$cs_lang = cs_translate('users');

$data = array();

global $login;

if(empty($login['mode'])) {

if(empty($login['nick'])) {
$login['nick'] = 'Nick';
}
if(empty($login['password'])) {
$login['password'] = 'Pass';
}

$data['form']['navlogin'] = cs_url('users','login');
$data['login']['nick'] = cs_secure($login['nick']);
$data['login']['password'] = cs_secure($login['password']);
$data['lang']['cookie'] = $cs_lang['cookie'];
$data['lang']['submit'] = $cs_lang['submit'];
$data['lang']['register'] = $cs_lang['register'];
$data['lang']['sendpw'] = $cs_lang['sendpw'];
$data['link']['register'] = cs_url('users','register');
$data['link']['sendpw'] = cs_url('users','sendpw');
$data['link']['uri'] = str_replace('&','&',$_SERVER['REQUEST_URI']);

echo cs_subtemplate(__FILE__,$data,'users','navlogin_1');
}
else {

$where_msg = "users_id_to = '" . $account['users_id'] . "' AND messages_show_receiver = 1 AND messages_view = 0";
$messages_count_new = cs_sql_count(__FILE__,'messages',$where_msg);

$data['lang']['home'] = $cs_lang['home'];
$data['link']['home'] = cs_url('users','home');
$data['lang']['messages'] = $cs_lang['messages'];
$data['link']['messages'] = cs_url('messages','center');

$data['messages']['new'] = $messages_count_new;

$data['lang']['settings'] = $cs_lang['settings'];
$data['link']['settings'] = cs_url('users','settings');

$data['link']['contact'] = '';
$data['link']['admin'] = '';
$data['link']['system'] = '';
$data['link']['panel'] = '';

$data['lang']['logout'] = $cs_lang['logout'];
$data['link']['logout'] = cs_url('users','logout');

if($cs_main['def_admin'] != 'separated') {

if($account['access_contact'] >= 3) {

$where_mail = "mail_answered = 0";
$mail_count_new = cs_sql_count(__FILE__,'mail',$where_mail);

$data['link']['contact'] .= cs_link($cs_lang['contact'],'contact','manage');
$data['link']['contact'] .= ' (' . $mail_count_new . ')' . cs_html_br(1);
}
if($account['access_clansphere'] >= 3) {

$data['link']['admin'] .= cs_link($cs_lang['admin'],'clansphere','admin');
$data['link']['admin'] .= cs_html_br(0);
}
if($account['access_clansphere'] >= 4) {

$data['link']['system'] .= cs_link($cs_lang['system'],'clansphere','system');
$data['link']['system'] .= cs_html_br(0);
}
}
elseif($account['access_clansphere'] >= 3) {

if(empty($cs_main['mod_rewrite']))
$data['link']['panel'] .= cs_html_link('admin.php',$cs_lang['panel']);
else {
$shorten = $cs_main['php_self']['filename'];
$shorten .= empty($_REQUEST['params']) ? '' : $_REQUEST['params'];
$panel_url = str_replace($shorten, '', $_SERVER['REQUEST_URI']);
$data['link']['panel'] .= cs_html_link($panel_url . 'admin',$cs_lang['panel']);
}
$data['link']['panel'] .= cs_html_br(2);
}

echo cs_subtemplate(__FILE__,$data,'users','navlogin_2');
}

?>


Ich möchte das Modul verwenden das ein kleines Fenster eingeblendet wird wenn ich eine PN erhalten habe ( http://www.csphere.eu/modules.php?mod=module&action=view&id=245 ) Für dies Modul müsste ich die oben aufgeführte navlogin.php überschreiben mit folgender Datei:

Navlogin.php des Moduls... +-
<?php
// ClanSphere 2009 - www.clansphere.net
// $Id: navlogin.php 3552 2009-11-25 21:06:31Z GaHero $

$cs_lang = cs_translate('users');

$messages_options = cs_sql_option(__FILE__,'messages');

$styles_array = array('horizontal', 'icons', 'picture');
$style = (!empty($_GET['style']) AND in_array($_GET['style'], $styles_array)) ? '_' . $_GET['style'] : '';

$uri = isset($_SERVER['REQUEST_URI']) ? $_SERVER['REQUEST_URI'] : '';

$data = array();

global $login;

if(empty($login['mode'])) {

if(empty($login['nick']))
$login['nick'] = 'Nick';
if(empty($login['password']))
$login['password'] = 'Pass';

$data['form']['navlogin'] = cs_url('users','login');
$data['login']['nick'] = cs_secure($login['nick']);
$data['login']['password'] = cs_secure($login['password']);
$data['link']['uri'] = str_replace('&','&',$uri);

echo cs_subtemplate(__FILE__,$data,'users','navlogin_form' . $style);
}
else {

if($style == '_picture') {
$cells = 'users_picture, users_country';
$user = cs_sql_select(__FILE__, 'users', $cells, 'users_id = ' . (int) $account['users_id']);
$data['users']['country_icon'] = cs_html_img('symbols/countries/' . cs_secure($user['users_country']) . '.png');
if(empty($user['users_picture']))
$data['users']['pic'] = cs_html_img('uploads/users/nopic.jpg');
else
$data['users']['pic'] = cs_html_img('uploads/users/' . $user['users_picture']);
}

$data['users']['link'] = cs_user($account['users_id'], $account['users_nick']);

$where_msg = 'users_id_to = ' . (int) $account['users_id'] . ' AND messages_show_receiver = 1 AND messages_view = 0';
$messages_count_new = cs_sql_count(__FILE__,'messages',$where_msg);

if($messages_count_new == 0)
$data['messages']['new'] = '0';
else {
$data['messages']['new'] = $messages_count_new;
$data['messages']['width'] = $messages_options['message_width'];
$data['messages']['height'] = $messages_options['message_height'];
$data['messages']['border'] = $messages_options['message_border'];
$data['messages']['bbcolor'] = $messages_options['message_bbcolor'];
$data['messages']['fondsize'] = $messages_options['message_fondsize'];
$data['messages']['brcolor'] = $messages_options['message_brcolor'];
$data['messages']['text'] = $messages_options['message_text'];
}

$data['if']['messages'] = ($messages_count_new > 0) ? 1 : 0;
$data['if']['panel'] = ($cs_main['def_admin'] == 'separated' AND $cs_main['tpl_file'] != 'admin.htm') ? 1 : 0;
$data['if']['contact'] = (empty($data['if']['panel']) AND $account['access_contact'] >= 3) ? 1 : 0;
$data['if']['admin'] = (empty($data['if']['panel']) AND $account['access_clansphere'] >= 3) ? 1 : 0;
$data['if']['system'] = (empty($data['if']['panel']) AND $account['access_clansphere'] >= 4) ? 1 : 0;
$data['if']['more'] = (empty($data['if']['contact']) AND empty($data['if']['admin']) AND empty($data['if']['panel'])) ? 0 : 1;

if(empty($data['if']['panel']) AND $account['access_contact'] >= 3) {
$mail_count_new = cs_sql_count(__FILE__,'mail','mail_answered = 0');
$data['contact']['new'] = $mail_count_new;
}

if(!empty($data['if']['panel']) AND $account['access_clansphere'] >= 3) {
if(empty($cs_main['mod_rewrite']))
$data['link']['panel'] = 'admin.php';
else {
$shorten = $cs_main['php_self']['filename'];
$shorten .= empty($_REQUEST['params']) ? '' : $_REQUEST['params'];
$data['link']['panel'] = str_replace($shorten, '', $uri) . 'admin';
}
}

echo cs_subtemplate(__FILE__,$data,'users','navlogin_view' . $style);
}


dann funktioniert das Design nicht mehr

Meine Frage an Euch kann einer die Zeilen die für das Modul nötig sind in die navlogin.php des Templates integrieren? Wäre Super!

Ich sage schonmal Danke!

-Leitwolf-


------------------
Inaktiv
Pet the Rap


King for a day



Herkunft: Essen
Beiträge: 263
# Antwort: 1 - 27.03.2010 um 10:01 Uhr
eigentlich steht das ja in der navlogin_view.tpl
in wie weit man das umändern kann weiss ich leider auch nicht.

greets


------------------
if (ahnung == 0) { read FAQ; use SEARCH; use GOOGLE; } else { use brain; make post; }




Inaktiv
|
VooDooAlex


Poststar




Herkunft: Coburg
Beiträge: 691
# Antwort: 2 - 27.03.2010 um 10:53 Uhr
Poste mal bitte deine navlogin_view.tpl.

Gruß Alex


------------------




Inaktiv
|
Leitwolf
Thread-Ersteller


Try to beat me





Beiträge: 188
# Antwort: 3 - 27.03.2010 um 16:40 Uhr
Mein Template benutzt 2 solche Dateien die unter themes/custom/users liegen:

navlogin_1.tpl +-

<form method="post" action="{form:navlogin}">
<div id="navlogin_1_left">
<div id="nav_inner_left">
<input type="text" name="nick" value="{login:nick}" onfocus="if(this.value=='Nick') this.value=''" onblur="if(this.value=='')this.value='Nick'" maxlength="40" size="18" class="formnav" />                            
<input type="password" name="password" value="{login:password}" onfocus="if(this.value=='Pass') this.value=''" onblur="if(this.value=='')this.value='Pass'" maxlength="40" size="18" class="formnav" />
</div>
<div id="nav_inner_right">
<div id="nav_inner_top">
<input type="radio" name="cookie" value="1" class="radio" /> {lang:cookie}
</div>
<div id="nav_inner_sub">
<input type="hidden" name="uri" value="{link:uri}" class="form" />
<input type="submit" name="login" value="Eintragen" class="form" />
</div>
</div>
</div>
<div id="button_top"><a href="{link:register}" onfocus="if(this.blur)this.blur()"><img src="templates/black_blue/images/button_register.jpg" alt="" /></a></div>
<div id="button_sub"><a href="{link:sendpw}" onfocus="if(this.blur)this.blur()"><img src="templates/black_blue/images/button_receive.jpg" alt="" /></a></div>
</form>

&

navlogin_2.tpl +-

<div id="navlogin_2_left">
<a href="{link:messages}">{lang:messages}</a> ({messages:new&#125  ∞  
<a href="{link:settings}">{lang:settings}</a>   ∞  
{link:admin}  ∞  {link:system} {link:panel}
</div>
<div id="button_top"><a href="{link:home}" onfocus="if(this.blur)this.blur()"><img src="templates/black_blue/images/button_home.jpg" alt="" /></a></div>
<div id="button_sub"><a href="{link:logout}" onfocus="if(this.blur)this.blur()"><img src="templates/black_blue/images/button_logout.jpg" alt="" /></a></div>


Evtl hilft es ja auch das ich dieses Template habe:

http://www.csphere.eu/design/template/view/id/93



------------------


Zuletzt editiert von Leitwolf am 27.03.2010 um 16:52 Uhr (1x Editiert)
Inaktiv
|
Antworten: 3
Seite [1]


Sie müssen sich registrieren, um zu antworten.