The AnimeFanlistings Network Message Board

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - Jessy

Pages: 1
1
Fanlistings Chit-Chat / Enth3 / Codesort2 and php 5.3
« on: December 05, 2010, 04:01:30 PM »
I noticed today that my webhost had upgraded the php server to php 5.3 and I was getting several warnings in my scripts, because some of the code was deprecated.
For those with the same problems, I've already fixed the following in the script and now it works again.

Enth3
Mail.php
Code: [Select]
Line 154: $parser = &new Mail_RFC822();replace with
Code: [Select]
Line 154: $parser = new Mail_RFC822();
PEAR.php
Code: [Select]
Line 563: $a = &new $ec($code, $mode, $options, $userinfo);
Line 566: $a = &new $ec($message, $code, $mode, $options, $userinfo);
replace with
Code: [Select]
Line 563: $a = new $ec($code, $mode, $options, $userinfo);
Line 566: $a = new $ec($message, $code, $mode, $options, $userinfo);

show_join.php
Code: [Select]
Line 139: $matchstring = "^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+" .
"@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$";
Line 141: if( $_POST['email'] && ereg( $matchstring, $_POST['email'] ) )
replace with
Code: [Select]
Line 139: $matchstring = "/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/";
Line 141: if( $_POST['email'] && preg_match( $matchstring, $_POST['email'] ) )

show_lostpass.php
Code: [Select]
Line 118: $matchstring = "^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+" .
"@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$";
Line 129: else if( !ereg( $matchstring, $_POST['email'] ) )
replace with
Code: [Select]
Line 118: $matchstring = "/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/";
Line 129: else if( !preg_match( $matchstring, $_POST['email'] ) )

show_update.php
Code: [Select]
Line 086: $matchstring = "^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+" .
"@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$";
Line 089: if( !ereg( $matchstring, clean( $_POST['email'] ) ) ||
replace with
Code: [Select]
Line 086: $matchstring = "/^([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}$/";
Line 089: if( !preg_match( $matchstring, clean( $_POST['email'] ) ) ||


Codesort 2
functions.php
Code: [Select]
Line 035: $instance =& new $object;replace with
Code: [Select]
Line 035: $instance = new $object;

2
Fanlistings Chit-Chat / Enth 3 Neglected Listings Notification
« on: March 04, 2010, 03:38:10 AM »
I have a question about Enth 3. I just received a notice from TFL that some of my fanlistings haven't been updated for 2 months (and I suspect that some of my TAFL fls). When I look at my enth administration I see that there isn't any fanlisting standing in the Neglected Listings Notification list.
Does anybody else have that problem? Or should I redownload the latest version (I do think that I have that version) and install it again?

Never mind, I toggled a bit with the php and now I get the list.

For those who also have this problem, I changed the 8 weeks to 6 on line 144 and suddenly the list grows.

I've looked a little bit further and found that the problem was in the calculation of the weeks. I found out that not all the weeks were showing.

After changing
Code: [Select]
if( $stats['lastupdated'] && date( 'Y' ) != date( 'Y', strtotime( $stats['lastupdated'] ) ) ) {
 $weeks = ( 52 - date( 'W', strtotime( $stats['lastupdated'] ) ) ) + date( 'W' );
   } else if( $stats['lastupdated'] ) {
 $weeks = date( 'W' ) - date( 'W', strtotime( $stats['lastupdated'] ) );
   }
to
Code: [Select]
$difference = strtotime(date('Y-m-d'), 0) - strtotime($stats['lastupdated'], 0 );
$weeks = floor($difference / 604800);

I got the complete list of fanlistings that wre being neglected.

Man, that took a while to found out. It's been to long since I've coded in php.

Pages: 1