![]() |
Home Community Mys-Script Creative Off-Topic |
|
![]() |
|
Thread Tools | Display Modes |
#1
|
||||
|
||||
![]()
I'm trying to reconstruct profile pages. I want to remove the tabs. Not a big fan of them.
This is basically what I'm trying to do (just a mockup): http://i.imgur.com/W7jwLeV.png I've managed to figure out how to edit the About Me section and such in the class_userprofile.php, however, I'd like the friends and the Adoptables sections to display on pages similar to what's on the myadopts.php page (or see mockup above). Could anyone help me with this? :c It would look sooo much better and load so much faster. edit: Also can't seem to figure out how to get the spotlight adopt to display in the about me part. Also you can see what I've done so far here (very big mess, beware!) http://mysgardia.com/profile/view/Lavie Last edited by tahbikat; 01-05-2016 at 06:23 AM. |
#2
|
||||
|
||||
![]()
Well, for the favepet, the lines here in .../classes/class_userprofile.php are what display the favepet on the adoptables tab:
PHP Code:
PHP Code:
As for the rest...well I know the adoptables section is done primarily through tables. If you want them to appear on separate pages then I believe you're going to need to build new pages to display the information. I'm going to play around with tables to see if I can get the pets, at least, to display like how you have it in your mockup. EDIT: OK, I got the pets to display in a table like they do on the myadopts page, the only issue is that when a user has a lot of pets you'll probably want to be able to go to another page of pets, and that's something I'm still working on. PHP Code:
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 01-05-2016 at 11:43 AM. |
#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. |
#4
|
||||
|
||||
![]()
Thank you guys!
@Abronsyth, thank you! It looks much better now, even if not paginated. Gonna see if I can figure it out. Probably take me a while though lol. @Kyttias, I'm gonna add your code soon and let you know how it works! Thank you for explaining everything. <3 edit: Thank you Kyttias! Looks so nice and sleek now. :D Last edited by tahbikat; 01-05-2016 at 09:58 PM. |
#5
|
||||
|
||||
![]()
Humm, does anyone know how I could apply css styles to only the adopt, market, stats, etc tables? If I try to style them as is, it of course styles the container table too.
edit: oh and Abron, with the Spotlight Adopt, I wanted it to float to the right of the about me section, but I'm not sure how to do that with how it's currently written. :c Last edited by tahbikat; 01-06-2016 at 07:30 AM. |
#6
|
||||
|
||||
![]()
If you show me how it's currently written I may be able to help, I've played around with getting images to display properly a lot, hehe.
As for the tables...if you give the tables a specific ID then you can style each individual one in the CSS...now I'm not very good with PHP tables but I *think* that the ID for, say, the myadopts table (and the way I've set it up the table that displays user pets on profiles as well), is "adopttable", so in CSS you could edit it with; Code:
#adopttable { } I tested this and it works :D #adopttable: myadopts table #top10: Top 10 adoptables on stats page #rand5: "5 random adoptables" table on stats page #shoplist: market ((I have not tested for any others aside from adopttable yet!)) Edit 2: The .../adopt.php page's table is simply ID'd as "table," so you might want to change that (line 37 in .../view/adoptview.php) to something else so that you can use CSS to customize it :)
__________________
My Mods Site (1.3.4, 2020 Mods) Last edited by Abronsyth; 01-06-2016 at 10:00 AM. |
#7
|
||||
|
||||
![]()
Awww yess thank you so much! I'll experiment with this later! <3
|
![]() |
|
|
What's New? |
What's Hot? |
What's Popular? |