Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke Mods
Author Message
MarkyBear
Hangin' Around



Joined: Mar 27, 2005
Posts: 39

PostPosted: Sun Sep 25, 2005 2:46 am Reply with quote

Sorry if this is the wrong forum for this, wasn't sure where this should go... Embarassed

I'd like to add the ability for users to decide whether or not they can view avatars and sigs on the forums, after a google search I came up with the following:

http://www.portedmods.com/ftopict-1297.html

First question, in the db_update file, at the top it reads:

Code:
define('IN_PHPBB', true);

$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);


Am I right in thinking that this should be changed to:

Code:
define('IN_PHPBB', true);

$phpbb_root_path = "./../";
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);


Last question (for now), will this work with the latest version of phpbb for Nuker or is their another hack out there for this?
 
View user's profile Send private message
MarkyBear







PostPosted: Sun Sep 25, 2005 12:14 pm Reply with quote

Well I guess nevermind about the DB_Update question because I'm having a hard time running the file...

But inside that file I found the SQL update and it's this:

Code:
$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD COLUMN user_ou_sig tinyint(1) DEFAULT 1";

$sql[] = "ALTER TABLE " . USERS_TABLE . " ADD COLUMN user_ou_avatar tinyint(1) DEFAULT 1";


Should this be changed to this and ran through PHPMyAdmin?

Code:
ALTER TABLE nuke_users ADD COLUMN user_ou_sig tinyint(1) DEFAULT 1;

ALTER TABLE nuke_users ADD COLUMN user_ou_avatar tinyint(1) DEFAULT 1;
 
MarkyBear







PostPosted: Mon Oct 03, 2005 4:30 am Reply with quote

Well nevermind, I figured it out myself and got it working! Very Happy

I found a newer version that made it pretty easy...

For anyone that would like to use it, here's the original, for phpbb:

Code:
############################################################## 

## MOD Title: View/Disable Avatars/Signatures
## MOD Author: r6untouchable < [ Only registered users can see links on this board! Get registered or login! ] > (Ryan) N/A
## MOD Description: Lets users choose to view/disable avatars/sigs
## MOD Version: 1.1.2
##
## Installation Level: (Intermediate)
## Installation Time: ~15-20 Minutes
## Files To Edit:
##               includes/ucercp_register.php
##               language/lang_english/lang_main.php
##               admin/admin_users.php
##               templates/subSilver/admin/user_edit_body.tpl
##               templates/subSilver/profile_add_body.tpl
##               templates/subSilver/viewtopic_body.tpl
##               viewtopic.php
## Included Files: (N/A)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: Please place the SQL commands in a text file and run them that way.
##
##############################################################
## MOD History:
##
##   2003-08-30 - Version 1.0.0
##      - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE phpbb_users ADD COLUMN user_showavatars tinyint(1) default '1';
ALTER TABLE phpbb_users ADD COLUMN user_showsignatures tinyint(1) default '1';
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $board_config['allow_smilies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = ( isset($HTTP_POST_VARS['showavatars']) ) ? ( ($HTTP_POST_VARS['showavatars']) ? TRUE : 0 ) : TRUE;
$showsignatures = ( isset($HTTP_POST_VARS['showsignatures']) ) ? ( ($HTTP_POST_VARS['showsignatures']) ? TRUE : 0 ) : TRUE;
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = ( isset($HTTP_POST_VARS['showavatars']) ) ? ( ($HTTP_POST_VARS['showavatars']) ? TRUE : 0 ) : $userdata['user_showavatars'];
$showsignatures = ( isset($HTTP_POST_VARS['showsignatures']) ) ? ( ($HTTP_POST_VARS['showsignatures']) ? TRUE : 0 ) : $userdata['user_showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
   SET
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allowsmile = $allowsmilies,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_showavatars = $showavatars, user_showsignatures = $showsignatures,
#
#-----[ FIND ]------------------------------------------
#
// Get current date
//
$sql = "INSERT INTO "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allowsmile,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_showavatars, user_showsignatures,
#
#-----[ FIND ]------------------------------------------
#
VALUES ($user_id,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$allowsmilies,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 $showavatars, $showsignatures,
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = $userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = $userdata['user_showavatars'];
$showsignatures = $userdata['user_showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$allowsmilies,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 $showavatars, $showsignatures,
#
#-----[ FIND ]------------------------------------------
#
'ALWAYS_ALLOW_SMILIES_NO' => ( !$allowsmilies ) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'SHOW_AVATARS_YES' => ( $showavatars ) ? 'checked="checked"' : '',
'SHOW_AVATARS_NO' => ( !$showavatars ) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_YES' => ( $showsignatures ) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_NO' => ( !$showsignatures ) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_SHOW_AVATARS' => $lang['Show_avatars'],
'L_SHOW_SIGNATURES' => $lang['Show_signatures'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Show_avatars'] = 'Show Avatars in Topic';
$lang['Show_signatures'] = 'Show Signatures in Topic';

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = ( isset( $HTTP_POST_VARS['allowsmilies']) ) ? intval( $HTTP_POST_VARS['allowsmilies'] ) : $board_config['allow_smilies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = ( isset( $HTTP_POST_VARS['showavatars']) ) ? intval( $HTTP_POST_VARS['showavatars'] ) : $board_config['showavatars'];
$showsignatures = ( isset( $HTTP_POST_VARS['showsignatures']) ) ? intval( $HTTP_POST_VARS['showsignatures'] ) : $board_config['showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
   SET
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allowsmile = $allowsmilies,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_showavatars = $showavatars, user_showsignatures = $showsignatures,
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = $this_userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = $this_userdata['user_showavatars'];
$showsigatures = $this_userdata['user_showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="allowsmilies" value="' . $allowsmilies . '" />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="showavatars" value="' . $showavatars . '" />';
$s_hidden_fields .= '<input type="hidden" name="showsignatures" value="' . $showsignatures . '" />';
#
#-----[ FIND ]------------------------------------------
#
'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'SHOW_AVATARS_YES' => ($showavatars) ? 'checked="checked"' : '',
'SHOW_AVATARS_NO' => (!$showavatars) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_YES' => ($showsignatures) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_NO' => (!$showsignatures) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_SHOW_AVATARS' => $lang['Show_avatars'],
'L_SHOW_SIGNATURES' => $lang['Show_signatures'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_AVATARS}:</span></td>
      <td class="row2">
         <input type="radio" name="showavatars" value="1" {SHOW_AVATARS_YES} />
         <span class="gen">{L_YES}</span>
         <input type="radio" name="showavatars" value="0" {SHOW_AVATARS_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_SIGNATURES}:</span></td>
      <td class="row2">
         <input type="radio" name="showsignatures" value="1" {SHOW_SIGNATURES_YES} />
         <span class="gen">{L_YES}</span>
         <input type="radio" name="showsignatures" value="0" {SHOW_SIGNATURES_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_AVATARS}:</span></td>
      <td class="row2">
         <input type="radio" name="showavatars" value="1" {SHOW_AVATARS_YES} />
         <span class="gen">{L_YES}</span>
         <input type="radio" name="showavatars" value="0" {SHOW_AVATARS_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_SIGNATURES}:</span></td>
      <td class="row2">
         <input type="radio" name="showsignatures" value="1" {SHOW_SIGNATURES_YES} />
         <span class="gen">{L_YES}</span>
         <input type="radio" name="showsignatures" value="0" {SHOW_SIGNATURES_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{postrow.POSTER_AVATAR}
#
#-----[ REPLACE WITH ]------------------------------------------
#

<!-- BEGIN switch_showavatars -->
<br />{postrow.POSTER_AVATAR}
<!-- END switch_showavatars -->

#
#-----[ FIND ]------------------------------------------
#
{postrow.SIGNATURE}
#
#-----[ REPLACE WITH ]------------------------------------------
#

<!-- BEGIN switch_showsignatures -->
{postrow.SIGNATURE}
<!-- END switch_showsignatures -->

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
'U_POST_ID' => $postrow[$i]['post_id'])
   );
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ($userdata['user_showavatars'])
   {
      $template->assign_block_vars('postrow.switch_showavatars', array());
   }
if ($userdata['user_showsignatures'])
   {
      $template->assign_block_vars('postrow.switch_showsignatures', array());
   }
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM



And here is the edited version for Nuke:

Code:
############################################################## 

## MOD Title: View/Disable Avatars/Signatures
## MOD Author: r6untouchable < [ Only registered users can see links on this board! Get registered or login! ] > (Ryan) N/A
## MOD Description: Lets users choose to view/disable avatars/sigs
## MOD Version: 1.1.2
##
## Installation Level: (Intermediate)
## Installation Time: ~15-20 Minutes
## Files To Edit:
##               includes/ucercp_register.php
##               language/lang_english/lang_main.php
##               admin/admin_users.php
##               templates/subSilver/admin/user_edit_body.tpl
##               templates/subSilver/profile_add_body.tpl
##               templates/subSilver/viewtopic_body.tpl
##               viewtopic.php
## Included Files: (N/A)
##############################################################
## For Security Purposes, Please Check: http://www.phpbb.com/mods/ for the
## latest version of this MOD. Downloading this MOD from other sites could cause malicious code
## to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered
## in our MOD-Database, located at: http://www.phpbb.com/mods/
##############################################################
## Author Notes: Please place the SQL commands in a text file and run them that way.
##
##############################################################
## MOD History:
##
##   2003-08-30 - Version 1.0.0
##      - Initial Release
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ SQL ]------------------------------------------
#
ALTER TABLE nuke_users ADD COLUMN user_showavatars tinyint(1) default '1';
ALTER TABLE nuke_users ADD COLUMN user_showsignatures tinyint(1) default '1';
#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_register.php
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $board_config['allow_smilies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = ( isset($HTTP_POST_VARS['showavatars']) ) ? ( ($HTTP_POST_VARS['showavatars']) ? TRUE : 0 ) : TRUE;
$showsignatures = ( isset($HTTP_POST_VARS['showsignatures']) ) ? ( ($HTTP_POST_VARS['showsignatures']) ? TRUE : 0 ) : TRUE;
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = ( isset($HTTP_POST_VARS['allowsmilies']) ) ? ( ($HTTP_POST_VARS['allowsmilies']) ? TRUE : 0 ) : $userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = ( isset($HTTP_POST_VARS['showavatars']) ) ? ( ($HTTP_POST_VARS['showavatars']) ? TRUE : 0 ) : $userdata['user_showavatars'];
$showsignatures = ( isset($HTTP_POST_VARS['showsignatures']) ) ? ( ($HTTP_POST_VARS['showsignatures']) ? TRUE : 0 ) : $userdata['user_showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
   SET
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allowsmile = $allowsmilies,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_showavatars = $showavatars, user_showsignatures = $showsignatures,
#
#-----[ FIND ]------------------------------------------
#
// Get current date
//
$sql = "INSERT INTO "
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allowsmile,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_showavatars, user_showsignatures,
#
#-----[ FIND ]------------------------------------------
#
VALUES ('$user_id',
#
#-----[ IN-LINE FIND ]------------------------------------------
#
'$allowsmilies',
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 '$showavatars', '$showsignatures',
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = $userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = $userdata['user_showavatars'];
$showsignatures = $userdata['user_showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
display_avatar_gallery($mode,
#
#-----[ IN-LINE FIND ]------------------------------------------
#
$allowsmilies,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 $showavatars, $showsignatures,
#
#-----[ FIND ]------------------------------------------
#
'ALWAYS_ALLOW_SMILIES_NO' => ( !$allowsmilies ) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'SHOW_AVATARS_YES' => ( $showavatars ) ? 'checked="checked"' : '',
'SHOW_AVATARS_NO' => ( !$showavatars ) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_YES' => ( $showsignatures ) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_NO' => ( !$showsignatures ) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
'L_ALWAYS_ADD_SIGNATURE' => $lang['Always_add_sig'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_SHOW_AVATARS' => $lang['Show_avatars'],
'L_SHOW_SIGNATURES' => $lang['Show_signatures'],
#
#-----[ OPEN ]------------------------------------------
#
language/lang_english/lang_main.php
#
#-----[ FIND ]------------------------------------------
#
//
// That's all, Folks!
#
#-----[ BEFORE, ADD ]------------------------------------------
#
$lang['Show_avatars'] = 'Show Avatars in Topic';
$lang['Show_signatures'] = 'Show Signatures in Topic';

#
#-----[ OPEN ]------------------------------------------
#
admin/admin_users.php
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = ( isset( $HTTP_POST_VARS['allowsmilies']) ) ? intval( $HTTP_POST_VARS['allowsmilies'] ) : $board_config['allow_smilies'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = ( isset( $HTTP_POST_VARS['showavatars']) ) ? intval( $HTTP_POST_VARS['showavatars'] ) : $board_config['showavatars'];
$showsignatures = ( isset( $HTTP_POST_VARS['showsignatures']) ) ? intval( $HTTP_POST_VARS['showsignatures'] ) : $board_config['showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
$sql = "UPDATE " . USERS_TABLE . "
   SET
#
#-----[ IN-LINE FIND ]------------------------------------------
#
user_allowsmile = $allowsmilies,
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------------
#
 user_showavatars = $showavatars, user_showsignatures = $showsignatures,
#
#-----[ FIND ]------------------------------------------
#
$allowsmilies = $this_userdata['user_allowsmile'];
#
#-----[ AFTER, ADD ]------------------------------------------
#
$showavatars = $this_userdata['user_showavatars'];
$showsigatures = $this_userdata['user_showsignatures'];
#
#-----[ FIND ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="allowsmilies" value="' . $allowsmilies . '" />';
#
#-----[ AFTER, ADD ]------------------------------------------
#
$s_hidden_fields .= '<input type="hidden" name="showavatars" value="' . $showavatars . '" />';
$s_hidden_fields .= '<input type="hidden" name="showsignatures" value="' . $showsignatures . '" />';
#
#-----[ FIND ]------------------------------------------
#
'ALWAYS_ALLOW_SMILIES_NO' => (!$allowsmilies) ? 'checked="checked"' : '',
#
#-----[ AFTER, ADD ]------------------------------------------
#
'SHOW_AVATARS_YES' => ($showavatars) ? 'checked="checked"' : '',
'SHOW_AVATARS_NO' => (!$showavatars) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_YES' => ($showsignatures) ? 'checked="checked"' : '',
'SHOW_SIGNATURES_NO' => (!$showsignatures) ? 'checked="checked"' : '',
#
#-----[ FIND ]------------------------------------------
#
'L_ALWAYS_ALLOW_SMILIES' => $lang['Always_smile'],
#
#-----[ AFTER, ADD ]------------------------------------------
#
'L_SHOW_AVATARS' => $lang['Show_avatars'],
'L_SHOW_SIGNATURES' => $lang['Show_signatures'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/admin/user_edit_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_AVATARS}:</span></td>
      <td class="row2">
         <input type="radio" name="showavatars" value="1" {SHOW_AVATARS_YES} />
         <span class="gen">{L_YES}</span>
         <input type="radio" name="showavatars" value="0" {SHOW_AVATARS_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_SIGNATURES}:</span></td>
      <td class="row2">
         <input type="radio" name="showsignatures" value="1" {SHOW_SIGNATURES_YES} />
         <span class="gen">{L_YES}</span>
         <input type="radio" name="showsignatures" value="0" {SHOW_SIGNATURES_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_add_body.tpl
themes/YOURTHEME/forums/profile_add_body.tpl
#
#-----[ FIND ]------------------------------------------
#
<input type="radio" name="allowsmilies" value="0" {ALWAYS_ALLOW_SMILIES_NO} />
      <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ AFTER, ADD ]------------------------------------------
#
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_AVATARS}:</span></td>
      <td class="row2">
         <input type="radio" name="showavatars" value="1" {SHOW_AVATARS_YES} />
         <span class="gen">{L_YES}</span>&nbsp;&nbsp;
         <input type="radio" name="showavatars" value="0" {SHOW_AVATARS_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
   <tr>
      <td class="row1"><span class="gen">{L_SHOW_SIGNATURES}:</span></td>
      <td class="row2">
         <input type="radio" name="showsignatures" value="1" {SHOW_SIGNATURES_YES} />
         <span class="gen">{L_YES}</span>&nbsp;&nbsp;
         <input type="radio" name="showsignatures" value="0" {SHOW_SIGNATURES_NO} />
         <span class="gen">{L_NO}</span></td>
   </tr>
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/viewtopic_body.tpl
themes/YOURTHEME/forums/viewtopic_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{postrow.POSTER_AVATAR}
#
#-----[ REPLACE WITH ]------------------------------------------
#

<!-- BEGIN switch_showavatars -->
{postrow.POSTER_AVATAR}
<!-- END switch_showavatars -->

#
#-----[ FIND ]------------------------------------------
#
{postrow.SIGNATURE}
#
#-----[ REPLACE WITH ]------------------------------------------
#

<!-- BEGIN switch_showsignatures -->
{postrow.SIGNATURE}
<!-- END switch_showsignatures -->

#
#-----[ OPEN ]------------------------------------------
#
viewtopic.php
#
#-----[ FIND ]------------------------------------------
#
'U_POST_ID' => $postrow[$i]['post_id'])
   );
#
#-----[ AFTER, ADD ]------------------------------------------
#
if ($userdata['user_showavatars'])
   {
      $template->assign_block_vars('postrow.switch_showavatars', array());
   }
if ($userdata['user_showsignatures'])
   {
      $template->assign_block_vars('postrow.switch_showsignatures', array());
   }
#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM


There was only a couple-few changes that had to be made, enjoy!!!
 
MarkyBear







PostPosted: Mon Oct 03, 2005 11:32 am Reply with quote

Ok, well even though this is working, I just noticed one small problem...

That being when I go into my profile to change my avatar, I hit the "Show Gallery" button, which will take me to the first gallery fine, but when I go to select a different gallery it takes me back to the profile page and my seetings change, it reads at the top:

'You must fill in the required fields.'

It also changes my board language to Dutch, my time zone setting to +1 and the Date Format to 'English'...

I'm positive that it's do to this hack, never had a problem before with this, how do I fix it and thanks for any help!?!
 
CurtisH
Life Cycles Becoming CPU Cycles



Joined: Mar 15, 2004
Posts: 638
Location: West Branch, MI

PostPosted: Mon Oct 03, 2005 1:30 pm Reply with quote

You have to make sure that whenever you make changes to the INSERT and UPDATE sql portions of usercp_register.php they are carried over to usercp_avatar.php as well otherwise this type of issue will occur.

I will try to make time this week to look over these mods to see what changes if any are needed to work with bbtonuke.

NOTE: I went ahead and moved this to the BBtoNukeMods forum

_________________
Those who dream by day are cognizant of many things which escape those who dream only by night. ~Poe 
View user's profile Send private message Visit poster's website Yahoo Messenger
MarkyBear







PostPosted: Mon Oct 03, 2005 3:32 pm Reply with quote

Thank you very much for your help!

I tried doing it myself, hoping I could learn by Baptism under fire, came close but no cigar...

I searched for Tuts on how to port mods from phpbb to Nuke but came up with nothing for this type of thing.

Also, if there's any direction that you can point me in so I can learn how to port these hacks over, I'd appreciate it, I hate having to bug people for help, I'm sure you guys/gals already have your hands full!

Thanks again and I hope this hack can be made to work!

NOTE: I forgot to mention here that I can change my avatars and view the different avatar galleries through "Your Account" without any problems at all.

It's just the Profile part that is giving me the problems.

I was planning on doing the 'redirect' users from 'info' to 'your account' hack, otherwise I'd just remove the section of could from the 'add profile' that allows you view the different avatar categories.[/b]


Last edited by MarkyBear on Mon Oct 03, 2005 3:39 pm; edited 1 time in total 
CurtisH







PostPosted: Mon Oct 03, 2005 3:37 pm Reply with quote

Here ya go:
It's a bit old, but still applies for most phpBBhacks to be ported to BBtoNuke. Additionally you need to keep in mind the directory structure is a bit different and the db tables etc..

Compliments of our good friend Anor: Basic Porting Tutorial
 
MarkyBear







PostPosted: Mon Oct 03, 2005 3:41 pm Reply with quote

Hey thanks a lot, I'm going to look at this right now!

I also added an above note to my last post, but here it is again just in case:

NOTE: I forgot to mention here that I can change my avatars and view the different avatar galleries through "Your Account" without any problems at all.

It's just the Profile part that is giving me the problems.

I was planning on doing the 'redirect' users from 'info' to 'your account' hack, otherwise I'd just remove the section of could from the 'add profile' that allows you view the different avatar categories.

Thanks a ton for your help too btw
 
CurtisH







PostPosted: Mon Oct 03, 2005 7:13 pm Reply with quote

Ok, ported and tested on PHP-Nuke 7.6

All seemed to work as it should.

Allow/Disallow Signatures and Avatars - Forum thread with attachment

You have to be registered to download the attachment.
 
MarkyBear







PostPosted: Mon Oct 03, 2005 11:19 pm Reply with quote

Thank you for all your help and work!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke Mods

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©