• [MOD] Apply permission to sub-categories from their parent category 5 0 5 1
Currently:  

Author Topic: [MOD] Apply permission to sub-categories from their parent category  (Read 84580 times)

0 Members and 1 Guest are viewing this topic.

Offline son_gokou

  • Full Member
  • ***
  • Posts: 199
    • View Profile
Re: [MOD] Apply permission to sub-categories from their parent category
« Reply #45 on: January 06, 2010, 06:46:44 PM »
Great MOD!

Just one more thing I would like to do. How I go to edit some categorie, the button "NO" related to "Aplly to all subcategories" is selectect by default. How can I turn into default the button "YES" to be selected?

Offline XxJakeBluesxX

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://www.digiclaudio.com
Re: [MOD] Apply permission to sub-categories from their parent category
« Reply #46 on: March 30, 2010, 10:14:57 AM »
Funktioniert das auch mit Version 1.7.7?
:) Ciao, Claudio :)

Offline Hagen-Roderich

  • Full Member
  • ***
  • Posts: 127
    • View Profile
    • Hof Jokers
Re: [MOD] Apply permission to sub-categories from their parent category
« Reply #47 on: March 30, 2010, 02:40:54 PM »
Funktioniert das auch mit Version 1.7.7?

Ich habs unter 1.7.6, entsprechend der Anleitung für 1.7.4 - 1.7.6 installiert. Danach einen manuellen Update auf 1.7.7 gemacht und der MOD läuft heut noch.
Daher gehe ich davon aus das er auch in einem "reinen" 1.7.7 läuft.
Du kannst den MOD ja vorher mit der Mobilserver Version 1.7.7 testen.

Offline XxJakeBluesxX

  • Newbie
  • *
  • Posts: 30
    • View Profile
    • http://www.digiclaudio.com
Re: [MOD] Apply permission to sub-categories from their parent category
« Reply #48 on: March 30, 2010, 06:20:14 PM »
Habe die beiden Dateien geändert. Hat prima funktioniert...  :D

Nun ist endlich Schluss mit dem schei** Spam... :mrgreen:
:) Ciao, Claudio :)

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Original Code from: V@no and Ivan

Changelog / Änderungen:
  • Beim Kategorie erstellen ist die Funktion auch vorhanden / Support the function by add categorie
  • Mehrsprachig / Multilingual

Dieser MOD kann die Rechte einer Kategorie mit allen Unterkategorien aktualisieren.

Läuft mit 4images 1.7.7
Work with 4images 1.7.7


Step 1
Open / Öffne: admin/categories.php

Find / Finde:
  $auth_sendpostcard $HTTP_POST_VARS['auth_sendpostcard'];
  
$auth_readcomment $HTTP_POST_VARS['auth_readcomment'];
  
$auth_postcomment $HTTP_POST_VARS['auth_postcomment'];


Insert / Füge below / darunter:
// MOD SUBCAT PERM FROM PARENT START
  
$subcats = (isset($HTTP_POST_VARS['subcats']) && $HTTP_POST_VARS['subcats']) ? 0;
// MOD SUBCAT PERM FROM PARENT END



Step 1.1
Find / Finde:
  show_table_separator($permission_headline2);
  foreach (
$access_field_array as $key => $val) {
    
show_access_select($lang[$key], $key$val);
  }

Insert / Füge below / danach:
  // MOD SUBCAT PERM FROM PARENT START
  
show_radio_row($lang['sub_categories_permission'], "subcats"$subcats);
// MOD SUBCAT PERM FROM PARENT END;


Step 1.2
Find / Finde:
    $msg = ($result) ? $lang['cat_edit_success'] : $lang['cat_edit_error'];

Insert / Füge above / davor:
// MOD SUBCAT PERM FROM PARENT START
    
if ($subcats)
    {
      
$subcat_ids = array();
      
$subcat_ids get_subcategories_id($cat_id);
      if (!empty(
$subcat_ids))
      {
        
$sql "UPDATE ".CATEGORIES_TABLE."
                SET auth_viewcat = 
$auth_viewcat, auth_viewimage = $auth_viewimage, auth_download = $auth_download, auth_upload = $auth_upload, auth_directupload = $auth_directupload, auth_vote = $auth_vote, auth_sendpostcard = $auth_sendpostcard, auth_readcomment = $auth_readcomment, auth_postcomment = $auth_postcomment
                WHERE cat_id IN ("
.implode($subcat_ids",").")";
        
$result $site_db->query($sql);
      }
    }
// MOD SUBCAT PERM FROM PARENT END



Step 1.3
Find / Finde:
  show_form_footer($lang['save_changes'], $lang['reset'], 2$lang['back']);

Insert / Füge above / darüber:
Code: [Select]
// MOD SUBCAT PERM FROM PARENT START
  show_radio_row($lang['sub_categories_permission'], "subcats", $subcats);
// MOD SUBCAT PERM FROM PARENT END

Step 1.4
Open / Öffne lang/admin.php
Find / Finde:
* English
$lang['save_changes'] = "Save changes";
* Deutsch
$lang['save_changes'] = "Änderungen speichern";

Replace / Ersetze mit:
* English
$lang['save_changes'] = "Save changes";
$lang['sub_categories_permission'] = "Apply To All Subcategories";

* Deutsch
$lang['save_changes'] = "Änderungen speichern";
$lang['sub_categories_permission'] = "Für alle Unterkategorien übernehmen";

Offline zakaria666

  • Full Member
  • ***
  • Posts: 211
    • View Profile
Re: [MOD] Apply permission to sub-categories from their parent category
« Reply #50 on: September 11, 2010, 01:45:04 AM »
Has this mod been tested?

I installed it checked my add categories inside my admin control panel and there was duplicates. Gave me errors.

Thanks any way man