Seite 2 von 6

Verfasst: 23.11.2002 18:27
von AWSW
Hallo Dwing,
nun machst Du mich neugierig :D

Habe eben noch mal frisch den Rules-MOD aus dem hier beheimateten DL gezogen und finde leider keine anderen Hinweise als die bei mir ?!?
<?php
/***************************************************************************
* rules.php
* -------------------
*
* copyright : (C) 2002 Dimitri Seitz
* email : dwing@weingarten-net.de
*
*
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);

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

//
// Load the appropriate Rules file
//
if( isset($HTTP_GET_VARS['mode']) )
{
switch( $HTTP_GET_VARS['mode'] )
{
case 'bbcode':
$lang_file = 'lang_bbcode';
$l_title = $lang['BBCode_guide'];
break;
default:
$lang_file = 'lang_rules';
$l_title = $lang['rules'];
break;
}
}
else
{
$lang_file = 'lang_rules';
$l_title = $lang['rules'];
}
include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/' . $lang_file . '.' . $phpEx);

//
// Pull the array data from the lang pack
//
$j = 0;
$counter = 0;
$counter_2 = 0;
$faq_block = array();
$faq_block_titles = array();

for($i = 0; $i < count($faq); $i++)
{
if( $faq[$i][0] != '--' )
{
$faq_block[$j][$counter]['id'] = $counter_2;
$faq_block[$j][$counter]['question'] = $faq[$i][0];
$faq_block[$j][$counter]['answer'] = $faq[$i][1];

$counter++;
$counter_2++;
}
else
{
$j = ( $counter != 0 ) ? $j + 1 : 0;

$faq_block_titles[$j] = $faq[$i][1];

$counter = 0;
}
}

//
// Lets build a page ...
//
$page_title = $l_title;
include($phpbb_root_path . 'includes/page_header.'.$phpEx);

$template->set_filenames(array(
'body' => 'faq_body.tpl')
);
make_jumpbox('viewforum.'.$phpEx, $forum_id);

$template->assign_vars(array(
'L_FAQ_TITLE' => $l_title,
'L_BACK_TO_TOP' => $lang['Back_to_top'])
);

for($i = 0; $i < count($faq_block); $i++)
{
if( count($faq_block[$i]) )
{
$template->assign_block_vars('faq_block', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);
$template->assign_block_vars('faq_block_link', array(
'BLOCK_TITLE' => $faq_block_titles[$i])
);

for($j = 0; $j < count($faq_block[$i]); $j++)
{
$row_color = ( !($j % 2) ) ? $theme['td_color1'] : $theme['td_color2'];
$row_class = ( !($j % 2) ) ? $theme['td_class1'] : $theme['td_class2'];

$template->assign_block_vars('faq_block.faq_row', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_QUESTION' => $faq_block[$i][$j]['question'],
'FAQ_ANSWER' => $faq_block[$i][$j]['answer'],

'U_FAQ_ID' => $faq_block[$i][$j]['id'])
);

$template->assign_block_vars('faq_block_link.faq_row_link', array(
'ROW_COLOR' => '#' . $row_color,
'ROW_CLASS' => $row_class,
'FAQ_LINK' => $faq_block[$i][$j]['question'],

'U_FAQ_LINK' => '#' . $faq_block[$i][$j]['id'])
);
}
}
}

$template->pparse('body');

include($phpbb_root_path . 'includes/page_tail.'.$phpEx);

?>
<?php
/***************************************************************************
* lang_rules.php [english]
* -------------------
*
* copyright : (C) 2002 Dimitri Seitz
* email : dwing@weingarten-net.de
*
*
*
***************************************************************************/

/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/

//
// To add an entry to your Rules simply add a line to this file in this format:
// $faq[] = array("question", "answer");
// If you want to separate a section enter $faq[] = array("--","Block heading goes here if wanted");
// Links will be created automatically
//
// DO NOT forget the ; at the end of the line.
// Do NOT put double quotes (") in your FAQ entries, if you absolutely must then escape them ie. \"something\"
//
// The FAQ items will appear on the FAQ page in the same order they are listed in this file
//


$faq[] = array("--","Main Rules");
$faq[] = array("Spamming", "Please do not spam our forums. Our Moderators are able to ban users that are spamming to much !");



//
// This ends the Rules entries
//

?>
#################################################################
## Mod Title: Rules
## Mod Version: 1.0
## Author: Dimitri Seitz < dwing@weingarten-net.de > - http://www.dseitz.de
##
## Description: This hack allows you to have rules at your board
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: 1
## Included Files: 2
##
#################################################################
##
## To add or delete rules, edit lang_rules.php
##
##
##
## Have Fun
## http://www.dseitz.de
## http://www.phpBBHacks.com
## http://www.phpBB.de
##
#################################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
#################################################################

#
#-----[ OPEN ]------------------------------------------
#
language/lang_xxx

#
#-----[ FIND ]------------------------------------------
#
?>

#
#-----[ ADD, BEFORE ]------------------------------------------
#
$lang['rules']


#
#-----[ UPLOAD FILES ]------------------------------------------
#
lang_rules.php into /language/lang_xxx
rules.php into phpBB/

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM
So weit ich das erkenne, habe ich lediglich den blauen Text bei mir verändert ?!?

Ich würde mich freuen, wenn Du mir da einen Hinweis geben könntest, wo da eine Zeile steht mit dem von Dir erwähnten (c) :o

Verfasst: 23.11.2002 18:50
von Dwing
:oops: hmm upps.
Sorry.
Du hast noch ne alte Version vom Rules hack wo der (c) noch net drin ist... :oops:
da ist der neue -> http://www.phpbbhacks.com/viewhack.php?id=747



Der Statistics Mod hat ganz unten ein (c) Notice auf Nivisec bzw. Acyd Burn

Verfasst: 23.11.2002 18:51
von Dwing
funzt der Sig Preview Hack eigentlich ?

Verfasst: 23.11.2002 19:00
von AWSW
Haha :D

Du machst mir ja Spaß :D [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] [ externes Bild ] :D

Dazu bin ich vor lauter Sucherei eben in den Copyright Hinweisen noch gar net zu gekommen - versuche ich gleich :D [ externes Bild ] :D

PS: Deine PM is immer noch net angekommen ?!?
PPS: Kannst Du mir mit dem in der PM eben erwähnten Installscript weiter helfen ??? Ich will das Forum dort nicht als öffentlichen DL anbieten, sondern will ein paar andere Foren, wie z.B. das hier testweise auf phpbb umstellen, da die jetzige SW von ubb bei mehr als 30800 Beiträgen alle neuen oft durcheinanderwürfelt und dann hilft nur noch ein Forenreorg, der bei dem Forum schon jetzt fast 6 Stunden dauert :(
PPPS: Jetzt ist´s hier eh OffTopic ;) Wie viele User oder Beiträge verkraftet phpbb denn so erfahrungsgemäß - gibt es da auch solche Obergrenzen, wo dann nix mehr geht ???

DANKE DIR NOCH MAL & VIELE GRÜSSE - Axel

Verfasst: 23.11.2002 19:03
von AWSW
Dwing hat geschrieben: Der Statistics Mod hat ganz unten ein (c) Notice auf Nivisec bzw. Acyd Burn

Hmmm den sehe ich in 3 unterschiedlich installierten Foren nur, wenn ich in der lang_statistik.php eine Auskommentierung ( // ) weg nehme, sonst nur die Versionsnummer... In 2 Foren bin ich mir eigenlich 99,999% sicher, daran nix gedreht zu haben... Aber ich werde auch älter ;) Wenn doch - noch mal - SORRY :)


Wegen dem Preview-MOD melde ich mich nachher noch mal...

Verfasst: 23.11.2002 19:20
von AWSW
Hallo Dwing,
hmmm da fehlt wohl noch was in der MOD-Anleitung "Files To Edit: 3". Ich finde dann im Text nur die Index.php und usercp_register.php... Fehlt da nicht noch was in der Profileadd_body.tpl ???

Hier zum testen: http://www.test7017.test-account.com/Forum/

Derzeit sehe ich leider nix von dem MOD...

DANKE Axel

Verfasst: 23.11.2002 19:53
von Dwing
ich weiß auch warum *g
stell mal die useractivation auf none.

Das hab ich übersehen..

Verfasst: 23.11.2002 20:37
von AWSW
Ach da hast Du die Vorschau versteckt :D
Information

Old Signature:
--------------------------------------------------------------------------------
_________________
empty
Information

New Signature:
--------------------------------------------------------------------------------
_________________
Wenn ich groß bin, werde ich eine Signatur ;)
Klappt so weit. Bei mir kommt dank der Einstellung der Regsitrierung per Mail erst mal das:
Information

Dein Account wurde erstellt. Dieses Forum benötigt aber eine Aktivierungs-Bestätigung, daher wurde ein Activation-Key an Deine E-Mail-Adresse gesendet. Bitte überprüfe jetzt Deine Mailbox für weitere Informationen.

Klick hier um zum Index zurückzukehren

Ist aber auch OK, da das mir eigentlich nur nach Aktualisierung des Profils wichtig war und da klappt es ja dann ;)

DANKE VIELMALS & SCHÖNEN ABEND !

Verfasst: 23.11.2002 21:10
von AWSW
Hmmm ich will ja net nerven, aber mir fehlt ein wenig die Sprachanpassung eng/ger ;)

In die Lang_main.php im entsprechenden Sprachordner habe ich den Text schon eingefügt:

lang_german:
// Signature Preview by Dwing
$lang['SignaturePreviewOld'] = 'Deine alte Signatur';
$lang['SignaturePreviewNew'] = 'Deine neue Signatur';

lang_english:
// Signature Preview by Dwing
$lang['SignaturePreviewOld'] = 'Your old signature';
$lang['SignaturePreviewNew'] = 'Your new signature';


Nur finde ich im Moment net heraus, wie ich das an stelle des hard gecodeten OLD SIGNATURE und NEW SIGNATURE einsetzten muss :(

Verfasst: 23.11.2002 21:35
von Dwing

Code: Alles auswählen

################################################################# 
## Mod Title: Signature Preview 
## Mod Version: 1.0.0 
## Author: Dimitri Seitz < http://www.dseitz.de > < dwing@weingarten-net.de > 
## Description: This Hack will create a Signature Preview after updating profile 
## 
## Installation Level: easy 
## Installation Time: 2 minutes 
## Files To Edit: 3 
## Included Files: n/a 
################################################################# 
## Security Disclaimer: This MOD Cannot Be Posted To Or Added At Any Non-Official phpBB Sites without the direct permission of the author 
################################################################# 
## 
## Author Note: To Get more Hacks and Mods visit 
http://www.dseitz.de 
http://www.phpBBHacks.com 
http://www.phpBB.de 
## 
################################################################# 
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD 
################################################################# 

# 
#-----[ OPEN ]------------------------------------------ 
# 

index.php 

# 
#-----[ FIND ]------------------------------------------ 
# 
                
      // 
   // Start output of page 
   // 
   $page_title = $lang['Index']; 
   include($phpbb_root_path . 'includes/page_header.'.$phpEx); 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

   // 
   // Start output of page 
   // 
   $page_title = $lang['Index']; 
    
   if($view == 'sig') 
   { 
      $template->assign_vars(array( 
               "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.php") . '">') 
            ); 
   } 
   include($phpbb_root_path . 'includes/page_header.'.$phpEx); 

   include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx); 
   if($view == 'sig') 
   { 
       
      $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : ''; 
      $user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : ''; 
      // $user_sig = $signature; 
      load_bbcode_template(); 

      if( $user_sig != '' ) 
      { 
    
         $user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']); 
         $user_sig = bbencode_first_pass($user_sig, $userdata['user_sig_bbcode_uid']); 
         $user_sig = make_clickable($user_sig); 
         $user_sig = smilies_pass($user_sig); 
         $user_sig = '_________________<br />' . $user_sig; 
         $user_sig = nl2br($user_sig); 
      } 
      else 
      { 
         $user_sig = 'empty'; 
      } 
       
      message_die(GENERAL_MESSAGE,'<br /><br /><b>' . $lang['SignaturePreviewNew'] . ':</b><hr>' . $user_sig . '<hr>'); 
   } 

# 
#-----[ OPEN ]------------------------------------------ 
# 

includes/usercp_register.php 

# 
#-----[ FIND ]------------------------------------------ 
# 

$message = $lang['Profile_updated'] . '<br /><br />' . sprintf($lang['Click_return_index'],  '<a href="' . append_sid("index.$phpEx") . '">', '</a>'); 

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

$message = $lang['Profile_updated'] . '<br /><br />' . sprintf($lang['Click_return_index'],  '<a href="' . append_sid("index.$phpEx?view=sig") . '">', '</a>'); 


# 
#-----[ FIND ]------------------------------------------ 
# 

   $template->assign_vars(array( 
            "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.php") . '">') 
         ); 
    

# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

      $template->assign_vars(array( 
            "META" => '<meta http-equiv="refresh" content="5;url=' . append_sid("index.php?view=sig") . '">') 
         ); 

# 
#-----[ FIND ]------------------------------------------ 
# 

message_die(GENERAL_MESSAGE, $message); 
} 
      else 
      { 
         $sql = "SELECT MAX(user_id) AS total 
            FROM " . USERS_TABLE; 
         if ( !($result = $db->sql_query($sql)) ) 
         { 
            message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); 
         } 


# 
#-----[ REPLACE WITH ]------------------------------------------ 
# 

         include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx); 
         $bbcode_uid = ( $bbcode_on ) ? make_bbcode_uid() : ''; 
         $user_sig = ( $userdata['user_sig'] != '' && $board_config['allow_sig'] ) ? $userdata['user_sig'] : ''; 
         // $user_sig = $signature; 
         load_bbcode_template(); 
         //$user_sig = $signature; 
         if( $user_sig != '' ) 
         { 
             
            $user_sig = bbencode_second_pass($user_sig, $userdata['user_sig_bbcode_uid']); 
            $user_sig = bbencode_first_pass($user_sig, $userdata['user_sig_bbcode_uid']); 
            $user_sig = make_clickable($user_sig); 
            $user_sig = smilies_pass($user_sig); 
            $user_sig = '_________________<br />' . $user_sig; 
            $user_sig = nl2br($user_sig); 
         } 
         else 
         { 
            $user_sig = 'empty'; 
         } 
         message_die(GENERAL_MESSAGE, $message . '<br /><br /><b>' . $lang['SignaturePreviewOld'] . ':</b><hr>' . $user_sig . '<hr>'); 
      } 
      else 
      { 
         $sql = "SELECT MAX(user_id) AS total 
            FROM " . USERS_TABLE; 
         if ( !($result = $db->sql_query($sql)) ) 
         { 
            message_die(GENERAL_ERROR, 'Could not obtain next user_id information', '', __LINE__, __FILE__, $sql); 
         } 

# 
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ 
# 
#EoM