Seite 1 von 1

Addon Box im AWSW Portal nur für registrierte User

Verfasst: 08.11.2005 14:01
von jkatten
Kann mir jemand sagen, nachdem ich massiv die Suche behelligt habe, wie man die Addon Box von AWSW nur registrierten Besuchern sichtbar macht ? Habe dazu wirklich nix gefunden. :-(

Danke

Verfasst: 08.11.2005 14:20
von Markus67
Hi ...

Welche Addon-Box denn?
Hast du mal einen Link zu deinem Forum?

Markus

Verfasst: 08.11.2005 14:28
von jkatten
Hab diese box eingefügt:

Code: Alles auswählen

ysql 

INSERT INTO phpbb_introportalmod VALUES ('votebox_active', '1') 





##### portal.php ##### 

++ Suche / Find: 

// TURN OFF BOXES FROM ACP END 


++ Vorher anfügen / Add before: 

// SWITCH VOTEBOX START 
if( $introportalmod_config['votebox_active'] == "1" ) 
{ 
// PHP CODE START 
// ... PHP CODE ... 
// PHP CODE END 
$template->assign_block_vars('switch_votebox_active', array( 
$template->assign_vars(array( 
// TEMPLATE CODE VARS START 
'VOTEBOX1' => $lang['votebox1'], 
'VOTEBOX2' => $lang['votebox2'] 
// TEMPLATE CODE VARS END 
)) 
)); 
} 
// SWITCH VOTEBOX END 



##### portal_body.tpl ##### 

++ Suche / Find: 

<!-- ##### GOOGLE START ##### --> 


++ Vorher anfügen / Add before: 

<!-- ##### VOTEBOX START ##### --> 
<!-- BEGIN switch_votebox_active --> 
<table width="100%" border="0" cellpadding="1" cellspacing="1" style="border-collapse: collapse" class="forumline"> 
<tr> 
<td class="catHead" colspan="2" height="25"><span class="cattitle"> 
{VOTEBOX1}: 
</span></td> 
</tr> 
<tr> 
<td colspan="2" height="1" class="row3"><img src="images/spacer.gif" width="1" height="1" alt="."></td> 
</tr> 
<tr> 
<td align="center" nowrap="nowrap" class="row1"><span class="gensmall"> 
<!-- CODE --> 
{VOTEBOX2} 
<!-- CODE --> 
</span></td> 
</tr> 
</table> 


<!-- END switch_votebox_active --> 
<!-- ##### VOTEBOX END ##### --> 




##### lang_german/lang_introportal.php ##### 

++ Suche / Find: 

$lang['UserNote'] = 'Hinweis'; 


++ Danach anfügen / Add after: 

$lang['votebox1'] = 'Überschrift AddonBox'; 
$lang['votebox2'] = 'Text in der Box'; 


##### lang_english/lang_introportal.php ##### 

$lang['UserNote'] = 'Note'; 


++ Vorher anfügen / Add before: 

$lang['votebox1'] = 'Header AddonBox'; 
$lang['votebox2'] = 'Text in Box'; 





##### admin/admin_introportalmod.php ##### 

++ Suche / Find: 

$google_active_yes = ($new['google_active']) ? 'checked="checked"' : ''; 
$google_active_no = (!$new['google_active']) ? 'checked="checked"' : ''; 


++ Vorher anfügen / Add before: 

$votebox_active_yes = ($new['votebox_active']) ? 'checked="checked"' : ''; 
$votebox_active_no = (!$new['votebox_active']) ? 'checked="checked"' : ''; 


++ Suche / Find: 

'IntroPortaltext26' => $lang['IntroPortaltext26'], 


++ Danach anfügen / Add after: 

'VOTEBOX1' => $lang['votebox1'], 


++ Suche / Find: 

"google_active_ENABLE" => $google_active_yes, 
"google_active_DISABLE" => $google_active_no, 


++ Vorher anfügen / Add before: 

"votebox_active_ENABLE" => $votebox_active_yes, 
"votebox_active_DISABLE" => $votebox_active_no, 



##### admin/introportalmod_body.tpl ##### 

++ Suche / Find: 

<tr> 
<td class="row1">{IntroPortaltext25}: 
<span class="gensmall">{IntroPortalAdmin22}</span></td></td> 
<td class="row2"><input type="radio" name="google_active" value="1" {google_active_ENABLE} /> {L_ENABLED}&nbsp;&nbsp;<input type="radio" name="google_active" value="0" {google_active_DISABLE} /> {L_DISABLED}</td> 
</tr> 


++ Vorher anfügen / Add before: 

<tr> 
<td class="row1">{VOTEBOX1}: 
<span class="gensmall">{IntroPortalAdmin22}</span></td></td> 
<td class="row2"><input type="radio" name="votebox_active" value="1" {votebox_active_ENABLE} /> {L_ENABLED}&nbsp;&nbsp;<input type="radio" name="votebox_active" value="0" {votebox_active_DISABLE} /> {L_DISABLED}</td> 
</tr>
In die Box habe ich ein Zufallsbild von der 4images Gallery eingefügt. Klappt alles wunderbar. Aber es wäre gut, wenn die Box nur für angemeldete Besucher sichtbar wäre.

Nur wie ? :-/

Verfasst: 08.11.2005 16:16
von Markus67
Hi ....

versuchs mal folgendes in der portal_body.tpl ...

suche:

Code: Alles auswählen

<!-- ##### VOTEBOX START ##### --> 
<!-- BEGIN switch_votebox_active --> 
davor einfügen:

Code: Alles auswählen

<!-- BEGIN switch_user_logged_in -->
suche:

Code: Alles auswählen

<!-- END switch_votebox_active --> 
<!-- ##### VOTEBOX END ##### --> 
danach einfügen:

Code: Alles auswählen

<!-- END switch_user_logged_in -->
Markus

Verfasst: 08.11.2005 16:51
von jkatten
Das habe ich bereist gemacht, leider ist dann die Box immer weg. Erscheint also auch nicht, wenn man sich anmeldet :-/

Verfasst: 08.11.2005 20:03
von Markus67
Hi ...

dann lösche in der portal-body.tpl

Code: Alles auswählen

<!-- ##### VOTEBOX START ##### --> 
<!-- BEGIN switch_votebox_active -->

und

Code: Alles auswählen

<!-- END switch_votebox_active --> 
<!-- ##### VOTEBOX END ##### --> 
Dann sollte es auf jeden Fall funktionieren.

Markus

Verfasst: 10.11.2005 15:21
von jkatten
@Markus:
[ externes Bild ]

Hat funktioniert !!! Vielen Dank!