NineChime forum

Furry stuff, oekaki stuff, and other stuff.

You are not logged in.

Post a reply

Write your message and submit
Options
Humanity test

What is four + one?

Go back

Topic review (newest first)

rainbow
04-23-2006 04:36:42

Thanks for the help. ^_^

I'll try it out to see how it will work out.

Waccoon
04-23-2006 02:34:33

If I wanted to calculate how old the drawing is, I can use that formula and subtract the age of the drawing (or comment from the current server time.

The proper way to do this is to get the date the drawing was posted as a UNIX timestamp, as follows:

Code:

$result = mysql_query ("SELECT UNIX_TIMESTAMP(posttime) FROM {$OekakiPoteto_Prefix}oekakidta WHERE PIC_ID='$resno'");

The UNIX_TIMESTAMP() function will get the time (in seconds) that the picture was posted, rather than a MySQL date string.

You can then do:

Code:

$age_in_seconds = time() - $row['posttime']

If $age_in_seconds is "86400", you know the image is 1 day old.

rainbow
04-22-2006 22:54:46

It worked.

I might want to do some fixing to my other files too. ^_^

If I wanted to calculate how old the drawing is, I can use that formula and subtract the age of the drawing (or comment from the current server time. big_smile

Waccoon
04-22-2006 20:41:50

I don't know if it just stops working cold turkey, but trust me, EditPlus is well worth a try.  What I like most about it is that it's very fast, and doesn't clog your system registry with crap, so getting rid of it won't leave any junk behind on your system that will cause problems later on.  That tends to be a big problem with other trial software.

As for the index file, I sent you a new one, with a few coding tips.  If you have trouble with it, let me know.

rainbow
04-22-2006 14:01:45

I sent you a e-mail.

(The EditPlus2 is a free trial program that will only last for 30 days after which you have to register for the product or discontinue the service, because I feel that the programme will quit functioning by them.)

Waccoon
04-22-2006 03:12:19

Not really.  If you're getting a "0 row" error for a registered member's account (not a guest), that usually means the database isn't set up right.  But, if that were the case, avatars wouldn't work at all.

Given that the standard index file is 520 lines long, it looks like you've added quite a bit of code.  If you don't mind, it may be best to send me a copy of your modified files, and I'll check them out.  My text editor, EditPlus2, has lots of great features for tracking down problems quickly that take forever to find with a PHP syntax check.

Do you have a web server set up on your computer or a text editor with syntax highlighting?  If not, I highly recommend them.

rainbow
04-21-2006 14:05:55

I did check for that on line 682 in my index.php file and I still get that warning message on line 687. Any solutions?

Waccoon
04-21-2006 05:59:28

Just above that line, check for this:

Code:

if ($use_c_avatars == 'yes' && $use_avatars == 'yes') {

Replace it with this:

Code:

if ($use_c_avatars == 'yes' && $use_avatars == 'yes' && $innerrow['usrname'] != 'Guest') {

Guest accounts (posts by non-members) are special because the name of the person making the post is not stored in the usrname field.  I overlooked that.

rainbow
04-20-2006 23:14:40

I tried to post a comment in a reply to one of my member's first picture and this is the warning message that I'm getting:

Warning: mysql_result(): Unable to jump to row 0 on MySQL result index 32 in /home/rainbow/public_html/index.php on line 687...

This has to do with this variable on line 687 in the index.php file:
if ($ava_sql && ($avatar = mysql_result ($ava_sql, 0))) {

How can I get it fixed to a point where my comment to a picture will be able to show properly?

Board footer

Yep, still running PunBB
© Copyright 2002–2008 PunBB