Tutorial

If you use the default Dolphin UNI template and you reach 30 members or more you will notice on your browse.php page that there are 7 across with the standard 960px page width.

Now what happens is you will have 4 perfect rows of 7 = 28 members. But since we have this set to show 30 per page the other 2 will show up on the next row all by their lonesome. This looks kind of funny having 28 all lined up nice and pretty and 2 on the bottom row all by themselves.

If you use a different template or change your page widths to a smaller number you might get all 30 to line up If not you can change this to another number to make them show up in nice perfect rows.

If you have 7 across a nice number would be 35 to display. That would be 7 across with 5 rows of them = 35 per page. If you have more the next 35 would be on the next page.

If you have 5 or 6 across you should be alright because 5 across by 6 rows = 30, and 6 across by 5 rows = 30, so this would look fine.

But if you have 7 across in this example we will change this to show 35 members, 7 across by 5 rows of them.

No database entries to edit so you can change this easy. If it doesn't work or you don't like it simply change it back.

 

This is based on Dolphin 6.1x Version.

First backup the file:
/browse.php (yoursite.com/browse.php)


Then open browse.php and find:

//====================================================================================================
//----------------------- search results -------------------------------------------------
//====================================================================================================


    $page = (int)$_GET[page];
    $p_per_page    = (int)$_GET[p_per_page];

    $aVar = array(30,60,90);
    if ( !$page )
    $page = 1;

    if ( !$p_per_page )
        $p_per_page = 30;



Notice the references to 30. We are going to change these to 35. The 30,60,90 are referring to the drop down box that becomes available that we can use to show more per page. So we also need to change this to increments of 35, which would be 35,70 and 105 respectively.

So we will simply change these numbers and upload the file back.

Change to:

//====================================================================================================
//----------------------- search results -------------------------------------------------
//====================================================================================================


    $page = (int)$_GET[page];
    $p_per_page    = (int)$_GET[p_per_page];

    $aVar = array(35,70,105);
    if ( !$page )
    $page = 1;

    if ( !$p_per_page )
        $p_per_page = 35;



Save the changes and re-upload overwriting the changes.

Now go back to yoursite.com/browse.php and refresh the page to verify the changes.

If you don't like it or it doesn't work for you simply change the numbers back to increments of 30 or restore your backup copy of browse.php


Here are some Screen Shot's. The database I used for this was for examples and test purposes and it didn't have over 30 members so you only see 1 member all by their lonesome at the bottom.

You can see that after the change they are not there anymore. They will then show up at the top of page 2 instead.



Screen Shot before original:

 


Browse Members Before


Screen Shot after edited / modified:

 


Browse Members After

 
Written By
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Sponsored Links
Recommend