Seite 1 von 2

Intro Portal MOD: Neue Box im Portal

Verfasst: 12.03.2005 12:12
von Reghe
Hi @all!

Ich habe eine Frage zum Intro Portal Mod:
Wie kann ich im Portal eine neue Box hizufügen?
Ich wollte nämlich eine Tabelle ins Porta mit einbauen, die dann in einer neuen Box auf der rechten Seite angezeigt wird!
Doch wie bekomme ich das hin und in welchen Template muss ich was ändern?
Danke schonmal im voraus!
Gruß Victoria!
Der Link zu meinem Forum: http://www.fce-portal.de

Verfasst: 12.03.2005 23:02
von Reghe
Kann mir denn keiener helfen????

Verfasst: 12.03.2005 23:05
von Markus67
Hi ...

die neue Box gibts hier :wink:

Markus

Link klappt nicht mehr

Verfasst: 27.06.2006 21:43
von redbull254
Hallo zusammen, ich such den Mod für eine zusätzliche Box auch, aber nicht mehr zu finden. Wäre toll, wenn mir jemand den noch geben könnte.
Gruß
Walter

Verfasst: 27.06.2006 22:58
von Markus67
Hi ....

na dann mal los :wink:



##### SQL #####

++ In phpMyAdmin ausführen / Run in phpMyAdmin:

Code: Alles auswählen

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

oder dieses Script ausführen / or run this script:

Code: Alles auswählen

<?php 
define('IN_PHPBB', 1); 
$phpbb_root_path = './'; 
include_once($phpbb_root_path . 'extension.inc'); 
include_once($phpbb_root_path . 'config.'.$phpEx); 
include_once($phpbb_root_path . 'common.'.$phpEx); 
include_once($phpbb_root_path . 'includes/constants.'.$phpEx); 
include_once($phpbb_root_path . 'includes/db.'.$phpEx); 

// 
// Start session management 
// 
$userdata = session_pagestart($user_ip, PAGE_INDEX); 
init_userprefs($userdata); 
// 
// End session management 
// 

// 
// 
// Restrict to members: 
if( !$userdata['session_logged_in'] ) 
{ 
message_die(GENERAL_MESSAGE, $lang['Not_Authorised'], $lang['Not_Authorised']); 
exit; 
} 
// 
// 

if ( $userdata['user_level'] == ADMIN ) 
{ 
} 
else 
{ 
message_die(GENERAL_MESSAGE, $lang['Not_Authorised'], $lang['Not_Authorised']); 
exit; 
} 

echo '<html> 
<head> 
<title>SQL-DB-Installer - Intro + Portal MOD - ADDON</title> 
</head> 
<body> 
<h1>SQL-DB-Installer - Intro + Portal MOD - ADDON</h1> 
<hr />'; 
if (!isset($HTTP_GET_VARS['install'])) { 
echo '<a href="?install=1">Please click here | Bitte hier klicken</a>'; 
} 
else { 
$queries = array( 

"INSERT INTO " . $table_prefix . "introportalmod VALUES ('addonbox_active', '1')" 

); 

$success = true; 
foreach($queries as $query) { 
if (!$db->sql_query($query)) { 
echo '<font color="red">An error occurred ! Changes have not been entered successfully !

Es Fehler ist aufgetreten ! Änderung nicht erfolgreich eingetragen !</font>

'; 
echo mysql_error(); 
$success = false; 
break; 
} 
} 
if ($success) { 
echo '<font color="green">DB-Changes have been entered successfully. You should delete this SQL-DB-Installer as soon as possible !

DB-Änderung wurde erfolgreich ausgeführt. Du solltest diesen SQL-DB-Installer sobald wie möglich löschen !'; 
} 
} 
?>


##### portal.php #####
++ Suche / Find:

Code: Alles auswählen

// TURN OFF BOXES FROM ACP END

++ Vorher anfügen / Add before:

Code: Alles auswählen

// SWITCH ADDONBOX START 
if( $introportalmod_config['addonbox_active'] == "1" ) 
{ 
// PHP CODE START 
// ... PHP CODE ... 
// PHP CODE END 
$template->assign_block_vars('switch_addonbox_active', array( 
$template->assign_vars(array( 
// TEMPLATE CODE VARS START 
'ADDONBOX1' => $lang['addonbox1'], 
'ADDONBOX2' => $lang['addonbox2'] 
// TEMPLATE CODE VARS END 
)) 
)); 
} 
// SWITCH ADDONBOX END


##### portal_body.tpl #####
++ Suche / Find:

Code: Alles auswählen

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

++ Vorher anfügen / Add before:

Code: Alles auswählen

<!-- ##### ADDONBOX START ##### --> 
<!-- BEGIN switch_addonbox_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"> 
{ADDONBOX1}:
</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 --> 
{ADDONBOX2} 
<!-- CODE --> 
</span></td> 
</tr> 
</table> 

<!-- END switch_addonbox_active --> 
<!-- ##### ADDONBOX END ##### -->


##### lang_german/lang_introportal.php #####
++ Suche / Find:

Code: Alles auswählen

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

++ Danach anfügen / Add after:

Code: Alles auswählen

$lang['addonbox1'] = 'Überschrift AddonBox'; 
$lang['addonbox2'] = 'Text in der Box';


##### lang_english/lang_introportal.php #####
++ Suche / Find:

Code: Alles auswählen

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

++ Vorher anfügen / Add before:

Code: Alles auswählen

$lang['addonbox1'] = 'Header AddonBox'; 
$lang['addonbox2'] = 'Text in Box'; 
##### admin/admin_introportalmod.php #####
++ Suche / Find:

Code: Alles auswählen

$google_active_yes = ($new['google_active']) ? 'checked="checked"' : ''; 
$google_active_no = (!$new['google_active']) ? 'checked="checked"' : ''; 
++ Vorher anfügen / Add before:

Code: Alles auswählen

$addonbox_active_yes = ($new['addonbox_active']) ? 'checked="checked"' : ''; 
$addonbox_active_no = (!$new['addonbox_active']) ? 'checked="checked"' : '';

++ Suche / Find:

Code: Alles auswählen

'IntroPortaltext26' => $lang['IntroPortaltext26'], 
++ Danach anfügen / Add after:

Code: Alles auswählen

'ADDONBOX1' => $lang['addonbox1'],

++ Suche / Find:

Code: Alles auswählen

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

++ Vorher anfügen / Add before:

Code: Alles auswählen

"addonbox_active_ENABLE" => $addonbox_active_yes, 
"addonbox_active_DISABLE" => $addonbox_active_no, 
##### admin/introportalmod_body.tpl #####
++ Suche / Find:

Code: Alles auswählen

<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:

Code: Alles auswählen

<tr> 
<td class="row1">{ADDONBOX1}:
<span class="gensmall">{IntroPortalAdmin22}</span></td></td> 
<td class="row2"><input type="radio" name="addonbox_active" value="1" {addonbox_active_ENABLE} /> {L_ENABLED}&nbsp;&nbsp;<input type="radio" name="addonbox_active" value="0" {addonbox_active_DISABLE} /> {L_DISABLED}</td> 
</tr>


Das wars :wink:

Markus

Zusätzliche Box einbauen

Verfasst: 28.06.2006 23:00
von redbull254
Hallo,Markus
Danke für den Code, hat alles einwandfrei geklappt.
Gruß
Walter

Verfasst: 05.07.2006 16:44
von 19cyprinus88
Hallo, habe dieses Thema über die suche gefunden. Wo bekomme ich denn den Portalmod her?

Verfasst: 05.07.2006 17:26
von gloriosa
Hallo,
den
19cyprinus88 hat geschrieben:Wo bekomme ich denn den Portalmod her?
findest Du hier ! :oops:

Zum Einbau siehe >>> KB:18 <<< oder auch >>> KB:easymod <<< ! :D

Verfasst: 05.07.2006 17:58
von senyafin
Hallo zusammen,

die IP Mod habe ich installiert,
bekomme aber bei Ansicht des User Profils eine Fehlermeldung

Code: Alles auswählen


Could not obtain ip information

DEBUG MODE

SQL Error : 1064 You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'ORDER BY post_time DESC LIMIT 1' at line 4

SELECT poster_id, poster_ip, post_time FROM phpbb_posts WHERE poster_id = ORDER BY post_time DESC LIMIT 1

Line : 43
File : usercp_viewprofile.php
usercp_viewprofile.php habe ich jetzt 3x bearbeitet, Fehler tritt immer wieder auf

Danke vielmals

Verfasst: 05.07.2006 18:10
von redbull254
Hallo, senyafin

vergleiche doch mal die Datei ohne den Mod mit der Datei mit Mod,vielleicht hast du ein Zeichnen vergessen,geht schnell.
Ich nehme immer dazu WinMerge,dann seh ich gleich,wo sich die
Dateien unterscheiden.

Gruß
Walter