PDA

View Full Version : Help, Sponsor in Category Hack


Littlebit
11-24-2001, 02:13 PM
I need some help finishing the Sponsor in Category Hack. I keep getting a parse error and fear I will only make it worse if I keep messing with it myself. Could someone please help me out?
Thanks

Admin
11-25-2001, 11:23 AM
It would help if you post the code. ;)

Littlebit
11-25-2001, 02:36 PM
When I replace the line:
eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");
with:
if?($forum['sponsorimg']?&&?$forum['cancontainthreads']==0?&&?$depth==1)?{

??????????eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level1_nopost_sponsor")."\";");

????????}?else?{

??????????eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");

????????}
I receive a parse error when index.php gets to this line:
if?($forum['sponsorimg']?&&?$forum['cancontainthreads']==0?&&?$depth==1)?{

Admin
11-25-2001, 04:00 PM
Probably a line before that line, maybe you forgot a ; there?

Littlebit
11-26-2001, 01:11 AM
Here is the first 6 lines above the code I am to replace and the 3 lines below:
if ($forum['cancontainthreads']==1) {
$tempext = '_post';
} else {
$tempext = '_nopost';
}

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");

if ($depth<$forumhomedepth) {
$forumbits.=makeforumbit($forum['forumid'],$depth+1,$forumperms);
}

This is without the hack...I don't see a ; anywhere that I may have accidently replaced.

Admin
11-26-2001, 12:43 PM
Make sure you don't have { instead of { in the scripts...

Littlebit
11-26-2001, 01:53 PM
I couldn't see any difference with { and {...
I keep trying to totally mimic the code posted on your thread in replacing that one line...I swear...its weird. The only other hack involved with my index.php is the little bit to make the PM message bar blink. That wouldn't effect it would it?

Admin
11-26-2001, 02:01 PM
[QUOTE]Originally posted by FireFly
Make sure you don't have { instead of { in the scripts...

Littlebit
11-26-2001, 02:07 PM
I wnet back and checked for that too...after someone else told me that might happen. No 123 was in it the third time I tried. I'm still stuck. :(

Littlebit
11-26-2001, 02:28 PM
Here it is in place with a parse error again...I copied a bunch of lines before and after
$tempext = '_nopost';
}

if ($forum['sponsorimg'] && $forum['cancontainthreads']==0 && $depth==1) {

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level1_nopost_sponsor")."\";");

} else {

eval("\$forumbits .= \"".gettemplate("forumhome_forumbit_level$depth$tempext")."\";");

}
if ($depth<$forumhomedepth) {
$forumbits.=makeforumbit($forum['forumid'],$depth+1,$forumperms);
}
} // END if can view
} // END while ( list($key2,$for

TraumTeam
07-13-2002, 09:44 PM
I got the same problem with the code ...
nothing wrong ... just when you add the lines it make that parse error

unexpected T_STRING in Line 311

if_($forum['sponsorimg']_&&_$forum['cancontainthreads']==0_&&_$depth==1)_{

Thats this line ...
Its right the same probl. littlebit got ...


So perhaps it is a bug ? Something with the vbb 2.2.6 ? With php ?

Greetz
rob

Admin
07-14-2002, 05:59 AM
For some reason you have _ where spaces should be...

if ($forum['sponsorimg'] && $forum['cancontainthreads']==0 && $depth==1) {

TraumTeam
07-14-2002, 11:39 AM
thanks for help ....
my texteditor .. dont show that underlines ____
dont know why :(

Thanks and greetz
TraumTeam