|
Needs no code for me.
When I prepare an article (in MS Edge Chromium) and want a picture there,
I copy the image from Word, right click in browser, then appears a box where I can paste the image:
Quote: Please paste inside the following box using the keyboard (Ctrl/Cmd+V) and hit OK
|
|
|
|
|
You should just be able to upload a bigger version of the image, and the article will automatically do it.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Hi Sean,
I will try it this way.
Is there a way to have a image clickable, but the default is 400 pixels width instead of 700 ?
Like just before this position Using Bitwise Operations on Bitfields as a Primitive SIMD[^]
The mechanical mouse image is 400, with comment on the side, and I would like it clickable.
Thanks for your time.
Patrice
“Everything should be made as simple as possible, but no simpler.” Albert Einstein
|
|
|
|
|
I have created a home page in codeigniter and have created a home controller in it. Index method has been created in the home controller, in which all articles have been shown. Now another function is added in the home controller in which to show all articles of single category, I also made model but in this show all articles in all categories. If I am calling only method then query is working but showing in home html page then all data showing all category.please help me
view page
<?php $this->load->view('front/header'); ?>
<div class="container pt-4 pb-4">
<h3 class="pb-3">About Company</h3>
<p class="text-muted"> Nike clearly knows its audience and makes their mission obvious to them as soon as they land on the About Us page. There's no question that the visitor is in the right place and understands exactly what Nike has set out to do. </p>
<p class="text-muted"> Nike clearly knows its audience and makes their mission obvious to them as soon as they land on the About Us page. There's no question that the visitor is in the right place and understands exactly what Nike has set out to do. </p>
</div>
<!--computer category list-->
<?php if(!empty($articles)){?>
<?php $this->load->view('front/computer_category');?>
<?php }?>
<!--yoga news start-->
<?php if(!empty($articles)){?>
<div class="pb-4 pt-4">
<div class="container">
<div class="row gx-4">
<div class="p-3 border bg-success text-white">
<h3>योग</h3>
</div>
</div>
<div class="row pb-3 pt-4">
<?php foreach ($articles as $article) {?>
<div class="col-md-3">
<div class="card">
<?php if(file_exists('./public/uploads/articles/thumb_admin/'.$article['image'])){?>
<img src="<?php echo base_url('public/uploads/articles/thumb_admin/'.$article['image'])?>" class="card-img-top" alt="">
<?php }?>
<div class="card-body">
<p class="card-text"><?php echo $article['title'];?></p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<?php }?>
</div>
</div>
</div><!--latest blogs-->
<?php }?>
<!--yoga news end-->
<!--lifestyle news start-->
<?php $this->load->view('front/lifestyle');?>
<!--lifestyle news end-->
<!--technology news start-->
<?php if(!empty($articles)){?>
<div class="pb-4 pt-4">
<div class="container">
<div class="row gx-4">
<div class="p-3 border bg-success text-white">
<h3>लाइफस्टाइल</h3>
</div>
</div>
<div class="row pb-3 pt-4">
<?php foreach ($articles as $article) {?>
<div class="col-md-3">
<div class="card">
<?php if(file_exists('./public/uploads/articles/thumb_admin/'.$article['image'])){?>
<img src="<?php echo base_url('public/uploads/articles/thumb_admin/'.$article['image'])?>" class="card-img-top" alt="">
<?php }?>
<div class="card-body">
<p class="card-text"><?php echo $article['title'];?></p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<?php }?>
</div>
</div>
</div><!--latest blogs-->
<?php }?>
<!--technology news end-->
<div class="bg-light pb-4">
<div class="container">
<h3 class="pb-3 pt-4">OUR SERVICES</h3>
<div class="row">
<div class="col-md-3">
<div class="card">
<img src="<?php echo base_url('public/images/box1.jpg');?>" class="card-img-top" alt="">
<div class="card-body">
<h5 class="card-title">Website Development</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<div class="col-md-3">
<div class="card">
<img src="<?php echo base_url('public/images/box2.jpg');?>" class="card-img-top" alt="">
<div class="card-body">
<h5 class="card-title">Website Development</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<div class="col-md-3">
<div class="card">
<img src="<?php echo base_url('public/images/box3.jpg');?>" class="card-img-top" alt="">
<div class="card-body">
<h5 class="card-title">Website Development</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<div class="col-md-3">
<div class="card">
<img src="<?php echo base_url('public/images/box4.jpg');?>" class="card-img-top" alt="">
<div class="card-body">
<h5 class="card-title">Website Development</h5>
<p class="card-text">Some quick example text to build on the card title and make up the bulk of the card's content.</p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
</div>
</div>
</div><!--our services-->
<?php if(!empty($articles)){?>
<div class="pb-4 pt-4">
<div class="container">
<h3 class="pb-3 pt-4">LATEST BLOGS</h3>
<div class="row">
<?php foreach ($articles as $article) {?>
<div class="col-md-3">
<div class="card">
<?php if(file_exists('./public/uploads/articles/thumb_admin/'.$article['image'])){?>
<img src="<?php echo base_url('public/uploads/articles/thumb_admin/'.$article['image'])?>" class="card-img-top" alt="">
<?php }?>
<div class="card-body">
<p class="card-text"><?php echo $article['title'];?></p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<?php }?>
</div>
</div>
</div><!--latest blogs-->
<?php }?>
<?php $this->load->view('front/footer'); ?>
Home controller page
<?php
class Home extends CI_Controller{
function index(){
$this->load->model('Article_model');
$param['offset']=4;
$param['limit']=0;
$articles=$this->Article_model->getArticlesFront($param);
";
//exit;
$data['articles']=$articles;
$this->load->view('front/home',$data);
}
function computerCategory($category_id=43){
$this->load->model('Category_model');
$this->load->model('Article_model');
$this->load->helper('text');
$this->load->library('pagination');
$param['offset']=4;
$param['limit']=0;
$category=$this->Category_model->getCategory($category_id);
$articles=$this->Article_model->getComputerArticlesFront($param);
$data=[];
$data['articles']=$articles;
$data['category']=$category;
//$data['pagination_links']=$pagination_links;
#$this->load->view('front/blog',$data);
$this->load->view('front/computer_category',$data);
}
//function computerCategory(){
//$this->load->model('Category_model');
//$this->load->model('Article_model');
//$param['offset']=4;
//$param['limit']=0;
//$articles=$this->Article_model->getComputerArticlesFront($param);
//$data=[];
//$data['articles']=$articles;
//$this->load->view('front/computer_category',$data);
//echo "
";
//print_r($articles);
//echo " ";
//exit;
//}
//function lifestyleCategory(){
//$this->load->model('Article_model');
//$param['offset']=4;
//$param['limit']=0;
//$articles=$this->Article_model->getlifestyleArticlesFront($param);
//$data['articles']=$articles;
//$this->load->view('front/computer_category',$data);
//echo "
";
//print_r($articles);
//echo " ";
//exit;
//}
function lifestyleCategory($category_id=42){
$this->load->model('Category_model');
$this->load->model('Article_model');
$this->load->helper('text');
$this->load->library('pagination');
$param['offset']=4;
$param['limit']=0;
$category=$this->Category_model->getCategory($category_id);
$articles=$this->Article_model->getlifestyleArticlesFront($param);
$data=[];
$data['articles']=$articles;
$data['category']=$category;
//$data['pagination_links']=$pagination_links;
#$this->load->view('front/blog',$data);
$this->load->view('front/computer_category',$data);
}
}
?>
Article model
<?php
class Article_model extends CI_Model{
function getArticle($id){
$this->db->select('articles.*,categories.name as category_name');
$this->db->where('articles.id',$id);
$this->db->join('categories','categories.id=articles.category','left');
$query=$this->db->get('articles');
$article=$query->row_array();
return $article;
}
function getArticles($param= array()){
$query = $this->db->get('articles');
if(isset($param['offset']) && isset($param['limit'])){
$this->db->limit($param['offset'],$param['limit']);
}
if(isset($param['q'])){
$this->db->or_like('title',trim($param['q']));
$this->db->or_like('author',trim($param['q']));
}
$query = $this->db->get('articles');
#echo $this->db->last_query();
$articles = $query->result_array();
return $articles;
}
function getArticlesCount($param= array()){
if(isset($param['q'])){
$this->db->or_like('title',trim($param['q']));
$this->db->or_like('author',trim($param['q']));
}
if(isset($param['category_id'])){
$this->db->where('category',$param['category_id']);
}
$count=$this->db->count_all_results('articles');
return $count;
}
function addArticle($formArray){
$this->db->insert('articles',$formArray);
return $this->db->insert_id();
}
function updateArticle($id,$formArray){
$this->db->where('id',$id);
$this->db->update('articles',$formArray);
}
function deleteArticle($id){
$this->db->where('id',$id);
$this->db->delete('articles');
}
function getArticlesFront($param= array()){
if(isset($param['offset']) && isset($param['limit'])){
$this->db->limit($param['offset'],$param['limit']);
}
if(isset($param['q'])){
$this->db->or_like('title',trim($param['q']));
$this->db->or_like('author',trim($param['q']));
}
if(isset($param['category_id'])){
$this->db->where('category',$param['category_id']);
}
$this->db->select('articles.*,categories.name as category_name');
$this->db->where('articles.status',1);
$this->db->order_by('articles.created_at','DESC');
$this->db->join('categories','categories.id=articles.category','left');
$query = $this->db->get('articles');
#echo $this->db->last_query();
$articles = $query->result_array();
return $articles;
}
function getComputerArticlesFront($param= array()){
if(isset($param['offset']) && isset($param['limit'])){
$this->db->limit($param['offset'],$param['limit']);
}
if(isset($param['q'])){
$this->db->or_like('title',trim($param['q']));
$this->db->or_like('author',trim($param['q']));
}
if(isset($param['category_id'])){
$this->db->where('category',$param['category_id']);
}
$this->db->select('articles.*');
$this->db->where('articles.category',43);
$this->db->order_by('articles.created_at','DESC');
$query = $this->db->get('articles');
$articles = $query->result_array();
return $articles;
}
function getlifestyleArticlesFront($param= array()){
if(isset($param['offset']) && isset($param['limit'])){
$this->db->limit($param['offset'],$param['limit']);
}
if(isset($param['q'])){
$this->db->or_like('title',trim($param['q']));
$this->db->or_like('author',trim($param['q']));
}
if(isset($param['category_id'])){
$this->db->where('category',$param['category_id']);
}
$this->db->select('articles.*,categories.name as category_name');
$this->db->where('articles.category',42);
$this->db->order_by('articles.created_at','DESC');
$this->db->join('categories','categories.id=articles.category','left');
$query = $this->db->get('articles');
$articles = $query->result_array();
return $articles;
}
}
?>
computer_category view page
<!--computer news start-->
<?php if(!empty($articles)){?>
<div class="pb-4 pt-4">
<div class="container">
<div class="row gx-4">
<div class="p-3 border bg-success text-white">
<h3>कंप्यूटर</h3>
</div>
</div>
<div class="row pb-3 pt-4">
<?php foreach ($articles as $article) {?>
<div class="col-md-3">
<div class="card">
<?php if(file_exists('./public/uploads/articles/thumb_admin/'.$article['image'])){?>
<img src="<?php echo base_url('public/uploads/articles/thumb_admin/'.$article['image'])?>" class="card-img-top" alt="">
<?php }?>
<div class="card-body">
<p class="card-text"><?php echo $article['title'];?></p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<?php }?>
</div>
</div>
</div><!--latest blogs-->
<?php }?>
<!--computer news end-->
<!--lifestyle start-->
<?php if(!empty($articles)){?>
<div class="pb-4 pt-4">
<div class="container">
<div class="row gx-4">
<div class="p-3 border bg-success text-white">
<h3>lifestyle</h3>
</div>
</div>
<div class="row pb-3 pt-4">
<?php foreach ($articles as $article) {?>
<div class="col-md-3">
<div class="card">
<?php if(file_exists('./public/uploads/articles/thumb_admin/'.$article['image'])){?>
<img src="<?php echo base_url('public/uploads/articles/thumb_admin/'.$article['image'])?>" class="card-img-top" alt="">
<?php }?>
<div class="card-body">
<p class="card-text"><?php echo $article['title'];?></p>
<a href="#" class="btn btn-primary">Go somewhere</a>
</div>
</div>
</div><!--card 1-->
<?php }?>
</div>
</div>
</div><!--latest blogs-->
<?php }?>
|
|
|
|
|
Wrong forum.
This forum is for questions about writing articles to be published on CodeProject. If you want to ask for help with your code, you need to pick a more appropriate forum.
Either post it in Quick Answers[^], or in the Web Development[^] forum.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
How to find my status of the article. In my article section when I click on my submitted article, it's giving me a message
Ticket:
Error: An error occurred in this page. The error has been recorded and the site administrator informed.
Abort, Retry, Fail?_
|
|
|
|
|
|
Hello Team,
I would like to inform you that I published one article and my member id is 15706543. Could you please live our link and let me know on cathrinewong67@gmail.com.
Thanks & Regards,
Aayushi
|
|
|
|
|
Your article featured links to a commercial enterprise. That's unpaid advertising, and such articles are deleted as spam. You'll also notice that your account has been closed.
|
|
|
|
|
Ironically, spammer leaves spammable email address in forum.
|
|
|
|
|
... and an interesting correlation between sig name and email addy.
Software rusts. Simon Stephenson, ca 1994. So does this signature. me, 2012
|
|
|
|
|
Salve ho visto che la domanda che ho fatto contiene termini errati.Come faccio a cancellarla per riformularla meglio?
|
|
|
|
|
|
Hello,
this Tip/Trick article I wrote : An Efficient String to Unsigned int ID Struct[^] was put in the Web Development/HTML section

, but it should be in something like General Programming/optimization or Programming Langage/C++.
I tried to change tags without effect.
Any suggestion ?
thanks
|
|
|
|
|
Ah ha! All fixed.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
|
|
1. This forum is for questions relating to articles you have written, or plan to write.
2. Someone has now an answered.
|
|
|
|
|
Thanks very much for your message. The question has been removed.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Hi,
I submitted an article yesterday 6 Jun 2022, and I can't access it now, no draft, no article, no explanatory notification.
Thanks,
Ion
crc of abc
|
|
|
|
|
Thanks very much for your message. It looks like you tried to submit an article that needed a little more work. Would you be willing to make some changes to your article? CodeProject articles have a certain layout to follow, so that users can learn the most from them. Each article attempts to answer the following questions: What problem does this solution solve? How does this help someone else? How does the code actually work? What is going on inside the code snippets?
Here is a submission from a first time author who did a terrific job, just to give you a basic overview of what a beginner article might looks like:
Avoiding InvokeRequired[^]
You can take a look at our article FAQ here:
CodeProject Article FAQ - Part 2: How to Post an Article on CodeProject [^]
For tips on writing articles, please see this article:
A Guide To Writing Articles For Code Project[^]
You can also see our submission guidelines here:
Submission Guidelines[^]
Please let me know if you have further questions.
Here is your article so you can access it. Currently only those with the link can. It will also be on a 20 min lockout because I opened it:
ATL window program, minimal[^]
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
Article: CsvFileProcessor[^]
First off, poor title.
Next, a pure code dump with little to no explanation of how it works, nor examples of usage.
Lastly, template content left in article:
Basic Principles
No
Step by Step Walk-throughs
For walk-through style articles, ensure your screenshots, code samples and code are up to date, or at the least, ensure you're clear on what version of a technology you're discussing. APIs change!
The other question is, how did this article get a 5* rating???
I have done no reading of the the article to check spelling and grammer as it is already approved...
I am not sure how this got approved. How many of those approved the article actually vett it? A bit of a concern.
Graeme
"I fear not the man who has practiced ten thousand kicks one time, but I fear the man that has practiced one kick ten thousand times!" - Bruce Lee
|
|
|
|
|
Let's see if the author is willing to beef it up a little. I think it could be saved.
Thanks,
Sean Ewington
CodeProject
|
|
|
|
|
How can I claim that I am that author?
|
|
|
|
|
Author of what? If you can find the article, you'll see your original username.
|
|
|
|
|