CodeIgniter Forums
How to add thumbnail in articles in my codeigniter blog? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forum-20.html)
+--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forum-23.html)
+--- Thread: How to add thumbnail in articles in my codeigniter blog? (/thread-59611.html)



How to add thumbnail in articles in my codeigniter blog? - El Forum - 10-27-2013

[eluser]Unknown[/eluser]
Hello Developers,

I have created a blog CMS and successfully fetches all data like: categories, pages, articles by category name etc.

But Now I want to add thumbnail image in my post articles. I am new at Codeigniter. So I need help.

I give my article table in below:

Code:
CREATE TABLE `articles` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `title` varchar(100) NOT NULL,
  `slug` varchar(100) NOT NULL,
  `pubdate` date NOT NULL,
  `body` text NOT NULL,
  `created` datetime NOT NULL,
  `modified` datetime NOT NULL,
  `category_id` int(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB  DEFAULT CHARSET=utf8 AUTO_INCREMENT=23 ;

How to upload this thumbnail with article and how fetch this thumbnail image in articles view.

Please help me.


How to add thumbnail in articles in my codeigniter blog? - El Forum - 10-27-2013

[eluser]CroNiX[/eluser]
Look at the upload helper. Also, I wouldn't store the image in the database. I'd store the path to the image and leave the image on the filesystem.