FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


New posts in bold





Afaceinthematrix
Is it possible to have all new posts in bold? I have a pretty good forum script but wish to update it and make it like that... do I need to somehow use a cookie or what?
virre
Do you want to display all new posts from your database in a bold type? Is that what you mean?

The simplest way is to just add a html tag that those this for you (either a <strong> or have your css class fix it)

somethinglike this

Code:


// Have your basic query and database stuff here

$query= ;// Whatever your query would be (I.e "SELECT * from x ORDER by Date" or something like that)

$a=mysql_fetch_array($query);

$b=mysql_fetch_array($a) {

echo "<strong>".$b['whateveryouwanttodisplayinbold']."</strong>"; // Add more things

}



Well something like that, if I understood you correct
Afaceinthematrix
not exactly... on some forums i've seen it to where a post is bold if it has been posted since your last visit... so it must be some cookie that does it or something...
virre
No you have a database field with a date/time of last login (or last post, or last check to login function) then you have a date/time field in the database field for the message. Then it is a simple question of easy select cases and printing it bold.

If it would be a cookie it could only be working if you used the same browser and computer all the time.

(You can do that kind of stuff if you set eternal cookies and the user don't remove them, but that isn't probable, and propaply a realy *bad* thing)
Related topics
Help with PhpBB
READ THIS FOR SERVER2 STATUS -DONT MAKE NEW POST PLS!!
Avoiding some sub-forums in "View New Topics"
Can clicking new post take you directly to the newest post?
Can clicking new post take you directly to the newest post?
"View Unread Posts" link
A new "bell" icon
Love the new layout
Log out OR mark all posts read...
We steal the easy posts from those who needs them!
TRADE - New Posts/Threads (Post exchanging)
New features being worked on
log out and new posts
No new Post !
Reply to topic    Frihost Forum Index -> Scripting -> Php and MySQL

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.