1
andrey3761
Re: TinyMCE v4 pour XOOPS

Unpack the archive into a folder /class/xoopseditor/tinymce4/external_plugins/

edit the file /class/xoopseditor/tinymce4/tinymce.php
Find the line (326)
le="color: #000000"><?php $ret .= '"xoops_tagextgal": "'.$chemin_path.'/class/xoopseditor/tinymce4/external_plugins/xoops_tagextgal/plugin.min.js",';

Add afterwards
le="color: #000000"><?php $ret .= '"codemirror": "'.$chemin_path.'/class/xoopseditor/tinymce4/external_plugins/codemirror/plugin.min.js",';


Find the line (330)
le="color: #000000"><?php $ret .= '},';

Add afterwards
le="color: #000000"><?php $ret .= 'codemirror: { indentOnInit: true, path: "CodeMirror", config: { mode: "application/x-httpd-php", lineNumbers: false }, jsFiles: [ "mode/clike/clike.js", "mode/php/php.js" ] },';


Enjoy!



2
andrey3761
Re: Bug in xoops_getModuleOption()

Hi Mamba!
I submit an bug report.
https://sourceforge.net/p/xoops/bugs/1291/



3
andrey3761
Bug in xoops_getModuleOption()

I found an error in the function xoops_getModuleOption().
The module MYMODULE1 configuration is IMGDIR.
The module MYMODULE2 configuration is IMGDIR.
The names of the modules are the same configurations.
If both call functions
$conf1 = xoops_getModuleOption( 'IMGDIR', 'MYMODULE1' );
$conf2 = xoops_getModuleOption( 'IMGDIR', 'MYMODULE2' );
then the last call will return the configuration of the first module
I corrected this error. The code below:
le="color: #000000"><?php function xoops_getModuleOption($option, $dirname = '') { static $modOptions = array(); if (is_array($modOptions) && isset($modOptions[$dirname][$option])) { return $modOptions[$dirname][$option]; } $ret = false; $module_handler =& xoops_gethandler('module'); $module =& $module_handler->getByDirname($dirname); $config_handler =& xoops_gethandler('config'); if (is_object($module)) { $moduleConfig =& $config_handler->getConfigsByCat(0, $module->getVar('mid')); if (isset($moduleConfig[$option])) { $ret = $moduleConfig[$option]; } } $modOptions[$dirname][$option] = $ret; return $ret; }



4
andrey3761
Re: bbcode and tinymce

hello

File:
/class/module.textsanitizer.php

Find
le="color: #000000"><?php $patterns[] = "/[color=(['"]?)([a-zA-Z0-9]*)\1](.*)[/color]/sU"; $replacements[] = '<span style="color: #\2;">\3</span>';


Replace

le="color: #000000"><?php $patterns[] = "/[color=#?(['"]?)([a-zA-Z0-9]*)\1](.*)[/color]/sU"; $replacements[] = '<span style="color: #\2;">\3</span>';



5
andrey3761
REFERENCES in mysql.sql

Created in the module file mysql.sql with the following contents:

le="color: #000000"><?php CREATE TABLE `video_cat` ( `cid` int(5) unsigned NOT NULL AUTO_INCREMENT, `pid` int(5) unsigned NOT NULL DEFAULT '0', `title` varchar(255) NOT NULL DEFAULT '', `imgurl` varchar(255) NOT NULL DEFAULT '', `description` text NOT NULL, `weight` int(11) NOT NULL DEFAULT '0', `datecreated` int(10) NOT NULL DEFAULT '0', `dateupdated` int(10) NOT NULL DEFAULT '0', `metakeywords` varchar(255) NOT NULL DEFAULT '', `metadescription` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`cid`), KEY `pid` (`pid`) ) ENGINE=InnoDB ; CREATE TABLE `video_video` ( `videoid` int(11) unsigned NOT NULL AUTO_INCREMENT, `cid` int(5) unsigned NOT NULL DEFAULT '0', `uid` int(11) unsigned NOT NULL DEFAULT '0', `title` varchar(255) NOT NULL DEFAULT '', `status` tinyint(1) unsigned NOT NULL DEFAULT '0', `hometext` mediumtext NOT NULL, `bodytext` mediumtext NOT NULL, `datecreated` int(10) NOT NULL DEFAULT '0', `dateupdated` int(10) NOT NULL DEFAULT '0', `metakeywords` varchar(255) NOT NULL, `metadescription` varchar(255) NOT NULL, `comments` int(11) unsigned NOT NULL DEFAULT '0', `rating` double(6,4) NOT NULL DEFAULT '0.0000', `votes` int(11) unsigned NOT NULL DEFAULT '0', `hits` int(11) unsigned NOT NULL DEFAULT '0', `dohtml` tinyint(1) unsigned NOT NULL DEFAULT '0', `dosmiley` tinyint(1) unsigned NOT NULL DEFAULT '0', `doxcode` tinyint(1) unsigned NOT NULL DEFAULT '0', `dobr` tinyint(1) unsigned NOT NULL DEFAULT '0', `videofile` varchar(255) NOT NULL DEFAULT '', `videowidth` smallint(5) unsigned NOT NULL DEFAULT '0', `videoheight` smallint(5) unsigned NOT NULL DEFAULT '0', `videosize` int(11) unsigned NOT NULL DEFAULT '0', `videoduration` smallint(5) unsigned NOT NULL DEFAULT '0', `imagefile` varchar(255) NOT NULL DEFAULT '', PRIMARY KEY (`videoid`), KEY `cid` (`cid`), KEY `status` (`status`) ) ENGINE=InnoDB ; ALTER TABLE `video_video` ADD CONSTRAINT `fk_cid` FOREIGN KEY (`cid`) REFERENCES `video_cat` (`cid`);


When installing the module error (not a database table 'video_cat').
Please add a prefix to the table and query REFERENCES, for example:

file:
/class/database/sqlutility.php
le="color: #000000"><?php $pattern3 = "/(REFERENCES)(\s)+([`]?)([^`\s]+)\\3(\s)?$/siU"; $replace = "\\1 " . $prefix . "_\\4\\5"; preg_replace($pattern3 , $replace, $query);



6
andrey3761
Re: C Holiday of Spring and Labor

1 May.

C пeрвoмaeм))



7
andrey3761
Re: Test module instruction

Ok. Realizing update content without reloading the entire page.



8
andrey3761
Re: Test module instruction

Do you want the content page is loaded in the AJAX?



9
andrey3761
Re: Test module instruction

Edit via the administration panel.
Additions to the user side is not implemented yet.



10
andrey3761
Test module instruction

This module is designed to create a content tree menu for your pages.

Demo:
Main page
Instruction
Pages

Download - http://xoops.ws/uploads/modules/instruction/instruction-last.zip

The design is not displayed zetagenesis page tree. To do this, remove styles:

le="color: #000000"><?php #xo-canvas-content ul, #xo-canvas-content ol { margin: 2px; padding: 2px; text-align: left; } #xo-canvas-content ul { list-style: disc inside; } #xo-canvas-content ol { list-style: decimal inside; } #xo-canvas-content li { margin-left: 2px; font-size: .9em; line-height: 1.4em; }


The module is currently not finished.




TopTop
(1) 2 3 4 ... 13 »