|
|
| Author |
Message |
Comatosed
New User
Joined: 31 Aug 2010
Posts: 13
|
Posted: August 31st 2010, 12:14 pm Post subject: Some help with memberlist_body.html |
|
|
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"> <!-- IF memberrow.U_WWW --><a href="{memberrow.U_WWW}">{WWW_IMG}</a><!-- ENDIF --> </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
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 |
|
 |
Patrick
Admin/Webmaster

Joined: 11 May 2001
Posts: 17279
Location: Harbinger, NC, U.S.A.
|
|
| Back to top |
|
 |
Comatosed
New User
Joined: 31 Aug 2010
Posts: 13
|
Posted: September 2nd 2010, 1:01 am Post subject: |
|
|
| Thanks for the welcome back, i guess i am on my own with this one. |
|
| Back to top |
|
 |
femu
Well Known User
Joined: 07 Jul 2007
Posts: 206
|
Posted: September 3rd 2010, 2:51 am Post subject: |
|
|
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 |
|
 |
Comatosed
New User
Joined: 31 Aug 2010
Posts: 13
|
Posted: September 3rd 2010, 9:05 pm Post subject: |
|
|
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 |
|
 |
femu
Well Known User
Joined: 07 Jul 2007
Posts: 206
|
Posted: September 3rd 2010, 10:39 pm Post subject: |
|
|
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 |
|
 |
Comatosed
New User
Joined: 31 Aug 2010
Posts: 13
|
Posted: September 6th 2010, 3:25 am Post subject: |
|
|
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 |
|
 |
femu
Well Known User
Joined: 07 Jul 2007
Posts: 206
|
Posted: September 6th 2010, 7:34 am Post subject: |
|
|
You can do following:
Open memberlist.php and search:
| Code:
|
'U_SORT_YIM' => $sort_url . '&sk=j&sd=' . (($sort_key == 'j' && $sort_dir == 'a') ? 'd' : 'a'),
|
After Add
| Code:
|
'U_SORT_POINTS' => $sort_url . '&sk=j&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 |
|
 |
Comatosed
New User
Joined: 31 Aug 2010
Posts: 13
|
Posted: September 7th 2010, 11:46 pm Post subject: |
|
|
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 |
|
 |
femu
Well Known User
Joined: 07 Jul 2007
Posts: 206
|
Posted: September 8th 2010, 8:43 pm Post subject: |
|
|
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 |
|
 |
|