Dean C
03 Jan 2003, 12:27
Well the most common mistake i made when i was new to install hacks was when it was long lines of code which performed a query.
Many hacks require you to edit the same line and add little fractions to it.
Ok so lets start out with a fresh install.
We install just a part of the 'away user hack'.
The instructions want us to replace this in user.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
With this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Ok that's not hard because what we need to replace will be there because the hack is made for a fresh install.
The problem comes when we have to edit that line again and it's different to the instructions. Most people will just look at the first 10 characters of that line and say well i should just replace it. Now if you do your 'away user hack' won't work.
Here's an example in the 'contributor lable' hack. It wants us again to replace this line in user.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
With this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
But because we've edited that line of code for another hack it isn't there. This leads many people to go into the support thread and say i haven't got that line of code in my user.php
Well in fact you have but it's slightly changed.
So what we do is look at the code that needs to be changed and we'll look up the line until we find what's different. Here's the code that was added to that line for the away hack:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
So what we do is ignore this line of code and see what's different in the other hack:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
So we see where the bit of code was added after in the line which was:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then we add the relevent code after it. And your final line of code should look like this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
And there we go. We've managed to get past one of the most commonest mistakes when editing your long query lines.
Regards
- miSt
Many hacks require you to edit the same line and add little fractions to it.
Ok so lets start out with a fresh install.
We install just a part of the 'away user hack'.
The instructions want us to replace this in user.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
With this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Ok that's not hard because what we need to replace will be there because the hack is made for a fresh install.
The problem comes when we have to edit that line again and it's different to the instructions. Most people will just look at the first 10 characters of that line and say well i should just replace it. Now if you do your 'away user hack' won't work.
Here's an example in the 'contributor lable' hack. It wants us again to replace this line in user.php:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
With this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
But because we've edited that line of code for another hack it isn't there. This leads many people to go into the support thread and say i haven't got that line of code in my user.php
Well in fact you have but it's slightly changed.
So what we do is look at the code that needs to be changed and we'll look up the line until we find what's different. Here's the code that was added to that line for the away hack:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
So what we do is ignore this line of code and see what's different in the other hack:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
So we see where the bit of code was added after in the line which was:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
Then we add the relevent code after it. And your final line of code should look like this:
Code:
---------------
Code is only visible to licensed users, and only when logged into the forums.
---------------
And there we go. We've managed to get past one of the most commonest mistakes when editing your long query lines.
Regards
- miSt