Log in Register FAQ Memberlist Search Welcome to RCF - WHF Forum Index
alt : test.swf
Welcome to RCF - WHF
4fx3.gif 
calendar_open_closeCalendar 
Sig in Profile MOD
Post new topic   Reply to topic View previous topic :: View next topic
Goto page: 1, 2  Next
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support Add To Bookmarks
Sig in Profile MOD
PostPosted: 07/22/2007 5:58 AM Reply with quote
Hawk
danrider
Hawk
Posts 193
Word Cnt. 9,285
BDay Jun 8
Sign Gemini
Sex Sex:Male
Joined: Apr 25, 2007
Local time: 7:54 PM
Location: Esperance, Australia
australC_1xa.gif
Hey Nightrider,

I Tried to install this MOD:

Code:
##############################################################
## MOD Title: Signature in Profile
## MOD Author: Dicky < > (Richard Foote) http://dicky.askmaggymae.com
## MOD Description: Adds the member's signature to their view profile page.
## MOD Version: 1.0.0b
##
## Installation Level: easy
## Installation Time: 5 Minutes
## Files To Edit: (2)
##            includes/usercp_viewprofile.php
##            templates/subSilver/profile_view_body.tpl
## Included Files: N/A
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##     This MOD has been verified to work with phpBB 2.0.22
##    This MOD can be installed by EasyMOD
##############################################################
## MOD History:
##
##     2007-01-21
##          - Corrected missing instruction in modX file
##     2006-12-22
##          - Updated FIND instructions
##      2006-11-25 - Version 1.0.0 Released
##         - Fix smilies not working and bbcode configurations
##     2006-01-03 - Version 0.0.3
##          - Move signature block so that header goes all the way across
##     2006-01-07 - Version 0.0.2
##          - Add switch by Kiwietje
##     2006-01-05 - Version 0.0.1
##          - Initial version
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
includes/usercp_viewprofile.php
#
#-----[ FIND ]------------------------------------------
#
$sql = "SELECT *
#
#-----[ BEFORE, ADD ]------------------------------------
#

// BEGIN ADD Signature in Profile
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);

//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
// END ADD Signature in Profile

#
#-----[ FIND ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------
#

// BEGIN Signature in Profile
$user_sig = '';
if ( $profiledata['user_attachsig'] && $board_config['allow_sig'] )
{
    $user_sig = $profiledata['user_sig'];
    $user_sig_bbcode_uid = $profiledata['user_sig_bbcode_uid'];
   if ( $user_sig != '' )
    {
       $template -> assign_block_vars('switch_signature', array());
        if ( !$board_config['allow_html'] || !$profiledata['user_allowhtml'])
          {
             $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $user_sig);
          }
       if ( $user_sig_bbcode_uid != '' && $profiledata['user_allowbbcode'] )
         {
            $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig);
         }

         $user_sig = make_clickable($user_sig);

        if ( $profiledata['user_allowsmile'] && $board_config['allow_smilies'] )
        {
            $user_sig = smilies_pass($user_sig);
        }

         if (count($orig_word))
      {
            $user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
         }

      $user_sig = str_replace("\n", "\n<br />\n", $user_sig);
    }
}
// END Signature in Profile
#
#-----[ FIND ]------------------------------------------
#
   'AVATAR_IMG' => $avatar_img,
#
#-----[ AFTER, ADD ]------------------------------------
#
    'USER_SIG' => $user_sig,
#
#-----[ FIND ]------------------------------------------
#
   'L_INTERESTS' => $lang['Interests'],
#
#-----[ AFTER, ADD ]------------------------------------
#
   'L_SIGNATURE' => $lang['Signature'],
#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/profile_view_body.tpl
#
#-----[ FIND ]------------------------------------------
#
{L_CONTACT} {USERNAME} </span></b></td>
  </tr>
  <tr>
#
#-----[ FIND ]------------------------------------------
#
<td class="row1"
#
#-----[ IN-LINE FIND ]------------------------------------------
#
"row1"
#
#-----[ IN-LINE AFTER, ADD ]------------------------------------
#
 rowspan="3"
#
#-----[ FIND ]------------------------------------------
#
        {ICQ_IMG}
     
#
#-----[ AFTER, ADD ]------------------------------------
#
      <!-- BEGIN switch_signature -->
   <tr>
      <td class="catRight" width="60%"><b><span class="gen">{L_SIGNATURE}</span></b></td>
   </tr>
   <tr>
      <td class="row1"> <span class="postbody">{USER_SIG}</span></td>
   </tr>
      <!-- END switch_signature -->
#
#-----[ SAVE/CLOSE ALL FILES ]--------------------------
#
# EoM


It installed ok but when I tried to test it and looked at someones profile it came up with:

Code:
Fatal error: Cannot redeclare load_bbcode_template() (previously declared in /home/www/forum.pegasus-outpost.com/includes/bbcode.php:45) in /home/www/forum.pegasus-outpost.com/includes/bbcode.php on line 43


I think this part of the mod has screwed it up, because its the onlu bit mentioning BBcode

Code:
#-----[ BEFORE, ADD ]------------------------------------
#

// BEGIN ADD Signature in Profile
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);

//
// Define censored word matches
//
$orig_word = array();
$replacement_word = array();
obtain_word_list($orig_word, $replacement_word);
// END ADD Signature in Profile

#
#-----[ FIND ]------------------------------------------
#
$search = '<a href="' . $temp_url . '">' . sprintf($lang['Search_user_posts'], $profiledata['username']) . '</a>';
#
#-----[ AFTER, ADD ]------------------------------------
#

// BEGIN Signature in Profile
$user_sig = '';
if ( $profiledata['user_attachsig'] && $board_config['allow_sig'] )
{
    $user_sig = $profiledata['user_sig'];
    $user_sig_bbcode_uid = $profiledata['user_sig_bbcode_uid'];
   if ( $user_sig != '' )
    {
       $template -> assign_block_vars('switch_signature', array());
        if ( !$board_config['allow_html'] || !$profiledata['user_allowhtml'])
          {
             $user_sig = preg_replace('#(<)([\/]?.*?)(>)#is', "&lt;\\2&gt;", $user_sig);
          }
       if ( $user_sig_bbcode_uid != '' && $profiledata['user_allowbbcode'] )
         {
            $user_sig = ( $board_config['allow_bbcode'] ) ? bbencode_second_pass($user_sig, $user_sig_bbcode_uid) : preg_replace("/\:$user_sig_bbcode_uid/si", '', $user_sig);
         }

         $user_sig = make_clickable($user_sig);

        if ( $profiledata['user_allowsmile'] && $board_config['allow_smilies'] )
        {
            $user_sig = smilies_pass($user_sig);
        }

         if (count($orig_word))
      {
            $user_sig = str_replace('\"', '"', substr(@preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "@preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $user_sig . '<'), 1, -1));
         }

      $user_sig = str_replace("\n", "\n<br />\n", $user_sig);
    }
}
// END Signature in Profile


munky2
Back to Top
View user's profile Find all posts by danrider Send private message [ Hidden ] Visit poster's website MSN Messenger Phoogle Map
Re: Sig in Profile MOD
PostPosted: 07/22/2007 2:14 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:54 AM
Location: St Pete, FL
peace.gif
The reason this is happening is because the bbcode.php file is being included more than once.  So try this:

OPEN
includes/usercp_viewprofile.php

FIND
Code:
// BEGIN ADD Signature in Profile
include($phpbb_root_path . 'includes/bbcode.'.$phpEx);

REPLACE WITH
Code:
// BEGIN ADD Signature in Profile
include_once($phpbb_root_path . 'includes/bbcode.'.$phpEx);


headbang
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Sig in Profile MOD
PostPosted: 07/22/2007 8:44 PM Reply with quote
Hawk
danrider
Hawk
Posts 193
Word Cnt. 9,285
BDay Jun 8
Sign Gemini
Sex Sex:Male
Joined: Apr 25, 2007
Local time: 7:54 PM
Location: Esperance, Australia
australC_1xa.gif
I Just did that, But the error keeps comming up  dontknow
Back to Top
View user's profile Find all posts by danrider Send private message [ Hidden ] Visit poster's website MSN Messenger Phoogle Map
Re: Sig in Profile MOD
PostPosted: 07/23/2007 1:44 AM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:54 AM
Location: St Pete, FL
peace.gif
Ok, then you will have to search for every instance of that code in all of your files and change it from include to include_once.  If you're lucky, there might be more than one line of this code in the usercp_viewprofile.php that you can fix in order to correct the problem...

Try fixing the include in the usercp_register.php file first to see if that cures the problem...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Sig in Profile MOD
PostPosted: 07/23/2007 3:04 AM Reply with quote
Hawk
danrider
Hawk
Posts 193
Word Cnt. 9,285
BDay Jun 8
Sign Gemini
Sex Sex:Male
Joined: Apr 25, 2007
Local time: 7:54 PM
Location: Esperance, Australia
australC_1xa.gif
I might just uninstall the MOD using EM's backups and correct the mod install.txt and install it again, proberly easier  headbang
Back to Top
View user's profile Find all posts by danrider Send private message [ Hidden ] Visit poster's website MSN Messenger Phoogle Map
Re: Sig in Profile MOD
PostPosted: 07/23/2007 3:08 AM Reply with quote
Hawk
danrider
Hawk
Posts 193
Word Cnt. 9,285
BDay Jun 8
Sign Gemini
Sex Sex:Male
Joined: Apr 25, 2007
Local time: 7:54 PM
Location: Esperance, Australia
australC_1xa.gif
The one you pointed out is the only instance of it in the mod install.txt file  1
Back to Top
View user's profile Find all posts by danrider Send private message [ Hidden ] Visit poster's website MSN Messenger Phoogle Map
Re: Sig in Profile MOD
PostPosted: 07/23/2007 2:57 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:54 AM
Location: St Pete, FL
peace.gif
Right.  So apparently, the line that we changed was called first, then the line of code in the usercp_register.php file was called next.  Since the second is an include rather than include_once command, the problem still persists until you correct it.  The problem is that the bbcode.php file is being included more than once in the sequence, so the only way to fix it is to change all the includes for the bbcode.php file that are called in the sequence to include_once.  Most likely, once you fix the include in the usercp_register.php file, the problem will go away...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Sig in Profile MOD
PostPosted: 07/25/2007 5:07 AM Reply with quote
Hawk
danrider
Hawk
Posts 193
Word Cnt. 9,285
BDay Jun 8
Sign Gemini
Sex Sex:Male
Joined: Apr 25, 2007
Local time: 7:54 PM
Location: Esperance, Australia
australC_1xa.gif
I'm sorry but am I meant to look for every include command in the usercp_register.php and change it too include_once?
Back to Top
View user's profile Find all posts by danrider Send private message [ Hidden ] Visit poster's website MSN Messenger Phoogle Map
Re: Sig in Profile MOD
PostPosted: 07/25/2007 2:28 PM Reply with quote
Site Admin
Nightrider
Site Admin
Posts 30757
Word Cnt. 2,628,690
BDay Jul 28
Sign Leo
Sex Sex:Male
Joined: Sep 25, 2004
Local time: 7:54 AM
Location: St Pete, FL
peace.gif
No, just do it for the bbcode.php include lines of code...

munky2
Back to Top
View all pictures posted by this userView user's profile Find all posts by Nightrider Send private message   AIM Address Yahoo Messenger Phoogle Map ICQ Number
Re: Sig in Profile MOD
PostPosted: 07/26/2007 3:05 AM Reply with quote
Hawk
danrider
Hawk
Posts 193
Word Cnt. 9,285
BDay Jun 8
Sign Gemini
Sex Sex:Male
Joined: Apr 25, 2007
Local time: 7:54 PM
Location: Esperance, Australia
australC_1xa.gif
ah thanks  headbang
Back to Top
View user's profile Find all posts by danrider Send private message [ Hidden ] Visit poster's website MSN Messenger Phoogle Map
 Post new topic  Reply to topic
Information
Welcome to RCF - WHF Forum Index -> Area 51 - phpBB & Easymod Tech Support

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 cannot attach files in this forum
You cannot download files in this forum
All times are GMT - 5 Hours
Goto page: 1, 2  Next
Page 1 of 2


Add To Bookmarks

 
  
  


  Google

Powered by phpBB © 2001, 2005 phpBB Group

Page generation time: 0.091s (PHP: 69% - SQL: 31%) - SQL queries: 57 - GZIP disabled - Debug on