Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8023581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T22:36:02+00:00 2026-06-04T22:36:02+00:00

I have a handcoded site with a few hundred articles. My current theme follows

  • 0

I have a handcoded site with a few hundred articles. My current theme follows a blue background. Of course the images are therefore, with a blue background. For future support of printable versions, I have (from first day) kept two versions of the images with the latter one having a white background. These ones has ‘_print’ before their extensions.

Of course, the best way to create a printable version is to use a different CSS and hide headers and sidebars by ‘display:none’ in respective CSS.

Is there any way I can use PHP to automatically add ‘_print’ before ‘.jpg’ in printable versions? Or is there is any other way altogether?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T22:36:03+00:00Added an answer on June 4, 2026 at 10:36 pm

    You could probably do this either with PHP or with Javascript.

    in PHP you could just pass a parameter like ?print=true and then write a little helper function to get the appropriate image url.

    <?php
    function getImageUrl(imageUrl) { 
       if(isset($_GET["print"])) {
          return preg_replace('\.jpg$','_print\.jpg',imageUrl);
       }
       return imageUrl;
    }
    ?>
    

    Disclaimer – not a PHP dev.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've just recently started developing a site for iPhone using jQTouch, and have the
By convention, all my web site's .aspx files also have corresponding .css files at
So I have a hand-coded one-pager site with a very long length and dozens
I have a feature which provisions a custom Default.aspx file to my publishing site
can you help me with my problem: i have ASP.NET web site that have
We have a Joomla site and have purchased a template from Gavick. I need
I have a webforms site where users upload files, the file name etc is
I have the following URLs for my ASP.Net MVC 2 site: http://localhost:1919/TimeEntry/SummaryForWeek/15/2011 http://localhost:1919/TimeEntry/SummaryForMonth/4/2011 Both
I have a site that displays telephone numbers and email addresses. The aim is
I have a three row, one column site design and I'd like to have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.