Forum Moderators: coopster

Message Too Old, No Replies

URGENT custom blog needed

i need a simple blog that will work

         

togethercomms

1:11 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



Hi everyone,
I need a simple blog that i can programme that allows the older blogs to be put into date order. displaying the most recent blogs

Also i will need the comments to be linked to the blog per subject.

I have been messing around with other blogging systems but nothing as simple as i need.

I just need the comments to come up with the blog.

Many Thanks

eatspinach

2:17 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



why dont you use wordpress or joomla..

togethercomms

2:30 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



i want it to be customized and fit in with the website i have designed

togethercomms

7:40 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



i have a problem with punctuation marks coming up as ? how would i go about making sure these are visible, i have heard of stripslashes but never had a reason (apart from now) to use them

if($res) {
while ($newArray = mysqli_fetch_array($res, MYSQLI_ASSOC)) {
$id = $newArray['blog_id'];
$date = $newArray['date'];
$title = $newArray['title'];
$main = $newArray['main'];

echo "<div id='border'>";
echo "<div class='bg'><div class='subject'>".$id."&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;".$title. "&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp;" .$date."</div></div>";
echo "<div class='body'>".$title."<div class='body'>".$main."<div class='morelink'><a target='_blank' href=\"comments.php?id=".$id."\">view comments</a></div></div><br>";
echo "</div><br>";

willybfriendly

8:02 pm on Jul 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



i have a problem with punctuation marks coming up as ?

Are you writing your copy in Word and then cut/pasting it? If so, it is a problem with Word's special characters.

Depending on your platform, you may be able to solve some of the problem with character encoding. But, you will probably need more, as discussed in this thread [webmasterworld.com]

I ended up with the following which took care of much of the problem:

function cleanUpHTML($text)
{
//discard unwanted tags
$text = strip_tags($text, '<b><i><ol><ul><li>');
//strip header stuff
$text = stristr($text, '<p');
//strip all attributes (word garbage)
$text = preg_replace("/<(\w)[^>]*?>/s", "<$1>", $text);
//get rid of useless non breaking spaces
$text = preg_replace("/&nbsp;/", "", $text);
//get rid of empty p's
$text = preg_replace("/<p><\/p>/i", "", $text);
$text = mb_convert_encoding($text, "EUCJP-WIN", "UTF-8");
return $text;
}

togethercomms

9:03 pm on Jul 1, 2009 (gmt 0)

10+ Year Member



how would i go about joining 2 tables

table 1: comments (id, blog_id, name, comments)
table 2: blog_board (id, blog_id, date, title, main)

result

displays (title) (date) here
displays (main) here

then

display (comment) here

but only the comments and blog (main) that are linked to the blog_id numbers.

Hope this makes sense