Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Widget: Latest Articles In Category Details »
Widget: Latest Articles In Category
Mod Version: 1.6, by OcR Envy (Coder) OcR Envy is offline
Developer Last Online: Oct 2016 I like it Show Printable Version Email this Page

vB Version: 4.0.0 Rating: (3 votes - 4.67 average) Installs: 39
Released: 07 Jan 2010 Last Update: Never Downloads: 0
Not Supported Auto-Template Re-usable Code Translations  

Latest Articles In Category

What is does:
vBCMS only has one option for latest articles and that is all sections and categories. This widget will allow you to display the latest articles in a specific category.

Change Log:
1.0 - Initial Release
1.1 - Updated to allow more than one category & display published date.
1.2 - Small update, no need to update unless you are using a table prefix.
1.3 - Added full page text if no previewtext row exists.
1.4 - Updated to not display unpublished articles.
1.5 - Updated read more link to be more vBulletin like.
1.6 - Small change to fix 4.0.2 [ATTACH] showing in text.

Installation:
  • Goto AdminCP-vBullietin CMS-Widgets->Create New Widget
  • Choose PHP Direct Execution as Widget's Type
  • Enter A Title IE: "Latest (Insert Your Category Name Here)"
  • Click Save
  • Click Configure
  • Remove all the default code.
  • Copy and Paste the code below first editing $category and $limit to your liking
  • Click Save
  • Goto AdminCP-vBullietin CMS-Layout Manager
  • Add the Widget to your Layout
  • Click Save
How do I find my category id?
When in your article you should see something like this:
The number after / in this case 11 is your category id.

Can I enter more than one category id?
Yes simply change $category = '11' to something like $category='11, 12, 13'

Code to copy(make sure you change $category and $limit!)

Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.

Preview:


For Section Mod See Here:
http://www.vbulletin.org/forum/showthread.php?p=1949493

Download Now

Only licensed members can download files, Click Here for more information.

Screenshots

Click image for larger version

Name:	screenshot.PNG
Views:	2218
Size:	128.1 KB
ID:	112093  

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Comments
  #2  
Old 07 Jan 2010, 14:08
kingMOB kingMOB is offline
 
Join Date: Nov 2007
Thank you very much OcR Envy, this should be a default widget for VB4.

I'm changing the output layout, how can I put the publishing date of the article?

Can more than one category be used in on single widget?

The widget could be modified to work with sections and sub-sections?
Reply With Quote
  #3  
Old 07 Jan 2010, 15:03
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
There ya go king update to allow for published date & more than one category

For sections see my other mod here: http://www.vbulletin.org/forum/showthread.php?t=232443

1.2 Updated - Small update for users who have a table prefix should resolve any database errors. No need to update otherwise.

Last edited by OcR Envy; 08 Jan 2010 at 11:32.
Reply With Quote
  #4  
Old 14 Jan 2010, 20:12
saYRam saYRam is offline
 
Join Date: Nov 2005
Real name: Gökşah TAŞYÜREK
good widget. can we do this?

i have a Section named Columnist. And there are a lot of Categories.

how can i display "Only first article" from every categories?.

i mean only one (Latest) article must listed from every cats i specified?

if there are 10 categories widget must display 10 articles from each categories.
Reply With Quote
  #5  
Old 19 Jan 2010, 11:06
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Sayram,

It isn't setup like that currently. You could try modifying the code a bit yourself but I don't think many people would use something like that.
Reply With Quote
  #6  
Old 20 Jan 2010, 11:08
Datenpapst's Avatar
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Real name: Martin
Hi,
I took the whole code you said just removed the align center and the hight and width of the image but still no preview text

I am using vb 4.0.1
Attached Images
File Type: jpg newsfalsch.jpg (34.7 KB, 113 views)
__________________
http://www.c-arena.com - http://fm.c-arena.com
Be Part of the CA.com Family
Reply With Quote
  #7  
Old 20 Jan 2010, 11:15
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Originally Posted by Datenpapst View Post
Hi,
I took the whole code you said just removed the align center and the hight and width of the image but still no preview text

I am using vb 4.0.1
Are you willing to run some test queries for me? Or possibly give me AdminCP access to your forum?
Reply With Quote
  #8  
Old 20 Jan 2010, 11:20
Datenpapst's Avatar
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Real name: Martin
you got mail
__________________
http://www.c-arena.com - http://fm.c-arena.com
Be Part of the CA.com Family
Reply With Quote
  #9  
Old 20 Jan 2010, 13:43
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Updated to 1.3 no need to update unless previewtext was not appearing for you.

For some reason Daten(and I assume others) had no previewtext row in some articles. The update will pull from the full text, strip bbcode and then limit the text to 150 characters.
Reply With Quote
  #10  
Old 22 Jan 2010, 17:18
Datenpapst's Avatar
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Real name: Martin
possible to add the number of comments given? ^^ like:

Comments: (1)

while the (1) is a link to the comments
__________________
http://www.c-arena.com - http://fm.c-arena.com
Be Part of the CA.com Family
Reply With Quote
  #11  
Old 22 Jan 2010, 17:24
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Originally Posted by Datenpapst View Post
possible to add the number of comments given? ^^ like:

Comments: (1)

while the (1) is a link to the comments

Haha Daten you always want something more don't you?

Kidding of course. I will work on that now.
Reply With Quote
  #12  
Old 22 Jan 2010, 17:39
Datenpapst's Avatar
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Real name: Martin
there is always something to do
__________________
http://www.c-arena.com - http://fm.c-arena.com
Be Part of the CA.com Family
Reply With Quote
  #13  
Old 22 Jan 2010, 17:49
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Originally Posted by Datenpapst View Post
there is always something to do
Comments are way more complicated then I thought. I'll have to put it on the back burner for the time being but eventually I'll get to it.
Reply With Quote
  #14  
Old 22 Jan 2010, 18:13
Datenpapst's Avatar
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Real name: Martin
maybe take the code from the recent article widget?
__________________
http://www.c-arena.com - http://fm.c-arena.com
Be Part of the CA.com Family
Reply With Quote
  #15  
Old 28 Jan 2010, 16:24
Naidoo Naidoo is offline
 
Join Date: Dec 2009
Real name: Naidoo
Nice widget ..

I have one question.
This widget is perfect for VB4 without VBSEO

How about VBSEO installed VB4 forum ..
It dont work out for me, since I have installed VBSEO

Can you help me out how to work it out

1) Changing output code ? (or)
2) Additional Custom Rewrite Code is needed in vbseo ?

Thanks in advance ..
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 20:44.

Layout Options | Width: Wide Color: