Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Widget: Latest Articles In Section Details »
Widget: Latest Articles In Section
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: (9 votes - 4.78 average) Installs: 65
Released: 07 Jan 2010 Last Update: Never Downloads: 0
Not Supported Auto-Template Re-usable Code Translations  

Latest Articles In Section

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 section.

Change Log:
1.0 - Initial Release
1.1 - Updated to allow more than one section & 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 show unpublished articles.
1.5 - Updated read more link to look more vBulletin related.
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 Section Name Here)"
  • Click Save
  • Click Configure
  • Remove all the default code.
  • Copy and Paste the code below first editing $section 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 section id?
When clicking on your section you should see something like this:
The number after ? in this case 11 is your section id.

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

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

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

Preview:



For Category Mod See Here:
http://www.vbulletin.org/forum/showthread.php?t=232440

Download Now

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

Screenshots

Click image for larger version

Name:	screenshot.PNG
Views:	4412
Size:	128.1 KB
ID:	112092  

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, 19:57
sisterhood's Avatar
sisterhood sisterhood is offline
 
Join Date: Nov 2008
not working database error
Reply With Quote
  #3  
Old 07 Jan 2010, 21:07
kingMOB kingMOB is offline
 
Join Date: Nov 2007
Thank you very much OcR Envy, works perfectly.

Any chance to get one for most viewed and one for most commented articles per sections and/or categories?

=)
Reply With Quote
  #4  
Old 08 Jan 2010, 11:04
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Originally Posted by sisterhood View Post
not working database error
What is the database error sisterhood?

Originally Posted by kingMOB View Post
Thank you very much OcR Envy, works perfectly.

Any chance to get one for most viewed and one for most commented articles per sections and/or categories?

=)
Sure I could work on that King.

1.2 Updated - Small update for people using a table prefix should resolve any database errors.

Last edited by OcR Envy; 08 Jan 2010 at 11:30.
Reply With Quote
  #5  
Old 08 Jan 2010, 16:41
sisterhood's Avatar
sisterhood sisterhood is offline
 
Join Date: Nov 2008
my box show nothing id have to change in my id

i use vbseo

Last edited by sisterhood; 08 Jan 2010 at 16:46.
Reply With Quote
  #6  
Old 08 Jan 2010, 17:26
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Originally Posted by sisterhood View Post
my box show nothing id have to change in my id

i use vbseo
So you aren't getting any database errors just nothing is showing in the widget?

There are other ways to find the Section ID.

Go to your AdminCP-vBCMS-Section Manager.
Hover over the section you want. The link should look like this:

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

sectionid=116 is the part you'd want 116 would be your section id in this example.
Reply With Quote
  #7  
Old 16 Jan 2010, 12:57
Datenpapst's Avatar
Datenpapst Datenpapst is offline
 
Join Date: Mar 2004
Real name: Martin
Hi,
whats the 150px image for?
It also seems like that the preview text code does not work
__________________
http://www.c-arena.com - http://fm.c-arena.com
Be Part of the CA.com Family

Last edited by Datenpapst; 16 Jan 2010 at 13:22.
Reply With Quote
  #8  
Old 19 Jan 2010, 01:26
kingMOB kingMOB is offline
 
Join Date: Nov 2007
OcR Envy, there's a way to print the section, subsection and/or categories from the article in the widget?

Thanks =)
Reply With Quote
  #9  
Old 19 Jan 2010, 01:48
tazattitude's Avatar
tazattitude tazattitude is offline
 
Join Date: Dec 2009
Real name: Scott F
I also got an error.
I changed the section to one of my sections


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

Also, to add, I do have a prefix "vbull"
Reply With Quote
  #10  
Old 19 Jan 2010, 02:54
Spiritvn's Avatar
Spiritvn Spiritvn is offline
 
Join Date: Apr 2009
Could u make it automatically get the section ID from the section clicked?
Reply With Quote
  #11  
Old 19 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,
whats the 150px image for?
It also seems like that the preview text code does not work
Preview Text works fine for me on two of my test boards. Check your source and see paste the HTML the widget enters so I can look at it closer please. The 150px image is the preview image for the article. If you insert and image into the article it will display a thumbnail view of the image. You can change the dimensions if you'd like. 150px just worked for what I was trying to do.

Originally Posted by kingMOB View Post
OcR Envy, there's a way to print the section, subsection and/or categories from the article in the widget?

Thanks =)
No king not currently.

Originally Posted by tazattitude View Post
I also got an error.
I changed the section to one of my sections


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

Also, to add, I do have a prefix "vbull"
You must change the sections to match your own section numbers. Make sure you have the number reading like this $section = '115'; 115 would be your own section id but you must have the surrounding ' '; for it to work.

Originally Posted by Spiritvn View Post
Could u make it automatically get the section ID from the section clicked?
I'm not sure what you mean? Explain more please.

Last edited by OcR Envy; 19 Jan 2010 at 11:26.
Reply With Quote
  #12  
Old 19 Jan 2010, 11:59
Neptun Neptun is offline
 
Join Date: Aug 2003
what section id if have to put in when i want to have articles from the main section - for example at vbulletin.com it is called "the Front page" ? that i get a lot of articles - because i tried the section id and i get nothing displayed ?!
Reply With Quote
  #13  
Old 19 Jan 2010, 12:03
tazattitude's Avatar
tazattitude tazattitude is offline
 
Join Date: Dec 2009
Real name: Scott F
Originally Posted by OcR Envy View Post

You must change the sections to match your own section numbers. Make sure you have the number reading like this $section = '115'; 115 would be your own section id but you must have the surrounding ' '; for it to work.
That's what I mean by
"I changed the section to one of my sections"



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

Reply With Quote
  #14  
Old 19 Jan 2010, 12:10
tazattitude's Avatar
tazattitude tazattitude is offline
 
Join Date: Dec 2009
Real name: Scott F
Originally Posted by Neptun View Post
what section id if have to put in when i want to have articles from the main section - for example at vbulletin.com it is called "the Front page" ? that i get a lot of articles - because i tried the section id and i get nothing displayed ?!
You can do this by default...

Admin Panel
Widgets>>Create New Widget >>Choose "General Search" (also name your widget)
Then "save"
Then you need to configure. Choose "Article". Then choose the rest how many days and how many you want to show up.
Reply With Quote
  #15  
Old 19 Jan 2010, 12:43
OcR Envy's Avatar
OcR Envy OcR Envy is offline
 
Join Date: May 2008
Real name: Ryan
Originally Posted by tazattitude View Post
That's what I mean by
"I changed the section to one of my sections"



Block Disabled:      (Update License Status)  
Suspended or Unlicensed Members Cannot View Code.
And you are getting an error with this code?

Originally Posted by tazattitude View Post
You can do this by default...

Admin Panel
Widgets>>Create New Widget >>Choose "General Search" (also name your widget)
Then "save"
Then you need to configure. Choose "Article". Then choose the rest how many days and how many you want to show up.
This will show every section though. To show just the front page set $section = '1';
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 18:12.

Layout Options | Width: Wide Color: