Posts by: heinemannj66

Posts: 3
Post: 7194
Topic: Undefined index: menu_indentation in gpeasy 4.3.4
Notice (8) Undefined index: menu_indentation
    in: /srv/www/htdocs/elma/data/_addoncode/jq246rl/download.php
    on line: 97
    Request: /administration/downloads
    Method: GET
Show Backtrace
array(
   [0] => array(
      [file] => (string)/srv/www/htdocs/elma/include/common.php
      [line] => (integer)491
      [args] => (string)array(1)
      [function] => (string)include_once
   )
   [1] => array(
      [file] => (string)/srv/www/htdocs/elma/include/tool/gpOutput.php
      [line] => (integer)494
      [function] => (string)IncludeScript
      [args] => (string)array(3)
   )
   [2] => array(
      [file] => (string)/srv/www/htdocs/elma/include/special.php
      [line] => (integer)164
      [function] => (string)ExecInfo
      [class] => (string)gpOutput
      [type] => (string)::
      [args] => (string)array(1)
   )
   [3] => array(
      [file] => (string)/srv/www/htdocs/elma/include/special.php
      [line] => (integer)77
      [function] => (string)ExecInfo
      [class] => (string)special_display
      [type] => (string)::
      [args] => (string)array(1)
   )
   [4] => array(
      [file] => (string)/srv/www/htdocs/elma/include/tool/gpOutput.php
      [line] => (integer)2496
      [function] => (string)RunScript
      [class] => (string)special_display
      [object] => (string)object special_display
      [type] => (string)->
      [args] => (string)array(0)
   )
)
8 years ago
Post: 7120
Topic: search hook for special link

This procedure works fine if in plugin code is no class defined.

But if there are classes the content value becomes empty.

I've tested with Plugins_Examples:

;Map Example
[Special_Link:Example_Map]
label = 'Example_Map'
script = '01_Map.php'
class = 'Example_Map'

;Ajax Example
[Special_Link:Example_Ajax]
label = 'Example_Ajax'
script = '02_Ajax.php'
class = 'Example_Ajax'

[Search]
script = 'Search.php'
class = 'Example_Search'

 

<?php

defined('is_running') or die('Not an entry point...');

class Example_Search {

    function PluginSearchContent($File){

        if( file_exists($File) ){
echo $File."<br>";
            ob_start();
            include($File);
            $Content = ob_get_clean();
        }
        return $Content;
    }

    function Example_Search($args){

        global $addonPathCode;
        $search_obj = $args[0];

        $Label = "Example_Map";
        $Link="Example_Map";
        $File = $addonPathCode.'/01_Map.php';
        $search_obj->FindString($this->PluginSearchContent($File), $Label, $Link);

        $Label = "Example_Ajax";
        $Link="Example_Ajax";
        $File = $addonPathCode.'/02_Ajax.php';
        $search_obj->FindString($this->PluginSearchContent($File), $Label, $Link);
    }
}
?>

 

 

8 years ago
Post: 7115
Topic: search hook for special link

I want to the search into special link html output.

Out of the box plugin output was not include into the gpeasy search function.

I've play arround with the search hook:

;Addon_Name
Addon_Name = 'Test'    

;Addon_Unique_ID
Addon_Unique_ID = 676

;Addon_Version
Addon_Version = 0.4

;min_gpeasy_version
min_gpeasy_version = 1.5RC2

;A description about your addon,
; may contain some html: <div>,<p>,<a>,<b>,<br/>,<span>,<tt>,<em>,<i>,<b>,<sup>,<sub>,<strong>,<u>
About = 'Test';

[Special_Link:ELMA diag system]
label = 'System diag'
script = 'system.php'
;class = 'Configuration'

[Special_Link:ELMA diag rsyslog]
label = 'rsyslog diag'
script = 'rsyslog.php'
;class = 'Configuration'

[Search]
script = 'Search.php'
class = 'DiagSearch'

My tries with search.php:

<?php defined('is_running') or die('Not an entry point...');

class DiagSearch{
    function DiagSearch($args){

        $search_obj = $args[0];

        $PluginFile = '/srv/www/htdocs/elma/addons/ELMA Diagnostics/system.php';

        $diagtitle = "Diagnostics";
        $diaglink="ELMA_diag_system";

            $diaglabel = common::GetLabel($diagtitle);
            include($PluginFile);
            $diagcontent = ob_get_clean();

            $search_obj->FindString($diagcontent, $diaglabel, $diaglink);

    }
}
?>

This finds the search pattern, but in case of not matching search pattern it is also in hit list.

Is there a more dynamic way to address all defined special link inside a plugin?

Any help would be fine.

Joerg

8 years ago

News

elFinder 2.1.50 in Upcoming Release
12/28/2019

A new release for Typesetter is in the works with a lot of improvements including the ... Read More

Typesetter 5.1
8/12/2017

Typesetter 5.1 is now available for download. 5.1 includes bug fixes, UI/UX improvements, ... Read More

More News

creisi productions

Dienstleistungen von creisi productions, Ennetb├╝rgen (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Websi...

Find out more about our Provider Spotlight

Log In

  Register