Wed, Nov 17, 2021 9:56 pm
Automatically resizing an image for mobile devices
I created this domain in April of 1997, a time when mobile device usage was
not common. HTML 3
was the version of the HyperText Markup Lanugage (HTML) in usage then with
pubished as a W3C Recommendation until December of that year. In the past,
I used to add material to the site far more frequently. I haven't added much
to the site in the last few years and haven't made any significant changes
to the site for many years. Consequently, visitors viewing pages with large
images from a mobile device would see only the leftmost portion of those
images and would need to scroll right if they were using a mobile device
such as a phone. I finally added a few lines to the site's style.css
Cascading Style Sheets (CSS)
file today to have images be scaled down to fit the screens of mobile devices.
The lines I added are those below:
Those lines tell browsers that the maximum width of an image when it is
displayed within the user's browser shoud be no wider than the page's
width as it is displayed within that browser on that device. I added the
"height: auto;" to ensure that when images are resized that the height
is also adjusted to maintain the heighth to width ration of the original
image. Otherwise, some images might be distorted so that the image height
would be much greater in relation to its width than in the original
image. With the auto setting, the height to width balance remains such that
the image fits within the displaye page without appearing elongated.
Wed, Nov 17, 2021 8:33 pm
Book classification fields in Book Collector
to catalog my books.
When entering books into the Book Collector database, I like to include
Decimal Classification (DDC)
Library of Congress Control Number
Library of Congress Classification
if those are available. When you
enter a new book into the database, you can have the program search for
an existing entry for the book from its enormous online database of books by
clicking on the plus sign (+) at the top, left-hand part of the Book Collector
window, which will then allow you to search by
International Standard Book Number (ISBN)
, Author/Title, or LCCN.
If the book is found, you can then choose to add its entry to your own
collection or your wish list. Occasionally, I've found an LCCN listed in the
LoC Control Number book, as is the case for
Lost Treasures of
by W.C. Jameson, but when I search
the Library of Congress database for information associated with that
LCCN, such as the LOC classification, I find that no record is returned.
[ More Info ]
Mon, Nov 15, 2021 10:23 pm
Converting a transparent PNG file to GIF in Corel PSP X4
I wanted to convert a transparent
file to a transparent GIF
file for placement on web pages in an area on the pages that had a black
background. I could have modified the code for the pages to use the PNG
file that had been provided to me, but I thought I could easily convert
the PNG image I had been provided, which was an image of stylized white
text on a black background, to a GIF image and just replace the old
GIF image on the site with the one I had recently been given. Since I use
Corel PaintShop Pro X4 for image editing, I thought I could just use its
"save as" feature to resave the file in the GIF format. But when
I saved the transparent PNG file as a GIF file expecting transparency to be
maintained by clicking on File
, selecting Save As
choosing GIF as the new format for the file, I found that transparency was not
maintained in the GIF file. I was able to produce the GIF file I needed by
the following steps, however.
More Info ]
Sat, Nov 13, 2021 10:25 pm
Removing logo image from 2O11 SMF Theme
After I installed the 2O11 theme (the name of the theme has a capital "O"
between the two and the first "1", though it looks like it would be 2011)
on a Simple Machines Forum (SMF) web site, I noticed it placed a logo at the
top, right-hand side of pages with "SEFFAF Tema" displayed. The logo
overlapped a search field.
The image that was displayed was in the Themes directory for the site at
. The relevant section of code
was as follows:
', empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '
I removed the code starting with
extending through the first
'</div>'. I.e., I deleted the
, empty($settings['site_slogan']) ? '<img id="smflogo" src="' . $settings['images_url'] . '/smflogo.png" alt="Simple Machines Forum" title="Simple Machines Forum" />' : '<div id="siteslogan" class="floatright">' . $settings['site_slogan'] . '</div>', '
function in the PHP code checks
whether the variable
$settings['site_slogan'] is empty. If it is
question mark ternary operator results in the logo image being displayed.
If the variable is not empty, it creates a
div section in the
code where the value of
site_slogan is displayed from the
settings. Since the site owner didn't have a site slogan
and didn't want the image, I removed the code.
Sat, Nov 06, 2021 8:30 pm
I needed to edit an index.template.php
file for a
Simple Machines Forum
theme to correct a problem with an image no longer being available
at the site pointed to in the code. For the missing image, I saw the following
code in the file:
href="#" _fcksavedurl="#" class="yukari"><img src="http://i43.tinypic.com/24xml1i.png" _fcksavedurl="http://i43.tinypic.com/24xml1i.png" border="0" title="YukarÄ±" /></a>
Instead of the referenced image appearing, a large image with the
message "The image is no longer available appeared" on it appeared.
I found the
original image at
the WayBack Machine
from a web crawl performed by the WayBack Machine on
November 17, 2018. It was just an upward pointing arrow within a circle with
some decorative elements around the circle, so I could easily substitute
another image for it—clicking on the image within the theme resulted in
the page being redisplayed, but putting the viewer at the top of the page again
if the viewer had scrolled down the page. But I wondered why the
"_fcksavedurl=" was referenced. It is apparently because the code was edited
with the the CKEditor
WYSIWYG editor - see
The CKEditor was first released in 2003 as FCKeditor according to the
Wikipedia CKEditor page.
I changed both references to the prior image to point to the new image I
placed in the "images" subdirectory for the theme where the problem occurred.
Shop Amazon Local - Subscribe to Deals in Your Neighborhood