Clark

Active Member
May 26, 2003
25
0
151
for the admin

Instead of typing CPanel.net support ticket number in every post all you need to do is in the newthread template add a new variable called "supportnum" and then in newthread.php do this:

if ($supportnum){

$message.="Cpanel.net support ticket number $supportnum";

}

and it won't litter the whole forum. I'm going by memory of the code but that should do it.

cPanel.net Support Ticket Number:
 

SoftmegUK

Well-Known Member
Feb 13, 2002
368
0
316
UK
Im sure they would know how to correct a bit of code like that :P

Besides theres an error on your code it should be:

if ($supportnum != ""){

$message.="Cpanel.net support ticket number $supportnum";

}

Because the variable is set whether there is anything entered into the box or not :D

cPanel.net Support Ticket Number:
 

Clark

Active Member
May 26, 2003
25
0
151
Originally posted by SoftmegUK
Im sure they would know how to correct a bit of code like that :P

Besides theres an error on your code it should be:

if ($supportnum != ""){

$message.="Cpanel.net support ticket number $supportnum";

}

Because the variable is set whether there is anything entered into the box or not :D

cPanel.net Support Ticket Number:
I'm sure they would :) Wasn't especially trying to give them code, just the idea...

About the if ($supportnum) being set when the field is left empty, not in my experience. I got code like that running all over the place working great for years...

BTW, just after you posted the site went down. Maybe they *DID* try my code and it broke down the whole cpanel.net HAHA ;)

cPanel.net Support Ticket Number:
 

SoftmegUK

Well-Known Member
Feb 13, 2002
368
0
316
UK
Lol its me getting confused again but it may or may not work, never tried it like that lol

cPanel.net Support Ticket Number:
 

Clark

Active Member
May 26, 2003
25
0
151
Juanra, I already have a headache and I'm not pregnant!

Let's keep it simple. (ok ok, I never did like regex, what did you post??)

cPanel.net Support Ticket Number: