Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:2.0:probleme_rund_um_admidio [2018/06/24 12:39] fasseen:2.0:probleme_rund_um_admidio [2024/11/29 17:23] (current) – [Mass assignment of roles using the import] greno
Line 5: Line 5:
  
 This information includes (Examples): This information includes (Examples):
-  * PHP version (v7.1.2)+  * PHP version (v8.2.5)
   * Database type + version (MySQL v10.1.2)   * Database type + version (MySQL v10.1.2)
-  * Admidio version (v3.2.10+  * Admidio version (v4.2.12
-  * Used Plugins + versions (login form v1.7.1, sidebar announcements)+  * Used Plugins + versions (statistics v3.1.2written communication)
   * Own adjustments were made (different design, own code changes)   * Own adjustments were made (different design, own code changes)
-  * Exception Messages -> View [[en:2.0:probleme_rund_um_admidio|Set debug mode]] (Pay attention to sensitive information!) +  * Exception Messages -> View [[en:2.0:probleme_rund_um_admidio#set_debug_mode|Set debug mode]] (Pay attention to sensitive information!) 
-  * Logdatei Auszüge -> View [[en:2.0:probleme_rund_um_admidio|Set debug mode]] (Pay attention to sensitive information!)+  * Logdatei Auszüge -> View [[en:2.0:probleme_rund_um_admidio#set_debug_mode|Set debug mode]] (Pay attention to sensitive information!)
   * Detailed instructions on how to make the mistake -> Non-reproducible errors are very hard to find   * Detailed instructions on how to make the mistake -> Non-reproducible errors are very hard to find
-  * Screenshots if useful+  * Screenshots if useful 
   * If error after update -> Check if everything has been updated (Plugins, Libs, Theme, ...)   * If error after update -> Check if everything has been updated (Plugins, Libs, Theme, ...)
  
Line 26: Line 26:
 Now, exceptions and other fatal errors are shown directly to the web page, as well as extended information written to the log files. For each day a separate file is created. You can open and analyze these with any text editor. Now, exceptions and other fatal errors are shown directly to the web page, as well as extended information written to the log files. For each day a separate file is created. You can open and analyze these with any text editor.
 <file>adm_my_files/logs/admidio-2017-08-23.log</file> <file>adm_my_files/logs/admidio-2017-08-23.log</file>
 +
 +===== Include PHP code in template files =====
 +Admidio uses the template engine [[https://www.smarty.net|Smarty]] since version 4.0. In the theme folder ''adm_themes/simple/templates'' you can find the template files, which can be customized by you to adapt the [[en:2.0:admidio_customization|layout of Admidio]] to your wishes.
 +
 +PHP code cannot be included there for security reasons. If you still want to use your own PHP code in a template file, you can do this via a plugin. Create a new folder in the folder ''adm_plugins'' with a name of your choice, e.g. **scripts**. In this folder you create a new file for every PHP snippet you want to include e.g. **date.php**. In this file you can now store HTML and PHP: <code php><b>The current date is <?php echo date('d.m.Y', time()); ?></b></code> In the next step, you can use the following code to place the output of this file anywhere in any template file: <code html>{load_admidio_plugin plugin="scripts" file="date.php"}</code>This code can simply be placed directly in the HTML of the template file. With ''plugin="xyz"'' the name of your subfolder of adm_plugins is specified and with ''file="xyz"'' the filename.
  
 ===== Problems in Photo Upload ===== ===== Problems in Photo Upload =====
-Some servers you are having problems with the Photo Upload. This can have various reasons, which are listed here again:+Some servers have problems uploading photos. This can have various causes, which are listed here: 
   * Folder **adm_photos** does not have the rights 777.   * Folder **adm_photos** does not have the rights 777.
   * Folder **adm_photos/upload** does not have the rights 777.   * Folder **adm_photos/upload** does not have the rights 777.
Line 51: Line 56:
 Here it is quite easy if you know the console and the editor [[http://www.vim.org|Vim]] . Open the file with Vim and enter '': set nobomb ''. Now save the file, and everything will be fine. Here it is quite easy if you know the console and the editor [[http://www.vim.org|Vim]] . Open the file with Vim and enter '': set nobomb ''. Now save the file, and everything will be fine.
  
-===== Not view topics of plugins ===== +===== Mass assignment of roles using the import =====
-Since version 2.2 that most plugins headings that appear above the plug-in content. If these shall not be displayed, because you want to use an own headine on your homepage, or it just does not fit into the layout of the page, so you can remove these headers with a simple CSS snippets. For this you add the following code in the **system.css** in your theme folder in the subfolder **css**: +
-<code css>.admPluginHeader { +
-    display:            none; +
-}</code> +
- +
-===== Mass role assignment using the import =====+
 If you want to quickly assign multiple users in a specific role, so you can make this even with the import function. For this purpose, you create an Excel list with first name and surname of the person that should get assigned to the role. If necessary, you can export a list from a different role and do your adjustments there. If you want to quickly assign multiple users in a specific role, so you can make this even with the import function. For this purpose, you create an Excel list with first name and surname of the person that should get assigned to the role. If necessary, you can export a list from a different role and do your adjustments there.
  
-This spreadsheet you now choose for the import with selection  **Existing users** type **complete**. In the next step you assign the mandatories, then the users are imported and the role assignment are created. Due to users were already added and also no changes in field contents are made so far, the role assignments are created quickly and easily. +This spreadsheet you now choose for the import with selection  **Existing contacts** type **Complement**. In the next step you assign the mandatories, then the users are imported and the role assignment are created. Due to users were already added and also no changes in field contents are made so far, the role assignments are created quickly and easily.
- +
-===== Modify graphics ===== +
- +
-**Icons**\\  +
-In the folder icons of the selected Theme you can find all the icons that are used in Admidio. All icons are either 16x16 (eg {{:de:2.0:home_small.png |}}) or 32x32 (eg {{:de:2.0:home_big.png|}}) pixels in size. Should you want to change the existing icons, simply replace the existing files with your own. Here you should make sure that you adjust the size accordingly. Some symbols are used in both sizes. To help your users to find a uniform image,  you should renew both formats. +
- +
- +
-**Other used graphics**\\  +
-Some of the graphics used for the "modern" layout are provided as Photoshop raw data. Thus, for example, the colors quite easy can be adapted. Another tip: After the changes use  "File> Save for Web & Devices" to simply convert to PNG and save it in the correct folder. +
- +
-**no_profile_pic**\\  +
-This graphic is displayed when a user has uploaded no own avatar to the profile.[[http://www.admidio.org/daten/no_profile_pic.psd]]+
  
 ===== Move Admidio folder ===== ===== Move Admidio folder =====
Line 84: Line 71:
 Now Admidio is running in the new folder. Now Admidio is running in the new folder.
  
-===== Change the menu to the database ===== +===== Insert back link into theme ===== 
- +From time to time it is useful to have a link that takes you back to the previous page. If you need this link, you can place it anywhere in the template file. Open the file ''adm_themes/simple/templates/index.tpl'' and insert the following code snippet at the desired place:<code smarty>{if $hasPreviousUrl
-With version 3.3, the menu is no longer statically assembled in the file ** my_body_bottom.php **. It's stored in the database and will be created out of it. In order for this to work for you, you have to adjust the ** my_body_bottom.php ** for an update to version 3.3 or newer. +    <!-- Add link to previous page --> 
- +    <a id="admidio-back-link" class="" href="{$urlAdmidio}/adm_program/system/back.php"><i class="fas fa-arrow-circle-left fa-fw"></i> {$l10n->get('SYS_BACK')}</a
-You have the following 3 possibilities: +{/if}</code>In this case, only the link will be displayed if there is also a meaningful URL from a previous pageYou can further adjust the visual design via CSS or change the HTML in the code snippet accordingly.
-  - If you have not made any adjustments in our standard theme, you can simply replace the theme folder ** adm_themes ** during the update. +
-  - Have you made adjustments in the theme, but not in the file ** my_body_bottom.php **, then just replace this file. +
-  - If you have the file **my_body_bottom.php** adapted to your needs, you have to do some changes in the code. \\ To do so, please remove the following code: <code html              <div id="plugin_menu" class="admidio-plugin-content"> +
-                    <?php +
-                    // Module Menu +
-                    $moduleMenu = new Menu('modules', $gL10n->get('SYS_MODULES')); +
-                    $moduleMenu->addItem('overview', '/adm_program/index.php', +
-                                         $gL10n->get('SYS_OVERVIEW'), '/icons/home.png'); +
-                    if($gPreferences['enable_announcements_module'] == 1 +
-                    || ($gPreferences['enable_announcements_module'] == 2 && $gValidLogin)) +
-                    { +
-                        $moduleMenu->addItem('announcements', FOLDER_MODULES . '/announcements/announcements.php', +
-                                             $gL10n->get('ANN_ANNOUNCEMENTS'), '/icons/announcements.png'); +
-                    } +
-                    if($gPreferences['enable_download_module'] == 1) +
-                    { +
-                        $moduleMenu->addItem('download', FOLDER_MODULES . '/downloads/downloads.php', +
-                                             $gL10n->get('DOW_DOWNLOADS'), '/icons/download.png'); +
-                    +
-                    if($gPreferences['enable_mail_module'] == 1 && !$gValidLogin) +
-                    { +
-                        $moduleMenu->addItem('email', FOLDER_MODULES . '/messages/messages_write.php', +
-                                             $gL10n->get('SYS_EMAIL'), '/icons/email.png'); +
-                    } +
-                    if(($gPreferences['enable_pm_module'] == 1 || $gPreferences['enable_mail_module'] == 1) && $gValidLogin) +
-                    { +
-                        $unreadBadge = ''; +
-                        // get number of unread messages for user +
-                        $message = new TableMessage($gDb); +
-                        $unread = $message->countUnreadMessageRecords($gCurrentUser->getValue('usr_id')); +
-                        if($unread > 0) +
-                        { +
-                            $unreadBadge = '<span class="badge">' . $unread . '</span>'; +
-                        } +
-                        $moduleMenu->addItem('private_message', FOLDER_MODULES . '/messages/messages.php', +
-                                             $gL10n->get('SYS_MESSAGES') . $unreadBadge, '/icons/messages.png'); +
-                    } +
-                    if($gPreferences['enable_photo_module'== +
-                    || ($gPreferences['enable_photo_module'] == 2 && $gValidLogin)) +
-                    { +
-                        $moduleMenu->addItem('photo', FOLDER_MODULES . '/photos/photos.php', +
-                                             $gL10n->get('PHO_PHOTOS'), '/icons/photo.png'); +
-                    } +
-                    if($gPreferences['enable_guestbook_module'] == 1 +
-                    || ($gPreferences['enable_guestbook_module'] == 2 && $gValidLogin)) +
-                    { +
-                        $moduleMenu->addItem('guestbk', FOLDER_MODULES . '/guestbook/guestbook.php', +
-                                             $gL10n->get('GBO_GUESTBOOK'), '/icons/guestbook.png'); +
-                    } +
-                    $moduleMenu->addItem('lists', FOLDER_MODULES . '/lists/lists.php', +
-                                         $gL10n->get('LST_LISTS'), '/icons/lists.png'); +
-                    if($gValidLogin) +
-                    { +
-                        $moduleMenu->addItem('mylist', FOLDER_MODULES . '/lists/mylist.php', +
-                                             $gL10n->get('LST_MY_LIST'), '/icons/mylist.png'); +
-                    } +
-                    if($gPreferences['enable_dates_module'== 1 +
-                    || ($gPreferences['enable_dates_module'] == 2 && $gValidLogin)) +
-                    { +
-                        $moduleMenu->addItem('dates', FOLDER_MODULES . '/dates/dates.php', +
-                                             $gL10n->get('DAT_DATES'), '/icons/dates.png'); +
-                    } +
-                    if($gPreferences['enable_weblinks_module'] == 1 +
-                    || ($gPreferences['enable_weblinks_module'] == 2 && $gValidLogin)) +
-                    { +
-                        $moduleMenu->addItem('links', FOLDER_MODULES . '/links/links.php', +
-                                             $gL10n->get('LNK_WEBLINKS'), '/icons/weblinks.png'); +
-                    } +
-                    echo $moduleMenu->show(); +
-                    // Administration Menu +
-                    if($gCurrentUser->approveUsers() || $gCurrentUser->editUsers() +
-                    || $gCurrentUser->manageRoles()  || $gCurrentUser->isAdministrator()) +
-                    { +
-                        $adminMenu = new Menu('administration', $gL10n->get('SYS_ADMINISTRATION')); +
-                        if($gCurrentUser->approveUsers() && $gPreferences['registration_mode'] > 0) +
-                        { +
-                            $adminMenu->addItem('newreg', FOLDER_MODULES . '/registration/registration.php', +
-                                                $gL10n->get('NWU_NEW_REGISTRATIONS'), '/icons/new_registrations.png'); +
-                        } +
-                        if($gCurrentUser->editUsers()) +
-                        { +
-                            $adminMenu->addItem('usrmgt', FOLDER_MODULES . '/members/members.php', +
-                                                $gL10n->get('MEM_USER_MANAGEMENT'), '/icons/user_administration.png'); +
-                        } +
-                        if($gCurrentUser->manageRoles()) +
-                        { +
-                            $adminMenu->addItem('roladm', FOLDER_MODULES . '/roles/roles.php', +
-                                                $gL10n->get('ROL_ROLE_ADMINISTRATION'), '/icons/roles.png'); +
-                        } +
-                        if($gCurrentUser->isAdministrator()) +
-                        { +
-                            $adminMenu->addItem('dbback', FOLDER_MODULES . '/backup/backup.php', +
-                                                $gL10n->get('BAC_DATABASE_BACKUP'), '/icons/backup.png'); +
-                            $adminMenu->addItem('orgprop', FOLDER_MODULES . '/preferences/preferences.php', +
-                                                $gL10n->get('SYS_SETTINGS'), '/icons/options.png'); +
-                        } +
-                        echo $adminMenu->show(); +
-                    } +
-                    ?> +
-</div><!-- closes "div#plugin_menu" --></code> Now add after the following line of code: <code php>require(ADMIDIO_PATH FOLDER_PLUGINS . '/login_form/login_form.php');</code> these lines of code: <code php>// create html page object and display Menu +
-$page = new HtmlPage(); +
-echo $page->showMainMenu(false);</code> +
-Now the sidebar should always show the menu you configured in Admidio.+
  • en/2.0/probleme_rund_um_admidio.1529836795.txt.gz
  • Last modified: 2018/06/24 12:39
  • by fasse