Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro
Author Message
sting
Involved
Involved



Joined: Sep 23, 2003
Posts: 456
Location: Somewhere out there...

PostPosted: Tue Jan 31, 2006 10:46 am Reply with quote

This is a tweak to the Memberlist module that I want to throw out there for consideration on future RavenNuke releases - since there is only one or two themes that go out with RN, it shouldn't be too tough to implement but it does touch the core code somewhat, and I know the basic feeling about that is that we want to do it as little as possible.

That being said - for those users who utilize the points tweak, this is a nice way of easily viewing a users's points in a module that is standard with nuke.

Would appreciate your thoughts on the subject.

-Begin Post-

Posted to premium members at http://www.nukehaven.net over the weekend:

Someone asked this as a question at NukeCops. For now this is what I have (and it works but I have an issue with one part of the code and want to fix it at some point to reflect a variable instead of a constant ( reference $lang['Points']) below.

The trouble with this is that it is THEME DEPENDENT. Theme templates for the memberlist have to be edited individually to allow for this to work.

To add points to the Member List:

in the Memberlist module's index.php

Find


Code:



$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm,

user_avatar, user_avatar_type, user_allowavatar
   FROM " . USERS_TABLE . "
   WHERE user_id <> " . ANONYMOUS . "
   ORDER BY $order_by";



Change to

Code:



$sql = "SELECT username, user_id, user_viewemail, user_posts, user_regdate, user_from, user_website, user_email, user_icq, user_aim, user_yim, user_msnm,

user_avatar, user_avatar_type, user_allowavatar, points
   FROM " . USERS_TABLE . "
   WHERE user_id <> " . ANONYMOUS . "
   ORDER BY $order_by";



Find

Code:



$posts = ( $row['user_posts'] ) ? $row['user_posts'] : 0;




After and on a new line insert

Code:



$points = ($row['points']);



Find

Code:



'POSTS' => $posts,



After on a new line insert

Code:



'POINTS' => $points,




Find

Code:


$template->assign_vars(array(
   'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
   'L_EMAIL' => $lang['Email'],
   'L_WEBSITE' => $lang['Website'],
   'L_FROM' => $lang['Location'],
   'L_ORDER' => $lang['Order'],
   'L_PRIVATE_MESSAGE' => $lang['Private_Message'],
   'L_SORT' => $lang['Sort'],
   'L_SUBMIT' => $lang['Sort'],
   'L_AIM' => $lang['AIM'],
   'L_YIM' => $lang['YIM'],
   'L_MSNM' => $lang['MSNM'],
   'L_ICQ' => $lang['ICQ'],
   'L_JOINED' => $lang['Joined'],
   'L_POSTS' => $lang['Posts'],
   'L_PM' => $lang['Private_Message'],



And Change to

Code:



$template->assign_vars(array(
   'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'],
   'L_EMAIL' => $lang['Email'],
   'L_WEBSITE' => $lang['Website'],
   'L_FROM' => $lang['Location'],
   'L_ORDER' => $lang['Order'],
   'L_PRIVATE_MESSAGE' => $lang['Private_Message'],
   'L_SORT' => $lang['Sort'],
   'L_SUBMIT' => $lang['Sort'],
   'L_AIM' => $lang['AIM'],
   'L_YIM' => $lang['YIM'],
   'L_MSNM' => $lang['MSNM'],
   'L_ICQ' => $lang['ICQ'],
   'L_JOINED' => $lang['Joined'],
   'L_POSTS' => $lang['Posts'],
   'L_POINTS' =>"Points",
   'L_PM' => $lang['Private_Message'],





Still working on finding the "Points" area where $lang['Points'] is supposed to go, but setting it to "Points" hardwires it for now. . .


In your theme template (memberlist.tpl or memberlistbody.tpl)


Find

Code:



<th class="thTop" nowrap="nowrap">{L_POSTS}</th>



After and on a new line type

Code:



<th class="thTop" nowrap="nowrap">{L_POINTS}</th>



Find

Code:



<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POSTS}</span></td>



AFter and on a new line insert

Code:



<td class="{memberrow.ROW_CLASS}" align="center" valign="middle"><span class="gen">{memberrow.POINTS}</span></td>



Find

Code:



  <td class="catbottom" colspan="8" height="28"> ;;</td>



and change to

Code:



  <td class="catbottom" colspan="9" height="28"> ;;</td>



Note: colspan is the key here - if your theme has 7, make it 8 (just add 1 for the new column that was added)

It works, and its not too problematic to change the files.

-sting
 
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
sting







PostPosted: Tue Feb 07, 2006 9:29 pm Reply with quote

Wow. Unaswered No More.

-sting
 
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6433

PostPosted: Tue Feb 07, 2006 11:09 pm Reply with quote

I'm not big on adding phpBB mods that require theme mods since it defeats one of the goals for compatibility with Nuke addons (modules, blocks, themes, etc.). That said, there are a few phpBB mods that don't require theme mods and some that good enough to make theme consideration secondary.

In this case, I've not been a big fan of the whole karma / points stuff, mainly because I don't need / use it on any of the sites I support...

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
View user's profile Send private message
sting







PostPosted: Wed Feb 08, 2006 9:20 am Reply with quote

Yeah me either. This isn't actually adding a phpBB mod though, its all in there - its just displaying the nuke points.

And why I actually spent time on doing this escapes me.

lol

-sting
 
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> Raven's RavenNuke(tm) v2.00.00 - v2.02.00 Distro

View next topic
View previous topic
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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©