phpBB2.de Foren-Übersicht  
[netclusive - internet broadcasting]
 FAQ  •  Suchen  •  Download  •  Lesezeichen  •  Mitgliederliste  •  Benutzergruppen   •  Registrieren  •  Profil  •  Einloggen, um private Nachrichten zu lesen  •  Login
 
        
 
        
 

LinkLift

Nächstes Thema anzeigen
Vorheriges Thema anzeigen

Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.
Autor Nachricht
Thomson
Universal Genius



Anmeldungsdatum: 05.08.2002
Beiträge: 4726
Wohnort: a shibby place

BeitragVerfasst am: So 14 Sep, 2003 13:35 Antworten mit ZitatNach oben 

Mod Name: Showing other Signatures on/off
Mod Author: EGO2000
phpBB-Versions: testet with 2.0.4 (should work with 2.0.5 and 2.0.6)
Mod-Description: This mod allow User to switch on/off showing the signatures of all other Members
Discussion: http://www.phpbb2.de/viewtopic.php?t=3386&sid=4c47ebd0ac59a25a85e95ac4415e0d64

Code:
Code:

###############################################
## Mod Title:   Showing other Signatures on/off
## Mod Version: 1.0
## Author:      EGO2000
## Description: This mod allow User to switch on/off showing the signatures of all other Members
##
## This mod is for phpBB2 ver 2.0.x
##
## Installation Level:  Easy
## Installation Time:   5 Minutes
##
## Files To Edit:    4
##   language/lang_xxx/lang_main.php
##   viewtopic.php
##   includes/usercp_register.php
##   templates/xxx/profile_add_body.tpl
##
###############################################

#
#-----[ SQL ]---------------------------------------------
#
ALTER TABLE phpbb_users ADD user_show_sig int(11) NOT NULL default '1';

#
#-----[ OPEN ]---------------------------------------------
#
includes/language/lang_english/lang_main.php

#
#-----[ FIND ]---------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]--------------------------------------
#
$lang['Show_All_Signatures'] = "Show Signatures of all Members";

#
#-----[ OPEN ]---------------------------------------------
#
includes/language/lang_german/lang_main.php

#
#-----[ FIND ]---------------------------------------------
#
//
// That's all Folks!
// -------------------------------------------------

#
#-----[ BEFORE, ADD ]--------------------------------------
#
$lang['Show_All_Signatures'] = "Zeige die Signaturen aller Mitglieder";

#
#-----[ OPEN ]---------------------------------------------
#
viewtopic.php

#
#-----[ FIND ]---------------------------------------------
#
//
// End auth check
//

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $sig_sql = "SELECT user_show_sig FROM " . USERS_TABLE . " WHERE user_id = " . $userdata['user_id'] . " ";
   if ( !($sig_result = $db->sql_query($sig_sql)) )
   {
      message_die(GENERAL_ERROR, 'Could not obtain private User Settings', '', __LINE__, __FILE__, $sql);
   }

   if ( $sig_row = $db->sql_fetchrow($sig_result) )
   {
      $show_sig = $sig_row['user_show_sig'];
   }

#
#-----[ FIND ]---------------------------------------------
#
   $user_sig = ( $postrow[$i]['enable_sig'] && $postrow[$i]['user_sig'] != '' && $board_config['allow_sig'] ) ? $postrow[$i]['user_sig'] : '';
   $user_sig_bbcode_uid = $postrow[$i]['user_sig_bbcode_uid'];

#
#-----[ AFTER, ADD ]--------------------------------------
#
   if ( $show_sig != '1' ) { $user_sig = '' ; }

#
#-----[ OPEN ]---------------------------------------------
#
includes/usercp_register

#
#-----[ FIND ]---------------------------------------------
#
   $popuppm = ( isset($HTTP_POST_VARS['popup_pm']) ) ? ( ($HTTP_POST_VARS['popup_pm']) ? TRUE : 0 ) : TRUE;

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $showsig = ( isset($HTTP_POST_VARS['showsig']) ) ? ( ($HTTP_POST_VARS['showsig']) ? TRUE : 0 ) : TRUE;

#
#-----[ FIND ]------------------------------------------
#
   $sql = "UPDATE " . USERS_TABLE . "
      SET "
      WHERE user_id = $user_id";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_attachsig = $attachsig

#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
, user_show_sig = $showsig

#
#-----[ FIND ]---------------------------------------------
#
   $attachsig = $userdata['user_attachsig'];

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $showsig = $userdata['user_show_sig'];

#
#-----[ FIND ]---------------------------------------------
#
      'ALWAYS_ADD_SIGNATURE_YES' => ( $attachsig ) ? 'checked="checked"' : '',
      'ALWAYS_ADD_SIGNATURE_NO' => ( !$attachsig ) ? 'checked="checked"' : '',

#
#-----[ AFTER, ADD ]--------------------------------------
#
      'SHOW_ALL_SIGNATURES_YES' => ( $showsig ) ? 'checked="checked"' : '',
      'SHOW_ALL_SIGNATURES_NO' => ( !$showsig ) ? 'checked="checked"' : '',

#
#-----[ FIND ]---------------------------------------------
#
      'L_SIGNATURE' => $lang['Signature'],
      'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $board_config['max_sig_chars']),

#
#-----[ AFTER, ADD ]--------------------------------------
#
      'L_SHOW_ALL_SIGNATURES' => $lang['Show_All_Signatures'],

#
#-----[ OPEN ]---------------------------------------------
#
templates/xxx/profil_add_body.tpl

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

   <tr>
     <td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}:</span></td>
     <td class="row2">
      <input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} />
      <span class="gen">{L_YES}</span>&&
      <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>

#
#-----[ AFTER, ADD ]--------------------------------------
#

   <tr>
     <td class="row1"><span class="gen">{L_SHOW_ALL_SIGNATURES}:</span></td>
     <td class="row2">
      <input type="radio" name="showsig" value="1" {SHOW_ALL_SIGNATURES_YES} />
      <span class="gen">{L_YES}</span>&&
      <input type="radio" name="showsig" value="0" {SHOW_ALL_SIGNATURES_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>

#
#-----[ EoM ]--------------------------------------
#

_________________
There are only 10 types of people in the world: Those who understand binary, and those who don't...
OfflineBenutzer-Profile anzeigenPrivate Nachricht sendenE-Mail sendenWebsite dieses Benutzers besuchenICQ-Nummer
Google







Verfasst am: Nach oben

TheRealKoston
phpBB2.de User
phpBB2.de User



Anmeldungsdatum: 10.08.2004
Beiträge: 3
Wohnort: where the stars come out at night

BeitragVerfasst am: Di 10 Aug, 2004 15:14 Antworten mit ZitatNach oben 

I did an Admin Addon:
(Hope it's ok for EGO2000)

Tested with 2.0.8a

Code:
###############################################
## Mod Title:   Showing other Signatures on/off Admin Addon
## Mod Version: 1.0
## Author:      TheRealKoston
## Description: This addon allows the admin to configure the "Showing other Signatures on/off" for any single user via ACP
##
## This mod is for phpBB2 ver 2.0.x
##
## Installation Level:  Easy
## Installation Time:   5 Minutes
##
## Files To Edit:    2
##   admin/admin_users.php
##   templates/xxx/user_edit_body.tpl
##
## THIS HACK REQUIRES THE Showing other Signatures on/off of EGO2000
##
###############################################

#
#-----[ OPEN ]---------------------------------------------
#
admin/admin_users.php

#
#-----[ FIND ]---------------------------------------------
#
   $attachsig = ( isset( $HTTP_POST_VARS['attachsig']) ) ? ( ( $HTTP_POST_VARS['attachsig'] ) ? TRUE : 0 ) : 0;

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $showsig = ( isset($HTTP_POST_VARS['showsig']) ) ? ( ($HTTP_POST_VARS['showsig']) ? TRUE : 0 ) : TRUE;

#
#-----[ FIND ]------------------------------------------
#
   $sql = "UPDATE " . USERS_TABLE . "
      SET "
      WHERE user_id = $user_id";
#
#-----[ IN-LINE FIND ]------------------------------------------
#
, user_attachsig = $attachsig

#
#-----[ IN-LINE, AFTER, ADD ]------------------------------------------
#
, user_show_sig = $showsig

#
#-----[ FIND ]---------------------------------------------
#
   $attachsig = $this_userdata['user_attachsig'];

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $showsig = $this_userdata['user_show_sig'];

#
#-----[ FIND ]---------------------------------------------
#
   $s_hidden_fields .= '<input type="hidden" name="attachsig" value="' . $attachsig . '" />';

#
#-----[ AFTER, ADD ]--------------------------------------
#
   $s_hidden_fields .= '<input type="hidden" name="showsig" value="' . $showsig . '" />';

#
#-----[ FIND ]---------------------------------------------
#
   'ALWAYS_ADD_SIGNATURE_YES' => ($attachsig) ? 'checked="checked"' : '',
   'ALWAYS_ADD_SIGNATURE_NO' => (!$attachsig) ? 'checked="checked"' : '',

#
#-----[ AFTER, ADD ]--------------------------------------
#
   'SHOW_ALL_SIGNATURES_YES' => ( $showsig ) ? 'checked="checked"' : '',
   'SHOW_ALL_SIGNATURES_NO' => ( !$showsig ) ? 'checked="checked"' : '',

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

    'L_SIGNATURE_EXPLAIN' => sprintf($lang['Signature_explain'], $board_config['max_sig_chars'] ),

#
#-----[ AFTER, ADD ]--------------------------------------
#

    'L_SHOW_ALL_SIGNATURES' => $lang['Show_All_Signatures'],

#
#-----[ OPEN ]---------------------------------------------
#
templates/xxx/user_edit_body.tpl

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

   <tr>
     <td class="row1"><span class="gen">{L_ALWAYS_ADD_SIGNATURE}</span></td>
     <td class="row2">
      <input type="radio" name="attachsig" value="1" {ALWAYS_ADD_SIGNATURE_YES} />
      <span class="gen">{L_YES}</span>&&
      <input type="radio" name="attachsig" value="0" {ALWAYS_ADD_SIGNATURE_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>

#
#-----[ AFTER, ADD ]--------------------------------------
#

   <tr>
     <td class="row1"><span class="gen">{L_SHOW_ALL_SIGNATURES}</span></td>
     <td class="row2">
      <input type="radio" name="showsig" value="1" {SHOW_ALL_SIGNATURES_YES} />
      <span class="gen">{L_YES}</span>&&
      <input type="radio" name="showsig" value="0" {SHOW_ALL_SIGNATURES_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>

#
#-----[ EoM ]--------------------------------------
#

_________________
Rent this signature for your advertise ;D
OfflineBenutzer-Profile anzeigenPrivate Nachricht senden
Beiträge der letzten Zeit anzeigen:      
Dieses Forum ist gesperrt, du kannst keine Beiträge editieren, schreiben oder beantworten.Dieses Thema ist gesperrt, du kannst keine Beiträge editieren oder beantworten.

Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum nicht antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen

Ähnliche Beiträge
Thema Autor Forum Antworten Verfasst am
Online/Offline image not showing newbeephp Support Forum 13 Do 03 Jan, 2008 01:18 Letzten Beitrag anzeigen
Problems with the template and the si... baz1131 Support Forum 5 Do 13 Dez, 2007 19:36 Letzten Beitrag anzeigen
icons not showing in portal ll_david Installation / Upgrading 13 Do 29 März, 2007 14:30 Letzten Beitrag anzeigen
Showing News and last forum in Portal Choas Support Forum 10 Mi 14 Feb, 2007 03:53 Letzten Beitrag anzeigen
Moderators NOT showing green !! Snider phpBB2.x - English phpBB2.x Talk 0 Mo 20 Nov, 2006 22:24 Letzten Beitrag anzeigen