Erweiterter Frontend-Editor

Gerade habe ich eine Erweiterung für den Frontend-Editor erstellt, ich könnte nicht mehr leben ohne :)

So einfach wie es nur geht. Dieser Tweak fügt hinzu:
1. “Gehe in das Backend” Button
2. “Neue Struktur” (unterhalb der aktiven Struktur) Button
3. “Neuer Artikel” (in der aktiven Struktur) Button

Installation:
1. Erstelle eine Datei “rt_more_fe_links.php” und kopiere den unten gezeigten Code hinein.
2. Die Datei wird in “template/inc_script/frontend_render/..” abgelegt.

Die Box ist nur sichtbar für eingeloggte Administratoren, der Frontend-Editor muss aktiviert sein.



Docu: –
Forum: Enhanced Frontend Editor (Easy)

Autor: Konstantin Schultes (phalancs) http://www.enym.com
CMS Version: >= 1.4x
Version: V1.0 (27.02.2012)
Bedingung:/config/phpwcms/conf.inc.php

  • $phpwcms['allow_ext_render'] = 1;
  • $phpwcms['frontend_edit'] = 1;
  • $phpwcms['SESSION_FEinit'] = 1;


PHP:

Datei: template/inc_script/frontend_render/rt_more_fe_links.php

rt_more_fe_links.php

<?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>';
}
 
?>


deutsch/andere-erweiterungen/frontend/enhanced-frontend-editor.txt · Last modified: 2018/06/03 18:09 (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