Mysidia Adoptables Support Forum

Mysidia Adoptables Support Forum (http://www.mysidiaadoptables.com/forum/index.php)
-   Addons/Mods Graveyard (http://www.mysidiaadoptables.com/forum/forumdisplay.php?f=41)
-   -   Adopts News (http://www.mysidiaadoptables.com/forum/showthread.php?t=881)

Bloodrun 05-27-2009 05:16 PM

Adopts News
 
Well this was suggested by a member, so I'd thought I would give it a try.

Now everything works, but the look is very minimal, the reason I did it this is, is that you guys can make the colors and what not something that would fit your site.

Oh, and something else, with this one, you dont have to do any modifications, technically! =D

Just upload, and off you go.

Preview:
http://i43.tinypic.com/14lrbix.jpg
http://i39.tinypic.com/b6c4f5.jpg

Now just upload the files to where you adopts script is, and your set.
Once they are uploaded, go to
www.yoursite.com/site_news.php

And for the sql just import the sql files into your database.

[attachment=193][attachment=203]

SJC 05-27-2009 05:35 PM

RE: Adopts News
 
Wow, thats good :)

Bloodrun 05-27-2009 05:41 PM

RE: Adopts News
 
Quote:

Originally Posted by SJC
Wow, thats good :)

Lol, thanks =D

SJC 05-27-2009 05:56 PM

RE: Adopts News
 
The site_news.php file is not there.

Bloodrun 05-27-2009 05:59 PM

RE: Adopts News
 
Quote:

Originally Posted by SJC
The site_news.php file is not there.

Ooops, it's there now =D

SJC 05-27-2009 06:03 PM

RE: Adopts News
 
Hmm, not add_reply.php either.

Bloodrun 05-27-2009 06:04 PM

RE: Adopts News
 
Quote:

Originally Posted by SJC
Hmm, not add_reply.php either.

Jeese >.<

Okay its added

SJC 05-27-2009 06:13 PM

RE: Adopts News
 
Thats better :) And again great job.

Bloodrun 05-27-2009 06:21 PM

RE: Adopts News
 
Quote:

Originally Posted by SJC
Thats better :) And again great job.

Lol thanks again =D

Xius 05-27-2009 06:41 PM

RE: Adopts News
 
You aught to put some padding on those tables! The words are too close to the left side.

Bloodrun 05-27-2009 06:45 PM

RE: Adopts News
 
Quote:

Originally Posted by Xius
You aught to put some padding on those tables! The words are too close to the left side.

Lol like I said, I only made it so it works. The fashion is up to you guys.

Saphira 05-27-2009 07:42 PM

RE: Adopts News
 
Haha, another awesome job Bloodrun. It is very easily customisable, only problem I have is when I'm posting a news comment, for some reason I get an error if the detail field is too long. I have to go into the database and manually edit it. Any idea why?

SJC 05-27-2009 07:57 PM

RE: Adopts News
 
Whats the error?

Bloodrun 05-27-2009 08:18 PM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
Haha, another awesome job Bloodrun. It is very easily customisable, only problem I have is when I'm posting a news comment, for some reason I get an error if the detail field is too long. I have to go into the database and manually edit it. Any idea why?

Hmm in your database, go to your 'adopts_news' table and change the details type to longtext.

That should take care of the text limitation.

Saphira 05-27-2009 08:40 PM

RE: Adopts News
 
Yep. It's perfect now. Great job!

Bloodrun 05-27-2009 08:42 PM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
Yep. It's perfect now. Great job!

Lol thanks =D
Let me know if something doesn't work right, or if there's something you think should be added.

zhiichiro 05-28-2009 05:24 AM

RE: Adopts News
 
when i go to my site + site_news.php, and click add news, it will say ERROR??

Bloodrun 05-28-2009 08:13 AM

RE: Adopts News
 
Quote:

Originally Posted by zhiichiro
when i go to my site + site_news.php, and click add news, it will say ERROR??

Can you please provide me with the error it is giving, as well as what you did when you installed the modification.

mapleblade 05-28-2009 08:27 AM

RE: Adopts News
 
at me its really weird its all on the wrong place,

take a look, and HELP ME! :(

http://yoshisisland.0fees.net/adoptables/news.php?nid=1

Bloodrun 05-28-2009 08:30 AM

RE: Adopts News
 
Quote:

Originally Posted by mapleblade
at me its really weird its all on the wrong place,

take a look, and HELP ME! :(

http://yoshisisland.0fees.net/adoptables/news.php?nid=1

Oh boy, it's really messing up your layout.
hmm, can i see your template file?

The reason I ask, is because are you using the:

$article_content

or are you using something else?

I think I may know the problem, but would you allow me access to your ftp to fix it?
I believe the structure is just conflicting with the way your template is set up.

Saphira 05-28-2009 10:26 AM

RE: Adopts News
 
Quote:

Originally Posted by Bloodrun
Lol thanks =D
Let me know if something doesn't work right, or if there's something you think should be added.

postedit.php is missing. :P

Bloodrun 05-28-2009 10:27 AM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
Quote:

Originally Posted by Bloodrun
Lol thanks =D
Let me know if something doesn't work right, or if there's something you think should be added.

postedit.php is missing. :P

DOH! >.<
Added.

Saphira 05-28-2009 10:32 AM

RE: Adopts News
 
Hmm, is there any way to make the system recognise new paragraphs? I've tried html and bbcode, and they both fail. Everything shows up in one continuous paragraph.

Bloodrun 05-28-2009 10:39 AM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
Hmm, is there any way to make the system recognise new paragraphs? I've tried html and bbcode, and they both fail. Everything shows up in one continuous paragraph.

Did you try <br>?

If that doesn't work, Ill just convert the thing to BBcode.

mapleblade 05-28-2009 10:40 AM

RE: Adopts News
 
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by mapleblade
at me its really weird its all on the wrong place,

take a look, and HELP ME! :(

http://yoshisisland.0fees.net/adoptables/news.php?nid=1

Oh boy, it's really messing up your layout.
hmm, can i see your template file?

The reason I ask, is because are you using the:

$article_content

or are you using something else?

I think I may know the problem, but would you allow me access to your ftp to fix it?
I believe the structure is just conflicting with the way your template is set up.


Well here is my template :

Quote:

<html>
<head>
<TITLE>:BROWSERTITLE:</TITLE>
<meta name="keywords" content="{%MetaKeywords%}">
<meta name="description" content="{%MetaDescription%}">
<meta http-equiv="Content-Type" content="{%MetaCharset%}">
<style type="text/css">
<!--
td {
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
}
body {
background-image: url(images/e025_01.png);
}
.content {
padding-top: 20px;
padding-right: 20px;
padding-bottom: 40px;
padding-left: 20px;
background-image: url(images/e025_14.png);
background-repeat: no-repeat;
background-position: top;
background-color: #FFFFFF;
}
.menutop {
height: 29px;
padding-right: 10px;
padding-left: 5px;
vertical-align: middle;
font-weight: bold;
color: #FFFFFF;
background-image: url(images/e025_09.png);
background-repeat: no-repeat;
background-position: right;
}
#menu {
height:35px;
line-height:35px;
background:url(images/d018_08.jpg) repeat-x;
padding:0 10px;
}
#menu ul {
list-style-type:none;
}
#menu li {
float:left;
}
#menu li a {
padding:0 15px;
display:block;
color:#ffffff;
margin-right:2px;
}
#menu li a:hover {
background:url(images/bg-menu-hover.png) no-repeat center center;
}
a:link, a:visited {
color: #FFFFFF;
text-decoration: underline;
}
a:hover {
color: #000000;
text-decoration: none;
}
.menutop a:link, .menutop a:visited {
color: #FFFFFF;
text-decoration: none;
}
.menutop a:hover {
color: #C8FBFD;
text-decoration: underline;
}
.footer, .footer a:link, .footer a:visited {
color: #000000;
}
.newsbar {
color: #000000;
font-weight: bold;
padding-left: 40px;
}
.logo {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
}
.leftcontent {
padding-top: 10px;
padding-right: 10px;
padding-bottom: 25px;
padding-left: 35px;
}
.style1 {font-size: 16px}
.date {
color: #FFFFFF;
padding-right: 15px;
padding-left: 15px;
}
-->
</style>
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="745" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="211" height="69" background="images/e025_02.png">&nbsp;</td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/e025_03.png" width="534" height="39" alt=""></td>
</tr>
<tr>
<td height="35" background="images/e025_07.png"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="100%"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="211" valign="top" background="images/e025_22.png"><table width="211" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="129" align="center" background="images/e025_13.png"><table width="210" border="0" cellpadding="5" cellspacing="0">
<tr>
<td align="center" nowrap class="logo"><span class="style1">:SITENAME: </span><br>
Where Yoshi's are the Boss</td>
</tr>
</table></td>
</tr>
<tr>
<td height="58" background="images/e025_15.png" class="newsbar">Explore</td>
</tr>
<tr>
<td height="100%" valign="top" background="images/e025_17.png" class="leftcontent">:SIDEFEED:</td>
</tr>
<tr>
<td height="7" background="images/e025_17.png"><img src="images/e025_20.png" width="211" height="7" alt=""></td>
</tr>
<tr>
<td height="6"><img src="images/e025_21.png" width="211" height="6" alt=""></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td height="124" background="images/e025_25.png">&nbsp;</td>
</tr>
</table></td>
<td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<div id="menu">
<ul>
:LINKSBAR:
</ul>
</div>
<tr>
<td height="100%" valign="top" class="content"><p>:ARTICETITLE::ARTICLEDATE:<br>< br>:ARTICLECONTENT:</p>
</td>
</tr>
<tr>
<td height="65" align="center" background="images/e025_26.png">Powered by Rusnak PHP Adoptables Script</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

Bloodrun 05-28-2009 10:41 AM

RE: Adopts News
 
Quote:

Originally Posted by mapleblade
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by mapleblade
at me its really weird its all on the wrong place,

take a look, and HELP ME! :(

http://yoshisisland.0fees.net/adoptables/news.php?nid=1

Oh boy, it's really messing up your layout.
hmm, can i see your template file?

The reason I ask, is because are you using the:

$article_content

or are you using something else?

I think I may know the problem, but would you allow me access to your ftp to fix it?
I believe the structure is just conflicting with the way your template is set up.


Well here is my template :

Quote:

<html>
<head>
<TITLE>:BROWSERTITLE:</TITLE>
<meta name="keywords" content="{%MetaKeywords%}">
<meta name="description" content="{%MetaDescription%}">
<meta http-equiv="Content-Type" content="{%MetaCharset%}">
<style type="text/css">
<!--
td {
font-family: Tahoma, Arial, Helvetica, sans-serif;
font-size: 11px;
}
body {
background-image: url(images/e025_01.png);
}
.content {
padding-top: 20px;
padding-right: 20px;
padding-bottom: 40px;
padding-left: 20px;
background-image: url(images/e025_14.png);
background-repeat: no-repeat;
background-position: top;
background-color: #FFFFFF;
}
.menutop {
height: 29px;
padding-right: 10px;
padding-left: 5px;
vertical-align: middle;
font-weight: bold;
color: #FFFFFF;
background-image: url(images/e025_09.png);
background-repeat: no-repeat;
background-position: right;
}
#menu {
height:35px;
line-height:35px;
background:url(images/d018_08.jpg) repeat-x;
padding:0 10px;
}
#menu ul {
list-style-type:none;
}
#menu li {
float:left;
}
#menu li a {
padding:0 15px;
display:block;
color:#ffffff;
margin-right:2px;
}
#menu li a:hover {
background:url(images/bg-menu-hover.png) no-repeat center center;
}
a:link, a:visited {
color: #FFFFFF;
text-decoration: underline;
}
a:hover {
color: #000000;
text-decoration: none;
}
.menutop a:link, .menutop a:visited {
color: #FFFFFF;
text-decoration: none;
}
.menutop a:hover {
color: #C8FBFD;
text-decoration: underline;
}
.footer, .footer a:link, .footer a:visited {
color: #000000;
}
.newsbar {
color: #000000;
font-weight: bold;
padding-left: 40px;
}
.logo {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
font-weight: bold;
color: #FFFFFF;
}
.leftcontent {
padding-top: 10px;
padding-right: 10px;
padding-bottom: 25px;
padding-left: 35px;
}
.style1 {font-size: 16px}
.date {
color: #FFFFFF;
padding-right: 15px;
padding-left: 15px;
}
-->
</style>
</head>
<body bgcolor="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="745" height="100%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="211" height="69" background="images/e025_02.png">&nbsp;</td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/e025_03.png" width="534" height="39" alt=""></td>
</tr>
<tr>
<td height="35" background="images/e025_07.png"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
</table></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
<tr>
<td height="100%"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="211" valign="top" background="images/e025_22.png"><table width="211" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td height="129" align="center" background="images/e025_13.png"><table width="210" border="0" cellpadding="5" cellspacing="0">
<tr>
<td align="center" nowrap class="logo"><span class="style1">:SITENAME: </span><br>
Where Yoshi's are the Boss</td>
</tr>
</table></td>
</tr>
<tr>
<td height="58" background="images/e025_15.png" class="newsbar">Explore</td>
</tr>
<tr>
<td height="100%" valign="top" background="images/e025_17.png" class="leftcontent">:SIDEFEED:</td>
</tr>
<tr>
<td height="7" background="images/e025_17.png"><img src="images/e025_20.png" width="211" height="7" alt=""></td>
</tr>
<tr>
<td height="6"><img src="images/e025_21.png" width="211" height="6" alt=""></td>
</tr>
<tr>
<td>&nbsp;</td>
</tr>
<tr>
<td height="124" background="images/e025_25.png">&nbsp;</td>
</tr>
</table></td>
<td valign="top"><table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<div id="menu">
<ul>
:LINKSBAR:
</ul>
</div>
<tr>
<td height="100%" valign="top" class="content"><p>:ARTICETITLE::ARTICLEDATE:<br>< br>:ARTICLECONTENT:</p>
</td>
</tr>
<tr>
<td height="65" align="center" background="images/e025_26.png">Powered by Rusnak PHP Adoptables Script</td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>

Ahh two things, first off, you need to link back to Rusnak not just say it ;)

and two, only the :ARTICLECONTENT: should be in <p> tags.

mapleblade 05-28-2009 10:47 AM

RE: Adopts News
 
oh oops and just <p>:ARTICECONTENT:</p>?

Bloodrun 05-28-2009 11:01 AM

RE: Adopts News
 
Quote:

Originally Posted by mapleblade
oh oops and just <p>:ARTICECONTENT:</p>?

Yessir! =D

mapleblade 05-28-2009 12:22 PM

RE: Adopts News
 
now its still bugged :( (but its better then earlier)

Saphira 05-28-2009 01:45 PM

RE: Adopts News
 
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Hmm, is there any way to make the system recognise new paragraphs? I've tried html and bbcode, and they both fail. Everything shows up in one continuous paragraph.

Did you try <br>?

If that doesn't work, Ill just convert the thing to BBcode.

I tried <br>, and <p>, and neither work. It turns

These

Are

Separate, into

These are separate, etc.

Bloodrun 05-28-2009 02:11 PM

RE: Adopts News
 
Quote:

Originally Posted by mapleblade
now its still bugged :( (but its better then earlier)

That is strange =/

Quote:

Originally Posted by Saphira
Quote:

Originally Posted by Bloodrun
Quote:

Originally Posted by Saphira
Hmm, is there any way to make the system recognise new paragraphs? I've tried html and bbcode, and they both fail. Everything shows up in one continuous paragraph.

Did you try <br>?

If that doesn't work, Ill just convert the thing to BBcode.

I tried <br>, and <p>, and neither work. It turns

These

Are

Separate, into

These are separate, etc.

Alright, then ill have to make BBcode work for it.

Saphira 05-30-2009 03:10 PM

RE: Adopts News
 
Hmm. I haven't tried this out since I changed the database field for detail to LONGTEXT. I'm trying to post news now, and I'm getting an error on add_news.php. I'm guessing that there's an error inserting it into the database.

PHP Code:

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

The line of code to insert it, and below, the database layout:

Quote:

nid int(11)
topic varchar(255)
detail longtext
name varchar(65)
datetime varchar(25)
Does this all seem right to you?

Bloodrun 05-30-2009 08:31 PM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
Hmm. I haven't tried this out since I changed the database field for detail to LONGTEXT. I'm trying to post news now, and I'm getting an error on add_news.php. I'm guessing that there's an error inserting it into the database.

PHP Code:

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

The line of code to insert it, and below, the database layout:

Quote:

nid int(11)
topic varchar(255)
detail longtext
name varchar(65)
datetime varchar(25)
Does this all seem right to you?

Can you tell me the error please.

And find the '$result' nearest to the line where it says the error is, and place this right after it:

die('Invalid query: ' . mysql_error());

Saphira 05-31-2009 04:36 AM

RE: Adopts News
 
Quote:

Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'm testing this using single quotes.', 'Jon', '31/05/09 02:32:12')' at line 1
I tried to post:

Quote:

I'm testing this using single quotes.
Someone else posted last night after I went to bed, and they managed to post fine, so I'm guessing it has something to do with single quotes. (')

Bloodrun 05-31-2009 04:46 AM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
Quote:

Invalid query: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'm testing this using single quotes.', 'Jon', '31/05/09 02:32:12')' at line 1
I tried to post:

Quote:

I'm testing this using single quotes.
Someone else posted last night after I went to bed, and they managed to post fine, so I'm guessing it has something to do with single quotes. (')

That's really wierd because it works fine on my test site, and some one else site.

I believe I put stripspalshes in the code, make sure i stripsplashed the name of the poster, the title and the details.

Saphira 05-31-2009 06:07 AM

RE: Adopts News
 
What part of the code are the stripslash parts in? I can double check just to make sure that they're there etc.

Bloodrun 05-31-2009 03:36 PM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
What part of the code are the stripslash parts in? I can double check just to make sure that they're there etc.

They would be right after a query and the items it is calling.

It would look like this:

$something = stripsplash($something)

Saphira 05-31-2009 09:56 PM

RE: Adopts News
 
Okay, I've looked through the files, and the only file I can find the stripslashes in is news.php. Wouldn't it need to be in add_news.php, being's that's the file that adds news to the database (which the script is having trouble doing?) I downloaded a fresh copy of the zip file, and it's the same in there. Only on news.php

Bloodrun 05-31-2009 10:05 PM

RE: Adopts News
 
Quote:

Originally Posted by Saphira
Okay, I've looked through the files, and the only file I can find the stripslashes in is news.php. Wouldn't it need to be in add_news.php, being's that's the file that adds news to the database (which the script is having trouble doing?) I downloaded a fresh copy of the zip file, and it's the same in there. Only on news.php

Oh, well I usually only put the stripsplash in the file that is calling the info, but I should probably do start doing it the other way.

Anyway, um, what was your problem again? Lol I cant remember.

EDIT:

This is really wierd, because the sites I installed this on, don't have that error at all, and they have tons of single quotes in their posts o.0

Saphira 06-01-2009 08:18 AM

RE: Adopts News
 
Yeah it is weird. I just tried uploading a fresh add_news.php, to see if it would change anything, and nada. Still nothing. The problem was posting articles with single quotes in lol.


All times are GMT -5. The time now is 05:08 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.