Adopts News

Forum
Last Post
Threads / Messages
Saphira said:
IDIDITIDIDITIDIDIT!

PHP:
// Find highest answer number.
$query = "SELECT MAX(nid) AS Max_nid FROM ".$prefix."news";
$result = mysql_query($query);

	$Max_nid=@mysql_result($result,"Max_nid");

// add + 1 to highest answer number and keep it in variable name "$Max_id". if there no answer yet set it = 1
if ($result) {
$Max_idd = $Max_nid+1;
}
else {
$Max_idd = 1;
}


$topic = $_POST['topic'];
$topic = secure($topic);
$detail = $_POST['detail'];
$deatil = secure($detail);
$name = $_POST['name'];
$name = secure($name);
$datetime = date('d/m/y h:i:s');
$datetime = secure($datetime); //create date time

$topic = addslashes($topic);
$detail = addslashes($detail);

	$query = "INSERT INTO ".$prefix."news(topic, detail, name, nid, datetime) VALUES('".$topic."', '".$detail."', '".$name."', '".$Max_idd."', '".$datetime."')";
	$result = mysql_query($query);

I'm like, so happy right now. :p I was getting sick of writing "I'm testing using apostrophes." lol.

WHO'S THE MAN!

What did you do?

Saphira said:
I am male. Saphira is the name of my favourite fictional character of all time. She's the beautiful dragon from Eragon/Eldest/Brisingr. =P

o.0 Boy was I wrong.
 
Okay, last step that I'm struggling on to get this perfected. I want the users in user group 6 to be able to delete news as well as admins, so if they mess up when they post, they don't have to wait for me to come online to delete it. I've tried 5 or 6 different things to get this to work, and nothing has yet. :S Any help? =^.^=
 
Saphira said:
Okay, last step that I'm struggling on to get this perfected. I want the users in user group 6 to be able to delete news as well as admins, so if they mess up when they post, they don't have to wait for me to come online to delete it. I've tried 5 or 6 different things to get this to work, and nothing has yet. :S Any help? =^.^=

I have to warn you about this, if you give them the option, that means all the responses will be lost as well.

Doing this will require a new page, and it will also require that you not only delete the news part, but the replies as well.
 
on the site_news.php, i click the add_news.php. i try to post a news, but when i try to add news, it's ERROR..

i also try the add_reply.php but it says error, contact administrator (bloodrun)


i just uploaded the files on the file manager of my site.. where the other php's are..
 
Well what error are you getting?
Did you follow the instructions step by step?
Did you tinker with the files?
Are you sure your MySql tables are in the correct database?
 
i just follow what you said on your first post. and i didnt do anything more.

about the error.. it simply says "ERROR" on mysite/add_news.php
 
i did it!yeay, this is cool!!

btw, is it possible to add new mod that is like this, but nut news, i want to make 1 for "games"
 
zhiichiro said:
i did it!yeay, this is cool!!

btw, is it possible to add new mod that is like this, but nut news, i want to make 1 for "games"

Um, just make a news report about games..
 
Eeep, I got this working on Suffering Spooks but it's not going as well on Rhypets.

The page is at http://www.rhypets.com/V2/news.php?nid=1 as as you can see it screws up the template quite a bit. It's only that page that does it, all the other ones in this mod work fine with my template.

Here's my template if you need it...

Code:
                                                                                                                                       <head>
<title>Rhypets</title>
<link rel="stylesheet" href="/V2/templates/Green/css.css" type="text/css">
</head>
 
<body>

<div id="frame">

<div id="header">
<img src="http://www.rhypets.com/layoutnew/bannertop.png">

<div id="header-stat">

</div>

</div>

<div id="NEWS">
<a href="/extrapage.php">NEWS<br>
...one of our new version launch pets is just going to...</a>
</div>


<div id="navside2">
<img src="http://www.rhypets.com/layoutnew/bannerside.png">

<div id="navbar">
<a href="index.php" class=nav>Home</a><br>
<a href="adopt.php" class=nav>Adopt</a><br>
<a href="myadopts_level.php" class=nav>My Portal</a><br>
<a href="account.php" class=nav>My Account</a><br>
<a href="messages.php" class=nav>RhyMail</a><br>
<a href="stats.php" class=nav>Top 10 Pets</a><br>
    <a href="register.php" class=nav>Register</a><br>
    <a href="logout.php" class=nav>Logout</a><br>
    <a href="tos.php" class=nav>ToS</a><br>
</div>


</div>

<div id="content">
<table style="border: 2px #000000 solid;width:500px;background-color:#FFF;">
<tr>
<td style="background-image: 
     url('http://www.rhypets.com/layoutnew/tablebg.jpg'); background-repeat: no-repeat; border:2px #000000 solid;">
<b><center><font color=#FFFFFF>Rhypets!</font></b></center>
</td>
</tr> 
<tr>
<td style="height:620px;">
<div id="rightcontent">
:ARTICLETITLE:<p>
:ARTICLECONTENT:
</div>
</td>
</tr>
</table>
<p>

<div id="copyadd">
<table>
<tr>
<td>
----Removed the google add code here----
</td>
</tr>
<tr>
<p>

<td style="background-image: 
     url('http://www.rhypets.com/layoutnew/tablebg.jpg'); background-repeat:repeat; border:2px #000000 solid;width:670px;">
<b><center><font color=#FFFFFF>

<!-- Start FreeOnlineUsers.com -->
<a href="http://www.freeonlineusers.com">
<script type="text/javascript" src="http://st1.freeonlineusers.com/on4.php?id=151830"> </script> Online Users</a>
<!-- End FreeOnlineUsers.com --><br>

Copyright 2008 - Subzero Ninja Productions
</center></font></b></center>
</td>
</tr>
</table>
<center>
<a href="http://www.verpets.com/register.php?refer=Subzeroace"><img src="http://www.verpets.com/images/banners/deathbutton.gif" border="0" /></a>  
<a href="http://www.sufferingspooks.com/"><img src="http://www.sufferingspooks.com/img/banner1.gif" border="0"></a>
<a href="http://www.vpnwars.com/meteor/vpn/redir/signup/?ra=4528"><img src="http://www.rhypets.com/img/vpn.gif" border="0"></a>
</div>

</body>
</html>
 
SubZ said:
Eeep, I got this working on Suffering Spooks but it's not going as well on Rhypets.

The page is at http://www.rhypets.com/V2/news.php?nid=1 as as you can see it screws up the template quite a bit. It's only that page that does it, all the other ones in this mod work fine with my template.

Here's my template if you need it...

Code:
                                                                                                                                       <head>
<title>Rhypets</title>
<link rel="stylesheet" href="/V2/templates/Green/css.css" type="text/css">
</head>
 
<body>

<div id="frame">

<div id="header">
<img src="http://www.rhypets.com/layoutnew/bannertop.png">

<div id="header-stat">

</div>

</div>

<div id="NEWS">
<a href="/extrapage.php">NEWS<br>
...one of our new version launch pets is just going to...</a>
</div>


<div id="navside2">
<img src="http://www.rhypets.com/layoutnew/bannerside.png">

<div id="navbar">
<a href="index.php" class=nav>Home</a><br>
<a href="adopt.php" class=nav>Adopt</a><br>
<a href="myadopts_level.php" class=nav>My Portal</a><br>
<a href="account.php" class=nav>My Account</a><br>
<a href="messages.php" class=nav>RhyMail</a><br>
<a href="stats.php" class=nav>Top 10 Pets</a><br>
    <a href="register.php" class=nav>Register</a><br>
    <a href="logout.php" class=nav>Logout</a><br>
    <a href="tos.php" class=nav>ToS</a><br>
</div>


</div>

<div id="content">
<table style="border: 2px #000000 solid;width:500px;background-color:#FFF;">
<tr>
<td style="background-image: 
     url('http://www.rhypets.com/layoutnew/tablebg.jpg'); background-repeat: no-repeat; border:2px #000000 solid;">
<b><center><font color=#FFFFFF>Rhypets!</font></b></center>
</td>
</tr> 
<tr>
<td style="height:620px;">
<div id="rightcontent">
:ARTICLETITLE:<p>
:ARTICLECONTENT:
</div>
</td>
</tr>
</table>
<p>

<div id="copyadd">
<table>
<tr>
<td>
----Removed the google add code here----
</td>
</tr>
<tr>
<p>

<td style="background-image: 
     url('http://www.rhypets.com/layoutnew/tablebg.jpg'); background-repeat:repeat; border:2px #000000 solid;width:670px;">
<b><center><font color=#FFFFFF>

<!-- Start FreeOnlineUsers.com -->
<a href="http://www.freeonlineusers.com">
<script type="text/javascript" src="http://st1.freeonlineusers.com/on4.php?id=151830"> </script> Online Users</a>
<!-- End FreeOnlineUsers.com --><br>

Copyright 2008 - Subzero Ninja Productions
</center></font></b></center>
</td>
</tr>
</table>
<center>
<a href="http://www.verpets.com/register.php?refer=Subzeroace"><img src="http://www.verpets.com/images/banners/deathbutton.gif" border="0" /></a>  
<a href="http://www.sufferingspooks.com/"><img src="http://www.sufferingspooks.com/img/banner1.gif" border="0"></a>
<a href="http://www.vpnwars.com/meteor/vpn/redir/signup/?ra=4528"><img src="http://www.rhypets.com/img/vpn.gif" border="0"></a>
</div>

</body>
</html>

Well for one you dont have a closing </P> around :ARTICLECONTENT:

This is why I don't suggest, that if you are new to HTML, that you use a template like this.
 

Similar threads

Users who are viewing this thread

  • Forum Contains New Posts
  • Forum Contains No New Posts

Forum statistics

Threads
4,274
Messages
33,113
Members
1,602
Latest member
BerrieMilk
BETA

Latest Threads

Latest Posts

Top