xoops forums

Forum Index


Board index » All Posts (luciorota)




luciorota

Module Developer
Posted on: 2013/5/11 20:41
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#51

Are Xoops form classes ajax friendly?

In my opinion NO... too much html and javascript code mix
It will be useful to use jquery and to separate html from javascript code...
are there some tricks?



luciorota

Module Developer
Posted on: 2013/4/7 10:09
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#52

Re: Core feature: xoops sample forms need enhancements

I could
Where?
xoops 2.5.6 or xoops 2.6.0?
IMO, I think xoops 2.6.0 but, what core developers prefer?



luciorota

Module Developer
Posted on: 2013/4/5 9:44
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#53

Re: DB tables shared between modules - how to do?

Module Handlers are useful for your task

e.g.
$errorHandler =& xoops_getModuleHandler('error''xhttperror');


more info here:
http://api.xoops.org/2.5.6/d4/d01/inc ... 0c0a71f93625a661dfc64b34c

and also here:
http://www.slideshare.net/xoopsproject/oop-adventures-with-xoops

bye



luciorota

Module Developer
Posted on: 2013/3/30 9:09
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#54

Re: NEW!!!

Hi chefry
I tested this solution on Xoops 2.5.5

Try this:

modify template file: modules/system/templates/blocks/system_block_mainmenu.html
or your custom template file system_block_mainmenu.html this way:

<div id="mainmenu">
    <
class="menuTop <{if !$block.nothome}>maincurrent<{/if}>" href="<{xoAppUrl }>" title="<{$block.lang_home}>"><{$block.lang_home}></a>
    <!-- 
start module menu loop -->
<{
php}>
    global 
$xoopsUser,$xoopsModule;

    
$days_for_new 10// a module is NEW! if "younger" then $days_for_new days

    
$block = array();
    
$block['lang_home'] = _MB_SYSTEM_HOME;
    
$block['lang_close'] = _CLOSE;
    
$module_handler =& xoops_gethandler('module');
    
$criteria = new CriteriaCompo(new Criteria('hasmain'1));
    
$criteria->add(new Criteria('isactive'1));
    
$criteria->add(new Criteria('weight'0'>'));
    
$modules $module_handler->getObjects($criteriatrue);
    
$moduleperm_handler =& xoops_gethandler('groupperm');
    
$groups is_object($xoopsUser) ? $xoopsUser->getGroups() : XOOPS_GROUP_ANONYMOUS;
    
$read_allowed $moduleperm_handler->getItemIds('module_read'$groups);
    foreach (
array_keys($modules) as $i) {
        if (
in_array($i$read_allowed)) {
            
$block['modules'][$i]['name'] = $modules[$i]->getVar('name');
            
$block['modules'][$i]['directory'] = $modules[$i]->getVar('dirname');
            
$block['modules'][$i]['last_update'] = formatTimestamp$modules[$i]->getVar('last_update'), 'm' );
            
$block['modules'][$i]['updated_from_days'] = round((time() - $modules[$i]->getVar('last_update')) / (24 60 60));
            
$block['modules'][$i]['is_new'] = ($block['modules'][$i]['updated_from_days'] < $days_for_new) ? true false;
            
$sublinks $modules[$i]->subLink();
            if ((!empty(
$xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) {
                
$block['modules'][$i]['highlight'] = true;
                
$block['nothome'] = true;
            }if ((!empty(
$xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) {
                
$block['modules'][$i]['highlight'] = true;
                
$block['nothome'] = true;
            }
            if ((
count($sublinks) > 0) && (!empty($xoopsModule)) && ($i == $xoopsModule->getVar('mid'))) {
                foreach(
$sublinks as $sublink){
                    
$block['modules'][$i]['sublinks'][] = array('name' => $sublink['name'], 'url' => XOOPS_URL.'/modules/'.$modules[$i]->getVar('dirname').'/'.$sublink['url']);
                }
            } else {
                
$block['modules'][$i]['sublinks'] = array();
            }
        }
    }
    
// render output
    
foreach ($block['modules'] as $module) {
        echo 
"<a class='menuMain " . ($module['highlight'] ? "maincurrent" "") . "' href='" XOOPS_URL "/modules/" $module['directory'] . "/' title='" $module['name'] . "'>" . ($module['is_new'] ? "<span style='color :red;'>NEW!</span> " "") . $module['name'] . "</a>";
        foreach (
$module['sublinks'] as $sublink) {
            echo 
"<a class='menuSub' href='" $sublink['url'] . "' title='" $sublink['name'] . "'>" $sublink['name'] . "</a>";
        }
    }
<{/
php}>
    <!-- 
end module menu loop -->
</
div>


maybe not the best solution but...


luciorota

Module Developer
Posted on: 2012/9/25 9:39
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#55

Re: new version of tcpdf is available

thanks, merci, grazie

Lucio


luciorota

Module Developer
Posted on: 2012/8/6 21:27
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#56

xhttperror 1.0 beta: ready for tests

ready for tests here:
http://xoops.svn.sourceforge.net/view ... httperror/trunk/?view=tar

This xHttpError is a module for displaying server error messages within your XOOPS site to give a more professional look, rather than the default/generic error message.
This module is new but inspired by the AM HTError module module.
There are three error messages already configured, 404 (not found), 500 (internal server error) and 403 (forbidden). You can easily add, edit or remove the error types as needed.
Error messages can be logged to help you track them, which is handy if you find another site is still linking to a file no that longer exists, or a page/script keeps failing.
This module is written with Apache in mind, so also needs the .htaccess file in the site's root folder (it should also work in other servers where you can add custom error messages) - xHttpError can not write to this file itself as this would be a security issue, so you will have to manually edit this upon first installing the module, and every time an error type is added or removed. The text for this is generated automatically in the module's admin index, and only needs to be copy & pasted.


luciorota

Module Developer
Posted on: 2012/8/6 21:26
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#57

ajaxfilemanager 1.0 beta: ready for tests

ready for tests here:
http://xoops.svn.sourceforge.net/view ... lemanager/trunk/?view=tar


luciorota

Module Developer
Posted on: 2012/8/6 21:24
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#58

xaddresses 1.0 beta: ready for tests

ready for tests here:
http://xoops.svn.sourceforge.net/view ... addresses/trunk/?view=tar


luciorota

Module Developer
Posted on: 2012/7/31 11:08
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#59

Re: smarty

try this code in "news_item.html" template

<{$story.morelink|regex_replace:'/</a>$/':''|regex_replace:'/^<a href=".*">/':''}>


luciorota

Module Developer
Posted on: 2012/7/31 8:29
luciorota
luciorota (Show more)
Module Developer
Posts: 197
Since: 2007/4/20
#60

Re: smarty

A small tip
It possible, but not easy, use a regular expression to extract a value using some Smarty variable modifiers like regex_replace.

Here a small exemple:
<{$story.morelink|regex_replace:"/<a href="XOOPS_URL/modules/news/article.php?storyid=/":""}>


more info here: http://www.smarty.net/docs/en/language.modifier.regex.replace.tpl

Here you can find a useful tool http://www.weitz.de/regex-coach/ to test your regular expression




TopTop
« 1 ... 3 4 5 (6) 7 8 9 ... 15 »