Seite 1 von 1

Intro und Portal Mod Neue Box hinzufügen

Verfasst: 14.12.2003 16:43
von Doc Lecter
Hi! Habe ein kleines Problem. Ich will eine neue Box zu meinem Portal (awsw) hinzufügen. Das hat auch funktioniert. Hier der angepasse code welchen ich in meine Dateien eingefügt habe:

Code: Alles auswählen

Mysql

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> 
Alles schön und gut allerdings will ich dort in die Box ein Bild mit Link einfügen. Es handelt sich um den Code von Listinus Toplist:

Code: Alles auswählen

        <!-- Anfang des Topsites Codes der Listinus-Toppages -->
        <a href="http://click.listinus.de/topsite.php?id=22163" target="_blank"><img
src="http://icon.listinus.de/topicon.php?id=22163" alt="Listinus Toplisten" border="0"></a> 
        <!-- Ende des Topsites Codes der Listinus-Toppages -->
Das Bild liegt also auf dem Listinus Server.
Wie bekomme krieg ich das Teil nun in die Box? Mit nem Echo Befehl? Oder kann man den HTML Code irgendwie umschreiben? *keinenPlanhat*

Danke schon mal :grin:

Verfasst: 14.12.2003 19:46
von Gast
Hi! Hat sich erledigt! Habe solange in der portal_body.tpl gefummelt bis es gefunzt hat! :grin:

Verfasst: 14.12.2003 20:06
von AWSW
Hallo,
kann man das Ganze auch irgendwo in Aktion sehen ?

Verfasst: 15.12.2003 08:41
von Doc Lecter
Hi! Natürlich! Da musst du nur auf meine Signatur klicken :D
Stimmt denn irgendwas nicht?

Verfasst: 15.12.2003 11:21
von AWSW
Hallo,
doch klar - wollte nur mal sehen, wie das dann aus sieht... :wink:

Verfasst: 15.12.2003 11:41
von Doc Lecter
Jo :D Allerdings habe ich seitdem, keine ahnung warum, nen Fehler auf der Seite. Also auf jeden fall wird das in der Statusleiste vom Browser angezeigt! Ist ja anscheinend kein schwerwiegender Fehler, aber sollte man der Statusleiste trauen?!! :-?