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)
$ret .= '"xoops_tagextgal": "'.$chemin_path.'/class/xoopseditor/tinymce4/external_plugins/xoops_tagextgal/plugin.min.js",';

Add afterwards
$ret .= '"codemirror": "'.$chemin_path.'/class/xoopseditor/tinymce4/external_plugins/codemirror/plugin.min.js",';


Find the line (330)
$ret .= '},';

Add afterwards
$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:
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
$patterns[] = "/[color=(['"]?)([a-zA-Z0-9]*)\1](.*)[/color]/sU";
        
$replacements[] = '<span style="color#\2;">\3</span>';


Replace

$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:

CREATE TABLE `video_cat` (
  `
cidint(5unsigned NOT NULL AUTO_INCREMENT,
  `
pidint(5unsigned NOT NULL DEFAULT '0',
  `
titlevarchar(255NOT NULL DEFAULT '',
  `
imgurlvarchar(255NOT NULL DEFAULT '',
  `
descriptiontext NOT NULL,
  `
weightint(11NOT NULL DEFAULT '0',
  `
datecreatedint(10NOT NULL DEFAULT '0',
  `
dateupdatedint(10NOT NULL DEFAULT '0',
  `
metakeywordsvarchar(255NOT NULL DEFAULT '',
  `
metadescriptionvarchar(255NOT NULL DEFAULT '',
  
PRIMARY KEY (`cid`),
  
KEY `pid` (`pid`)
ENGINE=InnoDB ;

CREATE TABLE `video_video` (
  `
videoidint(11unsigned NOT NULL AUTO_INCREMENT,
  `
cidint(5unsigned NOT NULL DEFAULT '0',
  `
uidint(11unsigned NOT NULL DEFAULT '0',
  `
titlevarchar(255NOT NULL DEFAULT '',
  `
statustinyint(1unsigned NOT NULL DEFAULT '0',
  `
hometextmediumtext NOT NULL,
  `
bodytextmediumtext NOT NULL,
  `
datecreatedint(10NOT NULL DEFAULT '0',
  `
dateupdatedint(10NOT NULL DEFAULT '0',
  `
metakeywordsvarchar(255NOT NULL,
  `
metadescriptionvarchar(255NOT NULL,
  `
commentsint(11unsigned NOT NULL DEFAULT '0',
  `
ratingdouble(6,4NOT NULL DEFAULT '0.0000',
  `
votesint(11unsigned NOT NULL DEFAULT '0',
  `
hitsint(11unsigned NOT NULL DEFAULT '0',
  `
dohtmltinyint(1unsigned NOT NULL DEFAULT '0',
  `
dosmileytinyint(1unsigned NOT NULL DEFAULT '0',
  `
doxcodetinyint(1unsigned NOT NULL DEFAULT '0',
  `
dobrtinyint(1unsigned NOT NULL DEFAULT '0',
  `
videofilevarchar(255NOT NULL DEFAULT '',
  `
videowidthsmallint(5unsigned NOT NULL DEFAULT '0',
  `
videoheightsmallint(5unsigned NOT NULL DEFAULT '0',
  `
videosizeint(11unsigned NOT NULL DEFAULT '0',
  `
videodurationsmallint(5unsigned NOT NULL DEFAULT '0',
  `
imagefilevarchar(255NOT NULL DEFAULT '',
  
PRIMARY KEY (`videoid`),
  
KEY `cid` (`cid`),
  
KEY `status` (`status`)
ENGINE=InnoDB ;

ALTER TABLE `video_video`
  
ADD CONSTRAINT `fk_cidFOREIGN 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
$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:

#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 »



Login

Who's Online

226 user(s) are online (138 user(s) are browsing Support Forums)


Members: 0


Guests: 226


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Mar 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits