Icy Phoenix

     
 


Post new topic  Reply to topic 
Page 1 of 1
 
 
Reply with quote Download Post 
Post How To Add A New Page Permission To ACP 
 
Hi there,

if you have an new site that is not included in the xs package, and you know who i can add a new site AUTH to the DB which is configuarable over the site page permissions in ACP, just let me know.

if you have the time maybe one can write an documantation about this, like an MOD install instruction.. maybe others find this usefull

thx




EDITED BY MG

Code: [Download] [Hide]
  1. ##############################################################  
  2. ## MOD Title: Page permissions for a new site in phpBBXS  
  3. ## MOD Author: KugeLSichA < kugelsicha@caromonline.de > (HoLLe) http://www.caromguild.de  
  4. ## MOD Description: If you have an other site that is not included in phpBBXS  
  5. ##                  package, and you want to add the phpBBXS site  
  6. ##                  permissions to this site, add the following lines to your  
  7. ##                  site.  
  8. ##                  Site permissions can be set in ACP -> config -> site  
  9. ##                  permissions.  
  10. ## MOD Version: 1.0.0  
  11. ##  
  12. ## Installation Level: Easy  
  13. ## Installation Time: 5 min  
  14. ## Files To Edit: 4  
  15. ##                adm/admin_board_permissions.php  
  16. ##                lanugage/lang_english/lang_admin.php  
  17. ##                new_page.php  
  18. ##                templates/ca_aphrodite/admin/board_config_permissions_body.tpl  
  19. ## Included Files: n/a  
  20. ##############################################################  
  21. ## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the  
  22. ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code  
  23. ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered  
  24. ## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/  
  25. ##############################################################  
  26. ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD  
  27. ##############################################################  
  28. #  
  29. #-----[ SQL ]------------------------------------------  
  30. #  
  31. INSERT INTO `phpbb_config_mg` (`config_name`, `config_value`) VALUES ('auth_view_new_page', '0');  
  32.  
  33. #  
  34. #-----[ OPEN ]------------------------------------------  
  35. #  
  36. adm/admin_board_permissions.php  
  37. #  
  38. #-----[ FIND ]------------------------------------------  
  39. #  
  40. $auth_view['viewonline'] = auth_select($new['auth_view_viewonline'], 'auth_view_viewonline');  
  41. #  
  42. #-----[ AFTER, ADD ]------------------------------------------  
  43. #  
  44. $auth_view['new_page'] = auth_select($new['auth_view_new_page'], 'auth_view_new_page');  
  45. #  
  46. #-----[ FIND ]------------------------------------------  
  47. #  
  48. "L_AUTH_VIEW_VIEWONLINE" => $lang['auth_view_viewonline'],  
  49. #  
  50. #-----[ AFTER, ADD ]------------------------------------------  
  51. #  
  52. "L_AUTH_NEW_PAGE" => $lang['auth_new_page'],  
  53. #  
  54. #-----[ FIND ]------------------------------------------  
  55. #  
  56. "S_AUTH_VIEW_VIEWONLINE" => $auth_view['viewonline'],  
  57. #  
  58. #-----[ AFTER, ADD ]------------------------------------------  
  59. #  
  60. "S_AUTH_VIEW_NEW_PAGE" => $auth_view['new_page'],  
  61.  
  62. #  
  63. #-----[ OPEN ]------------------------------------------  
  64. #  
  65. templates/ca_aphrodite/admin/board_config_permissions_body.tpl  
  66. #  
  67. #-----[ FIND ]------------------------------------------  
  68. #  
  69.     <tr>  
  70.         <td class="row1">{L_AUTH_VIEW_VIEWONLINE}</td>  
  71.         <td class="row2">{S_AUTH_VIEW_VIEWONLINE}</td>  
  72.     </tr>  
  73. #  
  74. #-----[ AFTER, ADD ]------------------------------------------  
  75. #  
  76.     <tr>  
  77.         <td class="row1">{L_AUTH_VIEW_NEW_PAGE}</td>  
  78.         <td class="row2">{S_AUTH_VIEW_NEW_PAGE}</td>  
  79.     </tr>  
  80.  
  81. #  
  82. #-----[ OPEN ]------------------------------------------  
  83. #  
  84. # do this for all languages you have installed!  
  85. lanugage/lang_english/lang_admin.php  
  86. #  
  87. #-----[ FIND ]------------------------------------------  
  88. #  
  89. $lang['auth_view_viewonline'] = 'View Online';  
  90. #  
  91. #-----[ AFTER, ADD ]------------------------------------------  
  92. #  
  93. $lang['auth_view_new_page'] = 'New Page';  
  94.  
  95. #  
  96. #-----[ OPEN ]------------------------------------------  
  97. #  
  98. new_page.php  
  99. #  
  100. #-----[ FIND ]------------------------------------------  
  101. #  
  102. # similar  
  103. // Start session management  
  104. $userdata = session_pagestart($user_ip, PAGE_INDEX);  
  105. init_userprefs($userdata);  
  106. // End session management  
  107. #  
  108. #-----[ AFTER, ADD ]------------------------------------------  
  109. #  
  110. $auth_level_req = $config_mg['auth_view_new_page'];  
  111. if ($auth_level_req > AUTH_ALL)  
  112. {  
  113.     if ( ($auth_level_req == AUTH_REG) && (!$userdata['session_logged_in']) )  
  114.     {  
  115.         message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  116.     }  
  117.     if ($userdata['user_level'] != ADMIN)  
  118.     {  
  119.         if ( $auth_level_req == AUTH_ADMIN )  
  120.         {  
  121.             message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  122.         }  
  123.         if ( ($auth_level_req == AUTH_MOD) && ($userdata['user_level'] != MOD) )  
  124.         {  
  125.             message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  126.         }  
  127.     }  
  128. }  
  129.  
  130. #  
  131. #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------  
  132. #  
  133. # EoM  
  134.  

 




____________

Play Games at GamesCampus!
 
Edited by Mighty Gorgon, Sat 12 Aug, 2006 11:33: Added the instructions in the first post.
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Icy Phoenix is an open source project, you can show your appreciation and support future development by donating to the project.

Support us
 
Reply with quote Download Post 
Post Re: How To Add A New Site AUTH 
 
KugeLSichA wrote: [View Post]
Hi there,

if you have an new site that is not included in the xs package, and you know who i can add a new site AUTH to the DB which is configuarable over the site page permissions in ACP, just let me know.

if you have the time maybe one can write an documantation about this, like an MOD install instruction.. maybe others find this usefull

thx

Sorry, but can you explain this again? I haven't understand what do you mean.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Add A New Site AUTH 
 
i have a new site, maybe movies.php

and want to add this code:
Code: [Download] [Hide]
  1. $auth_level_req = $config_mg['auth_view_forum'];  
  2. if ($auth_level_req > AUTH_ALL)  
  3. {  
  4.     if ( ($auth_level_req == AUTH_REG) && (!$userdata['session_logged_in']) )  
  5.     {  
  6.         redirect(append_sid(LOGIN_MG . "?redirect=forum.$phpEx", true));  
  7.     }  
  8.     if ($userdata['user_level'] != ADMIN)  
  9.     {  
  10.         if ( $auth_level_req == AUTH_ADMIN )  
  11.         {  
  12.             message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  13.         }  
  14.         if ( ($auth_level_req == AUTH_MOD) && ($userdata['user_level'] != MOD) )  
  15.         {  
  16.             message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  17.         }  
  18.     }  


to it... this is the code from forum.php... and i nee an how to, for adding the new DB field, and which is to edit in the ACP, that i can that up the page mermissions...

you understand?
 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Add A New Site AUTH 
 
Ok, now I got this!

  1. First thing you have to choose the name for the DB field and add it:
    Code: [Download] [Hide] [Select]
    INSERT INTO `phpbb_config_mg` (`config_name`, `config_value`) VALUES ('auth_view_new_page', '0');

  2. Open adm/admin_board_permissions.php
    FIND
    Code: [Download] [Hide] [Select]
    $auth_view['viewonline'] = auth_select($new['auth_view_viewonline'], 'auth_view_viewonline');

    ADD AFTER
    Code: [Download] [Hide] [Select]
    $auth_view['new_page'] = auth_select($new['auth_view_new_page'], 'auth_view_new_page');

    FIND
    Code: [Download] [Hide] [Select]
        "L_AUTH_VIEW_VIEWONLINE" => $lang['auth_view_viewonline'],

    ADD AFTER
    Code: [Download] [Hide] [Select]
        "L_AUTH_NEW_PAGE" => $lang['auth_new_page'],

    FIND
    Code: [Download] [Hide] [Select]
        "S_AUTH_VIEW_VIEWONLINE" => $auth_view['viewonline'],

    ADD AFTER
    Code: [Download] [Hide] [Select]
        "S_AUTH_VIEW_NEW_PAGE" => $auth_view['new_page'],

  3. Open templates/ca_aphrodite/admin/board_config_permissions_body.tpl
    FIND
    Code: [Download] [Hide] [Select]
        <tr>
            <td class="row1">{L_AUTH_VIEW_VIEWONLINE}</td>
            <td class="row2">{S_AUTH_VIEW_VIEWONLINE}</td>
        </tr>

    ADD AFTER
    Code: [Download] [Hide] [Select]
        <tr>
            <td class="row1">{L_AUTH_VIEW_NEW_PAGE}</td>
            <td class="row2">{S_AUTH_VIEW_NEW_PAGE}</td>
        </tr>

  4. Open language/lang_*/lang_admin.php
    FIND
    Code: [Download] [Hide] [Select]
    $lang['auth_view_viewonline'] = 'View Online';

    ADD AFTER
    Code: [Download] [Hide] [Select]
    $lang['auth_view_new_page'] = 'New Page';

  5. And finally add the code to your page... new_page.php
    FIND (similar)
    Code: [Download] [Hide] [Select]
    // Start session management
    $userdata = session_pagestart($user_ip, PAGE_INDEX);
    init_userprefs($userdata);
    // End session management

    ADD AFTER
    Code: [Download] [Hide] [Select]
    $auth_level_req = $config_mg['auth_view_new_page'];
    if ($auth_level_req > AUTH_ALL)
    {
        if ( ($auth_level_req == AUTH_REG) && (!$userdata['session_logged_in']) )
        {
            message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
        }
        if ($userdata['user_level'] != ADMIN)
        {
            if ( $auth_level_req == AUTH_ADMIN )
            {
                message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
            }
            if ( ($auth_level_req == AUTH_MOD) && ($userdata['user_level'] != MOD) )
            {
                message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);
            }
        }
    }


You owe me a beer.


P.S.: Topic title changed.
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Add A New Page Permission To ACP 
 
great MG,

thats exactly what i want to get.

maybe other users need this too, if they have other MODs installed.

thx.

 
Off Topic
:
P.S.: you can get a beer, but u dont have an beer MOD in your forum

 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Add A New Page Permission To ACP 
 
KugeLSichA wrote: [View Post]
great MG,

thats exactly what i want to get.

maybe other users need this too, if they have other MODs installed.

thx.

 
Off Topic
:
P.S.: you can get a beer, but u dont have an beer MOD in your forum

It took me an hour writing this... so we are tied...

I'll go to a pub buying a beer for myself!

 
 




____________
Luca
SEARCH is the quickest way to get support.
Icy Phoenix ColorizeIt - CustomIcy - HON
 
Mighty GorgonSend private messageSend e-mail to userVisit poster's website  
Back to topPage bottom
Reply with quote Download Post 
Post Re: How To Add A New Page Permission To ACP 
 
ok here i have written this as a MOD for easily download.

thx to MG for help.

Code: [Download] [Hide]
  1. ##############################################################  
  2. ## MOD Title: Page permissions for a new site in phpBBXS  
  3. ## MOD Author: KugeLSichA < kugelsicha@caromonline.de > (HoLLe) http://www.caromguild.de  
  4. ## MOD Description: If you have an other site that is not included in phpBBXS  
  5. ##                  package, and you want to add the phpBBXS site  
  6. ##                  permissions to this site, add the following lines to your  
  7. ##                  site.  
  8. ##                  Site permissions can be set in ACP -> config -> site  
  9. ##                  permissions.  
  10. ## MOD Version: 1.0.0  
  11. ##  
  12. ## Installation Level: Easy  
  13. ## Installation Time: 5 min  
  14. ## Files To Edit: 4  
  15. ##                adm/admin_board_permissions.php  
  16. ##                lanugage/lang_english/lang_admin.php  
  17. ##                new_page.php  
  18. ##                templates/ca_aphrodite/admin/board_config_permissions_body.tpl  
  19. ## Included Files: n/a  
  20. ##############################################################  
  21. ## For Security Purposes, Please Check: http://www.phpbb.com/mods/downloads/ for the  
  22. ## latest version of this MOD. Downloading this MOD from other sites could cause malicious code  
  23. ## to enter into your phpBB Forum. As such, phpBB will not offer support for MODs not offered  
  24. ## in our MOD-Database, located at: http://www.phpbb.com/mods/downloads/  
  25. ##############################################################  
  26. ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD  
  27. ##############################################################  
  28. #  
  29. #-----[ SQL ]------------------------------------------  
  30. #  
  31. INSERT INTO `phpbb_config_mg` (`config_name`, `config_value`) VALUES ('auth_view_new_page', '0');  
  32.  
  33. #  
  34. #-----[ OPEN ]------------------------------------------  
  35. #  
  36. adm/admin_board_permissions.php  
  37. #  
  38. #-----[ FIND ]------------------------------------------  
  39. #  
  40. $auth_view['viewonline'] = auth_select($new['auth_view_viewonline'], 'auth_view_viewonline');  
  41. #  
  42. #-----[ AFTER, ADD ]------------------------------------------  
  43. #  
  44. $auth_view['new_page'] = auth_select($new['auth_view_new_page'], 'auth_view_new_page');  
  45. #  
  46. #-----[ FIND ]------------------------------------------  
  47. #  
  48. "L_AUTH_VIEW_VIEWONLINE" => $lang['auth_view_viewonline'],  
  49. #  
  50. #-----[ AFTER, ADD ]------------------------------------------  
  51. #  
  52. "L_AUTH_NEW_PAGE" => $lang['auth_new_page'],  
  53. #  
  54. #-----[ FIND ]------------------------------------------  
  55. #  
  56. "S_AUTH_VIEW_VIEWONLINE" => $auth_view['viewonline'],  
  57. #  
  58. #-----[ AFTER, ADD ]------------------------------------------  
  59. #  
  60. "S_AUTH_VIEW_NEW_PAGE" => $auth_view['new_page'],  
  61.  
  62. #  
  63. #-----[ OPEN ]------------------------------------------  
  64. #  
  65. templates/ca_aphrodite/admin/board_config_permissions_body.tpl  
  66. #  
  67. #-----[ FIND ]------------------------------------------  
  68. #  
  69.     <tr>  
  70.         <td class="row1">{L_AUTH_VIEW_VIEWONLINE}</td>  
  71.         <td class="row2">{S_AUTH_VIEW_VIEWONLINE}</td>  
  72.     </tr>  
  73. #  
  74. #-----[ AFTER, ADD ]------------------------------------------  
  75. #  
  76.     <tr>  
  77.         <td class="row1">{L_AUTH_VIEW_NEW_PAGE}</td>  
  78.         <td class="row2">{S_AUTH_VIEW_NEW_PAGE}</td>  
  79.     </tr>  
  80.  
  81. #  
  82. #-----[ OPEN ]------------------------------------------  
  83. #  
  84. # do this for all languages you have installed!  
  85. lanugage/lang_english/lang_admin.php  
  86. #  
  87. #-----[ FIND ]------------------------------------------  
  88. #  
  89. $lang['auth_view_viewonline'] = 'View Online';  
  90. #  
  91. #-----[ AFTER, ADD ]------------------------------------------  
  92. #  
  93. $lang['auth_view_new_page'] = 'New Page';  
  94.  
  95. #  
  96. #-----[ OPEN ]------------------------------------------  
  97. #  
  98. new_page.php  
  99. #  
  100. #-----[ FIND ]------------------------------------------  
  101. #  
  102. # similar  
  103. // Start session management  
  104. $userdata = session_pagestart($user_ip, PAGE_INDEX);  
  105. init_userprefs($userdata);  
  106. // End session management  
  107. #  
  108. #-----[ AFTER, ADD ]------------------------------------------  
  109. #  
  110. $auth_level_req = $config_mg['auth_view_new_page'];  
  111. if ($auth_level_req > AUTH_ALL)  
  112. {  
  113.     if ( ($auth_level_req == AUTH_REG) && (!$userdata['session_logged_in']) )  
  114.     {  
  115.         message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  116.     }  
  117.     if ($userdata['user_level'] != ADMIN)  
  118.     {  
  119.         if ( $auth_level_req == AUTH_ADMIN )  
  120.         {  
  121.             message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  122.         }  
  123.         if ( ($auth_level_req == AUTH_MOD) && ($userdata['user_level'] != MOD) )  
  124.         {  
  125.             message_die(GENERAL_MESSAGE, $lang['Not_Auth_View']);  
  126.         }  
  127.     }  
  128. }  
  129.  
  130. #  
  131. #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------  
  132. #  
  133. # EoM  
  134.  

 




____________

Play Games at GamesCampus!
 
KugeLSichASend private messageVisit poster's website  
Back to topPage bottom
Post new topic  Reply to topic  Page 1 of 1
 


Display posts from previous:    

HideWas this topic useful?

Link this topic
URL
BBCode
HTML




 
Permissions List
You cannot post new topics
You cannot reply to topics
You cannot edit your posts
You cannot delete your posts
You cannot vote in polls
You cannot attach files
You can download files
You cannot post calendar events


  

 

  cron