PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
sting
Involved
Involved


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

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

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
Only registered users can see links on this board!
Get registered or login to the forums!
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
Involved
Involved


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

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

Wow. Unaswered No More.

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


Joined: Jun 04, 2004
Posts: 6044

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

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...
View user's profile Send private message
sting
Involved
Involved


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

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

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
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
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.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum