31
aerograf
Re: Problems with Lexicon (Tutorial Needed)
  • 2017/2/7 4:29

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Localization I will send you as soon as brought to order. With the description of the same help.

32
aerograf
Re: Problems with Lexicon
  • 2017/2/7 6:41

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Quote:

aerograf wrote:
Quote:

Mamba wrote:
Please test Lexikon 1.52 Beta 2

https://github.com/mambax7/lexikon/releases

First, it is necessary to replace category.php line:
// verify ID
    
if ($ xoopsDB-> getRowsNum ($ catdata) <= 0) {
        
redirect_header 'javascript: history.go (-1)'2_MD_LEXIKON_UNKNOWNERROR);
    }

on
// verify ID
    
if ($ xoopsDB-> getRowsNum ($ catdata) <= 0) {
        
redirect_header (XOOPS_URL '/ modules / lexikon / index.php'2_MD_LEXIKON_UNKNOWNERROR.);
    }

otherwise proper operation category.php? categoryID = true unless specified.

The rest look. Thank you!

It is best to change all redirect
XOOPS_URL '/ modules / lexikon / index.php'
to
'index.php'
, would be more correct to work by using SEO

33
aerograf
Re: Problems with Lexicon
  • 2017/2/7 8:05

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


You need to add in /language/english/main.php
define "_ MD_LEXIKON_MUSTREGFIRST""You do not have access to this item.");

34
aerograf
Re: Problems with Lexicon
  • 2017/2/7 9:24

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Quote:

aerograf wrote:
And it is not clear why recode from UTF8 encoding to the unknown ...

� � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � � �


http://xoops.shmel.org/modules/lexikon/category.php?categoryID=2


Resolved.
For those who do not have the text in terms of national characters correctly coded.
The template or lx_category.tpl lx_category.html replaced by:
h2.cat {
        
text-aligncenter important;!
        
font-size14px important;!
        
font-stylebold important;!
        
margin0;
        
color# 2F5376;
        
letter-spacing0.5em
    
}

To find:
<H2 class = "cat"> <{$ singlecat.name spacify}> h2>

and reduced to the form:
<H2 class = "cat"> <{$ singlecat.name}> h2>

35
Bleekk
Re: Problems with Lexicon
  • 2017/2/7 9:31

  • Bleekk

  • Theme Designer

  • Posts: 941

  • Since: 2002/12/14


This "| spacify" is definately wrong and should not be there

36
aerograf
Re: Problems with Lexicon
  • 2017/2/7 10:33

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Problems with Cyrillic, etc. solved too slowly.
The index.php add somewhere on the line 43 or elsewhere:
if (! function_exists 'mb_ucfirst') && function_exists 'mb_substr')) {
   function 
mb_ucfirst ($ string) {
   $ 
String mb_ereg_replace "^ [] +""", $ string);
   $ 
String mb_strtoupper (mb_substr ($ string01"UTF-8"), "UTF-8"mb_substr ($ string1mb_strlen ($ string), "UTF-8").;
   return $ 
string;
   }
}

and then the text to replace all ucfirst - mb_ucfirst
Most likely it is to be done everywhere, and in the xoops too. If you do not want to permanently solve these problems ....

37
aerograf
Re: Problems with Lexicon
  • 2017/2/8 11:01

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Help to plc.
How to change the encoding?
The idea should be UTF8, but for some reason, displays in 1251 ...

public static function getAlphaArray() 
{   
    global 
$xoopsUser$xoopsDB$xoopsModule;
    
$gpermHandler xoops_getHandler('groupperm');
    
$groups       is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
        
/** @var XoopsModuleHandler $moduleHandler */
    
$moduleHandler xoops_getHandler('module');
    
$module        $moduleHandler->getByDirname('lexikon');
    
$module_id     $module->getVar('mid');
    
$allowed_cats  $gpermHandler->getItemIds('lexikon_view'$groups$module_id);
    
$catids        implode(','$allowed_cats);
    
$catperms      " AND categoryID IN ($catids) ";
    
$alpha         = array();
    for (
$a 65$a < (65 26); ++$a) {
        
$letterlinks             = array(); 
        
$initial                 chr($a);
        
$sql                     $xoopsDB->query('SELECT entryID FROM '
                                                       
$xoopsDB->prefix('lxentries')
                                                       . 
" WHERE init = '$initial' AND submit = '0' AND offline ='0' AND request = '0' "
                                                       
$catperms
                                                       
'');
        
$howmany                 $xoopsDB->getRowsNum($sql);
        
$letterlinks['total']    = $howmany;
        
$letterlinks['id']       = chr($a);
        
$letterlinks['linktext'] = chr($a);
        
$alpha['initial'][] = $letterlinks;
    } 
    for (
$a 192$a < (192 32); ++$a) { 
        
$letterlinks             = array();
        
$initial                 chr($a);
        
$sql                     $xoopsDB->query('SELECT entryID FROM '
                                                       
$xoopsDB->prefix('lxentries')
                                                       . 
" WHERE init = '$initial' AND submit = '0' AND offline ='0' AND request = '0' "
                                                       
$catperms
                                                       
'');
        
$howmany                 $xoopsDB->getRowsNum($sql);
        
$letterlinks['total']    = $howmany;
        
$letterlinks['id']       = chr($a);
        
$letterlinks['linktext'] = chr($a);
        
$alpha['initial'][] = $letterlinks;
    }   
    
    return 
$alpha;
}

38
aerograf
Re: Problems with Lexicon
  • 2017/2/8 13:25

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


The template file lx_syndication.tpl - lx_syndication.html replaced by
<div style='width: auto;height:100%; border: 1px solid #ccc; padding: 4px;'>
    <
div style='background-color: #F5F5F5;font-family:verdana,arial, sans-serif; font-size:small; text-align: center;  padding-bottom: 8px; margin: 0 0 4px 0; border-bottom: 1px dotted #ccc; '>
        <
A STYLE='color:#000;font-weight:bold;text-decoration:none;' TARGET='_blank'
           
HREF=<{$xoops_url}>><{$lang_modulename}> - <{$smarty.const._MD_LEXIKON_TERMOFTHEDAY}>A>
    div>
    <{if 
$multicats == 1}>
        <
div style='padding-bottom: 10px;text-align:left;font-family:verdana,arial, sans-serif; font-size:small;'><{$smarty.const._MD_LEXIKON_ENTRYCATEGORY}>
        <
b><{$syndication.categoryname}>b>
        div>
    <{/if}>
    <
h4 style='margin: 0;text-align:left;font-family:verdana,arial, sans-serif; font-size:normal;'><A STYLE='color:#000;font-weight:bold;text-decoration:none;' TARGET='_blank'
               
HREF="<{$xoops_url}>/modules/<{$lang_moduledirname}>/entry.php?entryID=<{$syndication.id}>"><{$syndication.term}>A>h4>
    <
p style='text-align:left;font-family:verdana,arial, sans-serif; font-size:small;'><{$syndication.definition}>p>
    <
div style='min-width:100%;border-top: 1px dotted #ccc;width=100%;position:absolute; right:3px; bottom:6px; padding-top: 12px; text-align:right;font-family:verdana,arial, sans-serif; font-size:x-small;'>
        <
A
                HREF
=javascript:location.reload()> <{$smarty.const._MD_LEXIKON_RANDOMIZE}>A><br>
        <{
$smarty.const._MD_LEXIKON_POWER}> <A HREF="<{$xoops_url}>" TARGET='_blank'><{$lang_sitename}>A>
    div>
div>

39
aerograf
Re: Problems with Lexicon
  • 2017/2/8 13:52

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Quote:
The file submit.php on line 328 garbage ....


Sorry, wrong ....

40
aerograf
Re: Problems with Lexicon
  • 2017/2/10 20:08

  • aerograf

  • Quite a regular

  • Posts: 214

  • Since: 2017/1/7 1


Quote:

aerograf wrote:
Help to plc.
How to change the encoding?
The idea should be UTF8, but for some reason, displays in 1251 ...

public static function getAlphaArray() 
{   
    global 
$xoopsUser$xoopsDB$xoopsModule;
    
$gpermHandler xoops_getHandler('groupperm');
    
$groups       is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
        
/** @var XoopsModuleHandler $moduleHandler */
    
$moduleHandler xoops_getHandler('module');
    
$module        $moduleHandler->getByDirname('lexikon');
    
$module_id     $module->getVar('mid');
    
$allowed_cats  $gpermHandler->getItemIds('lexikon_view'$groups$module_id);
    
$catids        implode(','$allowed_cats);
    
$catperms      " AND categoryID IN ($catids) ";
    
$alpha         = array();
    for (
$a 65$a < (65 26); ++$a) {
        
$letterlinks             = array(); 
        
$initial                 chr($a);
        
$sql                     $xoopsDB->query('SELECT entryID FROM '
                                                       
$xoopsDB->prefix('lxentries')
                                                       . 
" WHERE init = '$initial' AND submit = '0' AND offline ='0' AND request = '0' "
                                                       
$catperms
                                                       
'');
        
$howmany                 $xoopsDB->getRowsNum($sql);
        
$letterlinks['total']    = $howmany;
        
$letterlinks['id']       = chr($a);
        
$letterlinks['linktext'] = chr($a);
        
$alpha['initial'][] = $letterlinks;
    } 
    for (
$a 192$a < (192 32); ++$a) { 
        
$letterlinks             = array();
        
$initial                 chr($a);
        
$sql                     $xoopsDB->query('SELECT entryID FROM '
                                                       
$xoopsDB->prefix('lxentries')
                                                       . 
" WHERE init = '$initial' AND submit = '0' AND offline ='0' AND request = '0' "
                                                       
$catperms
                                                       
'');
        
$howmany                 $xoopsDB->getRowsNum($sql);
        
$letterlinks['total']    = $howmany;
        
$letterlinks['id']       = chr($a);
        
$letterlinks['linktext'] = chr($a);
        
$alpha['initial'][] = $letterlinks;
    }   
    
    return 
$alpha;
}


Question withdrawn. Solution found ....

Login

Who's Online

187 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 187


more...

Donat-O-Meter

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

Latest GitHub Commits