Posts by: juergen

Posts: 1425
Post: 11167
Topic: Admin Menu: how to rise one level of some pages

First thing I see:

$item_class_name was meant to be used for possible CSS class(es), e.g. for custom backgroubd colors or alike.



But if you're going to add several links, we'd be better off with a different approach. Give me a few minutes…
 

1 year ago
Post: 11164
Topic: Admin Menu: how to rise one level of some pages

[GetHead]
script = jscript.php
method = plugin_function

Should have worked.
You probably just didn't click 'Upgrade' in Plugins->Manage->nbcDevice->Options, which is required after Addon.ini changed / hooks were added (?)

1 year ago
Post: 11162
Topic: Admin Menu: how to rise one level of some pages

where do have to I put this code?

Are your custom IOT admin pages coded as a Typesetter plugin? If so, you could use the GetHead() plugin hook.
It differs a bit whether the plugin class is instantiated or called statically - both will work.
How does your Addon.ini look like?


But you can also simply add the code to the very top of your template.php, without using a plugin hook. Will also work:

<?php

  global $page;

  if( \gp\tool::LoggedIn() && $page->title ){

    $item_link =               '/My_Item_Link';
    $item_label =              'My Item Label';
    $item_title =              'My Item Title';
    $item_fa_icon_class_name = 'fa-flag';
    $item_class_name =         'my-item-class-name';

    $page->jQueryCode .= '$("<div '
      . 'class=\"panelgroup ' . $item_class_name . '\" '
      . 'title=\"' . $item_title . '\">'
      .   '<a class=\"toplink\" href=\"' . $item_link . '\">'
      .     '<i class=\"fa ' . $item_fa_icon_class_name . '\"></i>'
      .     '<span>' . $item_label . '</span>'
      .   '</a>'
      . '</div>")'
      . '.insertAfter("div#simplepanel > div > div.toolbar")';
  }

?><DOCTYPE html>[ ... rest of template.php ]

 

 

 

 

 

1 year ago
Post: 11160
Topic: Cookie Law Policy Banner plugin?

There must be an issue with Chorme

Probably because Chrome increasingly enforces the use of HTTPS.
Can you switch your site to use https. Many hosting providers make it rather easy nowadays to use free "Let's encrypt' certificates.

1 year ago
Post: 11159
Topic: Admin Menu: how to rise one level of some pages

Ok. Try sth. like this:

public static function GetHead(){

  global $page;

  if( \gp\tool::LoggedIn() && $page->title ){

    $item_link =               '/My_Item_Link';
    $item_label =              'My Item Label';
    $item_title =              'My Item Title';
    $item_fa_icon_class_name = 'fa-flag';
    $item_class_name =         'my-item-class-name';

    $page->jQueryCode .= '$("<div '
      . 'class=\"panelgroup ' . $item_class_name . '\" '
      . 'title=\"' . $item_title . '\">'
      .   '<a class=\"toplink\" href=\"' . $item_link . '\">'
      .     '<i class=\"fa ' . $item_fa_icon_class_name . '\"></i>'
      .     '<span>' . $item_label . '</span>'
      .   '</a>'
      . '</div>")'
      . '.insertAfter("div#simplepanel > div > div.toolbar")';
  }

}

 

edit: 'insertAfter' instead of 'after'

Edited: 1 year ago
Post: 11156
Topic: Admin Menu: how to rise one level of some pages

Sample how to add a first link to the admin top bar, via GetHead hook:

public static function GetHead(){

  global $page;

  if( \gp\tool::LoggedIn() && $page->title ){ // FYI: $page->title means we're not on an admin page

    $item_link =               '/My_Item_Link';
    $item_label =              'My Item Label';
    $item_title =              'My Item Title';
    $item_fa_icon_class_name = 'fa-flag';
    $item_class_name =         'my-item-class-name';

    $page->jQueryCode .= '$("'
    . '<li '
    .   'class=\"' . $item_class_name . '\" '
    .   'title=\"' . $item_title . '\">'
    .     '<a href=\"' . $item_link . '\">'
    .       '<i class=\"fa ' . $item_fa_icon_class_name . '\"></i> '
    .       $item_label 
    .     '</a>'
    . '</li>'
    . '")'
    . '.prependTo("#admincontent_panel > ul:not(.panel_tabs)");';
  }

}

Edited: 1 year ago
Post: 11155
Topic: Admin Menu: how to rise one level of some pages
It's only possible using JavaScript.
Which one do you mean? The admin top bar or the floating panel?
1 year ago
Post: 11154
Topic: Cookie Law Policy Banner plugin?

I can't even deactivate it, because I'm not admitted.

Renaming the /addons/Cookie_Compliance folder will render it useless. If the plugin is the cause, you should now be able to log in (getting an error message that plugin hooks don't exist).

1 year ago
Post: 11149
Topic: PHPMailer

Do you know if someone have done this work?

Sorry, not as far as I know.

Before you start coding it yourself - have you noticed that Typesetter doesn't support editiing by diferent users at the same time?
Not a big deal If there are only 2 or 3 users, but with lots of them this will likely become a real problem.

1 year ago
Post: 11147
Topic: Can not login to admin?

Sorry, I don't know the cause of this issue this time, but two things come to mind:

uploading the unzipped files from my recent gpexport-file

  1. Have you tried to create an _exports directory in the new site's /data directory, copy the exported archive there and restore it via gpEasy's internal method?
    That's the way to restore an export, normally (which will care about an installation's unique ID).
  2. Does anything speak against using a more recent Typesetter version?
1 year 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, Luzern (Schweiz): * Konzeption, Planung und Erstellung Ihres Internet-Auftritts * Betreuung und Aktualisierung/Pflege Ihrer Website * ...

Find out more about our Provider Spotlight

Log In

  Register