Hello,
I want use default Boonex members block on home page only for Top section.
Can someone provide me php content of the block?
http://demo.boonex.com/index.php?MembersMode=top
Thanks,
Hello,
I want use default Boonex members block on home page only for Top section. Can someone provide me php content of the block?
http://demo.boonex.com/index.php?MembersMode=top
Thanks, |
i have needed a Members block like default Boonex Member block, but i want showing only "Top" section. I do not want other section in the Block like "Latest" and "Online" |
Do you want to modify the existing member block? or keep the existing and create new one of just top members? https://www.deanbassett.com |
Do you want to modify the existing member block? or keep the existing and create new one of just top members? I want create new one on homepage. |
I was afraid you were going to say that. https://www.deanbassett.com |
I was afraid you were going to say that. Ya, i understand you. |
Ok. As you requested in a message. This code should display the first 10 of the top members. Place in a PHP block. I have also attached as a file just incase the forum damages the code. https://www.deanbassett.com |
Thank you for your help. Its working fine! |
Ok. As you requested in a message. This code should display the first 10 of the top members. Place in a PHP block. I have also attached as a file just incase the forum damages the code.
Not to sound like a retard, but I do have to install the option to have a php block in the 7.10 version before using your code correct? |
Yes. A php block is needed for this. So some way to do php blocks will be needed. https://www.deanbassett.com |
Thanks deano92964! |
Thanks deano92964 it is very useful! I make a little modification to show only the online members and to female members shows the male members and for male shows the female members and all that displays randomly. Replace this in deano92964's code // possible conditions with this: $userinf = getProfileInfo($userid); ///add to the beginning of the code $usersex = $userinf['Sex']; ///add to the beginning of the code $sqlOrder = ""; if($usersex == "female"){ // possible conditions $sqlCondition = "WHERE `Profiles`.`Status` = 'Active' and (`Profiles`.`Couple` = 0 or `Profiles`.`Couple` > `Profiles`.`ID`) and ( `Profiles`.`Sex` = 'male')"; $aParams = array(); if (is_array($aParams)) { foreach ($aParams as $sField => $sValue) $sqlCondition .= " AND `Profiles`.`$sField` = '$sValue'"; } $sqlCondition .= " AND `Profiles`.`DateLastNav` > SUBDATE(NOW(), INTERVAL ".$iOnlineTime." MINUTE)"; $sqlOrder = " ORDER BY RAND()";} else{ // possible conditions $sqlCondition = "WHERE `Profiles`.`Status` = 'Active' and (`Profiles`.`Couple` = 0 or `Profiles`.`Couple` > `Profiles`.`ID`) and ( `Profiles`.`Sex` = 'female')"; $aParams = array(); if (is_array($aParams)) { foreach ($aParams as $sField => $sValue) $sqlCondition .= " AND `Profiles`.`$sField` = '$sValue'"; } I have attached the full code. I am not a PHP developer, so the code are not perfect, but works. I like to improve the online members section with auto refresh function. I tried this header('Refresh: 5'); but this reload the whole page. Have someone an idea how to refresh only the php block? The best solution will be to refresh the members inside the php block (online members) one to one. Every 10-15s replace only one member with a new one and in the next 10-15s replace a next member and so on. Can someone have any idea or suggestion how to realize this? Maybe some code examples. Sorry for my bad english. |
I posted this a few days ago about a similar scenario. Deanos could you check it out please. http://www.boonex.com/forums/?action=goto&my_threads=1#topic/Adding-custom-popups-and-links-to-box-header.htm caredesign.net |
Can someone help me modify this code to show the users City or some other field from their profile? You have this list of top members, but it just shows their name. I would like it to show their name and, if possible, on the next line down, their city... Actually, I would like to make an if-then statement based on their profile type from Anton's Profile Splitter, but if I could just see a simple example of adding their city, I could modify it to suit my needs. Thanks... |
$aDefFields = array( Add the fields from the Profiles table you wish to be included. Geeks, making the world a better place |
Kinda, I would add the fields there, but how do you get them to display? At the moment, even though "Sex" is already included, only the username is displayed... I was thinking somewhere in this section? $sCode = $GLOBALS['oSysTemplate']->parseHtmlByName('members_list.html', array( Maybe I have to edit members_list.html? |
Your close, but you can't from any of that code. https://www.deanbassett.com |