![]() |
Home Community Mys-Script Creative Off-Topic |
|
|
Thread Tools | Display Modes |
#3
|
||||
|
||||
![]()
Okay, well, friend list stuff. I see you've already managed to move it over to the page, which is a good first step.
So let's trace where these functions go. (Feel free to skip over if you just want to get to the good part.) ![]() So you want to find private function getfriends($user) in classes/class_userprofile.php, and this is where the fun begins. Here is where you'll find the title of the section, a count of how many friends the user has, a button to befriend the user (which only displays if you aren't that user, of course), and a notification that will display (if they are visiting their own page) if they have pending friend requests. You'll want to figure out what you're doing with that. But $friendlist->display(); is also called, and PHP Code:
Okay, but when you find it, you'll see that it's a table. You'll probably want to break out of that, so we're still going to take advantage of the foreach loop going on. There are three things in this table - firstly, the user avatar. Secondly, a delete friend button that will only show if you are visiting your own profile. And then thirdly - all the rest of the info. The rest of the info is being pulled from classes/class_friendtablehelper.php, in the getFriendInfo function. We should try to avoid a call to it if possible, so let's take a look to pull over information that we want from it. Doesn't look too bad. So our real enemy is rewriting that foreach loop in classes/class_friendlist.php's display function to not use a table. Let's use some divs? Save a copy of what's already there as a back up. Otherwise, try replacing the display function with this: PHP Code:
__________________
Please do not contact me directly outside of Mysidia.
I also cannot troubleshoot code more than two years old - I legit don't remember it. Last edited by Kyttias; 01-05-2016 at 06:03 PM. |
|
|
What's New? |
What's Hot? |
What's Popular? |