[NEW PLUGIN] jm_landingpage

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

jop
Posts: 66
Joined: Sun Sep 20, 2009 1:05 pm

Re: [NEW PLUGIN] jm_landingpage

Post by jop » Sun Jan 25, 2015 4:52 pm

Very nice plugin. Does it work in a safari browser on ipad (cookie will not automatically expire?).
/jop

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [NEW PLUGIN] jm_landingpage

Post by cmb » Sun Jan 25, 2015 9:43 pm

jop wrote:Does it work in a safari browser on ipad (cookie will not automatically expire?).
Are you referring to the problems described on http://wearebase.com/cookies-ios7/? If so: the cookies will be invalidated as soon as the browser is closed. See http://cmsimpleforum.com/viewtopic.php? ... 347#p45596 for a way to specify an expiration date.
Christoph M. Becker – Plugins for CMSimple_XH

mhz
Posts: 676
Joined: Tue Jun 25, 2013 8:46 pm
Location: Heusenstamm, Hessen
Contact:

Re: [NEW PLUGIN] jm_landingpage

Post by mhz » Thu Mar 12, 2015 9:05 pm

Nach solch einer Art von Plugin habe ich schon etwas länger gesucht.
Ist es eigentlich möglich, dieses auf einen User hin zugeschnitten, aufzurufen?
Mein Wunsch: Ein User meldet sich über Memberpages an und dann erscheint die Nachricht in landingpage (also in dem Fenster) nur für ihn. Andere angemeldete User bekommen nichts davon mit.
Michael Zajusch (mhz)-- Mein Tutorial für CMSimple_XH. Früher

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: [NEW PLUGIN] jm_landingpage

Post by cmb » Thu Mar 12, 2015 11:17 pm

mhz wrote:Nach solch einer Art von Plugin habe ich schon etwas länger gesucht.
Das sehr ähnliche Plugin Message_XH gibt es schon eine ganze Weile. :)
mhz wrote:Mein Wunsch: Ein User meldet sich über Memberpages an und dann erscheint die Nachricht in landingpage (also in dem Fenster) nur für ihn. Andere angemeldete User bekommen nichts davon mit.
Das wäre wohl eher ein Feature-Request für Memberpages; jm_landingpage könnte man jedenfalls nicht ohne weiteres nutzen -- allerdings eben die Idee eine Nachricht nicht direkt oberhalb des Content-Bereichs, sondern als "Popup" darzustellen. Ich weiß nicht, ob svasti hier mitliest -- im Zweifel poste es vielleicht besser im Memberpages 3.5 beta Thread.
Christoph M. Becker – Plugins for CMSimple_XH

mhz
Posts: 676
Joined: Tue Jun 25, 2013 8:46 pm
Location: Heusenstamm, Hessen
Contact:

Re: [NEW PLUGIN] jm_landingpage

Post by mhz » Fri Mar 13, 2015 12:02 am

Das Plugin Messages_XH kenne ich auch, aber das hier und so einfach in der Handhabung und als eine Art Popup ... das suchte ich.
Michael Zajusch (mhz)-- Mein Tutorial für CMSimple_XH. Früher

lck
Posts: 2963
Joined: Wed Mar 23, 2011 11:43 am
Contact:

Re: [NEW PLUGIN] jm_landingpage

Post by lck » Sat Mar 14, 2015 6:59 pm

An option in a plugin setting, where you could temporarily disable the plugin would be nice.
A "do not publish" the page or even deleting the "Landingpage" page is still a blank window with the close button.

Currently just remains alternative comment out of the plugin call in the template or disabling the plugin under CMS > Plugins > Disabled: jm_landingpage
„Bevor du den Pfeil der Wahrheit abschießt, tauche die Spitze in Honig!“   👉 Ludwig's XH-Templates for MultiPage & OnePage

maeg
Posts: 525
Joined: Fri Feb 20, 2009 2:27 pm
Location: Agerbæk, Denmark
Contact:

Re: [NEW PLUGIN] jm_landingpage

Post by maeg » Sat Mar 14, 2015 8:56 pm

Ludwig wrote:An option in a plugin setting, where you could temporarily disable the plugin would be nice.
A "do not publish" the page or even deleting the "Landingpage" page is still a blank window with the close button.

Currently just remains alternative comment out of the plugin call in the template or disabling the plugin under CMS > Plugins > Disabled: jm_landingpage
Hmm l'll try Update it with A on/OFF option

Tata
Posts: 3586
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: [NEW PLUGIN] jm_landingpage

Post by Tata » Fri Dec 02, 2016 11:02 pm

I just have implemented the plugin on one website and made small modification (index.php and language files) and added new config/config.php to the plugin.
Now:
1. The admin may specify which page shall be used for the Pop-Up.
2. The page won't pop-up if its content is empty.index.php

Code: Select all

<?php
//*** mod by tata
// utf8-marker: äöüß


if (!defined('CMSIMPLE_XH_VERSION')) {
    header('HTTP/1.0 403 Forbidden');
    exit;
}



function jm_landingpage() {
    global $hjs, $pth, $plugin_cf, $plugin_tx;

    $pcf = $plugin_cf['jm_landingpage']['name']; //*** added config variable
    $ptx = $plugin_tx['jm_landingpage'];
//*** test if the page has any content excl. heading   
        $test =  strip_tags(newsbox($plugin_cf['jm_landingpage']['name']));
        $test = str_replace(array(" ", "\r","\n", " "), '', $test);
//*** if there is any content, show the page content in newsbox
            if(strlen($test) > 0){
    
    $o = ' <script src="'.$pth['folder']['plugins'].'jm_landingpage/jm_landingpage.js"></script>
    <div id="page-space"></div>                
            <div id="page-consent">
                <div id="page-inner">
                    <div id="page-text">'.newsbox($plugin_cf['jm_landingpage']['name']).' </div>
                    <button id="accept1">'.$ptx['button'].'</button>                 
                </div>
             </div>';
    return $o;
    }else{
//*** if the page is empty, hide the newsbox
    $o = '';
    }
}

?>
language file

Code: Select all

<?php
$plugin_tx['jm_landingpage']['button']="[ CLOSE ]";
$plugin_tx['jm_landingpage']['cf_name']="The page shall be excluded from navigation. 
                                        If the publishing shall be canceled, the entire 
                                        page content shall be deleted 
                                        (from the heading end forward)."; 
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

Post Reply