e107sk.com

Recent Content List e107 Plugins

Available shortcodes on 06 Jul 2020

All shortcodes are global, so you can use them anywhere in your theme.
Outdated information for version 2.3.0

 Available shortcodes and how to use them

{DEFAULT_MENUAREA=100} version 1.0 up

it displays menus set for menuarea number 100 for default layout for any other layout. The same content like {MENUAREA=100} or {MENU=100} in default layout. It's very helpful if you have more footers with the same menus. More info.

{JM_CUSTOMHEADER}version 2.1 up it displays the content of header set for actual layout.  Now can be replaced with magic shortcode {---HEADER---}
{JM_CUSTOMHEADER: header=primary} it displays primary header (it is looking for html file in your theme/headers/header_* - in this case, header_primary.html).  This version is used mainly for custom pages (with correct template each custom page can have different header/layout)

{LAYOUT_BGIMAGE: template=bgimage} 

version 1.0 up

it displays background header image set for layout. It is special shortcodes for the header image, because, by default, you can set no image, external image (shortcodes work too) or image from media manager.  What is returned is set by template. Example:

$JMTHEME_TEMPLATE['bgimage'] = '<div class="image" style="background-image: url({BGIMAGE})"></div>';
$JMTHEME_TEMPLATE['cssimage'] = 'style="background-image: url({BGIMAGE})';

{LAYOUT_ELEMENT: element=title} 

version 1.0 up

It displays the value of the layout field for actual layout. It's good practice to write this shortcode to the description of your layout field. 

it replaces shortcodes. 

The output is not hardcoded. You can template it by using the template parameter. 

Parameter layout is ignored from version 2.1. It uses always actual layout.

{JM_CUSTOMFOOTER} version 2.1 up it displays the content of footer set for actual layout.  Now can be replaced with magic shortcode {---FOOTER---}
{JM_CUSTOMFOOTER: header=black} it displays black footer (it is looking for html file in your theme/footers/footer_* - in this case, footer_black.html).  This version is used mainly for custom pages (with correct template each custom page can have different footer/layout)

One Page plugin on 27 May 2020

Because e107 is complex CMS, there are some links that they always exist. If you want to make One Page site (just with scrolling), you should redirect those links to the Homepage.  But sometimes you need at least a contact page or something, so now with this plugin, you can set this behavior only for selected areas.

The former version of this plugin redirected everything except excluded pages to the homepage, but this is a better version, the version where you have things under your control.  

2f3823b34276

Version 1.0:

Contact Page  Warning! Use this only if you don't use any contact form! It redirects any "contact" in URL too, not only contact.php. If you use contact form on Homepage, by default menu is redirected to contact.php if there is an error.
Comment System Core redirects to yoursite/index.php file. This redirect to SITEURL (no index.php)
Print Page The same problem with double content it print.php doesn't have parameters. If you use it, be sure that there is no print icon in your news/pages used.
Members Only page Link for members-only access always exists, although your site access is not limited.
Who is online Page Link for Online page always exists, although it displays nothing for quests. 
Search page With One page site you will probably need search functionality
Submit News page Always exists with Access denied message for quests
Top Results page Always exists with No results message
User page Always exists with Access denied message for quests. With One Page site, you don't need a user management system.
News Plugin News is the core plugin you can't uninstall. Links always exist.
Page Plugin Book/Chapter/Pages system is inbuilt in the core. Links always exist.
Error Page With 404 error is displayed core 404 page. This redirect the 404 error page to the homepage.

Warnings:

Ab04ba3d2913

With One Page site you shouldn't:

- use Associate Root namespace, otherwise that part will not work (if you use Page, then Page is not working, with News, News redirection is not working)

and you should:

- use Redirect to System not found page, otherwise, Error redirection will not work.

How does it work?

It checks at the first e_PAGE variable.  If news, pages or contact is activated, then it checks "news", "page" and "contact" vs actual URL.

Masthead plugin - how to use it for video header on 18 May 2020

Testing for the sass landing page in mdbootstrap free templates (I can't find link to online demo, but it is part of free templates by mdbootstrap)

Just use any free text field for video URL and use its shortcode in the template.

Used video from LZ2 theme.

 $MASTHEAD_TEMPLATE['mdbootstrap']['element'] = '
<!-- Full Page Intro -->
<div class="view full-page-intro">
<!--Video source-->
<video class="video-intro" autoplay loop muted>
<source src="{BUTTON_LINK}" type="video/mp4" />
</video>
<!-- Mask & flexbox options-->
<div class="mask rgba-blue-light d-flex justify-content-center align-items-center">
<!-- Content -->
<div class="container">
<!--Grid row-->
<div class="row d-flex h-100 justify-content-center align-items-center wow fadeIn">
<!--Grid column-->
<div class="col-md-6 mb-4 white-text text-center text-md-left">
<h1 class="display-4 font-weight-bold">{MASTHEAD_HEADING}</h1>
<hr class="hr-light">
<p>
<strong>{MASTHEAD_SUBHEADING}</strong>
</p>
<p class="mb-4 d-none d-md-block">
<strong>{MASTHEAD_INTRO}</strong>
</p>
<a target="_blank" href="{BUTTON_LINK_LEFT}" class="btn btn-outline-white">{BUTTON_TEXT_LEFT}
<i class="fas fa-graduation-cap ml-2"></i>
</a>
<a target="_blank" href="{BUTTON_LINK_RIGHT}" class="btn btn-outline-white">{BUTTON_TEXT_RIGHT}
<i class="fas fa-download ml-2"></i>
</a>
</div>
<!--Grid column-->
<!--Grid column-->
<div class="col-md-6 col-xl-5 mb-4">
<img src="{IMAGE_01}" alt="{MASTHEAD_HEADING}" class="img-fluid">
</div>
<!--Grid column-->
</div>
<!--Grid row-->
</div>
<!-- Content -->
</div>
<!-- Mask & flexbox options-->
</div>
<!-- Full Page Intro -->
</header>
';

3f46d7f3e0eb

Source on 18 May 2020

The actual version of those plugins is on Github, but don't use it. You were warned. 

https://github.com/Jimmi08/e107-free-plugins-by-e107sk

Those plugins are used by this site.  

Masthead plugin is available only in the download section on this site. 

Masthead plugin on 16 May 2020

Some examples of how to use it.

The simplified version of JM Element plugin for all future business themes (with big header on homepage)

Very simple admin area.  If I found the main header that needs more fields, it is easy to add it. There will be a new version then. For now, I tested it with all my bootstrap4 themes and it was enough.

10fcb47cbfe6

Just set code (mode) and template. 

17e9f24f8eff

Add needed values. There are prepared shortcodes for 4 titles, 3 images and 3 buttons.

E95b2545d3db

9e9e61b39f98

0ca96948a3fe

There are prepared demo data in the pack, but this content will come with the theme itself. There are examples for templates too, but again, it should be part of the theme.

There is only one global shortcode with 2 parameters: mode and template. If the template is not set, mode name is used.

There is no menu because you should use this shortcode in HTML layout for homepage. If needed, it can be inserted anywhere and with shortcode menu used in Menu manager too.

Some snippets:

How to replace core welcome message in theme:

function sc_wmessage()
{ 
if(e107::isInstalled('masthead')) {
$text = '{MASTHEAD: mode='.$this->sitetheme.'}'; 
$wmessage = e107::getParser()->parseTemplate($text); 
if(e_DEBUG && $wmessage == '' ) { 
e107::getMessage()->addError('{MASTHEAD: mode='.$this->sitetheme.'&template=agency} is empty. Check if record with this code exists');
} 
return $wmessage;
}
return e107::getMessage()->add('Missing plugin!')->render();
}

How to use some background image:

$MASTHEAD_TEMPLATE['creative']['element'] = '
<header class="masthead" style="background-image: url({IMAGE_BG}) ">
<div class="container h-100">
<div class="row h-100 align-items-center justify-content-center text-center" >
<div class="col-lg-10 align-self-end">
<h1 class="text-uppercase text-white font-weight-bold">{MASTHEAD_HEADING}</h1>
<hr class="divider my-4" />
</div>
<div class="col-lg-8 align-self-baseline">
<p class="text-white-75 font-weight-light mb-5">{MASTHEAD_SUBHEADING}</p>
<a class="btn btn-primary btn-xl js-scroll-trigger" href="{BUTTON_LINK}">{BUTTON_TEXT}</a>
</div>
</div>
</div>
</header>';

How to use agency data with different template:

{MASTHEAD: mode=agency2&template=solid}

Warning:  This plugin is no replacement for JM ELements. With JME your options are not limited. This is just a solution for how to create free themes and not be limited with the core.

Where can you download the "old" v1 plugins? on 28 Apr 2020

Sources of old plugins

When you are looking for some old plugin and google searching failed:

1. some of those plugins are still accessible via e107.org and menu 'Get plugins'.

2. you can try to find them via Plugin Manager in your e107 installation.

3. you can look at https://github.com/Jimmi08/e107-old-plugins


The good source for old plugins too:
http://v1.e107hungary.org/download.php

If you have a plugin that is not listed there and you use it, let me know.

If you see something like x_trashed there, it means that plugin functionality was replaced by core or some other plugin.    

Uninstalling a Plugin on 28 Apr 2020

Sources:
book from Theodore Boomer Building Websites with e107

Uninstalling a Plugin

If you don't need a plugin, you should uninstall it. It is a good practice to keep your system as clean as possible to avoid unnecessary slowness. To uninstall a plugin you need to go to the Plugin Manager interface and do the following:

1. Locate the plugin from the Installed plugins section.

2. Select the Uninstall button.

3. The next page that appears is the uninstall interface. Here you will have two options:

Delete plugin tables: This will remove the plugin tables from 

Delete plugin files: This will remove the plugin from the server.

Generally, you can keep the default settings and then select Confirm uninstall.

5. Return to the administrative interface.

6. Select Database

7. Select Optimize SQL database.

Installing a Non-Core Plugin on 28 Apr 2020

Sources:
book from Theodore Boomer Building Websites with e107

Installing a Non-Core Plugin classic way

The first thing you need to do is to go to https://www.e107.org and look over the plugins that are available. Once you have found the one you like, do the following:
1. Download the plugin to your hard drive.
2. Unzip the file.
3. Open your FTP client.
4. Locate the /public_html/e107_plugins/ folder.
5. Upload the unzipped folder to the /public_html/e107_plugins/ folder.
6. Log in as administrator.
7. From the administrative interface select Plugin Manager at the bottom of the screen.
8. A page with plugins will be displayed; select a plugin that you wish to install by clicking on the Install button to the right of each listing.  
9. When you have selected, the plugin will move to the top of the screen in the installed plugins with a small green box to the left of the plugin name.
10. That completes a non-core plugin installation.

 

Installing a Non-Core Plugin with Find plugin option

You can install plugins from e107 repository directly via admin dashboard.

1. Go to Plugin Manager

2. Select Find plugin options

3. Wait for loading all available plugins from e107 repository

4. Search for the needed plugin, check compatibility

5. Click on Download icon on the right side and wait for downloading the plugin

6. Go to Uninstalled plugins and click on the Install button

You should always check plugin.xml file for information about the author and available other sources. 

Introduction to Plugins on 28 Apr 2020

Sources:
book from Theodore Boomer Building Websites with e107

Introduction to Plugins

There are two types of plugins that are available for use with e107. There are core plugins and non-core plugins. The biggest difference between the two types is that core plugins are created by members of the development team and as such are packaged with e107. Non-core plugins are created by other developers who
found a need, developed the plugin, and then uploaded it for others to use. This is one of the greatest assets of open-source software.

The site for all e107 plugins is at https://www.e107.org. This is the official repository; however, I would caution you to go to the developer's website before downloading and installing non-core plugins, as often developers are not quick to post updates to the https://www.e107.org site.

With GitHub and version 2 there are some core plugins (available with the developer GitHub version) that are not packed with the official release.  For example Alternative Authentication, FAQs and maybe others.

Core Plugin Installation on 28 Apr 2020

Sources:
book from Theodore Boomer Building Websites with e107

Core Plugin Installation

This is the easiest type of plugin to install because it is a part of the e107 core package and it is contained within your e107 installation. To install a core plugin you perform the following procedures:
1. Log in as administrator.
2. From the administrator interface select Plugin Manager at the bottom of the screen.
3. A page will be displayed; select the plugin that you wish to install by clicking on the Install button to the right of each listing. (See the screenshot on the next page.)
4. When you have selected, the plugin will move to the top of the screen in the Installed section with a small green box to the left of the plugin name.
5. That completes a core plugin installation.

if e_PLUGIN is used

Check it with any part that use SEF-URL links f.e. /news/   (news.php works)

You need to change:

<a href='".e_PLUGIN."tagcloud/tagcloud.php'>".LAN_TG6."</a>

to

<a href='".e_PLUGIN_ABS."tagcloud/tagcloud.php'>".LAN_TG6."</a>

 After using SEF-URL links for the plugin itself, all links have to be changed.

Tables are not created on 07 Jan 2020

Old plugin.php is used

Check if plugin.php doesn't use TYPE = MYISAM; 

You need to change it to: ENGINE=MyISAM;

For future update check if there are no space before comma like this: VARCHAR( 50 ) NOT NULL ,

it will cause the update needed message or errors with your SQL verification.

How to update old queries on 22 Dec 2019

queries used in old plugins maybe don't work [...]

Quickly way how to fix old queries

Here are combinations about different queries I found in old plugins.  Some time past and I wasn't able to remember how to replace them again. So now I note any combination I find.

$query = @mysql_query("SELECT game_id FROM ".MPREFIX."arcade_favourites WHERE user_id=".USERID."");
$checkfavs = mysql_fetch_assoc($query);

replace:

$sql->gen("...");
$checkfavs = $sql->fetch('assoc');
$sql->mySQLresult = @mysql_query("SELECT ...");
$rows = $sql->db_Rows();

replace:

$rows = $sql->gen("...");
$sql->mySQLresult = @mysql_query("SELECT SUM(duration) as dur FROM ".MPREFIX."arcade_scores WHERE game_id='".$_POST['gameid']."' and user_id = ".$result['user_id']."");
$duration = $sql->db_Fetch();

replace:

$sql->gen("...");
$duration = $sql->fetch();
$sql->mySQLresult = @mysql_query("UPDATE ".MPREFIX."arcade_games SET times_played = times_played   1 WHERE game_id = '".intval($_POST['gameid'])."';");
$sendpm = mysql_query("INSERT INTO ".MPREFIX."private_msg (pm_id, pm_from, pm_to, pm_sent, pm_read, pm_subject, pm_text, pm_sent_del, pm_read_del, pm_attachments, pm_option, pm_size) VALUES('0', '".USERID."', '".$row['user_id']."', '".intval(time())."', '0', 'Arcade Challenge Recieved!', '".$msg."', '1', '0', '', '', '".intval($size)."' ) ");

replace:

$sql->gen("..."); 
$sendpm = $sql->gen("...");
$class = @mysql_query("SELECT * FROM ".MPREFIX."arcade_categories WHERE cat_id='".$row['cat_id']."'");
$class = mysql_fetch_array($class);

replace:

$class = $sql->retrieve("...", "*", true, true);
$sql2 = new db;

replace:

$sql2 = e107::getDb();

This code doesn't work anymore:  

(not $row[0], but the key has to be used)

$sql->db_Select("chatbox2", "MAX(cb2_id)");
$row = $sql->db_Fetch();
echo $row[0];

Replaced: 


$sql->select("chatbox2", "MAX(cb2_id) AS lastId" );
$row = $sql->fetch();
//echo $row[0];
echo $row['lastId'];

The Core plugin for banner advertisements

The banner plugin is part of the core plugins, but you need to install it at first (it was active by default in the older version).

You can add banners to your site 2 ways in version 2 (there was only one way in the older version).

Banner shortcode

This way is limited and it needs be supported by theme (of course, if you use shortcode menus, you can use menu manager)

Examples:

 

Banner menu

Add banner menu to desired menu area and don't forget to set its configuration (otherwise nothing is displayed)

Caption Text displayed as the caption (depends of tablestyle of your menu area)
Campaigns to show in menu You can select one or more campaigns
Number of banners to show Numbers of banner, you would suppose that 1 is the default, no by default all are displayed
Width Banner width; always set it to the width of your banners
How to show the campaigns? How banners are rendered. Without tablestyle, with one or more menus etc.

Creating a Banner Ad Campaign

The banner plugin gives you the option to not only sell banner space for a specific amount of time but also by the number of times a banner has been clicked on (selected) by the viewer.

In banner administration just add a new banner, select campaign. All fields are intuitive, 

Private Messages on 16 Dec 2019

Moved from forum

You need to have plugin Private messages installed.  Go to unistalled plugins and install it. 

Private Messages

Then go to Configuration and set what you need. 

Don't forget to test your PM mail notification. 

Basic configuration:  

Private Messages2

Advanced configuration:

Private Messages3

If anythiing is not clear, just ask.

Forum - rank images on 15 Dec 2019

How to use display rank images in forum

At first, you need to set this in forum preferencies. Using core Rank system is not enough.

5456ed851a0a

The result depends on theme and if it's bootstrap base theme.

Standard for bootstrap theme is:

 


Result:
E8719ec62704

You need to customize forum view template, if you want any different output.



1fee9c4dfcca



7372dbd008ba



526c0c8a9ad1

How to upgrade to version 2.1. on 27 Sep 2019

How to update from 2.0 to 2.1 with theme packs wi[...]

How to update without breaking your existing site
Important.  You don't need to do this if your theme pack still works.  But our demos use this plugin version and if you are switching between more of our themes, you will need the same version of this plugin. 

IMPORTANT.  With the version 2.1.4 you don't need to move options to jmtheme folder and with themes without theme.html it looks in layouts folder. Documentation was updated.

There are 2 main changes in version 2.1:

-  database changes (removed not needed fields and moved important fields from options to separate fields)

-  the solution to work with both theme versions (HTML and PHP layouts).

Normally update would be managed by the plugin itself, but themes should be updated too then. It's not possible if you already customized them.  So now version 2.1 can manage old themes too.

Before update:

-  backup your layouts.  The best way is exporting them as XML file. You can do this 2 ways. In Database/Tools, Export data option and select table jmlayout.  Or directly in plugin by checking all layouts and use batch option Export records.

1d1dbfecfb93

 

Update files:

- upload the new version. It's recommended to delete folder content and upload the new one. 

Ac60e4eeb37a

Go to the admin area:

you should get a notice about the needed update.  It should be run twice times.  The first time database change is done, the second time values are moved. 

244e075277cd

Go to plugin admin area:

You should see the new fields there.

36af8993398d

Your site should work without any problems.

With old themes, you can change header and footer in 2 places. Changing in layout option is deprecated.

Possible issues:

1. neverending update  (it wasn't able to update tables)

Go to Database / Tools, option SQL Verification, check jmtheme plugin and run verify.

7bb3bcccf336

- check result and manually fix visible errors

844a5a42fcbe

- this should correct result:

Bf5247c4326b

2. if you don't see new field columns there

just click on Options and select them manually. Don't forget to press Save button. This happens if you already played with columns layout.

Dd8854add638

3. your header or footer is missing on Frontend. 

This shouldn't happen.  The only case could be if you used your own settings with the wrong file names. 

Just resave layout - edit, select header and footer and save.  

With old themes values from Layouts is used in theme layout, but there should the same value as in configuration.

If any other problem, contact us.

 

Admin menu on 12 Sep 2019

Combination new and old way

How to use new Admin UI just for part of plugin

Old plugins way:

file admin_menu.php

and there something like this:

show_admin_menu(_CLANWARS, $action, $var);

New way:

class clanwars_adminArea extends e_admin_dispatcher
{

...

protected $adminMenu = array(
'main/prefs' => array('caption'=> LAN_PREFS, 'perm' => 'P'), 
);

...

}

If there is useless to override all plugin and you need to replace just some its parts:

in new file: 

add to class clanwars_adminArea

  function renderMenu() {
     
	     include (e_PLUGIN.'efiction/admin_menu.php');
 
	} 

in old admin_menu change e_SELF to file name

$var['Mail']['text'] = _WWARSMAIL;
$var['Mail']['link'] = "admin_old.php?Mail";
$var['Prefs']['text'] = "Prefs";
$var['Prefs']['link'] = "admin_prefs.php";

This way you have the same menu for new and old parts and you can replace old parts by little steps, not everything at once. 

Extending theme with elements on 30 Aug 2019

How to extend theme packed already with elements

 Next text is just shortcut list of needed things to do. It supposes that you know how JM Elements works.

 You can create your own options and your own templates. If you don't want override already existing files, you should create folder custom inside elements and templates folder.

Rules for options are:

- 1. set - default options from plugin itself (folder default in plugin)

- 2. set - theme options from theme (folder elements in theme)

- 3. set - custom theme options from theme (folder elements/custom in theme)

Rules for templates are:

- 1. set - default template from plugin itself (folder templates, file default_template, array name $DEFAULT_TEMPLATE) -  this can be overridden by copying to theme folder. No merging. 

- 2. set  - theme template from theme itself (folder templates/jmelements, file theme_template, array name $THEME_TEMPLATE)

- 3. set - custom theme templates (folder templates/jmelements, file custom_template, array name $CUSTOM_TEMPLATE)

Inside template folders are other template files. They are used for dropdown options for element fields. They can be overridden standard way with theme templates. Prepacked ones are:

textcolour_template 

$TEXTCOLOUR_TEMPLATE[''] = '';
$TEXTCOLOUR_TEMPLATE['text-primary'] = 'text-primary';
$TEXTCOLOUR_TEMPLATE['text-secondary'] = 'text-secondary';
$TEXTCOLOUR_TEMPLATE['text-success'] = 'text-success';
$TEXTCOLOUR_TEMPLATE['text-warning'] = 'text-warning';
$TEXTCOLOUR_TEMPLATE['text-info'] = 'text-info';
$TEXTCOLOUR_TEMPLATE['text-light'] = 'text-light';

It has to be done this way because in the admin area you are able to work only with first key of frontend templates. 

 

Elements with your own theme on 30 Aug 2019

How to use it with your own theme

 Next text is just shortcut list of needed things to do. It supposes that you know how JM Elements works.

1. you have a theme without elements

2. install plugin

3. if you have installed elements from other theme, backup them and delete them (if you don't want to try them and you are creating your own ones)

4. create folder elements inside theme folder (for your own options files. otherwise you can use default ones)

5. create jmelements folder inside template folder with file theme_templates.php.  Create there at least one template key $THEME_TEMPLATE['yourkey']

6. add new element in admin area, set key (mode), select data set (option file) and template (template key)

7. test shortcode and play with the template. It's all

 

      >>  

Other links

Follow us