PDA

View Full Version : Need some help making a hack


heretic
11-25-2001, 07:19 PM
ok, I want a user-defined custom header and footer. This is similar to the custom color hack released for 2.0.3 by Palmer ofShinra, however it's outdated in 2.2.1

I already have fields set up as fields 5 and 6, for the header and footer, respectively.

here's how I was modifying it, and I'm getting a parse error:


// attempt at auto-surround post with tags
if ($bbuserinfo[5] != " ") && ($bbuserinfo[6] != " ") {
$message = "$bbuserinfo[5].$message.$bbuserinfo[6]";
}



Also, I might not be putting them in the right place. anyone able to help?

Admin
11-26-2001, 12:00 PM
// attempt at auto-surround post with tags
if ($bbuserinfo[5] != " ") && ($bbuserinfo[6] != " ") {
$message = "$bbuserinfo[5].$message.$bbuserinfo[6]";
}
needs to be:
// attempt at auto-surround post with tags
if ($bbuserinfo[field5] != " " && $bbuserinfo[field6] != " ") {
$message = $bbuserinfo[field5].$message.$bbuserinfo[field6];
}
I added field before 5 and 6, and also removed the parenthesis from around &&.

But it's not done yet, you're using $bbuserinfo info, so the header and footer for the posts will be by the VIEWING user, not the POSTING user.
You need to use $post or something like that.

Palmer ofShinra
11-26-2001, 06:04 PM
Yep... Firefly hit it all on the nose.

$post[field5] etc...

And this has to go in both newthread.php and newreply.php, same place mine went.

I considered doing it like this, but then people might go a bit bonkers with things...

Plus if they didn't close tags properly in field6, it would mess things up.

Also, my version limits what they can automatically do... color, glow, font. I like it that way.

heretic
11-27-2001, 12:22 AM
it's not working at all on my board.

I'm using 2.2.0, and some things on your hack that I am looking for to place it under are not on there.