Sponsored Content
Top Forums Web Development HTML/PHP show IMG based on location Post 302602086 by lawstudent on Sunday 26th of February 2012 01:13:49 AM
Old 02-26-2012
HTML/PHP show IMG based on location

HI guys/gals,

I like to add some personal touches to a welcome image on our mediawiki site, and have the welcome be displayed in the, presumed, language of the visitor.

Standard would be English, but if the IP or browser or OS is set to be in India, I want to display the message in Urdu for example... Or if South Afrika than I want the SA Afrikaans image to show.

Anyone have some idea on how to accomplish this using simple code?
 

8 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

copying files from one location to another based on a list

I have a text list of about 3,000 file names (image files), which exist on a server and that I want to copy over to another location. I understand the Unix cp code, but what's the string to have it copy multiple files based on an external list? Many thanks! (4 Replies)
Discussion started by: rebornhonest
4 Replies

2. Shell Programming and Scripting

how to detect ip address based location using PHP

I am interested in finding out if there is a reliable and economical way for extracting user's location based on his ip address, using php I tried to get the job done using ip2location.com, but I am not happy how it deals with result inconsistently. (2 Replies)
Discussion started by: siftin-com
2 Replies

3. OS X (Apple)

Location Based Printing in Leopard not working

Hello all, I've been searching for an answer but coming up with nothing so I figured I'd give it a shot and ask. After installing a fresh version of Leopard (with the latest updates) on a computer and then copying the user data back onto said computer, the location based printing doesn't work... (0 Replies)
Discussion started by: erodrigue
0 Replies

4. Web Development

PHP client location based page loading

Hi, I am new to PHP and at first got a task where I need some clues and help. So I am here.. The server is build to provide customized access for modules as per location. If client location is US then it shows modules and pages specific to US and if location is UK then it shows UK specific... (1 Reply)
Discussion started by: zing_foru
1 Replies

5. Shell Programming and Scripting

Parse based on location

I do have a big text file >A1 ACFGTSDCHG_GDF DGHA >A2 A_FGGSD_HG_GSF DGTA >A3 AC_GSDD_TU_GDF DGH_ .. ... there are equal number of characters within all the sub-headers. I want to parse out all the characters under each sub-header from user specified locations. For example, I want... (5 Replies)
Discussion started by: Lucky Ali
5 Replies

6. Shell Programming and Scripting

How to copy files from one location to another based on a priority?

Hi Gurus, I am a newbie to shell scripting and I am facing a problem right now.I have to automate the copy of files based on a priority.The scenario is as below: 1) There will be files from Mon-Fri with Mon file being named as abc_def_01_YYYYMMDD and Tue file being abc_def_02_YYYYMMDD and so... (4 Replies)
Discussion started by: vikramgk9
4 Replies

7. Shell Programming and Scripting

Show Logs from a server location to a web browser

hey Guys, Am a newbie to Linux and have a probable requirement that might come up pretty soon. I need to understand, how log files and log location can be displayed on a web browser. So that the end user can read the log files and should be able to search for order numbers in the logs. If... (2 Replies)
Discussion started by: ashish_samarth
2 Replies

8. Shell Programming and Scripting

Apache configuration Automation based on location

Hi I need to find a way to automate the deployment of my apache configuration to a few servers. I make change frequently on apache/conf/... etc, and I usually do this manually by copying files to each servers(and country config path)and restart apache servers.Source file will be like... (1 Reply)
Discussion started by: naresh2389
1 Replies
Tk_GetImage(3)						       Tk Library Procedures						    Tk_GetImage(3)

__________________________________________________________________________________________________________________________________________________

NAME
Tk_GetImage, Tk_RedrawImage, Tk_SizeOfImage, Tk_FreeImage - use an image in a widget SYNOPSIS
#include <tk.h> Tk_Image Tk_GetImage(interp, tkwin, name, changeProc, clientData) Tk_RedrawImage(image, imageX, imageY, width, height, drawable, drawableX, drawableY) Tk_SizeOfImage(image, widthPtr, heightPtr) Tk_FreeImage(image) ARGUMENTS
Tcl_Interp *interp (in) Place to leave error message. Tk_Window tkwin (in) Window in which image will be used. const char *name (in) Name of image. Tk_ImageChangedProc *changeProc (in) Procedure for Tk to invoke whenever image content or size changes. ClientData clientData (in) One-word value for Tk to pass to changeProc. Tk_Image image (in) Token for image instance; must have been returned by a previous call to Tk_GetImage. int imageX (in) X-coordinate of upper-left corner of region of image to redisplay (measured in pixels from the image's upper-left corner). int imageY (in) Y-coordinate of upper-left corner of region of image to redisplay (measured in pixels from the image's upper-left corner). int width ((in)) Width of region of image to redisplay. int height ((in)) Height of region of image to redisplay. Drawable drawable (in) Where to display image. Must either be window specified to Tk_GetImage or a pixmap compati- ble with that window. int drawableX (in) Where to display image in drawable: this is the x-coordinate in drawable where x-coordinate imageX of the image should be displayed. int drawableY (in) Where to display image in drawable: this is the y-coordinate in drawable where y-coordinate imageY of the image should be displayed. int widthPtr (out) Store width of image (in pixels) here. int heightPtr (out) Store height of image (in pixels) here. _________________________________________________________________ DESCRIPTION
These procedures are invoked by widgets that wish to display images. Tk_GetImage is invoked by a widget when it first decides to display an image. name gives the name of the desired image and tkwin identifies the window where the image will be displayed. Tk_GetImage looks up the image in the table of existing images and returns a token for a new instance of the image. If the image does not exist then Tk_GetImage returns NULL and leaves an error message in interp->result. When a widget wishes to actually display an image it must call Tk_RedrawImage, identifying the image (image), a region within the image to redisplay (imageX, imageY, width, and height), and a place to display the image (drawable, drawableX, and drawableY). Tk will then invoke the appropriate image manager, which will display the requested portion of the image before returning. A widget can find out the dimensions of an image by calling Tk_SizeOfImage: the width and height will be stored in the locations given by widthPtr and heightPtr, respectively. When a widget is finished with an image (e.g., the widget is being deleted or it is going to use a different image instead of the current one), it must call Tk_FreeImage to release the image instance. The widget should never again use the image token after passing it to Tk_FreeImage. There must be exactly one call to Tk_FreeImage for each call to Tk_GetImage. If the contents or size of an image changes, then any widgets using the image will need to find out about the changes so that they can redisplay themselves. The changeProc and clientData arguments to Tk_GetImage are used for this purpose. changeProc will be called by Tk whenever a change occurs in the image; it must match the following prototype: typedef void Tk_ImageChangedProc( ClientData clientData, int x, int y, int width, int height, int imageWidth, int imageHeight); The clientData argument to changeProc is the same as the clientData argument to Tk_GetImage. It is usually a pointer to the widget record for the widget or some other data structure managed by the widget. The arguments x, y, width, and height identify a region within the image that must be redisplayed; they are specified in pixels measured from the upper-left corner of the image. The arguments imageWidth and imageHeight give the image's (new) size. SEE ALSO
Tk_CreateImageType KEYWORDS
images, redisplay Tk 4.0 Tk_GetImage(3)
All times are GMT -4. The time now is 09:22 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy