61
luciorota
Re: Thumbnails (reduced-size versions of pictures was created)
  • 2014/3/17 10:58

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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" />





62
luciorota
Xoops and jQuery
  • 2014/3/16 8:36

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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?




63
luciorota
Re: How do I change the Jquery image size in wfdownloads?
  • 2013/7/17 14:50

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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




64
luciorota
Bug: imagemanager
  • 2013/5/25 16:14

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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



65
luciorota
Are Xoops form classes ajax friendly?
  • 2013/5/11 20:41

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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?




66
luciorota
Re: Core feature: xoops sample forms need enhancements
  • 2013/4/7 10:09

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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




67
luciorota
Re: DB tables shared between modules - how to do?
  • 2013/4/5 9:44

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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/include_2functions_8php.html#ae72e9470c0a71f93625a661dfc64b34c

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

bye




68
luciorota
Re: NEW!!!
  • 2013/3/30 9:09

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


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...



69
luciorota
Re: new version of tcpdf is available
  • 2012/9/25 9:39

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


thanks, merci, grazie

Lucio



70
luciorota
xhttperror 1.0 beta: ready for tests
  • 2012/8/6 21:27

  • luciorota

  • Module Developer

  • Posts: 216

  • Since: 2007/4/20


ready for tests here:
http://xoops.svn.sourceforge.net/viewvc/xoops/XoopsModules/xhttperror/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.




TopTop
« 1 ... 4 5 6 (7) 8 9 10 ... 17 »



Login

Who's Online

147 user(s) are online (98 user(s) are browsing Support Forums)


Members: 0


Guests: 147


more...

Donat-O-Meter

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

Latest GitHub Commits