
07-23-2002, 08:45 AM
|
|
|
Join Date: Oct 2001
Posts: 54
Благодарил(а): 0 раз(а)
Поблагодарили:
0 раз(а) в 0 сообщениях
|
|
Ok, so this will make it so I can add more than one line?
Pretty much like a message. I knew I could just copy the previous code for more lines, but I wanted to have a message field where I could post more than one line..make sense?
Sorry if this code below explains that, I wont be getting to it till tomorrow!
Quote:
Originally posted by chr@nox
PHP Code:
makeinputcode("[b]Server Text<b>hmm sorry for that *blush*
<b>little note...i used "servertext" as field name but you can replace it with what you want to.</b>
if you want more fields just add a field in phpmyadmin
or run this query
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">Code:</div>
<pre class="alt2" dir="ltr" style="
margin: 0px;
padding: 6px;
border: 1px inset;
width: 640px;
height: 34px;
text-align: left;
overflow: auto">ALTER TABLE `chratnox`.`serverstatus` ADD `<b>servertext</b>` VARCHAR(50) NOT NULL;</pre>
</div>then..in serverstatusadmin.php
find:
<div style="margin:20px; margin-top:5px">
<div class="smallfont" style="margin-bottom:2px">PHP Code:</div>
<div class="alt2" dir="ltr" style="
margin: 0px;
padding: 6px;
border: 1px inset;
width: 640px;
height: 34px;
text-align: left;
overflow: auto">
<code style="white-space:nowrap">
<!-- php buffer start --><code><span style="color: #000000"> <span style="color: #0000BB">makeinputcode</span><span style="color: #007700">(</span><span style="color: #DD0000">"Server Comments"</span><span style="color: #007700">,</span><span style="color: #DD0000">"servercomments"</span><span style="color: #007700">,</span><span style="color: #DD0000">""</span><span style="color: #007700">);
</span><span style="color: #0000BB"></span> </span> </code><!-- php buffer end -->
</code>
</div>
</div>and add this underneath it:
</b>","[b]servertext[/b]","");
thend find :
PHP Code:
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments) VALUES (NULL,'$servertitle','1')");
and replace it with :
PHP Code:
$DB_site->query ("INSERT INTO serverstatus (serverid,servertitle,serverstatus,serverspeed,serverlocation,serveroperators,serverowner,servercomments,[b]servertext[/b]) VALUES (NULL,'$servertitle','1')");
then find :
PHP Code:
$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown',serverspeed='$serverspeed',serverlocation='$serverlocation',serveroperators='$serveroperators',serverowner='$serverowner',servercomments='$servercomments' where serverid='$serverid'");
and replace it with :
[php]
$DB_site->query("UPDATE serverstatus SET servertitle='$servertitle',serverstatus='$updown', serverspeed='$serverspeed',serverlocation='$server location',serveroperators='$serveroperators',serve rowner='$serverowner',servercomments='$servercomme nts',servertext='$servertext' where serverid='$serverid'");
[php]
then find :
PHP Code:
makeinputcode("Server Comments","servercomments","$servstats[servercomments]");
and UNDER it add :
PHP Code:
makeinputcode("Server
Text","servertext","$servstats[servertext]");
and save and upload your file
then go to your templates and edit "serverinfo" template
and add the variable : $serverinfo[servertext] anywhere you want to.
so for example :
find :
PHP Code:
<b>Comments : </b> $serverinfo[servercomments]
and replace it with :
PHP Code:
<b>Comments : </b> $serverinfo[servercomments]<br>
<b>Text : </b> $serverinfo[servertext]
well, then you go in your admin cp and enter the new field [/B]
|
|