Default Image

Hi guys!
I have a problem that I can´t solve. I am creating a news script with php and mysql and my problem is that I
can´t figure out how to set up a default image for posts that haven´t got a image to add so it would display
instead so the field won´t be blank.
Hopefully you understand my problem and I thank you in advance for any help I will get.

I have added you code and changed it to my mysql setup, but when I check my site in a browser I get a Parse error:  parse error. The line that isn´t correct is colored in red.
if (@$row_rs_news['slika'] == "")
<img src="/../foto/novice/no_picture.jpg" alt="No Image Available" />
else
{ img src="/<?php echo $row_rs_news['slika']; ?>" alt="<?php echo $row_rs_news['slika']; ?>" />

Similar Messages

  • Set default image for no image found

    Hi Folks,
    I have a folder full of images and when en images is called form that directory and not found I would like the default image to show up.
    I have added an HTAccess file with this content:
    ErrorDocument 404 default.jpg
    And added a default.jpg image in the directory.
    I have used this approach successfully on a few other sites but in this instance when I open a page with a missing photo I still get the standard ugly missing image icon. However, if I open that image in a new tab I get a page with the text 'default.jpg' on it.
    NOt sure why that happens but I guess it's something about it being a different hosting set up. Perhaps there is another way to do this that will work on this set up.
    Anyone got an idea how I can fix it?
    Cheers
    Dave

    If I remember well, in the Report Attributes, you should select the linked column. At the link image, there are 2 edit images(the default is the big one), but there is one more image which is smaller.
    Hope it helps.

  • How do you change the default image at the login screen??

    I want to change my default image that is at the login screen. The image is also in the desktop display(so i can set it as my background), but those are the only two places I can find it. Is there a way I can delete the image from my computer?

    Well quick and dirty is to replace the applelogo.tif file with a .tif of your own.
    Read this site for cool ways to hack your login window:
    http://tinyurl.com/reanz
    Richard

  • Default image in master detail

    I'm trying to create a thumbnail master detail page. Mostly good so far, works ok. What I'd like to do is set the default image when the page loads to either the last image, or to one I choose. This is a photo of the month page, so I'd like the default to be the current month, which is the last one in the list. Any way to do this? Thanks.

    BTW, the data is in an HTML table, but I'd like the same behavior (defaulting to last or at least a specified master region) in xml if that's easier. I searched the forums, but the only link I found was either wrong or gone.

  • Dynamic image showing default image instead of requested image

    I'm using CR4E v2.0 to incorporate reports into my application which is built into an ear file and deployed with Jboss 4.2.2 at the moment. I have an image in my report that I am trying to set dynamically from a URL in a database,  but when the report is run only the default image shows up. The URL in the database for the logo is http://localhost:8087/module_Reporting/Logo.gif and I verified that exact string is being returned to the report, but the image is not changing from the default placeholder.
    The formula for the graphic location is:
    HdrPictureLogoClient : Graphic Location
    // Return values: Any string value.
    If Not IsNull({REPORT_PARAMETER_FACT.LOGO_URL_PATH})
    Then {REPORT_PARAMETER_FACT.LOGO_URL_PATH}
    Else "";
    I'm using a com.crystaldecisions.report.web.viewer.CrystalReportViewer in my jsp page to display the report and this is the part of the page that handles the viewer
    CrystalReportViewer crystalReportPageViewer = new CrystalReportViewer();
    // If the report is not saved in the session you just keep getting prompted for parameters
    Object reportSource = session.getAttribute("ReportSource");
    if (reportSource == null)
         reportSource = clientDoc.getReportSource();
         session.setAttribute("ReportSource", reportSource);
    //     set the reportsource property of the viewer
    crystalReportPageViewer.setReportSource(reportSource);
    // setting the optoins in the Crystal Report toolbar
    crystalReportPageViewer.setDisplayGroupTree(false);
    crystalReportPageViewer.setHasToggleGroupTreeButton(false);
    crystalReportPageViewer.setHasSearchButton(false);
    crystalReportPageViewer.setHasRefreshButton(false); 
    crystalReportPageViewer.processHttpRequest(request, response, application, null);
    The viewer is contained in an iFrame and is disposed of in the containing jsp.
    Am I missing something? Any help would be greatly appreciated!

    Thank you very much for your reply, but I am not trying to add an image into the report at run time, I am trying to change the source of the image. There is an image in the report as a place holder (called HdrPictureLogoClient) and the code that handles the source of the image is in the .rpt file also as this formula:
    HdrPictureLogoClient : Graphic Location
    // Return values: Any string value.
    If Not IsNull({REPORT_PARAMETER_FACT.LOGO_URL_PATH})
    Then {REPORT_PARAMETER_FACT.LOGO_URL_PATH}
    Else "";
    {/code}
    I have discovered that it works just fine with a file path name like C:\logo.png in the database but it does not work with my web URL.
    I just find it extra interesting because when the report was originally created in a Crystal Reports Project in myEclipse and deployed as an expanded war directly to jboss running in myEclipse it worked fine, but now that it is being incorporated into an EJB project which is built into an ear file that is deployed in a jboss service running outside of myEclipse it no longer works.

  • What exactly is the Default Image for?

    I have finished my first iPhone app and am planning to upload it soon to the app store. One of the many questions I have encountered is the Default Image, I know how to create it, just make a screenshot in Organiser, and then use the Save as Default Image option, but what is this? Is it a splashscreen? I have looked at a lot of the apps on my iPhone that I have downloaded over time but none of them seem to have anything I could recognise as a default image, usually they just open to the main screen.

    Hi Copernicium, and welcome to the Dev Forum!
    Yes, you can think of the Default image (usually Default.png) as a splash screen and you've probably been seeing that image in most of your downloaded apps without knowing it.
    The purpose of that image is to provide something other than a black screen when the app is loading. I.e. you don't bring it up with your code, the system looks for Default.png when the user touches your icon on the home page. If the file is found, the system displays that image until your app is up and running.
    You're free to use almost any image you want as the Default, but the guidelines recommend an image that transitions smoothly into your first screen, or better yet an image which is identical to the first image your code brings up. When you're unaware of the transition from the default image to the application launch, that generally means the developer has done a good job.
    The purpose of the +Save As Default Image...+ button in the Organizer is to make it easy to install your startup screen image as the Default. If your startup image is static it's easy. You just capture that screen, hit Save As Default and you're done. Note that if your screen capture includes the status bar, it will be masked by the real status bar when the Default image is displayed. So just two clicks in the organizer can produce and install a Default screen that's identical to the actual startup screen.
    If your startup image is dynamic (e.g. the "real" splash screen), but always begins with the same view, you just need to set a breakpoint in your code so you can capture that very first image.
    And yes, you'll have a better app if you add Default.png to the bundle before you upload to the Store. When last I looked, that wasn't a requirement, and there are still lots of apps that load with a black screen. But I wouldn't be surprised if Default.png is now or soon will be a requirement. It certainly helps to placate the user when your load time is anything over the absolute minimum.
    Hope that answers your questions!
    \- Ray

  • Default image in Albums index

    I was given this HTML snippet by Cyclosaurus to add to my "Ablums" template index page since I didn't want the first picture as the default in each of the pages:
    <script type='text/javascript'>
    var albumIndex = 0;
    var imageIndex = 5;
    function setGridImage(albumIndex, imageIndex) {
    try {
    mediaDiv = parent.document.getElementById('gridEntry' + albumIndex);
    slideDiv = mediaDiv.widget.getElementById('slideshow_placeholder');
    mediaDiv.widget.p_scrub(slideDiv,imageIndex);
    mediaDiv.addEventListener('mouseout', function() {this.widget.p_scrub(slideDiv,imageIndex);})
    clearInterval(chkGridEntry);
    } catch (e) {}
    chkGridEntry = setInterval('setGridImage(albumIndex, imageIndex)', 500);
    </script>
    Unfortunately, it doesn't seem to work. For example, if I choose albumIndex "0" as the first album and "24" as the imageIndex, the default picture is set to image 38. It doesn't even work for the first two or three pictures. What am I missing?
    http://web.mac.com/douglasm/2009/January/January.html
    -Doug

    ..in case you like to know, the imageIndex you looking for is 15
    He he! I'm sure there's a solution. It's just not clear to me right now why the images don't seem to line up with the numbers from the beginning. I'm assuming the numbers start with 0 and go up from there in order that they appear on the page. Since I have a three-up layout, the first picture would be "0" and the picture under it would be "3". Since Sylvia is the hostess of the evening, I thought it would be appropriate that her picture was the default image. I'm having fun in San Francisco for Macworld, no hurry right now.
    -Doug

  • Grab default image type

    I use grab a lot, and i mean a lot, for my blog, and for album art. When I upload pictures to my blog. They only accept jpeg and a couple other image types. Grabs default image type is .tiff. Is there any way to set the default image type to .jpeg?

    No. Grab generates tiff files. The Grab help suggests using Preview to open and convert the file types.
    There are a number of other image conversion tools out there as well.
    You might also try CMD-SHIFT-4 - this permits you to select a portion of your screen and saves it a .png file. Most modern servers understand png.

  • Displaying default image on page load if actual image is not retrieved

    Hello All,
    In jsff i have something like below
    <af:image source="path/something.jpg" id="id_1" styleClass="displayingImage">
    but if the image is not present in the path then a red cross is displayed.
    Is there any way where i can display a default image on page load if image is not properly loaded.

    Approach 1
    If i bind "source" property to back bean and check it will work.
    But because of the complexity of project, it is not possible to go with this approach.
    Approach 2 (I am selecting this approach)
    (Working fine)
    When i click on image, the image is set to as default image
    <af:resource type="javascript">
    var changeImage = function (event) {
        $('.cssclass').each(function(){
            var image = $(this);
            $(image).hover(function(){ 
                    $(image).attr('src','/path/defaultImage.png');
    </af:resource>
    <af:image source="http://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}/file/#{pageFlowScope.bean.imageName}&amp;Rendition=164FixedWidth" id="id_1" styleClass="cssclass"
                  rendered="#{!empty pageFlowScope.bean.imageName}">
         <af:clientListener method="changeImage" type="click" />
    </af:image>
    (Not Working fine)
    On page load
    <af:resource type="javascript">
    $(document).ready(function(){                        //on page load
          alert("Check");                                         //alert is displayed correctly
          $('.cssclass').each(function(){                         //search for all image with name "cssclass"
              var image = $(this);
              $(image).load(function(){}).error(function(){       //JQuery experts, can you please tell me if this line works in ADF
                  $(image).attr('src','/path/defaultImage.png');
    </af:resource>
    <af:image source="http://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}/file/#{pageFlowScope.bean.imageName}&amp;Rendition=164FixedWidth" id="id_1" styleClass="cssclass"
                  rendered="#{!empty pageFlowScope.bean.imageName}">
    </af:image>
    <af:image source="http://#{facesContext.externalContext.request.serverName}:#{facesContext.externalContext.request.serverPort}/file/#{pageFlowScope.bean.imageName}&amp;Rendition=164FixedWidth" id="id_2" styleClass="cssclass"
                  rendered="#{!empty pageFloScope.bean.imageName}">
    </af:image>

  • Default images zoom in Mountain Lion Preview - how to change

    Hi,
    I need to preview alot of images in my work. In previous system I would use Preview with zoom images to 100%. Now this option is gone in preferences. Since the images I preview are ewbsites designs, any other zoom then 100% is useless to me.
    I know that I can open an image, push Cmd+0, click on the green + dot, and then scroll up (because after zooming to 100% the image is centered on the screen). But I open images about 100 times a day - so to me that situation is Usability disaster.
    So my question is: is there a way I can set Preview default image viewing settings to:
    - pixel to pixel zoom (100%)
    - aligned to top
    - opened in window of maximum size on the screen
    I will go to church, kneel and pray for you, stranger sage...
    Cheers

    Dear wjosten,
    1) I have the same problem as Dergler: I can not set the availability status in Messages (ML, v7.0). The settings and also support documents tell that one should be able to set the status in the Menue bar, without mentioning that an active iCloud account in not sufficient.
    2) Also, the Access to "Edit status menue" (and default status messages) is only possible when the activity report tool is displayed in the lower-left corner of the Messages window. With ONLY an iCloud account active this tool is not displayed.
    You correctly tell that the activity report tool and also access to availability settings is possible when the Bonjour account is set to "Enable Bonjour instant messaging".
    HOWEVER:
    I do not want to become visible in my university network, I only want to use Messages (and iMessages on iOS) to communicate with other people that have iPads or iPhones. Are the availability settings not used over iCloud? Why then the setting "Use the same setting for all accounts"?
    Is this intended, or is it a bug??

  • Default image in CSS disjointed rollover

    I have 5 pics that come up as CSS disjointed rollovers with 5 links. How can I make the first one the default, that shows up when the page loads, before the user hovers over one of the links? I tried placing the first pic on the page, just like you would any graphic, but I can't get the rollover pics to line up with it in Safari AND FF. When I get it aligned in one browser, it's slightly off in the other one. I've tried positioning by pixels, percentage and ems with no luck. Shouldn't there be something in the CSS that makes one of the pics the default? Thanks.
    /** rollover change color **/
    #rollover {
        padding: 0 1px 1px;
        margin-left: 0;
        font: bold 10px Verdana, sans-serif;
        text-align: center;
    #rollover li {
        list-style: none;
        margin: 0;
        display: inline;
        border-top-style: none;
        border-right-style: none;
        border-bottom-style: none;
        border-left-style: none;
        text-align: left;
    #rollover li a {
        text-decoration: none;
        background-color: #FFFFFF;
    #rollover li a:link {
        color: #448;
        text-align: center;
    #rollover li a:visited {
        color: #667;
        text-align: center;
    #rollover li a:hover, #rollover li a:active, #rollover li a:focus{
        color: #FFF;
        visibility: visible;
        text-align: center;
        background-color: #000000;
    /**disjointed image rules**/
    #rollover li a span {
        visibility:hidden;
        display:block;
        position:absolute;
        left:27.8%; /**adjust image position in % or px as needed**/
        top:0%; /**adjust image position in % or px as needed**/
        text-align: center;/*color:#666;*/
    #rollover li a:hover span, #rollover li a:active span, #rollover li a:focus span {
    visibility:visible;

    Sorry to be such a pain, but a new problem presents. The nav boxes are cut off at the top in IE 7, or, rather, IE 8 in compatibility mode.
    http://www.paulcbuff.com/pcb2009/rollemover.html
    No significant errors when I validated the CSS and HTML, except for  _height:200px, which I tried commenting out to no avail.
    Thanks!
    #Relative {position: relative; margin:0 auto 14px auto; min-height:200px; _height:200px /**for IE6 Only**/ }
    /**menu**/
    #navlist {
        padding: 0 1px 1px;
        margin-left:0;
        font-family: Verdana, sans-serif;
        font-size: 10px;
        font-weight: bold;
        color: #FFFFFF;
    #navlist li {
    list-style: none;
    margin: 0;
    display: inline;}
    #navlist li a {
        padding: 0.5em 0.5em 0.5em 0.75em;
        text-decoration: none;
        background-color: #ffcc33;
        border-width: 1px;
        border-style: solid;
        border-top-color: #000000;
        border-left-color: #AAB;
        color: #FFFFFF;
    #navlist li a:link {
        color: #448;
        border: 1px solid #000000;
    #navlist li a:visited {
        color: #ffcc33;
    #navlist li a:hover, #navlist li a:active, #navlist li a:focus{
        /**border-color: #FF9900;**/
        color: #FFF;
        visibility: visible;
        background-color: #6633cc;
        border: 1px solid #000000;
    /**Default Image container**/
    #defaultImage {
    visibility:visible;
    display:block;
    position:absolute;
    left:110px; /**adjust position in pixels or % **/
    top:50px; /**adjust position in pixel or %**/
    /**disjointed image rules**/
    #navlist li a span {
    visibility:hidden;
    display:block;
    position:absolute;
    left:110px; /**position same as default image layer above**/
    top:50px; /**position same as default image layer above**/
    /*color:#666;*/ }
    #navlist li a:hover span, #navlist li a:active span, #navlist li a:focus span {
    visibility:visible;}
    a img {border:none}
    /**end menu**/

  • Default image in front of video

    Assuming the player is set to autoPlay false, has anyone setup a player to have a default image in place of video until the user hits play? If so how did you do it?

    Found the Poster Frame example which is exactly what I want to do. Now I'm trying to interaget that into the OSMFPlater sample but its not working.
    in place of using url = configuration.url to set the media value I'm try this
    var REMOTE_IMAGE:String = "http://mediapm.edgesuite.net/strobe/content/test/train.jpg";
    var serialElement:SerialElement = new SerialElement();
    serialElement.addChild(new PosterFrameElement(new URLResource(REMOTE_IMAGE)));
    serialElement.addChild(new VideoElement(new URLResource(configuration.url)));
    media = serialElement;
    I have the supporting classes in place and they seem to be working. I see the image bink briefly sometime so it is getting loaded and the video plays so it is also getting loaded it just does not hold on the image until you hit play like it does in the exanple. I'm have trouble figuring out why.
    I to would also be intrested if anyone has found any other ways to accomplish a poster frame.

  • Define Default Image Style option ignores Inline setting

    I am writing my Vectorworks training manuals using Pages 09 which have a lot of images in them. I want all my images to be inline not floating.
    I have followed the instructions in the Help to set my default image style.
    I select an image, choose outline, shadows, and inline from the Inspector and then choose Define Default Image Style from the Format/Advanced menu.
    All the settings EXCEPT the Inline are saved. And having to change from Floating to Inline each time is a real pain.
    What am I doing wrong?

    Hi vectorworks trainer
    Floating Image is not an attribute of the default image style.
    A way around this is to drag a folder of your images into the Media Browser.
    Select the image you want in the media browser, copy and click into the text where you want the image and paste. You can also copy and paste from the desktop.
    This demonstrates several elements of the poor UI design in OSX.
    1. That the obvious (drag & drop) doesn't work as expected
    2. Inserting the cursor where you want the image then going to the media browser, loses the focus in the document.
    3. The focus does not stay consistent between selection and insertion points.
    4. Dragging in text from the desktop behaves differently and does go into the insertion point.
    Peter
    btw How goes with VectorWorks? We really need a drawing program to fill in the gaps in iWork. Particularly useful would be one that can save Pages' Shapes and allow drag & drop/copy & paste Shapes into Pages documents.

  • Remove Default image

    I have read that to alleviate some of the slowness in 1.5.0_X you can remoce the default image when an applet is loading. (The spinning animation) What file do I edit to achieve this?

    http://www.rittmanmead.com/2009/04/08/customizing-obiee-dashboard-banners/

  • Changing Default Image Format After Creating Folio

    Is it possible to change the default image format to "PDF" after creating the folio. I just realized the PDF can allow for zooming on the iPad. Would this make for a larger file size?

    Hi
    follow this :
    step 1: save a image in gif format with z or y intial letter
    step 2: goto tcode smw0
    step 3: select Binary data
    step 4: click find button
    step 5: click execute
    step 6: goto settings > maintain MIME type
    step 7: click create > type =*.gif >extension =.GIF click ok and then go back
    step 8: click create >OBJ Name=name of image with extension>desc=any>click import
    step 9: select image click local object
    step 10: tcode sm30
    table name >SSM_CUST click maintain
    enter parameter RESIZE_IMAGE value =no
    START_IMAGE value =name of object name / image name with extention (in capiatl letter)
    step 11: click save
    step 12: logoff and login.
    Also refer to http://it.toolbox.com/wiki/index.php/Change_the_logo_on_the_right_hand_side_in_SAP
    if you face any issues
    This will do
    Rohit

Maybe you are looking for

  • Wont open in Elements

    I set the preferences to edit in Elements 3 and Elements opens when I double click the picture but will not open with the picture. Any ideas? I did not have any trouble getting this to work in iPhoto 05.

  • Connecting two printers wirelessly to Airport network?

    Hi, I currently have a working wireless network with the Linksys Wireless-B Broadband Router BEFW11S4 - which I believe is 802.11b - that connects 2-4 laptops at any point in time. I just purchased the new Airport Extreme 54 mbp Base Station. I would

  • [SOLVED] Thinkpad T61: No VGA out

    Using KMS (kernel mode setting) ... no xorg.conf. xrandr doesn't even see the VGA cable as plugged in. I see notes on /proc/acpi/ibm/video on ThinkWiki ... mine looks like: # cat /proc/acpi/ibm/video status:         supported lcd:            enabled

  • Sound input read multiple soundcards

    Heey everybody, I have a problem. I want to read two different signals at the same time from 2 different soundcards. 1 internal soundcard from my laptop, and 1 usb soundcard.  So i used the Acquire Sound VI. Reading both signals at the same time is n

  • TCP chat filtering by listbox multiline, is it possible?

    Hey, would you help me  so, i have a TCP chat one-way. and i need to filter every chat which will be forward to end-devices, this is a scenario: client 1, client 2, client 3, etc -----> Filter -----> end devices. my problem is in Filter, i have listb