Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

V4.6.0.tables2views #4

Open
wants to merge 29 commits into
base: v4.6.0
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
9d1c3e4
fix mistake with Undefined variable
dshovchko Dec 29, 2016
4b0aab4
remove creation of temporary tables and change form element
dshovchko Jan 23, 2017
4c018a2
work with views while cloning and deleting rendition(s)
dshovchko Jan 23, 2017
fee94fd
change check and generation lang views from upgrade script
dshovchko Jan 24, 2017
14b420c
change add/del views on setup/cleanup MLP and on any changes made to …
dshovchko Jan 24, 2017
9be03f7
clean from commented out code
dshovchko Jan 25, 2017
ff52b48
remove all operations on rendition tables: insert/update/delete/alter
dshovchko Jan 25, 2017
6ff7b0e
update MLP Kickstart
dshovchko Jan 25, 2017
1d735a7
Get l10n.php from origin branch. Fix undefined array index l10n_l10n-…
dshovchko Feb 23, 2017
5fc66ff
fix incorrect layout in MPL setup
dshovchko Mar 10, 2017
bb3f4c7
fix form editing section
dshovchko Mar 14, 2017
4000185
fix form editing category
dshovchko Mar 15, 2017
185e9a5
refactor code _l10n_section_paint()
dshovchko Mar 15, 2017
1be85a7
fix form editing link
dshovchko Mar 15, 2017
5c94fa9
fix form editing file
dshovchko Mar 15, 2017
9342862
fix form editing image
dshovchko Mar 16, 2017
ace3f82
add check result row in _l10n_file_paint
dshovchko Mar 16, 2017
f29b0ee
add check result row in _l10n_category_paint
dshovchko Mar 16, 2017
1b24e98
set correct lang direction markup
dshovchko Mar 16, 2017
f35ae20
fix zem_contact_lang-mlp plugin
dshovchko Mar 16, 2017
61733c5
improve inject rss lang markers
dshovchko Mar 16, 2017
39301b9
improve inject html lang markers
dshovchko Mar 16, 2017
dab1099
remove the entry about resync problem (it fixed)
dshovchko Mar 16, 2017
af9a6de
remove check result row in _l10n_category_paint
dshovchko Apr 7, 2017
78731d6
remove check result row in _l10n_category_paint
dshovchko Apr 7, 2017
19b19dd
remove check result row in _l10n_image_paint
dshovchko Apr 7, 2017
24742cf
remove check result row in _l10n_link_paint
dshovchko Apr 7, 2017
84a1c0d
fix incompatibility with php 7.1 in _l10n_build_sql_set()
dshovchko Aug 31, 2017
bf66f4a
fix 'show per page' button on page of renditions table list
dshovchko Oct 21, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 0 additions & 11 deletions KNOWN_ISSUES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,3 @@ MLP KNOWN ISSUES
* If using the 'Power users can change a rendition's language or article'
feature, if you change a rendition's language or article ID then the 'View'
link will not be updated until you reload the article.

* Older version of MLP sometimes lost track of changes to the textpattern
table made by other plugins such as glz_custom_fields. This manifests
itself when you save a rendition and the changes are reflected in the
admin side but _not_ in the public site. To fix this, find any plugin that
modifies the textpattern table and force it to make a change to the table.
For example, with glz_custom_fields, visit Extensions->Custom Fields and
either change an existing field's type, or create a new field. Make sure
you save the changes and then visit another admin panel which causes MLP
to resync the tables. You can then change your edited custom field back
the way it was, if you wish.
7 changes: 3 additions & 4 deletions plugins/sources/gbp_admin_library.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
// 1 = Plugin help is in raw HTML. Not recommended.
# $plugin['allow_html_help'] = 1;

$plugin['version'] = '4.6.0.20160216';
$plugin['version'] = '4.6.2.20170310';
$plugin['author'] = 'Graeme Porteous';
$plugin['author_uri'] = '';
$plugin['description'] = 'GBP Admin-Side Library';
Expand Down Expand Up @@ -416,7 +416,7 @@ public function render_tabs () {
}

$out[] = '</p>';
$out[] = '</div><div>';
$out[] = '</div><div class="clear">';

echo join('', $out);
}
Expand Down Expand Up @@ -484,8 +484,7 @@ public function url ($vars = array(), $gp = false) {
$out[] = $key.'='.urlencode($value);
}

$script = hu.basename(txpath).'/index.php';
return $script . (isset($out)
return (isset($out)
? '?'.join('&', $out)
: '');
}
Expand Down
38 changes: 33 additions & 5 deletions plugins/sources/l10n.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@
// 1 = Plugin help is in raw HTML. Not recommended.
# $plugin['allow_html_help'] = 1;

$plugin['version'] = '4.6.0.20160216';
$plugin['author'] = 'Graeme Porteous, Steve Dickinson, Stef Dawson';
$plugin['author_uri'] = 'http://txp-plugins.netcarving.com/plugins/mlp-plugin';
$plugin['version'] = '4.6.2.20170316';
$plugin['author'] = 'Graeme Porteous, Steve Dickinson, Stef Dawson, Dmitry Shovchko';
$plugin['author_uri'] = 'https://github.com/Bloke/MLP';
$plugin['description'] = 'Multi-Lingual Publishing Package.';

// Plugin load order:
Expand Down Expand Up @@ -542,7 +542,7 @@ function _l10n_textpattern_comment_submit()
# The REQUEST_URI has to be maintained to ensure comments work and compatibility with
# plugins...
#
if ($prefs['l10n_l10n-url_default_lang_marker'] === '1' || isset($_SESSION['l10n_request_uri']))
if ((isset($prefs['l10n_l10n-url_default_lang_marker']) && $prefs['l10n_l10n-url_default_lang_marker'] === '1') || isset($_SESSION['l10n_request_uri']))
{
if (isset($_SESSION['l10n_request_uri'])) {
$pretext['request_uri'] = $_SERVER['REQUEST_URI'] = $_SESSION['l10n_request_uri'];
Expand Down Expand Up @@ -721,7 +721,7 @@ function _l10n_inject_lang_markers_cb( $matches )
$default_lang_long = $site_langs[0];
$default_lang_short = substr( $default_lang_long , 0 , 2 );

if ( $prefs['l10n_l10n-url_default_lang_marker'] === '1' || ($callback_language_marker !== $default_lang_short) )
if ( (isset($prefs['l10n_l10n-url_default_lang_marker']) && $prefs['l10n_l10n-url_default_lang_marker'] === '1') || ($callback_language_marker !== $default_lang_short) )
{
$result = $l10n_replace_strings['start_rep'].$matches[1].'/'.$callback_language_marker.$extra.$matches[2].$l10n_replace_strings['stop_rep'];
}
Expand All @@ -746,6 +746,16 @@ function _l10n_inject_rss_lang_markers( $buffer )
_l10n_make_exclusion_list();

global $l10n_replace_strings;

# Insert the language code into all permlinks...
$l10n_replace_strings['start'] = ' href=["|\']';
$l10n_replace_strings['start_rep'] = ' href="';
$l10n_replace_strings['stop'] = '["|\']';
$l10n_replace_strings['stop_rep'] = '"';
$l10n_replace_strings['insert_blank'] = true;
$pattern1 = _l10n_make_pattern();
$buffer = _l10n_preg_replace_callback( $pattern1 , '_l10n_inject_lang_markers_cb' , $buffer );

$l10n_replace_strings['start'] = $l10n_replace_strings['start_rep'] = '<link>';
$l10n_replace_strings['stop'] = $l10n_replace_strings['stop_rep'] = '</link>';
$l10n_replace_strings['insert_blank'] = true;
Expand Down Expand Up @@ -845,6 +855,24 @@ function _l10n_inject_lang_markers( $buffer )
$pattern2 = _l10n_make_pattern();
$buffer = _l10n_preg_replace_callback( $pattern2 , '_l10n_inject_lang_markers_cb' , $buffer );

$l10n_replace_strings['start'] = $l10n_replace_strings['start_rep'] = '<loc>';
$l10n_replace_strings['stop'] = $l10n_replace_strings['stop_rep'] = '</loc>';
$l10n_replace_strings['insert_blank'] = false;
$pattern3 = _l10n_make_pattern();
$buffer = _l10n_preg_replace_callback( $pattern3 , '_l10n_inject_lang_markers_cb' , $buffer );

$l10n_replace_strings['start'] = $l10n_replace_strings['start_rep'] = '<link>';
$l10n_replace_strings['stop'] = $l10n_replace_strings['stop_rep'] = '</link>';
$l10n_replace_strings['insert_blank'] = false;
$pattern4 = _l10n_make_pattern();
$buffer = _l10n_preg_replace_callback( $pattern4 , '_l10n_inject_lang_markers_cb' , $buffer );

$l10n_replace_strings['start'] = $l10n_replace_strings['start_rep'] = '<guid>';
$l10n_replace_strings['stop'] = $l10n_replace_strings['stop_rep'] = '</guid>';
$l10n_replace_strings['insert_blank'] = false;
$pattern5 = _l10n_make_pattern();
$buffer = _l10n_preg_replace_callback( $pattern5 , '_l10n_inject_lang_markers_cb' , $buffer );

if (0) #debug
$buffer = 'Exclusions... :' . join( ', ' , $l10n_url_exclusions ) . $buffer;

Expand Down
80 changes: 71 additions & 9 deletions plugins/sources/zem_contact_lang-mlp.php
Original file line number Diff line number Diff line change
@@ -1,13 +1,74 @@
<?php

$plugin['name'] = 'zem_contact_lang-mlp';
$plugin['version'] = '4.0.3.6-MLP';
$plugin['author'] = 'Netcarver & the TXP Community';
$plugin['author_uri'] = 'http://forum.textpattern.com/viewtopic.php?id=12956';
$plugin['description'] = 'MLP strings plug-in for Zem Contact Reborn';
$plugin['type'] = 0;

@include_once('../zem_tpl.php');
// This is a PLUGIN TEMPLATE for Textpattern CMS.

// Copy this file to a new name like abc_myplugin.php. Edit the code, then
// run this file at the command line to produce a plugin for distribution:
// $ php abc_myplugin.php > abc_myplugin-0.1.txt

// Plugin name is optional. If unset, it will be extracted from the current
// file name. Plugin names should start with a three letter prefix which is
// unique and reserved for each plugin author ("abc" is just an example).
// Uncomment and edit this line to override:
$plugin['name'] = 'zem_contact_lang-mlp';

// Allow raw HTML help, as opposed to Textile.
// 0 = Plugin help is in Textile format, no raw HTML allowed (default).
// 1 = Plugin help is in raw HTML. Not recommended.
# $plugin['allow_html_help'] = 1;

$plugin['version'] = '4.6.2.20170316';
$plugin['author'] = 'Netcarver & the TXP Community';
$plugin['author_uri'] = 'http://forum.textpattern.com/viewtopic.php?id=12956';
$plugin['description'] = 'MLP strings plug-in for Zem Contact Reborn';

// Plugin load order:
// The default value of 5 would fit most plugins, while for instance comment
// spam evaluators or URL redirectors would probably want to run earlier
// (1...4) to prepare the environment for everything else that follows.
// Values 6...9 should be considered for plugins which would work late.
// This order is user-overrideable.
$plugin['order'] = '0';

// Plugin 'type' defines where the plugin is loaded
// 0 = public : only on the public side of the website (default)
// 1 = public+admin : on both the public and admin side
// 2 = library : only when include_plugin() or require_plugin() is called
// 3 = admin : only on the admin side (no AJAX)
// 4 = admin+ajax : only on the admin side (AJAX supported)
// 5 = public+admin+ajax : on both the public and admin side (AJAX supported)
$plugin['type'] = '0';

// Plugin "flags" signal the presence of optional capabilities to the core plugin loader.
// Use an appropriately OR-ed combination of these flags.
// The four high-order bits 0xf000 are available for this plugin's private use
if (!defined('PLUGIN_HAS_PREFS')) define('PLUGIN_HAS_PREFS', 0x0001); // This plugin wants to receive "plugin_prefs.{$plugin['name']}" events
if (!defined('PLUGIN_LIFECYCLE_NOTIFY')) define('PLUGIN_LIFECYCLE_NOTIFY', 0x0002); // This plugin wants to receive "plugin_lifecycle.{$plugin['name']}" events

$plugin['flags'] = '0';

// Plugin 'textpack' is optional. It provides i18n strings to be used in conjunction with gTxt().
// Syntax:
// ## arbitrary comment
// #@event
// #@language ISO-LANGUAGE-CODE
// abc_string_name => Localized String

/** Uncomment me, if you need a textpack
$plugin['textpack'] = <<< EOT
#@admin
#@language en-gb
abc_sample_string => Sample String
abc_one_more => One more
#@language de-de
abc_sample_string => Beispieltext
abc_one_more => Noch einer
EOT;
**/
// End of textpack

if (!defined('txpinterface'))
@include_once('zem_tpl.php');

# --- BEGIN PLUGIN CODE ---
#
Expand Down Expand Up @@ -59,7 +120,8 @@
# Register the callback for the enumerate string event.
# If the MLP pack is not present and active this will NOT get called.
#
register_callback( 'zem_crl_enumerate_strings' , 'l10n.enumerate_strings' );
if (defined('txpinterface'))
register_callback( 'zem_crl_enumerate_strings' , 'l10n.enumerate_strings' );

#
# Here's a callback routine used to register the above strings with
Expand Down
2 changes: 1 addition & 1 deletion textpattern/l10n.css
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ l10n styles for other tabs...

.l10n_values_list { float: right; width: 50%; }
.l10n_string_list { float: left; width: 25%; }
.l10n_subtab { padding: 0 30px; }
.l10n_subtab { padding: 0 30px; clear:both; }
.l10n_list { float: left; width: 50%; }
.l10n_edit { float: right; width: 50%; }
.l10n_owner_list { float: left; width: 20%; }
Expand Down
Loading