Page 1 of 1
Points issue with group permissions...

Posted:
Mon May 01, 2006 5:31 pm
Author: BurninFingerTipz
I am having an issue with the points system and the usergroup(s) that is given access to the points system.
You know how when you're logged on as an admin, you have the ability to click on the points level in author panel of posts, and their public profile? Well when I set the usergroup(s) to have access to the points control panel, they do not have this link as admins to. They have the ability to access the Points CP link on the Board Navigation, but not in posts or profiles.
Is there a fix for this?
Thanks in advance,
-Dave

Posted:
Tue May 02, 2006 2:24 pm
Author: Michaelo
Not sure this is a problem, as only admins should have access to this? Perhaps one of the other guys knows more
Mike
Re: Points issue with group permissions...

Posted:
Tue May 02, 2006 2:54 pm
Author: found it
"BurninFingerTipz";p="3987" wrote:I am having an issue with the points system and the usergroup(s) that is given access to the points system.
You know how when you're logged on as an admin, you have the ability to click on the points level in author panel of posts, and their public profile? Well when I set the usergroup(s) to have access to the points control panel, they do not have this link as admins to. They have the ability to access the Points CP link on the Board Navigation, but not in posts or profiles.
Is there a fix for this?
Thanks in advance,
-Dave
I solved this for another member but sadly iti is on the other integramod site...i will see what i can dig up...


Posted:
Tue May 02, 2006 8:38 pm
Author: BurninFingerTipz
found it, if you can dig it up that would be so awesome. I'll keep checking back to see if you've posted anything about it.
Re: Points issue with group permissions...

Posted:
Wed May 03, 2006 4:39 am
Author: found it
i had a lok around and as Michaelo said it would appear that only admin are able to access it...
I would say the mod has been hard coded that way so that admin only have that ability and it would require code changes to make the group access it...
you can see the code here in
def_userfuncs_std.php on line 1022
- Code: Select all
$txt .= ($userdata['user_level'] == ADMIN ) ? '<a>' . $view_userdata['user_points'] . '</a>' ];
this part is causing the problem but i do not know how to change it ...maybe some one else can
- Code: Select all
($userdata['user_level'] == ADMIN )
I hope that helps


Posted:
Wed May 03, 2006 7:13 am
Author: BurninFingerTipz
With that code you gave me, I added:
- Code: Select all
|| user_is_authed($userdata['user_id']>
After]$userdata['user_level'] == ADMIN[/code]
Making it:
- Code: Select all
($userdata['user_level'] == ADMIN || user_is_authed($userdata['user_id']> )
But, for the authized user and all users, the View Topic does not show anymore...
However it still works for Admins... Is this code hardcoded even deeper?
Re: Points issue with group permissions...

Posted:
Wed May 03, 2006 7:36 am
Author: found it
It could well be...but you are going to have to be careful as you do not want every user to access it..so you need to make it so groups can access it...
I wish I knew more on how the pcp works I can never find the code I need...lol


Posted:
Wed May 03, 2006 7:54 am
Author: BurninFingerTipz
No, with that line (as I tested) it doesn't give everyone the access to it, only those in the usergroup inwhich has the access...
I use to co-admin with someone that use PCP, and she knew it well. I believe she had to code this same mod with her forums... So I'll see what I can't get out of her... I'll post any finding and if I get it working.
If anyone else knows here, please post, any help is welcome. Thanks again, and thanks inadvance for any new information to be posted.
Memberlist and Profiles points link work with the above modification, only the viewing posts is the only issue... thus far.

Posted:
Wed May 03, 2006 8:18 am
Author: Michaelo
This mod is already installed in 1.4.1. The edit above should be enought to update 1.4.0 but if not you may have to wait for 1.4.1...
Create a group and remember the group ID then
Go to ACp > User Admin > Authorized Groups > Points Configuration: Add group ID here
Add user to group and log-in as this user (rememer to Ctrl+F5 to refresh cache).
Now the user can access the points... <img>
Mike
Re: [SOLVED]Points issue with group permissions...

Posted:
Wed May 03, 2006 9:27 am
Author: found it
We know that Mike

<img>
Re: [SOLVED]Points issue with group permissions...

Posted:
Wed May 03, 2006 9:46 am
Author: Michaelo
It works in viewtopics too <img>
Re: [SOLVED]Points issue with group permissions...

Posted:
Wed May 03, 2006 9:48 am
Author: found it

Im eating my words right now...lol
I missed that...nice one Mike

Re: [SOLVED]Points issue with group permissions...

Posted:
Wed May 03, 2006 9:51 am
Author: Michaelo
Re: [SOLVED]Points issue with group permissions...

Posted:
Wed May 03, 2006 9:54 am
Author: BurninFingerTipz
would there me a code fault in some file where the viewtopic is blank? Because its only the topics that don't show, the Navigation Menu and over header and footer show... but not thread contents nor buttons.
Other than that, the modification works on other location inwhich have the points link....

Posted:
Wed May 03, 2006 10:53 am
Author: Michaelo
The mod is included in 1.4.1 but I assume you are using 1.4.0... We need to check the viewtopics tpl for both versions if you have both just compare them also you need to compare the viewtopics.php versions
Mike
Re: [SOLVED]Points issue with group permissions...

Posted:
Wed May 03, 2006 2:57 pm
Author: BurninFingerTipz
Here's the viewtopic.php, any other files I can post, just let me know.
[Edit] - It wouldn't let me post the whole thing... Go here:
http://bodalliance.com/files/public/viewtopic.php.txt

Posted:
Wed May 03, 2006 7:01 pm
Author: Michaelo
[strike]Easier way... Zip the two files and attach them. I will do the comparisons and post back the edits...[/strike]
There are to many to edits in this but it seems ok. Post the tpl file <img>
Mike

Posted:
Wed May 03, 2006 8:10 pm
Author: BurninFingerTipz
templates/c3s/viewtopic_body.tpl:
http://bodalliance.com/files/public/viewtopic.tpl.txtviewtopic.php is the stock form for IM 1.4.0. Only MODs we have installed that are not stock are the pIRC Chat MOD, and Rank Gain Access. Which is below:
- Code: Select all
############################################################## ## MOD Title ]http://www.phpbb-fr.com[/url] ## ## MOD Description : Allows you to choose in the board the way to give members access## to a given rank, by with the the classical way according to the number## of posts of the member, or according to how many points the member owns## gained with a system point. The MOD is compliant with the Cash MOD of Xore## and the Point System of eXplosive. If no system points is installed, the ## option of choosing the rank according to how many points the member has## will be disabled. #### MOD Version : 1.0.0## Updated For IntegraMod 1.4.0 by Jon - [url=http://www.integramod.com#]http://www.integramod.com#[/url]# Installation Level: Easy ## Installation Time: 10 minute(s) ## Files to edit : 7## includes/constants.php## admin/admin_ranks.php## admin/admin_approve.php## pafiledb/includes/functions_comment.php## language/lang_english/lang_admin.php## templates/fisubice/admin/ranks_list_body.tpl ## templates/fisubice/admin/ranks_edit_body.tpl ## ## Files included : 0 #### Author Notes : ## ## If you use Cash MOD of Xore as a point system, you will have to ## create a currency named 'points' that add a user_points field## to the users table, to make the MOD works well.## ############################################################## ## MOD History: ## ## 05-07-2004 - Version 1.0.0## ############################################################## ## PLEASE backup all files and databases before installing this MOD !!!############################################################## # #-----[ SQL ]---------------------------------------------- # ALTER TABLE ranks ADD rank_choose_minimum tinyint(1) not null; # #-----[ OPEN ]---------------------------------------------- # includes/constants.php # #-----[ FIND ]---------------------------------------------- # define('USER_AVATAR_GALLERY', 3); # #-----[ AFTER, ADD ]---------------------------------------------- # // Rank gain access MODdefine('USER_POINTS_MINIMUM', 1);define('USER_POSTS_MINIMUM', 0); # #-----[ OPEN ]---------------------------------------------- # admin/admin_ranks.php # #-----[ FIND ]---------------------------------------------- # $rank_is_special = ( $rank_info['rank_special'] ) ? "checked="checked"" : ""; $rank_is_not_special = ( !$rank_info['rank_special'] ) ? "checked="checked"" : ""; # #-----[ AFTER, ADD ]---------------------------------------------- # $rank_minimum_posts = ( !$rank_info['rank_choose_minimum'] ) ? "checked="checked"" : ""; $rank_minimum_points = ( $rank_info['rank_choose_minimum'] ) ? "checked="checked"" : ""; $sql = "SELECT * FROM " . USERS_TABLE ." WHERE user_points"; if( !$result = $db->sql_query($sql) ) { $lock_points = 'disabled'; $template->assign_block_vars('switch_no_point_explain', array() ); } else { $lock_points = ''; $template->assign_block_vars('switch_point_system_explain', array() ); } # #-----[ FIND ]---------------------------------------------- # "MINIMUM" => ( $rank_is_special ) ? "" : $rank_info['rank_min'], # #-----[ AFTER, ADD ]---------------------------------------------- # "RANK_MINIMUM_POSTS" => $rank_minimum_posts, "RANK_MINIMUM_POINTS" => $rank_minimum_points, "LOCK_POINTS" => $lock_points, # #-----[ FIND ]---------------------------------------------- # "L_RANK_SPECIAL" => $lang['Rank_special'], # #-----[ AFTER, ADD ]---------------------------------------------- # "L_RANK_CHOOSE_MINIMUM" => $lang['Rank_choose_minimum'], "L_RANK_POINT_SYSTEM_EXPLAIN" => $lang['Rank_point_system_explain'], "L_RANK_NO_POINT_EXPLAIN" => $lang['Rank_no_point_explain'], "L_POINTS" => $lang['Points'], "L_POSTS" => $lang['Posts'], # #-----[ FIND ]---------------------------------------------- # $special_rank = ( $HTTP_POST_VARS['special_rank'] == 1 ) ? TRUE : 0; # #-----[ AFTER, ADD ]---------------------------------------------- # $rank_choose_minimum = ( $HTTP_POST_VARS['rank_choose_minimum'] == 1 ) ? TRUE : 0; # #-----[ FIND ]---------------------------------------------- # $sql = "UPDATE " . RANKS_TABLE . " SET # #-----[ IN-LINE FIND ]---------------------------------------------- # rank_image = '" . str_replace("'", "''", $rank_image) . "' # #-----[ IN-LINE AFTER, ADD ]---------------------------------------------- # , rank_choose_minimum = $rank_choose_minimum # #-----[ FIND ]---------------------------------------------- # $sql = "INSERT INTO " . RANKS_TABLE . " # #-----[ IN-LINE FIND ]---------------------------------------------- # , rank_image # #-----[ IN-LINE AFTER, ADD ]---------------------------------------------- # , rank_choose_minimum # #-----[ FIND ]---------------------------------------------- # )"; # #-----[ BEFORE, ADD ]---------------------------------------------- # , $rank_choose_minimum # #-----[ FIND ]---------------------------------------------- # "L_RANK_MINIMUM" => $lang['Rank_minimum'], # #-----[ AFTER, ADD ]---------------------------------------------- # "L_RANK_CHOOSE_MINIMUM" => $lang['Rank_choose_minimum'], # #-----[ FIND ]---------------------------------------------- # $special_rank = $rank_rows[$i]['rank_special']; # #-----[ AFTER, ADD ]---------------------------------------------- # $rank_choose_minimum = $rank_rows[$i]['rank_choose_minimum']; # #-----[ FIND ]---------------------------------------------- # "SPECIAL_RANK" => ( $special_rank == 1 ) ? $lang['Yes'] : $lang['No'], # #-----[ AFTER, ADD ]---------------------------------------------- # "RANK_CHOOSE_MINIMUM" => ( $rank_choose_minimum == 1 ) ? $lang['Points'] : $lang['Posts'], # #-----[ FIND ]---------------------------------------------- # "L_RANK_MINIMUM" => $lang['Rank_minimum'], # #-----[ AFTER, ADD ]---------------------------------------------- # "L_RANK_CHOOSE_MINIMUM" => $lang['Rank_choose_minimum'], # #-----[ FIND ]---------------------------------------------- # $special_rank = $rank_rows[$i]['rank_special']; # #-----[ AFTER, ADD ]---------------------------------------------- # $rank_choose_minimum = $rank_rows[$i]['rank_choose_minimum']; # #-----[ FIND ]---------------------------------------------- # $rank_is_special = ( $special_rank ) ? $lang['Yes'] : $lang['No']; # #-----[ AFTER, ADD ]---------------------------------------------- # $rank_selected_minimum = ( $rank_choose_minimum ) ? $lang['Points'] : $lang['Posts']; # #-----[ FIND ]---------------------------------------------- # "SPECIAL_RANK" => $rank_is_special, # #-----[ AFTER, ADD ]---------------------------------------------- # "RANK_CHOOSE_MINIMUM" => $rank_selected_minimum, # #-----[ OPEN ]---------------------------------------------- # admin/admin_approve.php # #-----[ FIND ]---------------------------------------------- # else{ for($i = 0; $i <count>= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] ) { $poster_rank = $ranksrow[$i]['rank_title']; $rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img><br>' : ''; } }} # #-----[ REPLACE WITH ]---------------------------------------------- # else{ for($i = 0; $i <count>= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] ) { $poster_rank = $ranksrow[$i]['rank_title']; $rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img><br>' : ''; } } if ( $ranksrow[$i]['rank_choose_minimum'] == USER_POINTS_MINIMUM ) { if ( $profiledata['user_points'] >= $ranksrow[$i]['rank_min'] && !$ranksrow[$i]['rank_special'] ) { $poster_rank = $ranksrow[$i]['rank_title']; $rank_image = ( $ranksrow[$i]['rank_image'] ) ? '<img><br>' : ''; } } }} # #-----[ OPEN ]---------------------------------------------- # pafiledb/includes/functions_comment.php # #-----[ FIND ]---------------------------------------------- # else { for($j = 0; $j <count>= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] ) { $poster_rank = $ranksrow[$j]['rank_title']; $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img><br>' : ''; } } } # #-----[ REPLACE WITH ]---------------------------------------------- # else { for($j = 0; $j <count>= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] ) { $poster_rank = $ranksrow[$j]['rank_title']; $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img><br>' : ''; } } if ( $ranksrow[$j]['rank_choose_minimum'] == USER_POINTS_MINIMUM ) { if ( $comments_row['user_points'] >= $ranksrow[$j]['rank_min'] && !$ranksrow[$j]['rank_special'] ) { $poster_rank = $ranksrow[$j]['rank_title']; $rank_image = ( $ranksrow[$j]['rank_image'] ) ? '<img><br>' : ''; } } } } # #-----[ OPEN ]---------------------------------------------- # language/lang_english/lang_admin.php # #-----[ FIND ]---------------------------------------------- # $lang['Rank_minimum'] = 'Minimum Posts'; # #-----[ REPLACE WITH ]---------------------------------------------- # // START Rank gain access MOD$lang['Rank_minimum'] = 'Minimum Posts / Points';$lang['Points'] = 'Points';$lang['Posts'] = 'Posts';$lang['Rank_choose_minimum'] = 'Choice of attribution of ranks';$lang['Rank_point_system_explain'] = 'A compliant points system has been detected on this board';$lang['Rank_no_point_explain'] = 'No compliant points system has been installed on this board';// END rank gain access MOD # #-----[ OPEN ]---------------------------------------------- # templates/fisubice/admin/ranks_list_body.tpl # #-----[ FIND ]---------------------------------------------- # <th> {L_RANK_MINIMUM} </th> # #-----[ AFTER, ADD ]---------------------------------------------- # <START><th> {L_RANK_CHOOSE_MINIMUM} </th> <END> # #-----[ FIND ]---------------------------------------------- # <td>{ranks.RANK_MIN}</td> # #-----[ AFTER, ADD ]---------------------------------------------- # <START><td>{ranks.RANK_CHOOSE_MINIMUM}</td><END> # #-----[ OPEN ]---------------------------------------------- # templates/fisubice/admin/ranks_edit_body.tpl # #-----[ FIND ]---------------------------------------------- # <tr> <td>{L_RANK_SPECIAL}</td><td> <input>{L_YES}<input>{L_NO}</td></tr> # #-----[ AFTER, ADD ]---------------------------------------------- # <START> <tr> <td>{L_RANK_CHOOSE_MINIMUM}<br> <span> <BEGIN> {L_RANK_POINT_SYSTEM_EXPLAIN}* <END> <BEGIN> {L_RANK_NO_POINT_EXPLAIN}* <END> </span></td> <td><input>{L_POSTS} ??<input> {L_POINTS}</td> </tr> <END> # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoF

Posted:
Wed May 03, 2006 10:23 pm
Author: Michaelo
When did it happen?
Do you have a link?
Running out of options... and stuck for time with 1.4.1 dev... <img>

Posted:
Thu May 04, 2006 6:35 am
Author: BurninFingerTipz
Lost me, when did what happen? And link to... The site? It's
http://www.bodalliance.comNot much a community forum, it's a gaming alliance's forum, so most forums are private and so forth.
That rank MOD does seem to edit anything that would effect the points link, unless I over looked something.
Did you find something?

Posted:
Thu May 04, 2006 1:41 pm
Author: Michaelo
Im a bit lost so lets start over. (BTW I like the theme especially the red buttons <img>)
Tell me what you have done so far and what problems if any you have. I thought you were getting a partial blank page in viewtopicsà¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦ What modification have you made to get the points thingy to work etcà¢Ãƒ ¢Ã¢â‚¬Å¡Ã‚ ¬Ãƒâ€šÃ‚ ¦
Mike

Posted:
Thu May 04, 2006 8:00 pm
Author: BurninFingerTipz
In order:
- IntegraMOd Installation
- pIRC Chat MOD (Believe I got it off the old IntegraMOD server)
- Rank Gain Access (Posted above)
- phpBB updates (to .19)
- phBB Security update
- phpBB update (to .20)
That is all we've got installed. Everything else is stock to the IntegraMOD 1.4.0 installation.
Now to the issue at hand, points not showing as links for authorized group members.
With the changed code that I found with found its aid of telling when what controlled the link. I applied it, and the profile point amount shows as a link, and the same with it in the memberlist page. So it worked, right? NOT REALLY. So I went to see if the points amount showed as a link in the author panel of the threads... No threads, the overall header/footer shows, the Board Navigation shows, but nothing where the thread posts would be... Like on this site, see the posts, graphics, quick reply, all that? That won't show when I have the code applied. ([url=http]Code Changes to get Points link to work.[/url])
If you need a screen shot I can supply that.
[Edit] - Another issue is the Poster Ranks don't show correctly in the Author Panel or the Memberlist, but shows correctly in the Ranks.php page... That, I don't think, isn't related to the points link issue..

Posted:
Fri May 05, 2006 9:17 pm
Author: BurninFingerTipz
What are you're code changes in 1.4.1 for the link mod you stated you had it 1.4.1?

Posted:
Sat May 06, 2006 5:54 am
Author: Michaelo
The main upgrade is 1.4.1 is php 5 ready. The rest of the changes are bug fixes to 1.4.0.
One option would be to join the beta team and get a beta copy. Install it on your local/home computer and test it. Report errors and bugs and in the mean time you can check the various updates in relation to you site.
Check with Fubie if this appeals to you.
In the mean time I will look at the code changes...
Mike

Posted:
Sat May 06, 2006 8:22 pm
Author: BurninFingerTipz
Sounds interesting. I've hosted phpBB servers off my home computer before, and I have php 5 I can run to test it on aswell. I'll shoot Fubie a PM and see if I can't get in on it.
Also, if you could, keep me posted it you find anything.