The Arcive of vBulletin Modifications Site. |
|
Bizzare phpinclude problem Details »»
|
|||||||||||||||||||||||||
Does anyone have any idea why when I add this:
ob_start(); include_once("./last10.php"); $last10 = ob_get_contents(); ob_end_clean(); To the phpincludes template, vb now automatically fills in the subject line on replies with titles from other threads? It's totally weird, and driving me and my users NUTS. All I want to do is include the file last10.php in a template. Is there a better way to do it maybe? This is with 2.2.6 Thank you! Ixian Show Your Support
|
|||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Probably because last10.php populates the $subject variable when it's called.
A not-very-nice-but-works workaround: PHP Code:
|
|
#3
|
||||
|
||||
|
Chen once again proves he is the master.
It does work, and avoids the subject problem as well. Which leads me to ask, what's not nice about it? ![]() Love that last10 hack of yours. I use it in two places - a new threads box at the top of my (non-php) homepage, where I renamed it to last5 and heavily edited it so it would only show very basic info and uses my CSS classes, and a separate instance I left intact as last10 that I am using in a template to provide an overal new post summary page with vb. I modified it a little, actually - added some more variables so I can make links for the forum name, etc different colors. Thanks again! |
|
#4
|
||||
|
||||
|
Well it's nice... it could be done more elegantly but what I gave was a quick fix.
![]() (And psst... that's not my hack! )
|
![]() |
|
|