xoops forums

Forum Index


Board index » All Posts (andrey3761)




andrey3761

XOOPS Translator
Posted on: 2014/3/22 13:37
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#1

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!


andrey3761

XOOPS Translator
Posted on: 2014/1/14 18:23
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#2

Re: Bug in xoops_getModuleOption()

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


andrey3761

XOOPS Translator
Posted on: 2014/1/13 20:15
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#3

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;
}


andrey3761

XOOPS Translator
Posted on: 2013/7/20 8:05
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#4

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>';


andrey3761

XOOPS Translator
Posted on: 2012/7/21 19:14
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#5

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);


andrey3761

XOOPS Translator
Posted on: 2012/4/30 21:10
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#6

Re: C Holiday of Spring and Labor

1 May.

C пeрвoмaeм))


andrey3761

XOOPS Translator
Posted on: 2012/4/19 17:39
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#7

Re: Test module instruction

Ok. Realizing update content without reloading the entire page.


andrey3761

XOOPS Translator
Posted on: 2012/4/19 17:25
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#8

Re: Test module instruction

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


andrey3761

XOOPS Translator
Posted on: 2012/4/19 14:29
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#9

Re: Test module instruction

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


andrey3761

XOOPS Translator
Posted on: 2012/4/19 11:31
andrey3761
andrey3761 (Show more)
XOOPS Translator
Posts: 234
Since: 2008/8/21
#10

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 »