Images from my WP blog doesn't show in other sites - php

why does the images from my site http://allbusters.in doesn't load in other sites like http://jsfiddle.net or http://jsbin.com
Here is the JSBin Link to the check. it shows an image from another site which loads perfectly
http://jsbin.com/afahec

There is no such thing as </img>.
Remove it and properly close the <img tag with a />, then your image appears:
<img src='http://www.lantiis.com/images/top.png' />
<img src='http://allbusters.in/wp-content/uploads/2011/07/facebook_32.png' />
http://jsbin.com/otayuy/
Why?
Because non-compliant code is unpredictable.

Related

Something that cause plain iframe not to show on php page?

<div class="grid-5-12">
<iframe width="200" height="120" src="http://www.saweb.info/videos/nightclub.mp4" frameborder="0"></iframe>
</div>
I copied above direct from an "admin page" from Firefox developer page source and it works as standalone, but on the admin page itself it doesn't appear (it always did)
It also doesn't show even without the div. (It's in a parsley form and the iframe show the "current selected video")
Tested in Chrome and it also doesn't display while I can't find any similar error on the internet.
Anyone perhaps has an idea why the iframe don't appear / disappeared please?
is not used for play videos but to display another page. Some browsers might support this way of importing a video. But correct way to use tag like this for your video link.
<video width="200" height="120" controls>
<source src="http://www.saweb.info/videos/nightclub.mp4" type="video/mp4">
</video>

Icon usage in HTML with PHP

I have started learning html and php. I know very little coding of it. I am confused for using png icons in my action buttons. I have currently text button with css. I want use png icons instead that text buttons. I have used it like below
<td>
Edit
Activate
Delete
</td>
Now I want use png icons there instead of text. What should I do for it ?
I have icons located in directory called icons.
Sorry for my little knowledge.
Thanks
You can add icon as image in your code, check below snippet
<td><img src="https://dummyimage.com/20x20/000/fff.png&text=E" alt="Edit"/>
<img src="https://dummyimage.com/20x20/000/fff.png&text=A" alt="Activate"/>
<img src="https://dummyimage.com/20x20/000/fff.png&text=D" alt="Delete"/></td>
It depends on the structure of your web folder, where icons directory is in your web folder.
If you have icon directory in your root folder and php file is also in root then you can simply use below syntax :
<img src="icon/image_name.jpg" alt="" />
Or you can use complete path for icon folder relative to your website url as shown below :
<img src="http://localhost:8080/websitename/icon/image_name.jpg" alt="" />

Edit HTML files permanently with PHP

I am building a blogging website and I am facing troubles when I try to upload a photo. I need the photo to be pasted in the webpage. I know that javascript can do that, but it only affects the current session of the webpage. I need to permanently embed that image into the webpage as a child of this div element, for example:
<div id="img-wrapper"></div>
Everything is OK with PHP file uploads. How can I do that with PHP?
I assume its not an advisable solution as it increases the page size, but you can do this in the following manner:-
Some examples:
HTML:
<img alt="Embedded Image" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA..." />
CSS:
div.image {
width:100px;
height:100px;
background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIA...);
}
Here is a sample code
https://jsfiddle.net/casiano/xadvz/
For an online image to base 64 encode Click here

Assign button image to links from db

php newbie. echoing out links to product pages, the following code works fine:
<a href="<?php echo $rows[$product_buy];?>"<p>Click Here for Details</p></a>
but, would like to change text link "Click Here..." to an image of a button.
tried different ways, searched around, still haven't figured it out
You could simply style your link to look like a button (by giving it a class/id to make sure not all links are targeted) or you can put an img tag between the a tag.
<img src="path_to_img" alt="">

Open a fancybox gallery from another HTML file

I have two files, one with HTML code when I've diferent photo albums links, example:
<a href="albumprueba.php"><img class="fancyboxi"
src="Libro Fez/Libro Fez - 001.jpg" alt="image19"
width="91%" height="56" /></a>
And another file (is php) I've a routine that scans all the photos in a folder, and shows photos:
<a class="fancyboxi" data-fancybox-group="gallery" title="Laurea"
href="Libro Fez/<?php echo $archivos[$imagen_a_empezar]?>"><img
src="Libro Fez/<?php echo $archivos[$imagen_a_empezar]?>" alt="" width="19%"/></a>
I would like to open the HTML file from an album and open a fancybox with all the photos that showing the routine in PHP file.
I've tried to do in the HTML file this, but doesn't works:
<img src="Libro Fez/Libro Fez - 001.jpg" alt="image19" width="91%" height="56" />
Any idea? thank.
Your href is certainly malformed.
albumprueba.php?Libro Fez/Libro Fez - 001.jpg
That isn't an address as URLs cannot have spaces (go to it manually and check what the address is in the navigation bar in your browser). Moreover it's just landing on a jpeg - are you sure you want this link to be to a single image?
Other than that the anchor should work. Are you getting a 404 error after following the link? If you want the other html file to be perptually viewable from the parent page you should consider using an iframe.

Categories