Code: Select all
<?php
$db = new mysqli('localhost', 'USERNAME', 'PASSWORD', 'DATABASE');
$result = $db->query("SELECT * FROM `phpbb_zebra` WHERE `user_id`>0 AND `zebra_id`>0 ORDER BY `user_id`, `zebra_id`");
$q++;
if ( $result->num_rows > 0 )
{
$t = $result->num_rows;
while ( $row = $result->fetch_object() )
{
$result1 = $db->query("SELECT * FROM `phpbb_zebra` WHERE `user_id`='" . $row->zebra_id . "' AND `zebra_id`='" . $row->user_id . "' LIMIT 1");
$q++;
if ( $result1->num_rows == 0 )
{
$db->query("DELETE FROM `phpbb_zebra` WHERE `user_id`='" . $row->user_id . "' AND `zebra_id`='" . $row->zebra_id . "' LIMIT 1");
$q++;
$d++;
}
$result1->free_result();
}
}
$result->free_result();
echo "Total Queries performed: $q\nTotal Rows: $t\nTotal Deleted: $d\n";
?>
There I go forgetting the utf8 functions again . Thanks for telling me about this.trickoff wrote:Thank you for a super mod!
Just want to inform you that characters like åäö is not working. Seems like UTF-8 isn't supported.
Thanks for the script. I'll see if I can get it converted to phpbb's functions so everyone can use it .stathisch wrote:I wrote a PHP script to do it using loops, but I'm pretty sure it can be done using a single SQL query. Anyway, here is the script -- note that it might not work correctly, I haven't tested it much.
Oh I should have done that myself in the first place. Anyway OK.kmklr72 wrote:Thanks for the script. I'll see if I can get it converted to phpbb's functions so everyone can use it .
kmklr72 wrote:Just a quick update on the status of the next version of this MOD. There have been a few bugs fixed and some optimizations in the lists. New friends has been added and a complete friends list with pagination is being worked on. The code has been added for a popup notificationon new requests much like the pm popup notification but this hasn't been tested. If there is anything else anyone wants to see in this MOD, now would be the time to tell me .
The avatar is already showing.stathisch wrote:hmm maybe showing the users avatar on the request page?
That means I did something wrong while installing it on my test forum. D'oh!trickoff wrote:The avatar is already showing.stathisch wrote:hmm maybe showing the users avatar on the request page?
I think is a trouble do this, but i try to tell you if you want make for next release.kmklr72 wrote:If there is anything else anyone wants to see in this MOD, now would be the time to tell me .
djrikyx wrote:I think is a trouble do this, but i try to tell you if you want make for next release.kmklr72 wrote:If there is anything else anyone wants to see in this MOD, now would be the time to tell me .
A Log system for friend request.
Example1: I send a friend request to User1, User1 see in a Log box: 'Djrikyx have requested to be friend with you.'
Example2: if User1 accept my request i see in my Log box: 'User1 have approved your friend request!'
if denied same thing but show 'User1 have denied your friend request.'
This is instead at PM notification. i think it's better
Other thing, but is a double trouble (xD) in the same box, i can see what my friends does.
Example: User1 it's my friend, User1 become friend of User2, and i see in my log Box:
'User1 it' now a friend of User2'
if this is possible phpbb become a real social network!!