Home
Help
Sitemap
Login
Register
Elxis.org
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: EDC:
Download extensions for Elxis 4.x
Elxis CMS Forum
>
Support
>
Elxis 2008 developers guide
>
Thumbnails generation
Pages: [
1
]
« previous
next »
Print
Author
Topic: Thumbnails generation (Read 2950 times)
datahell
Elxis Team
Hero Member
Offline
Posts: 7682
Thumbnails generation
«
on:
September 28, 2007, 10:51:38 »
Elxis 2008 has a build-in feature for
thumbnails generation
using GD2 PHP library.
Usage
Parameters:
$w = thumbnail width in pixels (ie 64)
$h = thumbnail height in pixels (ie 64)
$keepratio = 0 or 1 (keep picture aspect ratio or not)
$image = image's path relative to Elxis root dir (i.e. images/logo.png)
We create the thumbnail by calling this file: /includes/thumb.php
We also need to pass thumbnail parameters in the url via the GET method.
We store thumbnail parameters in a variable named
fi
witch is constructed like this:
$fi = base64_encode($w.','.$h.','.$keepratio.','.$image);
Our final link would be:
$thumb_url =$mosConfig_live_site.'/includes/thumb.php?fi='.$fi;
And here is the html thumbnail:
echo '<img src="'.$thumb_url.' " width="'.$w.'" height="'.$h.'" alt="thumbnail" />';
If thumbnail can not be generated a default one is being displayed (images/M_images/story.png).
Notice: only local images are being processing.
Valid image extensions: 'gif', 'jpeg', 'jpg', 'png', 'wbmp', 'bmp'
Valid $fi characters: a-z, A-Z, 0-9 and the symbols: . / - , _
«
Last Edit: September 28, 2007, 11:46:42 by datahell
»
Logged
Elxis Team
|
Is Open Source
|
IOS Reservations | IOS Eshop
Pages: [
1
]
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General
-----------------------------
=> News and announcements
-----------------------------
Support
-----------------------------
=> FAQs
=> General
=> Installation
=> Security
=> Administration
=> Database
=> Language
=> Elxis 4.x DEV
=> Elxis 2008 developers guide
=> Technical support
=> Public Speaking
-----------------------------
Extensions
-----------------------------
=> Components
=> Modules
=> Bots and plugins
=> Tools
=> Bridges
=> Templates
-----------------------------
Community
-----------------------------
=> Elxis Community
=> Elxis 2008.x Olympus (dev)
=> Build with Elxis...
-----------------------------
Ελληνικό Forum
-----------------------------
=> Γενικά Θέματα για το Elxis CMS
=> Εγκατάσταση
=> Διαχείριση
=> Γλώσσες - Πολυγλωσσία
=> Πρόσθετα
=> Ασφάλεια
=> Βάσεις Δεδομένων
=> Σχετικά με το Forum
=> Δημόσιο Βήμα
-----------------------------
International zone
-----------------------------
=> Dutch
=> Deutsch
=> Français
=> Italiano
=> Indonesian
=> فارسی - Persian
=> Русский
=> Srpski - Српски
=> Türkiye
Loading...