PDA

View Full Version : Small programming help


CP,
06-08-2008, 03:21 AM
if ($vbulletin->userinfo['field8'])
{
if ($vbulletin->options['globalignore'])
{
$vbulletin->options['globalignore'] = $vbulletin->options['globalignore'] . " " . $vbulletin->userinfo['field8'];
}
else
{
$vbulletin->options['globalignore'] = $vbulletin->userinfo['field8'];
}
}


Hi the above code was taken from a 3.5.4 hack but no longer works for 3.7.1, as you can see above its a very simple short code which presumably needs a few tweaks for it to work on a 3.7.1.

Field 8 you are seeing above is refering to a custom field which was created under each users profile.

I would really appreciate it if somebody could fix the above snippet for a 3.7.1,

Many thanks in advance!

Dismounted
06-08-2008, 04:23 AM
What's the error?

The most obvious one is the lack of single quotes - as you can see, the whole block is parsed incorrectly, leading to the weird colours.

Boofo
06-08-2008, 04:30 AM
He must not have copied that exactly as in the hack. The last field8 only has one quote which should be giving errors in the hack.

CP,
06-08-2008, 12:44 PM
What's the error?

The most obvious one is the lack of single quotes - as you can see, the whole block is parsed incorrectly, leading to the weird colours.

There are no errors, nothing simply happens...

Looks pretty simple just needs tweaking.. i remember it working for vb 3.5.4.

[QUOTE=Boofo;1543754]He must not have copied that exactly as in the hack. The last field8 only has one quote which should be giving errors in the hack.[/QUOTE

The one quote was my error.. it has two, one on either side...

Field 8 is the custom field you make for the hack to apply to specific users of the forum. See below.

https://vborg.vbsupport.ru/showthread.php?t=109543

Thanks

Opserty
06-08-2008, 12:47 PM
Lets play spot the difference!

Correct:$vbulletin->userinfo['field8']Incorrect:$vbulletin->userinfo['field8]First one to guess it wins a cookie :D

(I think all this sun is getting to me... :()

If it doesn't work after you changed it, then it is probably due to code changes elsewhere. Which would probably require a new modification.

CP,
06-08-2008, 12:51 PM
Lets play spot the difference!

Correct:$vbulletin->userinfo['field8']Incorrect:$vbulletin->userinfo['field8]First one to guess it wins a cookie :D

(I think all this sun is getting to me... :()

If it doesn't work after you changed it, then it is probably due to code changes elsewhere. Which would probably require a new modification.

Ive recitfied my initial post. It was actually my error when i had posted it. See my second post above.

:)

Opserty
06-08-2008, 12:54 PM
Ah, you're second post hadn't appeared when I went to post mine :p

Boofo
06-08-2008, 01:36 PM
So YOU say... ;)

CP,
06-08-2008, 01:49 PM
Sorry for the confusion guys but the problem still remains it does not work! :(

My first post was a typo... :erm:

Dismounted
06-08-2008, 03:30 PM
Where are you putting the code?

CP,
06-09-2008, 02:24 AM
Where are you putting the code?

In the plugin area where you are able to add a new plugin by submitting the entire code. The button is called "Add New Plugin" Its in the plugin area.. and then the "hook location" is global_start.

Dismounted
06-09-2008, 03:22 AM
Have you checked if field8 exists?

CP,
06-10-2008, 08:58 PM
Have you checked if field8 exists?

Yep it all exists and it worked on 3.5.4 fine.

Now as the hack is pretty simple and straight forward i think it should work with vb 3.7 fine without any issues, however it dosent. I think it requires some tweaking somewhere...