Skip to content

Commit

Permalink
Merge pull request #2 from xoopscube/xcl-pico
Browse files Browse the repository at this point in the history
Pico version 2.4.2.1
  • Loading branch information
gigamaster authored Dec 21, 2022
2 parents 770bc65 + 40637a7 commit ee0c37c
Show file tree
Hide file tree
Showing 10 changed files with 284 additions and 927 deletions.
206 changes: 23 additions & 183 deletions html/modules/pico/language/english/help/help.html

Large diffs are not rendered by default.

206 changes: 23 additions & 183 deletions html/modules/pico/language/fr_utf8/help/help.html

Large diffs are not rendered by default.

206 changes: 23 additions & 183 deletions html/modules/pico/language/ja_utf8/help/help.html

Large diffs are not rendered by default.

206 changes: 23 additions & 183 deletions html/modules/pico/language/pt_utf8/help/help.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion xoops_trust_path/modules/pico/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
$langman->read( 'admin.php', $mydirname, $mytrustdirname );
$langman->read( 'main.php', $mydirname, $mytrustdirname );

// fork each pages of this module
// fork each page of this module
$page = preg_replace( '/[^a-zA-Z0-9_-]/', '', @$_GET['page'] );

if ( file_exists( "$mytrustdirpath/admin/$page.php" ) ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,14 @@ public function getHtmlHeader(): string {
public function exitFileNotFound(): void {
$error404 = $this->mod_config['err_document_404'];
if ( ! empty( $error404 ) ) {
$error404 = preg_replace( '#^xoops_root_path#i', XOOPS_ROOT_PATH, $error404 );
$error404 = preg_replace( '#^xoops_trust_path#i', XOOPS_TRUST_PATH, $error404 );
$error404 = preg_replace( '#^root_path#i', XOOPS_ROOT_PATH, $error404 );
$error404 = preg_replace( '#^trust_path#i', XOOPS_TRUST_PATH, $error404 );
}
if ( $error404 && is_readable( $error404 ) ) {
header( 'HTTP/1.0 404 Not Found' );
// Note
// Do not mix the use of http_response_code() and manually setting the response code header to avoid unexpected status code
// header( 'HTTP/1.0 404 Not Found' );
http_response_code(404);
readfile( $error404 );
} else {
redirect_header( XOOPS_URL . "/modules/$this->mydirname/index.php", 2, _MD_PICO_ERR_READCONTENT );
Expand Down
32 changes: 16 additions & 16 deletions xoops_trust_path/modules/pico/language/english/main.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,24 +147,24 @@
define( '_MD_PICO_ERR_NOCONTENTMATCHED' , 'The requested content or resource is not available.');

// filters
define( '_MD_PICO_FILTERS_EVALTITLE' , 'php code');
define( '_MD_PICO_FILTERS_EVALDESC' , 'It will be the parameter of eval() function');
define( '_MD_PICO_FILTERS_EVALTITLE' , 'PHP code');
define( '_MD_PICO_FILTERS_EVALDESC' , 'Evaluate the given code with eval() function.');
define( '_MD_PICO_FILTERS_HTMLSPECIALCHARSTITLE' , 'HTML special character escape');
define( '_MD_PICO_FILTERS_HTMLSPECIALCHARSDESC' , 'If you want to use BBCode etc. also, set it the first place.');
define( '_MD_PICO_FILTERS_TEXTWIKITITLE' , 'PEAR TextWiki <a href="https://wiki.ciaweb.net/yawiki/index.php?area=Text_Wiki&amp;page=SamplePage" target="_blank">Sample</a>');
define( '_MD_PICO_FILTERS_TEXTWIKIDESC' , 'Rendered by TextWiki rule');
define( '_MD_PICO_FILTERS_XOOPSTPLTITLE' , 'Smarty(XoopsTpl)');
define( '_MD_PICO_FILTERS_XOOPSTPLDESC' , 'Rendered as a Smarty template');
define( '_MD_PICO_FILTERS_NL2BRTITLE' , 'Auto new line');
define( '_MD_PICO_FILTERS_NL2BRDESC' , 'LF will be replaced into &lt;br /&gt;');
define( '_MD_PICO_FILTERS_HTMLSPECIALCHARSDESC' , 'Set this filter in first place for BBCode etc.');
define( '_MD_PICO_FILTERS_TEXTWIKITITLE' , 'PEAR TextWiki ');
define( '_MD_PICO_FILTERS_TEXTWIKIDESC' , 'Rendered with TextWiki rules');
define( '_MD_PICO_FILTERS_XOOPSTPLTITLE' , 'Smarty Renderer');
define( '_MD_PICO_FILTERS_XOOPSTPLDESC' , 'Enable Smarty template constants and variables.');
define( '_MD_PICO_FILTERS_NL2BRTITLE' , 'Automatically create and replace line-break');
define( '_MD_PICO_FILTERS_NL2BRDESC' , 'Replace line break LF with &lt;br /&gt;');
define( '_MD_PICO_FILTERS_SMILEYTITLE' , 'Smiley');
define( '_MD_PICO_FILTERS_SMILEYDESC' , ':-) :-D etc.');
define( '_MD_PICO_FILTERS_SMILEYDESC' , 'Convert character :-) combinations into emoticons.');
define( '_MD_PICO_FILTERS_XCODETITLE' , 'BBCode');
define( '_MD_PICO_FILTERS_XCODEDESC' , 'Auto link and BBCode will be enabled');
define( '_MD_PICO_FILTERS_WRAPSTITLE' , 'Page wraps (note: displays the file specified in the virtual path)');
define( '_MD_PICO_FILTERS_WRAPSDESC' , 'The target file is XOOPS_TRUST_PATH/wraps/(dirname)/file (same as wraps)');
define( '_MD_PICO_FILTERS_XOOPSTSTITLE' , 'Editor default filter (smiley, xcode , img, br)');
define( '_MD_PICO_FILTERS_XOOPSTSDESC' , 'Use default text filter, enabled smiley, xcode , img & br');
define( '_MD_PICO_FILTERS_XCODEDESC' , 'Automatically generates hyperlinks');
define( '_MD_PICO_FILTERS_WRAPSTITLE' , 'Page [wraps]');
define( '_MD_PICO_FILTERS_WRAPSDESC' , 'Displays the file specified in virtual path');
define( '_MD_PICO_FILTERS_XOOPSTSTITLE' , 'Editor default filter');
define( '_MD_PICO_FILTERS_XOOPSTSDESC' , 'Enable text filter, smiley, xcode, img and br');


// permissions
Expand All @@ -183,7 +183,7 @@
@define( '_ALIGN_START', _ADM_USE_RTL ? 'right' : 'left' );
@define( '_ALIGN_END', _ADM_USE_RTL ? 'left' : 'right' );
} else {
@define( '_ALIGN_START', 'left' ); // change it right for RTL
@define( '_ALIGN_START', 'left' ); // change it right for RTL TODO error on PHP7->PHP8
@define( '_ALIGN_END', 'right' ); // change it left for RTL
}

Expand Down
84 changes: 42 additions & 42 deletions xoops_trust_path/modules/pico/language/english/modinfo.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,67 +27,67 @@
define( $constpref . '_ADMENU_MYPREFERENCES', 'Preferences' );

// configurations
define( $constpref . '_USE_WRAPSMODE', 'Enable wraps mode. All content should be wrapped in a div' );
define( $constpref . '_USE_WRAPSMODE', 'Enable wraps mode. <br>Note: it is recommend to use a div wrapper for the content.' );
define( $constpref . '_ERR_DOCUMENT_404', 'Custom page for error : 404 Not Found ' );
define( $constpref . '_ERR_DOCUMENT_404DSC', 'Example: <b>xoops_root_path/404.html</b> redirects to public root path <b>' . XOOPS_ROOT_PATH . '/404.html</b> and<br> <b>xoops_trust_path/404.html</b> redirects to trust path <b>' . XOOPS_TRUST_PATH . '/404.html</b>' );
define( $constpref . '_ERR_DOCUMENT_404DSC', 'Example: <b>root_path/404.html</b> redirects to public root path <br><i>' . XOOPS_ROOT_PATH . '/404.html</i> <br><b>trust_path/404.html</b> redirects to trust path<br><i>' . XOOPS_TRUST_PATH . '/404.html</i>' );
define( $constpref . '_USE_REWRITE', 'Enable mod_rewrite' );
define( $constpref . '_USE_REWRITEDSC', 'Rename .htaccess.rewrite_wraps (with wraps) or htaccess.rewrite_normal (without wraps) to .htaccess under XOOPS_ROOT_PATH/modules/(dirname)/' );
define( $constpref . '_WRAPSAUTOREGIST', 'Enable auto-registering HTML wrapped files into DB as contents' );
define( $constpref . '_USE_REWRITEDSC', 'Rename .htaccess under public_html/modules/(dirname)/<br>Default: <i>htaccess.rewrite_normal</i><br>Wraps: <i>htaccess.rewrite_wraps</i>' );
define( $constpref . '_WRAPSAUTOREGIST', 'Enable auto-save HTML wrapped files in the database as contents' );
define( $constpref . '_AUTOREGISTCLASS', 'Class name to register/unregister HTML wrapped files' );
define( $constpref . '_TOP_MESSAGE', 'Description of TOP category' );
define( $constpref . '_TOP_MESSAGE', 'Description of TOP category [ html ]' );
define( $constpref . '_TOP_MESSAGEDEFAULT', '' );
define( $constpref . '_MENUINMODULETOP', 'Display menu (index) in the top of this module' );
define( $constpref . '_LISTASINDEX', "Display table of contents (TOC) or custom page" );
define( $constpref . '_LISTASINDEXDSC', 'YES - a table of contents (TOC) is auto-generated and displayed on the main page.<br> NO - the content with the highest priority (order, weight) is displayed instead of TOC.' );
define( $constpref . '_SHOW_BREADCRUMBS', 'Display the breadcrumbs' );
define( $constpref . '_SHOW_RSS', 'Display link RSS' );
define( $constpref . '_SHOW_PAGENAVI', 'Display the page navigation' );
define( $constpref . '_SHOW_PRINTICON', 'Display the printer friendly icon' );
define( $constpref . '_SHOW_TELLAFRIEND', 'Display tell a friend icon' );
define( $constpref . '_SHOW_BREADCRUMBS', 'Enable breadcrumbs' );
define( $constpref . '_SHOW_RSS', 'Enable RSS' );
define( $constpref . '_SHOW_PAGENAVI', 'Enable page navigation' );
define( $constpref . '_SHOW_PRINTICON', 'Enable printer friendly icon' );
define( $constpref . '_SHOW_TELLAFRIEND', 'Enable tell a friend icon' );
define( $constpref . '_SEARCHBYUID', 'Enable the concept of authorship' );
define( $constpref . '_SEARCHBYUIDDSC', 'Publications are listed in user profile. This option can be turned off for static content.' );
define( $constpref . '_USE_TAFMODULE', 'Use the module "tellafriend".' );
define( $constpref . '_USE_TAFMODULE', 'Use the module "tellafriend".<br>Please refer to X-Update Manager for download and deploy.' );
define( $constpref . '_FILTERS', 'Default filter set' );
define( $constpref . '_FILTERSDSC', 'Specified filter names separated by "|" (pipe). Example: xcode|smiley|nl2br|textwiki' );
define( $constpref . '_FILTERSDSC', 'Specify filter names separated by pipe "|". Example : xcode|smiley|nl2br|textwiki' );
define( $constpref . '_FILTERSDEFAULT', '' );
define( $constpref . '_FILTERSF', 'Forced filters' );
define( $constpref . '_FILTERSFDSC', 'input filter names separated with ,(comma). filter:LAST means the filter is passed in the last phase. The other filters are passed in the first phase.' );
define( $constpref . '_FILTERSFDSC', 'Specify filter names separated with comma ","<br>filter:LAST means all other filters have higher priority.' );
define( $constpref . '_FILTERSP', 'Prohibited filters' );
define( $constpref . '_FILTERSPDSC', 'Select filter names separated with ,(comma).' );
define( $constpref . '_SUBMENU_SC', 'Show contents in submenu' );
define( $constpref . '_SUBMENU_SCDSC', 'In the default mode, only the categories are displayed. If you activate this function, the content marked "menu" will also be displayed.' );
define( $constpref . '_SITEMAP_SC', 'Display the content in the sitemap module' );
define( $constpref . '_USE_VOTE', 'Use the VOTE function' );
define( $constpref . '_GUESTVOTE_IVL', 'Vote from guests' );
define( $constpref . '_GUESTVOTE_IVLDSC', 'Set this value to 0, to disable guest voting. Any other number refers to the time (sec.) needed to allow a second message from the same IP.' );
define( $constpref . '_HTMLHEADER', 'Common HTML header' );
define( $constpref . '_ALLOWEACHHEAD', 'Allow custom HTML header (CSS, JS) for each content' );
define( $constpref . '_CSS_URI', 'URI of CSS file for this module' );
define( $constpref . '_CSS_URIDSC', 'a relative or absolute path can be defined. Default value: {mod_url}/index.php?page=main_css' );
define( $constpref . '_FILTERSPDSC', 'Specify filter names separated with comma ","' );
define( $constpref . '_SUBMENU_SC', 'Enable contents in submenu' );
define( $constpref . '_SUBMENU_SCDSC', 'Default mode only displays the categories. This feature displays all content marked "menu".' );
define( $constpref . '_SITEMAP_SC', 'Enable content in Sitemap module' );
define( $constpref . '_USE_VOTE', 'Enable Voting feature' );
define( $constpref . '_GUESTVOTE_IVL', 'Enable Voting from guests' );
define( $constpref . '_GUESTVOTE_IVLDSC', 'Allow votes from the same IP with required delay in seconds. Disable with value set to 0. Default value: 86400' );
define( $constpref . '_HTMLHEADER', 'Common HTML header [ CSS, JS ]' );
define( $constpref . '_ALLOWEACHHEAD', 'Enable custom HTML header for each content' );
define( $constpref . '_CSS_URI', 'CSS file for this module' );
define( $constpref . '_CSS_URIDSC', 'Relative or absolute path can be defined. Default value : {mod_url}/index.php?page=main_css' );
define( $constpref . '_IMAGES_DIR', 'Directory for image files' );
define( $constpref . '_IMAGES_DIRDSC', 'the relative path should be defined in the module directory. Default value : images' );
define( $constpref . '_BODY_EDITOR', 'WYSIWYG HTML editor to simplify the content creation' );
define( $constpref . '_IMAGES_DIRDSC', 'Relative path to module in the public directory e.g. dirname/images. Default value : images' );
define( $constpref . '_BODY_EDITOR', 'WYSIWYG HTML editor to simplify content creation' );
define( $constpref . '_HTMLPR_EXCEPT', 'Select Trusted Users Groups.' );
define( $constpref . '_HTMLPR_EXCEPTDSC', 'HTML sanitization with HTMLPurifier to secure against XSS attacks.' );
define( $constpref . '_HISTORY_P_C', 'How many revisions are stored in DB' );
define( $constpref . '_MLT_HISTORY', 'Minimum lifetime of each revisions (sec)' );
define( $constpref . '_BRCACHE', 'Cache life time for image files (only with wraps mode)' );
define( $constpref . '_BRCACHEDSC', 'Files other than HTML will be cached by web browser in this second (0 means disabled)' );
define( $constpref . '_EF_CLASS', 'class for extra_fields' );
define( $constpref . '_EF_CLASSDSC', 'Override the handler for extra_fields. The default value is PicoExtraFields' );
define( $constpref . '_URIM_CLASS', 'class mapping URI' );
define( $constpref . '_URIM_CLASSDSC', 'Override the URI mapper. The default value is PicoUriMapper' );
define( $constpref . '_EFIMAGES_DIR', 'directory for extra_fields' );
define( $constpref . '_EFIMAGES_DIRDSC', 'set relative path from XOOPS_ROOT_PATH. Create and chmod 777 the directory first. default) uploads/(module dirname)' );
define( $constpref . '_EFIMAGES_SIZE', 'pixels for extra images' );
define( $constpref . '_EFIMAGES_SIZEDSC', '(main_width)x(main_height) (small_width)x(small_height) default) 480x480 150x150' );
define( $constpref . '_HISTORY_P_C', 'Document Version Control - How many revisions are stored in database. Default value: 4' );
define( $constpref . '_MLT_HISTORY', 'Document Version Control - Minimum lifetime for each revision. Default value in seconds: 300 ' );
define( $constpref . '_BRCACHE', 'Cache lifetime for image files (only with wraps mode)' );
define( $constpref . '_BRCACHEDSC', 'Files other than HTML are cached by the web browser. Default value in seconds (60 minutes): 3600<br>PageSpeed Insights recommend a minimum cache time of one week and preferably up to one year for static assets.' );
define( $constpref . '_EF_CLASS', 'Class for extra_fields' );
define( $constpref . '_EF_CLASSDSC', 'Developers can override the class name and method name parameters of the handler for extra_fields. The default value is PicoExtraFields' );
define( $constpref . '_URIM_CLASS', 'Class mapping URI' );
define( $constpref . '_URIM_CLASSDSC', 'Developers can override the URI mapper. The default value is PicoUriMapper' );
define( $constpref . '_EFIMAGES_DIR', 'Directory for extra_fields' );
define( $constpref . '_EFIMAGES_DIRDSC', 'Relative path to the public directory e.g. public_html/.<br>First, create and chmod 777 the directory. Default value: uploads/dirname' );
define( $constpref . '_EFIMAGES_SIZE', 'Pixels for extra images' );
define( $constpref . '_EFIMAGES_SIZEDSC', 'main_width x main_height small_width x small_height. Default value: 480x480 150x150' );
define( $constpref . '_IMAGICK_PATH', 'Path for ImageMagick binaries' );
define( $constpref . '_IMAGICK_PATHDSC', 'Leave blank normal, or set it like /usr/X11R6/bin/' );
define( $constpref . '_IMAGICK_PATHDSC', 'Leave blank, or set it like /usr/X11R6/bin/' );
define( $constpref . '_COM_DIRNAME', 'Comment-integration: dirname of d3forum' );
define( $constpref . '_COM_FORUM_ID', 'Comment-integration: forum ID' );
define( $constpref . '_COM_VIEW', 'View of comment-integration' );
define( $constpref . '_COM_ORDER', 'Order of comment-integration' );
define( $constpref . '_COM_POSTSNUM', 'Max posts displayed in comment-integration' );
define( $constpref . '_COM_VIEW', 'Comment-integration : View' );
define( $constpref . '_COM_ORDER', 'Comment-integration : Order' );
define( $constpref . '_COM_POSTSNUM', 'Comment-integration : Maximum number of comments per page' );

// blocks
define( $constpref . '_BNAME_MENU', 'Menu' );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,11 @@ <h5>
<{else}>
<{assign var=check value=1}>
<{/if}>
<label aria-label="<{$filter.desc}>" class="grid-2">

<label aria-label="filter_enabled_<{$filter_name}>" class="grid-right">
<span>
<input type="checkbox" name="filter_enabled_<{$filter_name}>" id="filter_enabled_<{$filter_name}>" value="1" <{if $filter.enabled && $check}>checked="checked"<{/if}> <{if $filter.fixed}>disabled="disabled"<{/if}>>
<{$filter.title}>
<{$filter.title}> <br><small><{$filter.desc}></small>
</span>
<span>
<input type="number" size="3" min="0" max="100" step="1" name="filter_weight_<{$filter_name}>" id="filter_weight_<{$filter_name}>" value="<{$filter.weight}>" class="pico_number_only" aria-label="Max 100">
Expand Down Expand Up @@ -436,7 +437,7 @@ <h5>
<{/if}>

<{if $category.isadminormod}>
<h4><{$smarty.const._MD_PICO_EXPIRING}></h4>
<h5><{$smarty.const._MD_PICO_EXPIRING}></h5>
<{if $content.specify_expiring_time}>
<{assign var="specify_expiring_time_checked" value="checked='checked'"}>
<{else}>
Expand Down
Loading

0 comments on commit ee0c37c

Please sign in to comment.