Differences

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

english:other-enhancements:frontend:enhanced-frontend-editor [2012/02/29 01:32]
Knut Heermann (flip-flop) created
english:other-enhancements:frontend:enhanced-frontend-editor [2018/06/03 18:09] (current)
Line 1: Line 1:
 +{{indexmenu_n>10}}
 +
====== Enhanced Frontend-Editor ====== ====== Enhanced Frontend-Editor ======
Line 6: Line 8:
> As simple as it gets. This Tweak adds: > As simple as it gets. This Tweak adds:
> 1. "Go to Backend" Button > 1. "Go to Backend" Button
-> 2. "New structure" (below active structure) button +> 2. "New structure" //(below active structure)// button 
-> 3. "New article" (into active structure) button+> 3. "New article" //(into active structure)// button
> >
> Installation: > Installation:
-> 1. create "rt_more_fe_links.php" and paste the code below +> 1. create "rt_more_fe_links.php" and paste the code below. 
-> 2. put the file into "template/inc_script/frontend_render/"+> 2. put the file into "template/inc_script/frontend_render/..".
> >
-> The box is only visible to logged in admin, also requires the frontend editor to be enabled+> The box is only visible to logged in admin, also requires the frontend editor to be enabled
 +
 +> {{:deutsch:andere-erweiterungen:frontend:phpwcmsenhancedfeeditor.jpg|}}
\\ \\
Line 25: Line 29:
**Condition:**  -> [[http://www.phpwcms-docu.de/config_files.phtml|config/phpwcms/conf.inc.php]] \\ **Condition:**  -> [[http://www.phpwcms-docu.de/config_files.phtml|config/phpwcms/conf.inc.php]] \\
  * $phpwcms['allow_ext_render']  = 1;   * $phpwcms['allow_ext_render']  = 1;
-  * $phpwcms['frontend_edit']  = 0;+  * $phpwcms['frontend_edit']  = 1; 
 +  * $phpwcms['SESSION_FEinit']    = 1;
---- ----
\\ \\
 +===== PHP: =====
 +
 +
 +**File:** template/inc_script/frontend_render/rt_more_fe_links.php
 +
 +
 +<code php |h rt_more_fe_links.php|h>
 +<?php
 +
 +// =========================================================================
 +//
 +// ADMIN-BOX V1.0
 +// 10.10.2011
 +// www.enym.com - Konstantin Schultes
 +//
 +// This script enhances the frontend-Editor. Just create a file like
 +// "rt_more_fe_links.php" and put it into "template/inc_script/frontend_render/"
 +// Basic editing tasks will be much easier then! Enjoy :)
 +//
 +// What it does:
 +// Adds: "Go to Backend" Button
 +// Adds: "New structure" (below active structure) button
 +// Adds: "New article" (into active structure) button
 +//
 +//==========================================================================
 +
 +
 +// ----------------------------------------------------------------
 +// obligate check for phpwcms constants
 +if (!defined('PHPWCMS_ROOT')) {
 +   die("You Cannot Access This Script Directly, Have a Nice Day."); }
 +// ----------------------------------------------------------------
 +
 +                
 +if(FE_EDIT_LINK && $_SESSION['wcs_user_admin']=='1') {
 +
 +//ADD SOME CSS for (THE ADMIN BOX
 +$block['custom_htmlhead']['mycss']  = '<style type="text/css">
 +
 +#admin_box1 {
 +    position: absolute;
 +    right: 80px;
 +    top: 3px;
 +    color: white;
 +    border: 1px solid #030;
 +    padding: 3px;
 +    background-position: center center;
 +    background-repeat: no-repeat;
 +    height: 16px;
 +    width: 16px;
 +    cursor: pointer;
 +    z-index: 10000;
 +    background-color:#8cb963;
 +}
 +
 +#admin_box2 {
 +    position: absolute;
 +    right: 31px;
 +    top: 3px;
 +    color: white;
 +    border: 1px solid #030;
 +    padding: 3px;
 +    background-position: center center;
 +    background-repeat: no-repeat;
 +    height: 16px;
 +    width: 37px;
 +    cursor: pointer;
 +    z-index: 10000;
 +    background-color:#fff58a;
 +}
 +
 +</style>';
 +
 +//ADD THE ADMIN BOX
 +    $content['all'] .= '<div id="admin_box1"><a href="phpwcms.php?do=admin&p=6"><img src="img/famfamfam/action_go.gif" title="Administration" border="0"></a></div>';
 +    $content['all'] .= '<div id="admin_box2"><a href="phpwcms.php?do=admin&p=6&struct='.$GLOBALS ['content']['cat_id'].'"><img src="img/famfamfam/page_white_add.gif" style="margin-right:3px;" title="New structure" border="0"></a>';
 +    $content['all'] .= '<a href="phpwcms.php?do=articles&p=1&struct='.$GLOBALS ['content']['cat_id'].'"><img src="img/famfamfam/layout_add.png" title="New article" border="0"></a></div>';
 +}
 +
 +?>
 +</code>
 +
 +\\
english/other-enhancements/frontend/enhanced-frontend-editor.1330475555.txt.gz · Last modified: 2018/06/03 18:08 (external edit)
www.planmatrix.de www.chimeric.de Creative Commons License Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0