Image in header displays in Safari, FFX and Opera, but not in IE (on 9, btw).
Not sure if this matters, but when using IE's developer tools, it shows "Empty Text Node" all over the place.
I don't even know what other code to attach to this post...let me know.
site url: http://glassinfusion.accountsupport.com/
Header Code:
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>" />
<?php if (is_search()) { ?>
<meta name="robots" content="noindex, nofollow" />
<?php } ?>
<title>
<?php
if (function_exists('is_tag') && is_tag()) {
single_tag_title("Tag Archive for ""); echo '" - '; }
elseif (is_archive()) {
wp_title(''); echo ' Archive - '; }
elseif (is_search()) {
echo 'Search for "'.wp_specialchars($s).'" - '; }
elseif (!(is_404()) && (is_single()) || (is_page())) {
wp_title(''); echo ' - '; }
elseif (is_404()) {
echo 'Not Found - '; }
if (is_home()) {
bloginfo('name'); echo ' - '; bloginfo('description'); }
else {
bloginfo('name'); }
if ($paged>1) {
echo ' - page '. $paged; }
?>
</title>
<link rel="shortcut icon" href="/favicon.ico">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>">
<link rel="icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" type="image/x-icon" />
<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" type="image/x-icon" />
<?php if ( is_singular() ) wp_enqueue_script('comment-reply'); ?>
<?php wp_head(); ?>
</head>
<body>
<div id="wrapper">
<div id="header">
<!-- start logo -->
<h1><a href="<?php echo get_option('home'); ?>/"><span><?php bloginfo('name'); ?></span>
<img src="<?php bloginfo('template_directory'); ?>/images/logo3.jpg" width="" height=""alt="<?php bloginfo('name'); ?>"/>
</a></h1>
<!-- End Logo -->
<?php
/* A sidebar on top of the content? Yep. You can can customize
* your top with three columns of widgets.
*/
get_sidebar('navigation');
?>
</div><!--end header -->
<!-- start middle -->
<div id="middle">
Try with different format image like gif instead of jpg in the case of those images which are not displaying.
Related
When I share post viva whatsapp share button in codeigniter postted image not showing like thumlin and we image fetch form database
and also I see view source to image name showing proparlly
View Source
<meta property="og:image:secure_url" content="htttp://statenews.co.in/images/product_images/1000raj.jpg" />
View
Head Meta tag
<meta name="description" content="The Fatest News Channel">
<meta property="og:title" content="StateNews ! Hosla Sach Karne Ka..">
<meta property="og:type" content="article">
<meta property="og:site_name" content="News">
<meta property="og:url" content="<?php echo base_url(); ?>" />
<?php $file=base_url()."homeassets/images/".$product_images->image;
if(file_exists($file)){
?>
<meta property="og:image" content="<?php echo base_url(); ?>images/product_images/<?php echo $product_images->image; ?>" />
<?php
}else{
?>
<meta property="og:image" content="<?php echo base_url(); ?>images/product_images/<?php echo $product_images->image; ?>" />
<?php
}
?>
Whatsapp Button
<li style="background: #71b733;">
<a href="https://api.whatsapp.com/send?text=<?php echo base_url() . $_SERVER['REQUEST_URI']; ?>" data-link="<?php echo base_url() . $_SERVER['REQUEST_URI']; ?>" target="_blank" style="color:inherit;">
<i class="fa fa-whatsapp"></i>
</a>
</li>
Controller
$data['products'] = $this->User_model->get_all_data_by2('products','product_images','product_id','master','Common',base_url(),'added_at','DESC',10);
$this->load->view('include/header',$data);
$this->load->view('home',$data);
$this->load->view('include/footer',$data);
Model
function get_all_data_by2($table1='',$table2='',$colum1='',$colum='',$value='',$value2='',$color='',$ord='',$limit=''){
if((!empty($value)) && (!empty($colum))) {
$this->db->where($colum, $value);
}
if(!empty($value2)){
$this->db->or_where($colum, $value2);
}
if((!empty($ord)) && (!empty($color))){
$this->db->order_by($color,$ord);
}
if(!empty($limit)){
$this->db->limit($limit);
}
$query = $this->db->select('*')
->from($table1)
->join($table2, "$table2.$colum1 = $table1.$colum1")
->get();
return $query->result();
}
I am having trouble creating a drop down that can sort my search results, any help is welcome. I have tried a couple of different methods that I have found from the internet but so far none have worked (I have no doubt in my mind that it is user error as others seem to have had success using those methods.) I apologise in advance for my being new at coding.
I have put my new code into this post if you could assess it and explain to me why it is not working I would be eternally grateful to you.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Jenewan Pets</title>
<link rel="icon" type="image/gif/png" href="img/Logo.png"/>
<link rel="stylesheet" type="text/css" href="css/main.css" />
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="//maxcdn.bootstrapcdn.com/font-awesome/4.1.0/css/font-awesome.min.css" rel="stylesheet">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
</head>
<body>
<body background="img/bckgrnd.png">
<div id="container">
<div id="header">
<img src="img/Header.png" style="position: absolute; top: 0px;"/>
<h1>
<img src="img/logo.png" alt="logo" height="100px" width="100px" border="0px" style=position:relative; />
<div class="box">
<div class="container-1">
<form method="get" action="searchresults11.php" id="searchForm">
<input type="text" id="searchBox" name="q" placeholder="Let's Sniff it Out...">
<div class="search-icon">
<img class="search-icon" img src="img/PawSearch.png" width="18" height="18" alt="search icon" />
</div>
</div>
</div>
</h1>
</div>
<div id="content">
<div id="nav">
<ul>
<li><a class="selected" href="/index.php">Home</a></li>
<li>Dogs</li>
<li>Cats</li>
<li>Birds</li>
<li>Reptiles/Exotic</li>
<li>Aquatics</li>
</ul>
</div>
<div id="Results">
<h2>We sniffed and we found...</h2>
<?php
$con=mysqli_connect("localhost","root","","catalog");
// Check connection
if (mysqli_connect_errno())
{
echo "Failed to connect to MySQL: " . mysqli_connect_error();
}
if(isset($_GET['q'])){
$searchq = $_GET['q'];
}
$q = mysqli_query($con,"SELECT * FROM final_dog_catologue_full where
keywords LIKE '%$searchq%' OR brand LIKE '%$searchq%' OR name LIKE '%$searchq%' LIMIT 0, 40") or
die(mysqli_error("Sorry we lost the scent..."));
echo "<table border='2'>
<tr>
<th> </th>
<th id='Name_Header'>Item Name</th>
<th>Brand</th>
<th id='Price_Header'>Price</th>
</tr>";
while($row = mysqli_fetch_array($q))
{
echo "<tr>";
echo "<td><img src='img/".$row['Picture']."'></td>";
echo "<td headers='Name_Header'>" . $row['Name'] . "</td>";
echo "<td headers='Brand'>" . $row['Brand'] . "</td>";
echo "<td headers='Price_Header'>£" . $row['Retail_Price_With_Delievery'] . "</td>";
echo "</tr>";
}
echo "</table>";
mysqli_close($con);
?>
<script type="text/javascript">
var table = $('table');
$('#Name_Header, #Price_Header')
.wrapInner('<span title="sort this column"/>')
.each(function(){
var th = $(this),
thIndex = th.index(),
inverse = false;
th.click(function(){
table.find('td').filter(function(){
return $(this).index() === thIndex;
}).sortElements(function(a, b){
return $.text([a]) > $.text([b]) ?
inverse ? -1 : 1
: inverse ? 1 : -1;
}, function(){
// parentNode is the element we want to move
return this.parentNode;
});
inverse = !inverse;
});
});
</script>
</div>
</div>
<div id="footer">
Copyright © 2017 Jenewan Pets
<!-- jQuery first, then Tether, then Bootstrap JS. -->
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
</body>
</html>
I've an e-commerce site in Magento 1.9 with two version: English and French. I've to change some words in both English version and in the French. For example, in the English version, I've to change word "BAG" in the homepage menu.
I've to replace "BAG" with "SHOPPING BAG" but, inserting string "BAG", "SHOPPING BAG" (or "bag","shopping bag", or "Bag", "Shopping bag") into translate.csv of the theme (in the English folder) any change is shown in the frontend. Activating path hints for the English version I notice that the phtml file that builds the block that contains this menu is the following:
<meta http-equiv="Content-Type" content="<?php echo $this->getContentType() ?>" />
<title><?php echo $this->getTitle()?></title>
<meta name="description" content="<?php echo htmlspecialchars($this->getDescription()) ?>" />
<meta name="keywords" content="<?php echo htmlspecialchars($this->getKeywords()) ?>" />
<meta name="robots" content="<?php echo htmlspecialchars($this->getRobots()) ?>" />
<link rel="icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<link rel="shortcut icon" href="<?php echo $this->getFaviconFile(); ?>" type="image/x-icon" />
<?php
$currentUrl = Mage::helper('core/url')->getCurrentUrl();
if (preg_match('/^https/', $currentUrl)) {
$currentUrl = str_replace('https://', 'http://', $currentUrl);
}
$exclusions = array(
'checkout/',
'customer/account/'
);
$regexUrl = '/^' . str_replace(array('/', '.'), array('\\/', '\\.'), Mage::getBaseUrl() . '(?:(?:' . implode(')|(?:', $exclusions) . '))') . '/';
if (!preg_match($regexUrl, $currentUrl)) {
echo '<link rel="canonical" href="' . $currentUrl . '" />';
}
?>
<!--[if lt IE 7]>
<script type="text/javascript">
//<![CDATA[
var BLANK_URL = '<?php echo $this->helper('core/js')->getJsUrl('blank.html') ?>';
var BLANK_IMG = '<?php echo $this->helper('core/js')->getJsUrl('spacer.gif') ?>';
//]]>
</script>
<![endif]-->
<?php echo $this->getCssJsHtml() ?>
<?php echo $this->getChildHtml() ?>
<?php echo $this->getIncludes() ?>
I think that there are some function (may be getHtmlChild()) that overwrites my translation because other words are translated adding new strings into traslate.csv.
Which file or function I've to change to see "shopping bag" in the frontend of my site? Why some words are changed with translate.csv and others not? Can you help me, please? Thank you very much!
First, all strings in the translation files are casesensitive.
When I look for a word to translate for example "add to my cart" then I usually do like this:
Open a terminal and go to the root of your magento shop and run:
cd app
git grep "add to my cart" | grep csv
This gets all the hits from all your translation files in your entire project.
My result looks like this:
design/frontend/fortis/eke/locale/sv_SE/translate.csv:1:"Add to Cart","add to my cart"
locale/sv_SE/Mage_Catalog.csv:33:"Add to Cart","add to my cart"
In the result, first you se the path to the file and then the translation.
In my example the string was already translated. But now you know exactly what the base string is. Use this in you own translation file.
If you don´t get a hit in the translation files then the word or sentence might come from a cms-block or cms-page. To search for it there you have to connect to your SQL server and run some querys like this (one at the time):
select * from cms_block where content like '%add to my cart%';
select * from cms_page where content like '%add to my cart%';
From the result you can see what the block or page with the string is named. Go the backend and edit it.
i have integrated uploadify with codeigniter.i can't able select images while clicking the select photos.
MY View file
<!DOCTYPE HTML>
<html lang="en-GB">
<head>
<meta charset="UTF-8">
<title>Uploadify V3 & CodeIgniter</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="Capsone-System2" >
<!-- Styles -->
<link href="/assets/bootstrap/css/bootstrap.min.css" type="text/css" media="screen" rel="stylesheet"/>
<link href="<?php echo base_url;?>assets/js/jquery/uploadify_31/uploadify.css" type="text/css" media="screen" rel="stylesheet"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<!-- Main Content -->
<div class="container">
<h1 class="page-header">Uploadify V3 & CodeIgniter</h1>
<p>This is a simple tutorial demo showing Uploadify V3 working with CodeIgniter 2.1.2</p>
<?php echo form_open_multipart(); ?>
<ul class="unstyled">
<li>
<?php echo form_upload('userfile','','id="userfile"'); ?>
<?php echo (isset($error)) ? $error : ''; ?>
</li>
<li>
<?php echo form_button(array('content'=> 'Upload', 'id'=>'upload-file', 'class'=>'btn btn-large btn-primary')); ?>
</li>
</ul>
<?php echo form_close(); ?>
</div>
<!-- End Of Main Content -->
<!--<script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>-->
<!--<script>window.jQuery || document.write('<script src="<?php echo base_url;?>assets/js/jquery/jquery-1.8.0.min.js"></script>')</script>-->
<script src="<?php echo base_url;?>assets/js/jquery/uploadify_31/jquery.uploadify-3.1.min.js" type="text/javascript"></script>
<!--<script src="<?php echo base_url;?>assets/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>-->
<script type="text/javascript">
$(document).ready(function () {
var base_url = '<?php echo base_url; ?>';
alert(base_url);
$('#upload-file').click(function (e) {
e.preventDefault();
$('#userfile').uploadify('upload', '*');
alert(base_url);
});
$('#userfile').uploadify({
'debug':true,
'auto':false,
'swf': base_url + 'assets/js/jquery/uploadify_31/uploadify.swf',
'uploader': base_url + 'uploadify_v3/do_upload',
'cancelImg': base_url + 'assets/javascript/jquery/uploadify_31/uploadify-cancel.png',
'fileTypeExts':'*.jpg;*.bmp;*.png;*.tif',
'fileTypeDesc':'Image Files (.jpg,.bmp,.png,.tif)',
'fileSizeLimit':'2MB',
'fileObjName':'userfile',
'buttonText':'Select Photo(s)',
'multi':true,
'removeCompleted':false,
'onUploadError' : function(file, errorCode, errorMsg, errorString) {
alert('The file ' + file.name + ' could not be uploaded: ' + errorString);
}
});
});
</script>
</body>
</html>
My Controller File
I have error uncaught exception: Call to StartUpload failed
<?php if (!defined('BASEPATH')) exit('No direct script access allowed');
/**
* #property CI_Upload $upload
*/
class Uploadify_v3 extends CI_Controller
{
public $view_data = array();
private $upload_config;
function __construct()
{
parent::__construct();
}
public function index()
{
$this->load->helper(array('url', 'form'));
$this->load->view('uploadify_v3', $this->view_data);
}
public function do_upload()
{
$this->load->library('upload');
$image_upload_folder = FCPATH . '/uploads';
if (!file_exists($image_upload_folder)) {
mkdir($image_upload_folder, DIR_WRITE_MODE, true);
}
$this->upload_config = array(
'upload_path' => $image_upload_folder,
'allowed_types' => 'png|jpg|jpeg|bmp|tiff',
'max_size' => 2048,
'remove_space' => TRUE,
'encrypt_name' => TRUE,
);
$this->upload->initialize($this->upload_config);
if (!$this->upload->do_upload()) {
$upload_error = $this->upload->display_errors();
echo json_encode($upload_error);
} else {
$file_info = $this->upload->data();
echo json_encode($file_info);
}
}
}
/* End of file uploadify_v3.php */
/* Location: ./application/controllers/uploadify_v3.php */
I have spent more time..still now i can't fix this error..please help me.
I too had the same problem, it was a security issue because I was hosting the flash .swf file on a separate domain eg: static.mysite.com
Make sure your swf file and post handler script are hosted on the same domain that you are accessing the site from.
Or if you need to add cross domain posting then see here:
http://www.adobe.com/devnet/adobe-media-server/articles/cross-domain-xml-for-streaming.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<?php
foreach($css_files as $file): ?>
<link type="text/css" rel="stylesheet" href="<?php echo $file; ?>" />
<?php endforeach; ?>
<?php foreach($js_files as $file): ?>
<script src="<?php echo $file; ?>"></script>
<?php endforeach; ?>
<style type='text/css'>
body
{
font-family: Arial;
font-size: 14px;
}
a {
color: blue;
text-decoration: none;
font-size: 14px;
}
a:hover
{
text-decoration: underline;
}
</style>
</head>
<body>
<div>
<a href='<?php echo base_url?>images_examples/example1'>Example 1 - Simple</a> |
<a href='<?php echo base_url?>images_examples/example2'>Example 2 - Ordering</a> |
<a href='<?php echo base_url?>images_examples/example3'>Example 3 - With group id</a>
</div>
<div style='height:20px;'></div>
<div>
<?php echo $output; ?>
</div>
</body>
</html>
Here i upload view file.but i can't able write controller function.i want how to install image_crud library and how to upload multiple images in database and store the image in folder.
Download the image-crud then extract the package
Place the files in the appropriate codeigniter's folder
config >> image_crud.php
controllers >> images_examples.php
libraries >> image_crud.php, image_moo.php
views >> example.php
Assets in the root of your CI folder
And in your url http://yourproject.localhost/images_examples/example1
Also import the sample database provided in the package