phpBBHacks.com - Some help with memberlist_body.html
Managing Online Forums, a manual for the community admin
StatsForums Home   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in
FAQFAQ   SearchSearch   MemberlistMemberlist   TutorialsTutorials   ContactContact Us
Username:    Password:
Remember Me?    
   I Lost My Password!
Bookmark and Share
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> General phpBB 3 Support and Discussion
 See a User Guidelines violation? Please contact us.
Author Message

Comatosed
New User

Joined: 31 Aug 2010
Posts: 13

PostPosted: August 31st 2010, 12:14 pm    Post subject: Some help with memberlist_body.html Reply with quote

Hi, i have been away from the community for a good few number of years, since phpbb1 and i wasnt particularly good back then lol so i am a bit below amature :s but if someone could help me with this.

I have been trying to create another section in the memberlist with ref to the easy cash mod that has been ditched.
Here is what i am doing so if someone could enlighten me where i am going wrong -:

I am trying to change the website section so it shows points instead of website (since we are a fairly closed community)

Code:
<th nowrap="nowrap" width="11%"><a href="{U_SORT_WEBSITE}">{L_WEBSITE}</a></th>

I also belive i have to change this line aswell ?
Code:
<td class="gen" align="center">&nbsp;<!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}">{WWW_IMG}</a><!-- ENDIF -->&nbsp;</td>


I have been at it for hours trying many different variations on both lines to no avail, like using the {POINTS}, {POINTS_NAME}, {postrow.POINTS_NAME}, memberrow.U_POINTS, {memberrow.POINTS} etc.

I am sure i am missing something very simple or doing it completly wrong lol, any help would be greatly appreciated Blush

Or would it be easier to write up a table purely for the points system, starting from hi to low on its own page like memberlist_view.html ? ie points_view.html
The end product i want similarly like this
Back to top
View user's profile Send private message

Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.

PostPosted: August 31st 2010, 1:53 pm    Post subject: Reply with quote

Welcome back, Comatosed.

Patrick
_________________
Patrick O'Keefe - phpBBHacks.com Administrator - Feedback? Questions? Please Contact Me!
User Guidelines - Featured phpBB - Featured Author - phpBBHacks.com Awards - Supported Sites - About Us
Author, Managing Online Forums - A Practical Guide to Community Management
phpBB 3 Tutorials: Add Hacks | Clear Your Cache | Fix Missing Images | phpBB 3 Permissions Guide
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger

Comatosed
New User

Joined: 31 Aug 2010
Posts: 13

PostPosted: September 2nd 2010, 1:01 am    Post subject: Reply with quote

Thanks for the welcome back, i guess i am on my own with this one.
Back to top
View user's profile Send private message

femu
Well Known User

Joined: 07 Jul 2007
Posts: 206

PostPosted: September 3rd 2010, 2:51 am    Post subject: Reply with quote

Did you changed the memberlist.php according to your HTML? You need to read out the values of course ...
_________________
Regards,
femu

NO SUPPORT VIA EMAIL OR PM!! Please use the forum!
[My modifications homepage] - [My main page (German only!)]
Back to top
View user's profile Send private message

Comatosed
New User

Joined: 31 Aug 2010
Posts: 13

PostPosted: September 3rd 2010, 9:05 pm    Post subject: Reply with quote

changing the memberlist.php to read out the values would be for the table im trying to write up or the points showing in memberlist_view.html but it could be both ?
what line would i need to add or is it not as simple as that ?
I am currently looking for some tutorials on php since html is fairly easy
Back to top
View user's profile Send private message

femu
Well Known User

Joined: 07 Jul 2007
Posts: 206

PostPosted: September 3rd 2010, 10:39 pm    Post subject: Reply with quote

As I don't know, where the values for POINTS, POINTS_NAME, etc resides, it's difficult to say. Let's say the points name is in the regular config and the user points in the users table.

Step 1 - Define the Points Name for the memberlist

Open memberlist.php and find:
Code:

         'PROFILE_IMG'   => $user->img('icon_user_profile', $user->lang['PROFILE']),
         'PM_IMG'      => $user->img('icon_contact_pm', $user->lang['SEND_PRIVATE_MESSAGE']),
         'EMAIL_IMG'      => $user->img('icon_contact_email', $user->lang['EMAIL']),


BEFORE ADD
Code:

         'POINTS_NAME'   => $config['points_name'],



Step 2 - Define the points from the users

Open memberlist.php and find:
Code:

   // Dump it out to the template
   return array(
      'AGE'         => $age,
      'RANK_TITLE'   => $rank_title,
      'JOINED'      => $user->format_date($data['user_regdate']),
      'VISITED'      => (empty($last_visit)) ? ' - ' : $user->format_date($last_visit),
      'POSTS'         => ($data['user_posts']) ? $data['user_posts'] : 0,
      'WARNINGS'      => isset($data['user_warnings']) ? $data['user_warnings'] : 0,


AFTER ADD:
Code:

      'POINTS'      => $data['user_points'],


Step3 - Adding the stuff to the template

Open styles/yourstyle/template/memberlist_body.html and find:
Code:

      <tr>
         <th class="name"><span class="rank-img"><a href="{U_SORT_RANK}">{L_RANK}</a></span><a href="{U_SORT_USERNAME}"><!-- IF S_SHOW_GROUP and .memberrow -->{L_GROUP_LEADER}<!-- ELSE -->{L_USERNAME}<!-- ENDIF --></a></th>
         <th class="posts"><a href="{U_SORT_POSTS}#memberlist">{L_POSTS}</a></th>


AFTER ADD:
Code:

         <th class="posts">{POINTS_NAME}</th>


Find:
Code:

      <td class="posts"><!-- IF memberrow.POSTS and S_DISPLAY_SEARCH --><a href="{memberrow.U_SEARCH_USER}" title="{L_SEARCH_USER_POSTS}">{memberrow.POSTS}</a><!-- ELSE -->{memberrow.POSTS}<!-- ENDIF --></td>


AFTER ADD:
Code:

      <td>{memberrow.POINTS}</td>



The whole stuff as I did it (based on our UPS), assumes you have the points name in the config (filed is calles points_name) and the users points are in the users table (field is called user_points).

Hope this helps to get you in the right direction.
_________________
Regards,
femu

NO SUPPORT VIA EMAIL OR PM!! Please use the forum!
[My modifications homepage] - [My main page (German only!)]
Back to top
View user's profile Send private message

Comatosed
New User

Joined: 31 Aug 2010
Posts: 13

PostPosted: September 6th 2010, 3:25 am    Post subject: Reply with quote

My man you are an absolute star i was getting it right in the html file just not in the php file , so if i get this right the php files purely deal with the database entries in relation to its html layout buddy ? according that each line, is in line to each other on all the files ?
I so need a noobs guide to php lol.

I dont expect an answer for this next one as you have helped me a bunch already, or it may be more beneficial for me to post this in mod requests but how easy or hard would it be, to write up a table like the one in the pic above that would sort into tables from high to low, according to the amount of points one would have.

If its too hard, i will stick to manually editing the tables i have at current, since it isn't very time consuming anyway.
Back to top
View user's profile Send private message

femu
Well Known User

Joined: 07 Jul 2007
Posts: 206

PostPosted: September 6th 2010, 7:34 am    Post subject: Reply with quote

You can do following:

Open memberlist.php and search:
Code:

         'U_SORT_YIM'         => $sort_url . '&amp;sk=j&amp;sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),


After Add
Code:

         'U_SORT_POINTS'         => $sort_url . '&amp;sk=j&amp;sd=' . (($sort_key == 'k' && $sort_dir == 'a') ? 'd' : 'a'),



Then open styles/your_style/template/memberlist_body.html and search for the line we entered:
Code:

         <th class="posts">{POINTS_NAME}</th>


and REPLACE WITH
Code:

         <th class="posts"><a href="{U_SORT_POINTS}#memberlist">{POINTS_NAME}</a></th>


Then you should be able to sort ascending/descending by clicking the pointsname in the header.

UNAPPROVED
_________________
Regards,
femu

NO SUPPORT VIA EMAIL OR PM!! Please use the forum!
[My modifications homepage] - [My main page (German only!)]
Back to top
View user's profile Send private message

Comatosed
New User

Joined: 31 Aug 2010
Posts: 13

PostPosted: September 7th 2010, 11:46 pm    Post subject: Reply with quote

thanks for youre help dude, i have got so far as to add the points section in member list per user but as u said u had limited info so i am unable to sort by points, high - low becase it wasnt pulling the points name, as u may have suspected so i removed the code to pull the data for the name but as it is now it will do.
Code:
<th class="posts"><a href="{U_SORT_POINTS}#memberlist">{POINTS_NAME}</a></th>

to
<th class="posts"><a href="{U_SORT_POINTS}#memberlist">POINTS</a></th>

I am starting to understand how it works slowly. Thanks for youre insight
On a side note you said points name in the config ? which i didnt understand lol.
Just so you know this is running off that simple points mod 0.5.1 that was ditched half way through
Back to top
View user's profile Send private message

femu
Well Known User

Joined: 07 Jul 2007
Posts: 206

PostPosted: September 8th 2010, 8:43 pm    Post subject: Reply with quote

Oha. Simple Points Mod is abondoned I think for a long time. You may try instead our Ultimate Points System. This gives you much, much more possibilities.

Check it here
_________________
Regards,
femu

NO SUPPORT VIA EMAIL OR PM!! Please use the forum!
[My modifications homepage] - [My main page (German only!)]
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> General phpBB 3 Support and Discussion All times are GMT - 6 Hours
Page 1 of 1
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Links: Big Message Boards - Free JavaScript - phpBB2 - phpbb styles - Suporte phpBB - phpBB Česky - phpBB Turkiye - phpBBArabia.com - phpBB-fr.com - Romanian phpBB online community - phpBB-TW.net - phpBBservice.nl - phpBB Brasil - phpBB Portugal - phpBBpersian.com

Network: iFroggy Hosting - PhotoshopForums.com - Managing Online Forums - ManagingCommunities.com - CommunityAdmins.com - KarateForums.com - Bad Boy Blog - SodaRatings.com - Patrick O'Keefe

< Advertising - Contact Us - Disclosure Policy - Staff - User Guidelines >

Copyright © 2001-2012. iFroggy Network, phpBBHacks.com. All Rights Reserved. Privacy Policy. We Support phpBBHacks.com (of course!).
Powered by phpBB © phpBB Group. phpBB SEO. We are in no way affiliated with the phpBB Group. phpBB is copyright to the phpBB Group.