Talk martial arts at KarateForums.com

Bookmark and Share

Improvising During Hack Installations

Improvising During Hack Installations

Postby Fibz » August 22nd 2004, 4:28 pm

We've all been there right? Installing a hack but running into a snag because you don't use subSilver or because you have installed another hack. You go to find something and it isn't there - a lot of you would give up because your new to phpBB and all you know how to do is follow the instructions the hack author gives you. Well there are ways to get round this... And i'll show you my stratergy for doing this!

It came to me that this tutorial was neccesary when I was going through the Add Field To Profile hack (which is more of a tutorial). My forum uses the FI subGrey Template and I had the Birthday Hack installed. Both of those factors caused a problem for me when trying to follow the instructions.

Code: Select all
# 
#-----[ FIND ]---------------------------------------------------
# 
			$sql = "UPDATE " . USERS_TABLE . "
				SET " . $username_sql . $passwd_sql . "user_email = '" . str_replace("\'", "''", $email) ."', user_icq = '" . str_replace("\'", "''", $icq) . "', user_website = '" . str_replace("\'", "''", $website) . "', user_occ = '" . str_replace("\'", "''", $occupation) . "', user_from = '" . str_replace("\'", "''", $location) . "', user_interests = '" . str_replace("\'", "''", $interests) . "', user_sig = '" . str_replace("\'", "''", $signature) . "', user_sig_bbcode_uid = '$signature_bbcode_uid', user_viewemail = $viewemail, user_aim = '" . str_replace("\'", "''", str_replace(' ', '+', $aim)) . "', user_yim = '" . str_replace("\'", "''", $yim) . "', user_msnm = '" . str_replace("\'", "''", $msn) . "', user_attachsig = $attachsig, user_allowsmile = $allowsmilies, user_allowhtml = $allowhtml, user_allowbbcode = $allowbbcode, user_allow_viewonline = $allowviewonline, user_notify = $notifyreply, user_notify_pm = $notifypm, user_popup_pm = $popuppm, user_timezone = $user_timezone, user_dateformat = '" . str_replace("\'", "''", $user_dateformat) . "', user_lang = '" . str_replace("\'", "''", $user_lang) . "', user_style = $user_style, user_active = $user_active, user_actkey = '" . str_replace("\'", "''", $user_actkey) . "'" . $avatar_sql . "


That may look bunched up to you - I'm sorry about that. Anyway, I couldn't find that because I had the Birthday Hack installed and somewhere in my .tpl files would be a a spot where the Birthday Hack had required a change to be made. So I looked below that instruction and say find this:

Code: Select all
# 
#-----[ IN-LINE FIND ]---------------------------------------------------
# 
$interests) . "'


Now I had an idea of what i was looking for! :) But still there was more than one instance of $interests) . "' in the .tpl. :( However, I didn't give up.

I looked back up at the original FIND (not IN-LINE FIND) and said to myself "what is the key thing about that code sniplet?" and i noticed at the very beggining "$sql = "UPDATE " . USERS_TABLE . " " If I'm going to update the user table in that piece of code then i wont be updating it again in that .tpl because that would be a waste. So then I knew what made the lines different from all of the others which contained the IN-LINE instance that I was looking for. :) So I used my eyes instead of CTRL+F and found where that instance was and low and behold I was able to finish off the hack.

I hope that this tutorial has been some help!
Fibz
New User
 
Posts: 1
Joined: June 23rd 2004, 5:41 pm

Return to phpBB 2: Customizing Your phpBB

Who is online

Users browsing this forum: No registered users and 0 guests