vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Member Archives (https://vborg.vbsupport.ru/forumdisplay.php?f=202)
-   -   Help, Sponsor in Category Hack (https://vborg.vbsupport.ru/showthread.php?t=32637)

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$te mpext")."\";");
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$te mpext")."\";");

????????}

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$te mpext")."\";");

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 &#123 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 &#123 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$te mpext")."\";");

}
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

PHP Code:

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...

PHP Code:

if ($forum['sponsorimg'] && $forum['cancontainthreads']==&& $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


All times are GMT. The time now is 06:25 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.03252 seconds
  • Memory Usage 1,733KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (2)bbcode_php_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (13)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete