Bad Boy Blog, an unofficial Diddy and Bad Boy fan blog

Bookmark and Share

phpBB 2.0.3 to 2.0.4 Code Changes

Postby Acyd Burn » January 26th 2003, 7:46 pm

  • templates/subSilver/error_body.tpl
  1. FIND - Line 9
    Code: Select all
    
    				<td align="center"><span class="error">{ERROR_MESSAGE}</span></td>
    


    REPLACE WITH
    Code: Select all
    
    				<td align="center"><span class="gen">{ERROR_MESSAGE}</span></td>
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:47 pm

  • templates/subSilver/groupcp_info_body.tpl
  1. FIND - Line 12
    Code: Select all
    
    		<th class="thHead" colspan="7" height="25"><span class="tableTitle">{L_GROUP_INFORMATION}</span></th>
    


    REPLACE WITH
    Code: Select all
    
    		<th class="thHead" colspan="7" height="25">{L_GROUP_INFORMATION}</th>
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:47 pm

  • templates/subSilver/groupcp_pending_info.tpl
  1. FIND - Line 26
    Code: Select all
    
    	  <td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gensmall"> <input type="checkbox" name="pending_members[]" value="{pending_members_row.USER_ID}" /></span></td>
    


    REPLACE WITH
    Code: Select all
    
    	  <td class="{pending_members_row.ROW_CLASS}" align="center"><span class="gensmall"> <input type="checkbox" name="pending_members[]" value="{pending_members_row.USER_ID}" checked="checked" /></span></td>
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:48 pm

  • templates/subSilver/modcp_split.tpl
  1. FIND - Line 18
    Code: Select all
    
    	  <td class="row2" colspan="2"><span class="courier"> 
    		<input type="text" size="35" style="width: 350px" maxlength="100" name="subject" class="post" />
    		</span></td>
    	</tr>
    	<tr> 
    	  <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td>
    	  <td class="row2" colspan="2"><span class="courier">{S_FORUM_SELECT}</span></td>
    


    REPLACE WITH
    Code: Select all
    
    	  <td class="row2" colspan="2"><input class="post" type="text" size="35" style="width: 350px" maxlength="60" name="subject" /></td>
    	</tr>
    	<tr> 
    	  <td class="row1" nowrap="nowrap"><span class="gen">{L_SPLIT_FORUM}</span></td>
    	  <td class="row2" colspan="2">{S_FORUM_SELECT}</td>
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:49 pm

  • templates/subSilver/posting_body.tpl
  1. FIND - Line 20
    Code: Select all
    
    var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1)
                    && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1)
                    && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1));
    


    AFTER, ADD
    Code: Select all
    
    var is_moz = 0;
    

  2. FIND - Line 95
    Code: Select all
    
    	text = ' ' + text + ' ';
    	if (document.post.message.createTextRange && document.post.message.caretPos) {
    		var caretPos = document.post.message.caretPos;
    		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
    		document.post.message.focus();
    	} else {
    	document.post.message.value  += text;
    	document.post.message.focus();
    	}
    }
    
    function bbfontstyle(bbopen, bbclose) {
    	if ((clientVer >= 4) && is_ie && is_win) {
    		theSelection = document.selection.createRange().text;
    		if (!theSelection) {
    			document.post.message.value += bbopen + bbclose;
    			document.post.message.focus();
    			return;
    		}
    		document.selection.createRange().text = bbopen + theSelection + bbclose;
    		document.post.message.focus();
    		return;
    	} else {
    		document.post.message.value += bbopen + bbclose;
    		document.post.message.focus();
    		return;
    	}
    	storeCaret(document.post.message);
    }
    
    
    function bbstyle(bbnumber) {
    


    REPLACE WITH
    Code: Select all
    
    	var txtarea = document.post.message;
    	text = ' ' + text + ' ';
    	if (txtarea.createTextRange && txtarea.caretPos) {
    		var caretPos = txtarea.caretPos;
    		caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text;
    		txtarea.focus();
    	} else {
    		txtarea.value  += text;
    		txtarea.focus();
    	}
    }
      
    function bbfontstyle(bbopen, bbclose) {
    	var txtarea = document.post.message;
    
    	if ((clientVer >= 4) && is_ie && is_win) {
    		theSelection = document.selection.createRange().text;
    		if (!theSelection) {
    			txtarea.value += bbopen + bbclose;
    			txtarea.focus();
    			return;
    		}
    		document.selection.createRange().text = bbopen + theSelection + bbclose;
    		txtarea.focus();
    		return;
    	}
    	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
    	{
    		mozWrap(txtarea, bbopen, bbclose);
    		return;
    	}
    	else
    	{
    		txtarea.value += bbopen + bbclose;
    		txtarea.focus();
    	}
    	storeCaret(txtarea);
    }
    
    
    function bbstyle(bbnumber) {
    	var txtarea = document.post.message;
    

  3. FIND - Line 145
    Code: Select all
    
    			document.post.message.value += bbtags[butnumber + 1];
    			buttext = eval('document.post.addbbcode' + butnumber + '.value');
    			eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
    		}
    		imageTag = false; // All tags are closed including image tags :D
    		document.post.message.focus();
    		return;
    	}
    
    	if ((clientVer >= 4) && is_ie && is_win)
    		theSelection = document.selection.createRange().text; // Get text selection
    		
    	if (theSelection) {
    		// Add tags around selection
    		document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
    		document.post.message.focus();
    		theSelection = '';
    		return;
    	}
    


    REPLACE WITH
    Code: Select all
    
    			txtarea.value += bbtags[butnumber + 1];
    			buttext = eval('document.post.addbbcode' + butnumber + '.value');
    			eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
    		}
    		imageTag = false; // All tags are closed including image tags :D
    		txtarea.focus();
    		return;
    	}
    
    	if ((clientVer >= 4) && is_ie && is_win)
    	{
    		theSelection = document.selection.createRange().text; // Get text selection
    		if (theSelection) {
    			// Add tags around selection
    			document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1];
    			txtarea.focus();
    			theSelection = '';
    			return;
    		}
    	}
    	else if (txtarea.selectionEnd && (txtarea.selectionEnd - txtarea.selectionStart > 0))
    	{
    		mozWrap(txtarea, bbtags[bbnumber], bbtags[bbnumber+1]);
    		return;
    	}
    

  4. FIND - Line 182
    Code: Select all
    
    				document.post.message.value += bbtags[butnumber + 1];
    				buttext = eval('document.post.addbbcode' + butnumber + '.value');
    				eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
    				imageTag = false;
    			}
    			document.post.message.focus();
    			return;
    	} else { // Open tags
    	
    		if (imageTag && (bbnumber != 14)) {		// Close image tag before adding another
    			document.post.message.value += bbtags[15];
    			lastValue = arraypop(bbcode) - 1;	// Remove the close image tag from the list
    			document.post.addbbcode14.value = "Img";	// Return button back to normal state
    			imageTag = false;
    		}
    		
    		// Open tag
    		document.post.message.value += bbtags[bbnumber];
    		if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
    		arraypush(bbcode,bbnumber+1);
    		eval('document.post.addbbcode'+bbnumber+'.value += "*"');
    		document.post.message.focus();
    		return;
    	}
    	storeCaret(document.post.message);
    


    REPLACE WITH
    Code: Select all
    
    				txtarea.value += bbtags[butnumber + 1];
    				buttext = eval('document.post.addbbcode' + butnumber + '.value');
    				eval('document.post.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"');
    				imageTag = false;
    			}
    			txtarea.focus();
    			return;
    	} else { // Open tags
    	
    		if (imageTag && (bbnumber != 14)) {		// Close image tag before adding another
    			txtarea.value += bbtags[15];
    			lastValue = arraypop(bbcode) - 1;	// Remove the close image tag from the list
    			document.post.addbbcode14.value = "Img";	// Return button back to normal state
    			imageTag = false;
    		}
    		
    		// Open tag
    		txtarea.value += bbtags[bbnumber];
    		if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag
    		arraypush(bbcode,bbnumber+1);
    		eval('document.post.addbbcode'+bbnumber+'.value += "*"');
    		txtarea.focus();
    		return;
    	}
    	storeCaret(txtarea);
    }
    
    // From http://www.massless.org/mozedit/
    function mozWrap(txtarea, open, close)
    {
    	var selLength = txtarea.textLength;
    	var selStart = txtarea.selectionStart;
    	var selEnd = txtarea.selectionEnd;
    	if (selEnd == 1 || selEnd == 2) 
    		selEnd = selLength;
    
    	var s1 = (txtarea.value).substring(0,selStart);
    	var s2 = (txtarea.value).substring(selStart, selEnd)
    	var s3 = (txtarea.value).substring(selEnd, selLength);
    	txtarea.value = s1 + open + s2 + close + s3;
    	return;
    

  5. FIND - Line 358
    Code: Select all
    
    					<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]')" onMouseOver="helpline('s')">
    


    REPLACE WITH
    Code: Select all
    
    					<select name="addbbcode18" onChange="bbfontstyle('[color=' + this.form.addbbcode18.options[this.form.addbbcode18.selectedIndex].value + ']', '[/color]');this.selectedIndex=0;" onMouseOver="helpline('s')">
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:49 pm

  • templates/subSilver/privmsgs_body.tpl
  1. FIND - Line 35
    Code: Select all
    
    		  <td colspan="3" width="100%" class="row1" nowrap="nowrap"><span class="gensmall">{BOX_SIZE_STATUS}</span></td>
    		</tr>
    		<tr> 
    		  <td colspan="3" width="100%" class="row2">
    


    REPLACE WITH
    Code: Select all
    
    		  <td colspan="3" width="175" class="row1" nowrap="nowrap"><span class="gensmall">{BOX_SIZE_STATUS}</span></td>
    		</tr>
    		<tr> 
    		  <td colspan="3" width="175" class="row2">
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:50 pm

  • templates/subSilver/profile_send_email.tpl
  1. FIND - Line 60
    Code: Select all
    
    		<td class="catBottom" colspan="2" align="center" height="28"><input type="submit" tabindex="6" name="submit" class="mainoption" value="{L_SEND_EMAIL}" /></td>
    


    REPLACE WITH
    Code: Select all
    
    		<td class="catBottom" colspan="2" align="center" height="28">{S_HIDDEN_FIELDS}<input type="submit" tabindex="6" name="submit" class="mainoption" value="{L_SEND_EMAIL}" /></td>
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:51 pm

  • templates/subSilver/viewtopic_body.tpl
  1. FIND - Line 33
    Code: Select all
    
    				<td valign="top" align="right" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
    


    REPLACE WITH
    Code: Select all
    
    				<td valign="top" nowrap="nowrap">{postrow.QUOTE_IMG} {postrow.EDIT_IMG} {postrow.DELETE_IMG} {postrow.IP_IMG}</td>
    

  2. FIND - Line 49
    Code: Select all
    
    	if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 )
    


    REPLACE WITH
    Code: Select all
    
    	if ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 && navigator.userAgent.indexOf('5.') == -1 && navigator.userAgent.indexOf('6.') == -1 )
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:52 pm

  • viewforum.php
  1. FIND - Line 106
    Code: Select all
    
    		$header_location = ( @preg_match("/Microsoft|WebSTAR|Xitami/", getenv("SERVER_SOFTWARE")) ) ? "Refresh: 0; URL=" : "Location: ";
    		header($header_location . append_sid("login.$phpEx?redirect=viewforum.$phpEx&$redirect", true));
    		exit;
    


    REPLACE WITH
    Code: Select all
    
    		redirect(append_sid("login.$phpEx?redirect=viewforum.$phpEx&$redirect", true));
    

  2. FIND - Line 374
    Code: Select all
    
    	$s_auth_can .= sprintf($lang['Rules_moderate'], '<a href="' . append_sid("modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>');
    


    REPLACE WITH
    Code: Select all
    
    	$s_auth_can .= sprintf($lang['Rules_moderate'], "<a href=\"modcp.$phpEx?" . POST_FORUM_URL . "=$forum_id&sid=" . $userdata['session_id'] . '">', '</a>');
    

  3. FIND - Line 388
    Code: Select all
    
    //
    // Dump out the page header and load viewforum template
    //
    


    AFTER, ADD
    Code: Select all
    
    define('SHOW_ONLINE', true);
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

Postby Acyd Burn » January 26th 2003, 7:53 pm

  • viewonline.php
  1. FIND - Line 40
    Code: Select all
    
    $page_title = $lang['Who_is_online'];
    


    REPLACE WITH
    Code: Select all
    
    $page_title = $lang['Who_is_Online'];
    

User avatar
Acyd Burn
Consultant
 
Posts: 650
Joined: April 19th 2002, 7:00 pm
Location: Germany (Oldb)

PreviousNext

Return to phpBB 2: Fixes and Code Changes

Who is online

Users browsing this forum: No registered users and 0 guests