PDA

View Full Version : Set variable based on user title


kontrabass
08-09-2001, 12:22 PM
Hello,

In 2.0beta3, I inserted the code:

switch ($post[usertitle]) {
case $post[usertitle]=="New Member":
$support="<a href=\"http://www.mysite.com/support.php\">Upgrade Available</a>";
break;
case $post[usertitle]=="Member":
$support="<a href=\"http://www.mysite.com/support.php\">Upgrade Available</a>";
break;
default:
$support="";
}


..In showthread.php, in the following While loop:

while ($post=$DB_site->fetch_array($posts) and $counter++<$perpage)

The point is to display the "Upgrade Available" link in a user's post under their usertitle, if the user is not a "Supporting Member". This is done by simply including the $support variable in the postbit template.

However, this no longer works in 2.0.3, in the same While loop, and I can't figure out why...

Anyone have an idea how to set the $support variable based on user title and achieve the objective?

Thanks -

Freddie Bingham
08-09-2001, 12:48 PM
The section is in the second function of admin/functions.php no.

Also could you please enter your vB license into your profile to continue to receive support.