Featured News Module

Register an Account
Reply
 
Thread Tools
Featured News Module
Developed by Yankidank Yankidank is offline
Developer Last Online: Feb 2012 Show Printable Version Email this Page
Designed for: Pligg 1.0.1
Released: 09-28-2009
Last Update: Never
Installs: 53
Makes Database Changes
Uses Module System
Can Reuse Source Code
Template Edits Required
Not Supported by Author
While working on a new template for Pligg I was trying to come up with the best way to manage articles that would appear on top of the homepage to feature select stories. I originally was thinking that I could use the "Groups" feature for Pligg, or even create a "Featured" category. Then I thought that those methods would not allow me to appropriately label my news and were not the best way to handle the featured news articles that I wanted on the homepage. That's when I turned to CMStheme's Featurify module, which allows admins to manually set up images that link to news article and rotate those images somewhere in your template. A few hours later I had created a "Featured" module for Pligg.

How it works
The first thing you will need to do is upload and install the module. Then add a snippet of code to the template file where you want the featured news to appear. You can do this by adding the following line to a .tpl file:
Code:
{$featured}
I suggest that you place it on your homepage by placing it in index_center.tpl and wrapping it with the following code so that it only shows up on the homepage and not the second, third, etc. pages.
Code:
{if $pagename == 'index' && count($templatelite.get) == 0}{$featured}{/if}
The Featured module has a nearly identical admin interface to the Featurify module. Admins can log in to the admin area and then navigate to a page where it displays your current featured news items. If you want to remove a news item you can easily edit or delete it, or if you don't have any you can click on the button to "Add Featured News". See the attached screenshots for examples.

The module is set to only grab the latest 4 news items from your Featured News list. The most recent item will be used to display the first news article with a larger image, while the second, third and fourth most recent article appear with a smaller thumbnail.

The template file used for this module ( /modules/featured/templates/featured.tpl ) has been designed to work with the new Arthemia Pligg template. If you are using another template you will want to customize this file to make it look better in your own template. You can also make some small tweaks to the file to change how many stories you want to appear, how many characters the smaller stories get in their descriptions before being cut off and other cosmetic changes.

Lastly, make sure that you CHMOD 0777 the /modules/featured/phpthumb/cache/ directory to ensure that thumbnails are able to be added to that folder.

Credits
CMStheme for his Featurify module.
phpthumb for generating and caching image thumbnails

Download Now

File Type: zip featured.1.0.zip (605.8 KB, 2492 views)

Screenshots

File Type: png featured1.png (39.1 KB, 2405 views)
File Type: png featured2.png (18.4 KB, 1531 views)
File Type: png featured3.png (74.9 KB, 1949 views)

Show Your Support

  • If you like this download support the author by donating.
  • This download may not be copied, reproduced or published elsewhere without author's permission.

Similar Downloads
Download Developer Category Replies Last Post
Arthemia Free Pligg Template Yankidank Free Templates 311 11:39 PM 02-09-2012
Headlinr: Featured News Manager PLMCHL Free Modules 12 01:47 PM 07-10-2011

Comments
  #52 (permalink)  
Old 03-02-2010, 08:47 AM
New Pligger
 
Join Date: Feb 2010
Posts: 3
How can I change the featured story urls to url method 2?
Thanks a lot in advance!

Best,
Michael
Reply With Quote
  #53 (permalink)  
Old 04-04-2010, 05:17 PM
New Pligger
Pligg Version: 1.0.3
 
Join Date: Apr 2010
Posts: 2
I've got a problem with the Image of the featured.
Nat 'n Alex United - Your source for news about Nat 'n Alex Wolff.



Code:
if (!$this->ImageMagickVersion() && !phpthumb_functions::gd_version()) {
					return $this->ErrorImage('Neither GD nor ImageMagick seem to be installed on this server. At least one (preferably GD), or better both, MUST be installed for phpThumb to work.');
				} elseif ($HeaderFourBytes == "\xD7\xCD\xC6\x9A") { // WMF
					return $this->ErrorImage($this->ImageMagickVersion() ? 'ImageMagick failed on WMF source conversion' : 'ImageMagick is unavailable and phpThumb() does not support WMF source images without it');
				} elseif ($HeaderFourBytes == '%PDF') { // "%PDF"
					return $this->ErrorImage($this->ImageMagickVersion() ? 'ImageMagick and GhostScript are both required for PDF source images; GhostScript may not be properly configured' : 'ImageMagick and/or GhostScript are unavailable and phpThumb() does not support PDF source images without them');
				} elseif (substr($HeaderFourBytes, 0, 3) == "\xFF\xD8\xFF") { // JPEG
					return $this->ErrorImage('Image (JPEG) is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting');
				} elseif ($HeaderFourBytes == '%PNG') { // "%PNG"
					return $this->ErrorImage('Image (PNG) is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting');
				} elseif (substr($HeaderFourBytes, 0, 3) == 'GIF') { // GIF
					return $this->ErrorImage('Image (GIF) is too large for PHP-GD memory_limit, please install ImageMagick or increase php.ini memory_limit setting');
				}
				return $this->ErrorImage('Unknown image type identified by "'.$HeaderFourBytes.'" ('.phpthumb_functions::HexCharDisplay($HeaderFourBytes).') in SourceImageToGD() ['.__LINE__.']');

The reason why it is might a unknown image is because the image is saved as code in the mysql not as a picture link.
The thing is I can see the pic in the admin menue but not in the frontpage



Soluted on a not so cool but really good ideo for my site (mostly just for members which need to get verified manually)

I made the link of the picture which can seen at the admin site for this featured post.
It can also seen by registred, admins & gods but nor by unregistered.
Also I let them cropp by simple <img> tags

Anyways THANKS for that template

Last edited by marvinpoo; 04-04-2010 at 05:49 PM.
Reply With Quote
  #54 (permalink)  
Old 05-10-2010, 09:17 AM
New Pligger
Pligg Version: 1.0.3
 
Join Date: Jan 2010
Posts: 2
Quote:
Originally Posted by 67895123 View Post
OK, I fixed it myself.
If you have same ploblem, try this


First,

Open
Code:
modules\featured\templates\featured.tpl

go to line 24 and change
HTML Code:
<a href="{$featured[featured].link_url}"><img style="border:1px solid #ccc;padding:2px;" src="{$my_pligg_base}/modules/featured/phpthumb/phpThumb.php?src={$my_base_url}{$my_pligg_base}%2fmodules%2ffeatured%2ffeatured.php%3fid%3d{$featured[featured].featured_id}&w=300" alt=""></a>
to

HTML Code:
<a href="{$featured[featured].link_url}"><img style="border:1px solid #ccc;padding:2px;" src="{$my_pligg_base}/modules/featured/phpthumb/phpThumb.php?src=http%3a%2f%2fwww.YOR_DOMAIN_NAME.com%2fmodules%2ffeatured%2ffeatured.php%3fid%3d{$featured[featured].featured_id}&w=300" alt=""></a>
if you install in sub folder
ex. http://www.YOR_DOMAIN_NAME.com/YOUR_FOLDER try this


HTML Code:
<a href="{$featured[featured].link_url}"><img style="border:1px solid #ccc;padding:2px;" src="{$my_pligg_base}/modules/featured/phpthumb/phpThumb.php?src=http%3a%2f%2fwww.YOR_DOMAIN_NAME.com%2fYOUR_FOLDER%2fmodules%2ffeatured%2ffeatured.php%3fid%3d{$featured[featured].featured_id}&w=300" alt=""></a>


Go to line 37,
Change this
HTML Code:
<img class="left" src="{$my_pligg_base}/modules/featured/phpthumb/phpThumb.php?src={$my_base_url}{$my_pligg_base}%2fmodules%2ffeatured%2ffeatured.php%3fid%3d{$featured[featured].featured_id}&w=100" alt="">
to
HTML Code:
<img class="left" src="{$my_pligg_base}/modules/featured/phpthumb/phpThumb.php?src=http%3a%2f%2fwww.YOR_DOMAIN_NAME.com%2fmodules%2ffeatured%2ffeatured.php%3fid%3d{$featured[featured].featured_id}&w=100" alt="">

if you install in sub folder
HTML Code:
<img class="left" src="{$my_pligg_base}/modules/featured/phpthumb/phpThumb.php?src=http%3a%2f%2fwww.YOR_DOMAIN_NAME.com%2fYOUR_FOLDER%2fmodules%2ffeatured%2ffeatured.php%3fid%3d{$featured[featured].featured_id}&w=100" alt="">

Save and upload


Ps. Don't for get to change
YOR_DOMAIN_NAME
YOUR_FOLDER

--
Techaker - Your Source for Technolgy News and Networking
Thx 67895123 - this seems solves the problem
Reply With Quote
  #55 (permalink)  
Old 07-03-2010, 11:17 PM
New Pligger
Pligg Version: 1.0.4
 
Join Date: Jun 2010
Posts: 6
Dear Yankidank and all
use pligg 1.0.4
How to solve the Recent Submissions category to active?
pls find attach
thank you

Last edited by Lambert007; 07-07-2010 at 06:00 AM.
Reply With Quote
  #56 (permalink)  
Old 07-13-2010, 08:30 PM
Constant Pligger
Pligg Version: 1.0.4
 
Join Date: Jan 2008
Posts: 102
his module comes with a google ad?, i cant seem to find the file that contains that ad. I have searched for all filles and nothing, maybe its from the arthemia theme that i am using, but arthemia has a directory with 3 files called "ads" and none of them have adsense.

See atchement
Attached Images
File Type: png Capturar(4).PNG (235.5 KB, 28 views)

Last edited by chuckroast; 07-13-2010 at 08:42 PM.
Reply With Quote
  #57 (permalink)  
Old 07-13-2010, 08:42 PM
chuckroast's Avatar
Pligg Developer/Coder/Designer
Pligg Version: SVN
Pligg Template: Social Pro Kit
 
Join Date: Jun 2006
Posts: 5,448
No this module does not have adsense either.
Neither does the Arthemia template.
You've most likely installed the adsense sharing module.
Reply With Quote
  #58 (permalink)  
Old 07-13-2010, 09:26 PM
Constant Pligger
Pligg Version: 1.0.4
 
Join Date: Jan 2008
Posts: 102
You are right, never thought of that, how stupid
Reply With Quote
  #59 (permalink)  
Old 08-02-2010, 02:19 AM
New Pligger
 
Join Date: Jul 2010
Posts: 1
Does anyone know why the images for the Features are not being displayed? I see the images saved in the database and also when I do "View Image" in Manage Featured Admin section. But in the front page they are not being displayed. Thank you.
Attached Images
File Type: gif ScreenHunter_01 Aug. 02 01.16.gif (14.6 KB, 37 views)
Reply With Quote
  #60 (permalink)  
Old 08-02-2010, 09:23 AM
Yankidank's Avatar
Pligg Founder/Coder/Designer
Pligg Version: SVN
Pligg Template: Wistie
 
Join Date: Dec 2005
Location: Ocala, FL
Posts: 4,934
Send a message via AIM to Yankidank
Right click > View Image, and see where the link is pointing to.
It would be helpful if you listed your site so we could just look ourselves.

The Twitter Module for Pligg CMS!
Register, Login, and Submit Stories with Twitter. An absolute MUST HAVE for all Pligg sites!
Reply With Quote
  #61 (permalink)  
Old 08-03-2010, 07:08 PM
New Pligger
 
Join Date: May 2009
Posts: 8
Hello,

I use this great module on my website. I need to crop (resize) the images for the featured news. How can I use the Smart Image Resizer (SIR) for doing this? Is that possible? I hope to receive your great support on this issue.

Thanks!
Reply With Quote
Reply

Tags
featured, featurify, module, mod_security rule, news, whitelist

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fixes to Profile Extra Fields Module v0.2 and Extended Profile Module v0.1 redwine Questions and Comments 11 12-20-2010 04:18 PM
Module that allows users to put their adsense ads on their news. Ganha Questions and Comments 4 06-09-2009 08:07 PM
Removing adsense from Featured Module? submitlink Questions and Comments 1 08-16-2008 12:11 PM
How to Change Headline of FEATURED MODULE weismangroup Questions and Comments 2 06-13-2008 11:21 PM
No upcoming news module on pages other than published news? AshMCairo Questions and Comments 2 08-07-2007 10:25 AM


Pligg Modules and Pligg Templates from Pligg Pro Find support on the Pligg CMS Forum - 24 hours a day! Make a donation to support Pligg CMS development