[RC] 2.0.4/2.0.5 : Profile Controle Panel v 1.0.1

A place for MOD Authors to post and receive feedback on MODs still in development. No MODs within this forum should be used within a live environment! No new topics are allowed in this forum.
Forum rules
READ: phpBB.com Board-Wide Rules and Regulations

IMPORTANT: MOD Development Forum rules

On February 1, 2009 this forum will be set to read only as part of retiring of phpBB2.
Locked
testit
Registered User
Posts: 34
Joined: Sun Jan 06, 2002 6:58 pm

Post by testit »

Well - you can verify what I told you by simply inserting following code in profilcp_buddy.php that prints out the result array (user names):

Code: Select all

// get a list of field of the users table
$sql = "SELECT * FROM " . USERS_TABLE;
if ( !($result = $db->sql_query($sql)) ) message_die  (GENERAL_ERROR, "Could not read user informations", '', __LINE__, __FILE__, $sql);
$row = $db->sql_fetchrow($result);
while ($row = $db->sql_fetchrow($result)) { 
	echo "$row[username] <br>";
}
exit(0);
You will notice at once that all records are read instead of only 1 you need for analyzing the table structure.

So adding limit 1 does not result in compliance but much more in performance!

Concerning the memberlist I really cannot use it at the moment because it does need several 1.5 - 2 minutes until it shows up a result. The problem derives from the bad performance of CASE and HAVING in the sql statement which is built.

Thx and regards
Volker
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

Just a problem : this :

Code: Select all

while ($row = $db->sql_fetchrow($result)) { 
   echo "$row[username] <br>"; 
}
perform the read of all the records, and that takes time. As long you don't access anything else an existing index, the consumption is the same necessary to acces one record, without any filter. Dont mix the build of an index and the use of an existing index, it is absolutly not the same :).

For the performance, I thing the problem is rather with the necessary to loop the join on itself with the ranks, which required a group by process. But as I have many possibilities (as mentioned precedently), I won't get into a solution before having test some others :). What you can do meanwhile is to restraign this feature, and remove the profilcp_buddy (and linked), re-activating the standard memberlist.
testit
Registered User
Posts: 34
Joined: Sun Jan 06, 2002 6:58 pm

Post by testit »

Ptirhiik - RPGnet-fr wrote: Just a problem : this :

Code: Select all

while ($row = $db->sql_fetchrow($result)) { 
   echo "$row[username] <br>"; 
}
perform the read of all the records,

Pierre, we do not need to discuss about the issue above because I simply can check out the difference (with and without limit 1) by testing it in my board where 69.000 users are registred. :)

The sql_fetchrow() does NOT read all of the records - this is already done by select *. sql_fetchrow() only reads out the result array and increments the internal pointer for the next array read command.


and that takes time. As long you don't access anything else an existing index, the consumption is the same necessary to acces one record, without any filter. Dont mix the build of an index and the use of an existing index, it is absolutly not the same :).

I know - look above :)

For the performance, I thing the problem is rather with the necessary to loop the join on itself with the ranks, which required a group by process. But as I have many possibilities (as mentioned precedently), I won't get into a solution before having test some others :). What you can do meanwhile is to restraign this feature, and remove the profilcp_buddy (and linked), re-activating the standard memberlist.

I simply suppressed the "membership" tab in the buddy list and removed the redirect command in membership.php - hoping that I can reactivate it soon :wink:

This MOD really is a wonderful work - thanks again for it! :lol:

Best regards

testit
testit
Registered User
Posts: 34
Joined: Sun Jan 06, 2002 6:58 pm

Who I am a buddy of etc.

Post by testit »

Hi,

does anyone know if there extensions for PCP like

- "Who visited my Profile" last xy days?
- "Who I am a buddy of"?

Thanks

testit
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

The second ask can be really easy performed in profilcp_home : basicely it's a reverse of the both user key used in already displaying buddy (little left boxes). It was originaly implemented, and I remove simply the box :).
User avatar
Jamy
Registered User
Posts: 429
Joined: Mon Mar 24, 2003 12:02 pm
Location: Mississippi

Post by Jamy »

I just added this mod but I can't find it what is the link to it ? rather what should it look like ?
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

Just hit "Profile" :)
User avatar
Jamy
Registered User
Posts: 429
Joined: Mon Mar 24, 2003 12:02 pm
Location: Mississippi

Post by Jamy »

I did but it looks just like it did before.
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

You probably forget to upload some files so :)
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

A new little improvement for other mods compliancy, same wave than the precs :

Code: Select all

#
#-----[ OPEN ]------------------------------------------------
# - fix : 2003-08-21-01 : add the global def for system values
includes/functions_search.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
	global $starttime, $gen_simple_header;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
	global $admin_level, $level_prior;
//-- fin mod : profile cp --------------------------------------------------------------------------
#
#-----[ OPEN ]------------------------------------------------
#
includes/functions_post.php
#
#-----[ FIND ]------------------------------------------------
#
<?php
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
#
#-----[ FIND ]------------------------------------------------
#
	global $user_ip, $session_length, $starttime;
	global $userdata;
#
#-----[ AFTER, ADD ]------------------------------------------
#
//-- mod : profile cp ------------------------------------------------------------------------------
//-- add
	global $admin_level, $level_prior;
//-- fin mod : profile cp --------------------------------------------------------------------------
FX
Registered User
Posts: 254
Joined: Thu Aug 01, 2002 9:29 pm
Location: France
Contact:

Post by FX »

Ptirhiik did oyu have a date for the version 1.0.2 ? Beacause you have released all bug fix 8)
Last edited by FX on Fri Aug 22, 2003 7:16 am, edited 1 time in total.
User avatar
Ptirhiik
Registered User
Posts: 7411
Joined: Mon Jan 06, 2003 10:36 pm
Contact:

Post by Ptirhiik »

Not yet, as I have to redo a full visit to alls the progs, and there are one or two issues identified to solve yet. As I want a perfect integration with all other of my mods, and does want to anticipate a few the v 2, I prefer take the necessary time to do it properly :).
User avatar
A_Jelly_Doughnut
Former Team Member
Posts: 34459
Joined: Sat Jan 18, 2003 1:26 am
Location: Where the Rivers Run
Contact:

Post by A_Jelly_Doughnut »

Phitiik, it seems like a user testing my MOD with PCP is having problems. Is it PCP, or me? http://www.phpbb.com/phpBB/viewtopic.php?t=126888
A Donut's Blog
"Bach's Prelude (Cello Suite No. 1) is driving Indiana country roads in Autumn" - Ann Kish
Godlike242
Registered User
Posts: 279
Joined: Mon Dec 16, 2002 9:29 pm
Contact:

Post by Godlike242 »

OMG!! this mod rocks! it has all the things i have been looking for - ignore user, daylight savings time, detailed control of the profile... it is very nicely done.


i'm not quite sure i believe the 30 minute install time, but maybe i was going slow..
I will help if possible, but i will not do things for you.
User avatar
Carpe Diem
Registered User
Posts: 580
Joined: Tue Dec 10, 2002 11:19 pm

Post by Carpe Diem »

Well I must say that no matter how many great mods made by Ptirhiik I install there are still plenty of other great mods made by him yet to install and test! I love'm all!
:D

Can I try to suggest something? It might already have been suggested but since I did not want to review like over 30 pages of posts(!), here it goes:

Would it be possible to add a feature in the "home" folder where you see the private messages and the subscribed topics, so that the latest 5 or 10 posts on the board could also be shown?

It could have these options:

1. First of all, a feature which makes it possible for the user to choose how many of the latest topics to see. 5, 10, 20 would be great!

2. Maybe a feature that would allow the user to choose to see all those latest topics on one page or on several subsequent pages.

3. We could have several of those boxes, one for the last let's say 10 made "posts" by ANYONE.
Another box for the last 10 posts that the USER made him/herself.
Yet another box that would show the last 5 or 10 started THREADS (=topics) made by anyone.
Maybe another box that would allow a user to choose 1-5 specific FORUMS to watch, where he/she could see an update of posts only being made in those specific forums...

Also, there are some different photo galleries out there. Would it be possible to have a configuration to get the last made pic or a random pic of somekind as well??!

Ok those are ALL suggestions! I know Ptirhiik that you like to get suggestions and that does not mean that you always like to implement them of course, but IMHO those would be GREAT features. Especially those new "box" suggestions would add a huge improvement!

Thx for all your wonderful mods!

/Carpe Diem
Locked

Return to “[2.0.x] MODs in Development”