phpBBHacks.com - Making a Mod Similar to Jr. Admin
Get Photoshop help and share your work at PhotoshopForums.com
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 -> phpBB 2 Hack Requests and Development
 See a User Guidelines violation? Please contact us.
Author Message

Seth Sandrino
New User

Joined: 12 Jan 2010
Posts: 22

PostPosted: January 17th 2010, 12:49 pm    Post subject: Making a Mod Similar to Jr. Admin Reply with quote

Because the Jr. Admin mod does not work on my version of phpbb (2.0.23) and the fact that I was told there was security issues with the mod I am looking to create something similar. My idea is this:

    Use usergroups to allow access to the ACP.

    Hide bits of the panel with checking user_level so only admin can see what you want more secure.

    Allow access to the parts you want the usergroups to have access to in the same way that usergroups are allowed to see hidden forums.


The only problem is I am not a programmer and have no idea how to get this started. Would anyone care to help me out with 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: January 17th 2010, 2:44 pm    Post subject: Reply with quote

Hello Mr. Sandrino,

Thanks for posting. In order to write a hack, you are going to need some level of programming knowledge. But, maybe some other can recommend some PHP tutorials, guides, books, etc. for you to check out and read. But, it will take time.

Thanks,

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

Seth Sandrino
New User

Joined: 12 Jan 2010
Posts: 22

PostPosted: January 18th 2010, 5:30 pm    Post subject: Reply with quote

thanks for the reply Patrick. I went ahead and found my own tutorials so I could get started although, sadly I've already ran into my first road block.

Code:
$user_groups_game_mod_table = mysql_query("SELECT user_id FROM phpbb_user_group WHERE group_id=6");
while($row = mysql_fetch_array($user_groups_game_mod_table))
{
  echo $row['group_id'] . " " . $row['user_id'];
  echo "<br/>";
  }
$game_mod_array =array($row);
if (!$game_mod_array)
  {
  die('Assigning $game_mod_array failed ' . mysql_error());
  }
else
echo "Game Mod Array Below:";
echo $game_mod_array;
echo "<br>";
$user_id_my_test = $userdata['user_id'];
if (!$user_id_my_test)
  {
  die('$user_id_my_test asign failed ' . mysql_error());
  }
echo $user_id_my_test;
if (in_array($user_id_my_test,$game_mod_array))
{
$game_mod_check = '1';
}
else
{
$game_mod_check = '0';
}
echo "<br>";
echo $game_mod_check;
//end my jr. admin attempt //


I cannot seem to get the "if (in_array($user_id_my_test,$game_mod_array)) " to work properly. At first I had the array simply as $row but it said that it was the wrong type (I thought this meant not an array so I tried to make it into an array ($game_mod_array) but it is isn't functioning properly.

(when a user logs in (me) it isn't setting $game_mod_check properly. My user_id should be in the array. However it sets $game_mod_check to 0. So I think the check may be working but the array is not being made properly.)

* I only have the echos in there so I could see it working.

Thanks for any help or pointers you see fit in giving,

Seth Sandrino
Back to top
View user's profile Send private message

Seth Sandrino
New User

Joined: 12 Jan 2010
Posts: 22

PostPosted: January 22nd 2010, 5:22 pm    Post subject: Reply with quote

I am incredibly close. I got the array working but my in_array() doesn't seem to be functioning.

Code:
$query = "SELECT user_id FROM phpbb_user_group WHERE group_id=6";
$result = mysql_query($query) or die(mysql_error());

//count the rows and fields
$totalRows = mysql_num_rows($result);
$totalFields = mysql_num_fields($result);

//start the loop
for ( $i = 0; $i < $totalRows; ++$i ) {

//make it 2 dim in case you change your order
  $results[$i] = mysql_fetch_array($result);

//call data at will controlling the loop with the array
echo $results[your_row_id]['your_field_name']; }

//print the entire array to see what lives where
print_r($results); 
$test_con = mysql_connect("localhost","crimhunt_Gregor","brocop4924");
if (!$test_con)
  {
  die('Could not connect: ' . mysql_error());
  }
mysql_select_db("crimhunt_adrTest", $test_con);
//talk to the db
$query = "SELECT user_id FROM phpbb_user_group WHERE group_id=6";
$result = mysql_query($query) or die(mysql_error());

//count the rows and fields
$totalRows = mysql_num_rows($result);
$totalFields = mysql_num_fields($result);

//start the loop
for ( $i = 0; $i < $totalRows; ++$i ) {

//make it 2 dim in case you change your order
  $results[$i] = mysql_fetch_array($result);

//call data at will controlling the loop with the array
echo $results[your_row_id]['your_field_name']; }

//print the entire array to see what lives where
print_r($results); 
$user_id_my_test = $userdata['user_id'];
if (!$user_id_my_test)
  {
  die('$user_id_my_test asign failed ' . mysql_error());
  }
echo $user_id_my_test;
if (in_array($user_id_my_test,$results))
{
$game_mod_check = '1';
}
else
{
$game_mod_check = '0';
}


here's the read out I'm getting:

Array ( [0] => Array ( [0] => 2 [user_id] => 2 ) [1] => Array ( [0] => 3 [user_id] => 3 ) ) Array ( [0] => Array ( [0] => 2 [user_id] => 2 ) [1] => Array ( [0] => 3 [user_id] => 3 ) )
3 (which would be the user id)
0 (which would be $game_mod_check)

as you can see the user id of 3 is in the array..

$game_mod_check is equal to 0 in cases I know it should be 1. Any ideas where I went wrong?

Thanks,
Back to top
View user's profile Send private message

ABDev
Not So New User

Joined: 21 Nov 2005
Posts: 39
Location: Lens / France

PostPosted: November 30th 2010, 4:59 pm    Post subject: Reply with quote

I have fully revized "Jr Admin", if that can interest you.
Back to top
View user's profile Send private message Visit poster's website

Dogs and Things
Well Known User

Joined: 11 Sep 2006
Posts: 189

PostPosted: December 1st 2010, 2:06 am    Post subject: Reply with quote

I am interested.
Back to top
View user's profile Send private message Visit poster's website

ABDev
Not So New User

Joined: 21 Nov 2005
Posts: 39
Location: Lens / France

PostPosted: December 1st 2010, 3:44 am    Post subject: Reply with quote

Ok, I prepare you that .
Back to top
View user's profile Send private message Visit poster's website

Dogs and Things
Well Known User

Joined: 11 Sep 2006
Posts: 189

PostPosted: December 1st 2010, 5:47 am    Post subject: Reply with quote

Tres bien!
Back to top
View user's profile Send private message Visit poster's website

Patrick
Admin/Webmaster

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

PostPosted: December 1st 2010, 12:56 pm    Post subject: Reply with quote

Awesome, ABDev. Thanks.

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
Display posts from previous:   
Post new topic   Reply to topic    phpBBHacks.com Support Forums Forum Index -> phpBB 2 Hack Requests and Development 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.