The Arcive of vBulletin Modifications Site. |
|
|
#1
|
||||
|
||||
|
ok.. I used to have a trivia kind of hack.. and when the change to vb 2.2.6 happened. i couldnt get it to work....
in my postbit i have ea variable $trivia now the cool thing is that i can put a question in a field and someone replies and it shows the answer after they reply (this isn't lockdown... i changed lockdown so it works for trivia) now with the change of coding.. i can't get it to work anymore... i have most of the code down... but i can't get it to show up in the thread... i will post part of the code here. i know i am missing something that makes the postbit show the $trivia i just don't know what.. here is the code... Code:
// Morgans modified trivia hack
$trivia='';
if (($thread['forumid']==2) AND ($counter==1)) {
$triviadata=$DB_site->query_first("SELECT answer from triviadata WHERE threadid=$threadid");
if (($triviadata['answer'] != '') {
$myreplies=$DB_site->query_first("SELECT COUNT(*) AS replies FROM post WHERE threadid='$threadid' AND userid='$bbuserinfo[userid]'");
$myreplies=$myreplies[replies];
if ($myreplies > 0) {
eval("\$trivia = \"".gettemplate("showthread_triviaanswer")."\";");
} else {
$triviadata='<blockquote><font face="Verdana, Arial"><b>If You Don't Know The Answer to the Question, Reply:)</font></b></blockquote>';
}
}
}
i tried this code (that is what it used to be before) Code:
eval("\$postbits .= \"".gettemplate("postbit")."\";");
|
|
#2
|
||||
|
||||
|
i finally figured it out. thansk anyways guys=)
|
![]() |
|
|
| X vBulletin 3.8.12 by vBS Debug Information | |
|---|---|
|
|
More Information |
|
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|