xoops forums

Forum Index


Board index » All Posts (luciorota)




luciorota

Module Developer
Posted on: 2014/3/31 14:42
luciorota
luciorota (Show more)
Module Developer
Posts: 192
Since: 2007/4/20
#41

latest/better news module

sorry but... what is the latest/better news module?
news? xnews?
and where can i download it?

tnx


luciorota

Module Developer
Posted on: 2014/3/17 10:58
luciorota
luciorota (Show more)
Module Developer
Posts: 192
Since: 2007/4/20
#42

Re: Thumbnails (reduced-size versions of pictures was created)

Hi Gnomesu
Xoops image manager doesn't create reduced images.
But, in latest Xoops versions, is possibile to use some image.php options.

help:
Enhanced image access/edit
This enhanced version is very useful in many cases, for example when you need a
smallest version of an image. This script uses Xoops cache to minimize server load.

Parameters need to be passed in through the URL's query string:
@param int id Xoops image id;
@param string url relative to XOOPS_MAIN_PATH, path of local image starting with "/" (e.g. /images/toast.jpg);
@param string src relative to XOOPS_MAIN_PATH, path of local image starting with "/" (e.g. /images/toast.jpg);
@param int width (optional) maximum width of final image in pixels (e.g. 700);
@param int height (optional) maximum height of final image in pixels (e.g. 700);
@param string color (optional) background hex color for filling transparent PNGs (e.g. 900 or 16a942);
@param string cropratio (optional) ratio of width to height to crop final image (e.g. 1:1 or 3:2);
@param boolean nocache (optional) don't read image from the cache;
@param boolean noservercache (optional) don't read image from the server cache;
@param boolean nobrowsercache (optional) don't read image from the browser cache;
@param int quality (optional, 0-100, default: 90) quality of output image;
@param mixed filter (optional, imagefilter 2nd, 3rd, 4th, 5th arguments, more info on php.net manual) a filter or an array of filters;
@param int radius (optional, 1, 2, 3 or 4 integer values, CW) round corner radius
@param float angle (optional), rotation angle)




examples:
Resizing a JPEG:
<img src="/image.php?url=image-name.jpg&width=100&height=100" alt="Don't forget your alt text" />

Resizing and cropping a JPEG into a square:
<img src="/image.php?url=image-name.jpg?width=100&height=100&cropratio=1:1" alt="Don't forget your alt text" />

Matting a PNG with #990000:
<img src="/image.php?url=image-name.png?color=900&image=/path/to/image.png" alt="Don't forget your alt text" />

Apply a filter:
<img src="/image.php?url=/path/to/image.png&filter=IMG_FILTER_COLORIZE,128,60,256" alt="Don't forget your alt text" />

Apply more filters (array) :
<img src="/image.php?url=/path/to/image.png&filter[]=IMG_FILTER_GRAYSCALE&filter[]=IMG_FILTER_COLORIZE,128,60,256" alt="Don't forget your alt text" />
Round the image corners:
All corners with same radius:
<img src="/image.php?url=/path/to/image.png&radius=20" alt="Don't forget your alt text" />

Left and right corners with different radius (20 for left corners and 40 for right corners)
<img src="/image.php?url=/path/to/image.png&radius=20,40" alt="Don't forget your alt text" />

4 corners, 4 radius, clockwise order
<img src="/image.php?url=/path/to/image.png&radius=20,40,0,10" alt="Don't forget your alt text" />




luciorota

Module Developer
Posted on: 2014/3/16 8:36
luciorota
luciorota (Show more)
Module Developer
Posts: 192
Since: 2007/4/20
#43

Xoops and jQuery

I recently had problems with newest themes because the JQuery hardcoded in Xoops is too old to work with the latest jQuery plugins.
In Xoops we have the outdated jQuery v1.8.3...
I would like update it to v1.11.0, the latest.
What do you think about?
There will be some problems with themes/modules? What themes/modules?

or

we can have it in /extras ... so people could just copy it over and use it, if they need it...

In your opinions?



luciorota

Module Developer
Posted on: 2013/7/17 14:50
luciorota
luciorota (Show more)
Module Developer
Posts: 192
Since: 2007/4/20
#44

Re: How do I change the Jquery image size in wfdownloads?

I think:

"thickbox image" is the original uploaded image

"screenshot image" is resized as thumbnail only if, in module preferences, "Use Thumbnails" preference is setted to "Yes"



In templates files, for example in "wfdownloads_singlefile.html":

"thickbox image" url is <{$xoops_url}>/<{$shots_dir}>/<{$down.screenshot_full}>
and it isn't resized

"screenshot image" url is <{$down.screenshot_thumb}>
and it is resized according to module preferences



luciorota

Module Developer
Posted on: 2013/5/25 16:14
luciorota
luciorota (Show more)
Module Developer
Posts: 192
Since: 2007/4/20
#45

Bug: imagemanager

From xoops 2.5.5 images are never stored in the database (as binary "blob" data)


luciorota

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

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: 192
Since: 2007/4/20
#47

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: 192
Since: 2007/4/20
#48

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: 192
Since: 2007/4/20
#49

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: 192
Since: 2007/4/20
#50

Re: new version of tcpdf is available

thanks, merci, grazie

Lucio



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