The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Widget: Latest Articles In Category Details »» | |||||||||||||||||||||||||||
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:
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!) PHP Code:
For Section Mod See Here: https://vborg.vbsupport.ru/showthread.php?p=1949493 Screenshots
Show Your Support
|
Comments |
#12
|
||||
|
||||
Quote:
Haha Daten you always want something more don't you? Kidding of course. I will work on that now. |
#13
|
|||
|
|||
there is always something to do
|
#14
|
||||
|
||||
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.
|
#15
|
|||
|
|||
maybe take the code from the recent article widget?
|
#16
|
|||
|
|||
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 .. |
#17
|
||||
|
||||
Quote:
What do you have your vbSEO CMS urls looking like? |
#18
|
||||
|
||||
Updated to 1.6
- 4.0.2 started inserting [ATTACH] into the text fields. Simply add: Code:
$text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text); $text = strip_bbcode($text); Code:
if($text == '') $text = substr($fulltext, 0,150); |
#19
|
|||
|
|||
so nice
|
#20
|
|||
|
|||
Verry nice but I can not find a way to translate months? june etc ...
and if Image would take you to the article that would be nice-er |
#21
|
|||
|
|||
I can't make it work. Here is the error
Quote:
Code:
// Set Your Category ID Here $category = '48'; // Set The Number of Articles To Display $limit = '2'; // Set The Height of The Thumbnail Image $height = '50'; // Set The Width of The Thumbnail Image $width = '50'; $articlegrab = vB::$db->query_read(" SELECT ".TABLE_PREFIX."cms_nodeinfo.nodeid , ".TABLE_PREFIX."cms_nodeinfo.title , ".TABLE_PREFIX."cms_article.previewimage , ".TABLE_PREFIX."cms_article.previewtext , ".TABLE_PREFIX."cms_article.pagetext , ".TABLE_PREFIX."cms_article.contentid , ".TABLE_PREFIX."cms_node.nodeid , ".TABLE_PREFIX."cms_node.parentnode , ".TABLE_PREFIX."cms_node.contentid , ".TABLE_PREFIX."cms_node.url , ".TABLE_PREFIX."cms_node.publishdate , ".TABLE_PREFIX."cms_category.category , ".TABLE_PREFIX."cms_category.categoryid , ".TABLE_PREFIX."cms_node.setpublish FROM ".TABLE_PREFIX."cms_node INNER JOIN ".TABLE_PREFIX."cms_article ON ".TABLE_PREFIX."cms_article.contentid = ".TABLE_PREFIX."cms_node.contentid INNER JOIN ".TABLE_PREFIX."cms_nodeinfo ON ".TABLE_PREFIX."cms_nodeinfo.nodeid = ".TABLE_PREFIX."cms_node.nodeid INNER JOIN ".TABLE_PREFIX."cms_nodecategory ON ".TABLE_PREFIX."cms_nodecategory.nodeid = ".TABLE_PREFIX."cms_node.nodeid INNER JOIN ".TABLE_PREFIX."cms_category ON ".TABLE_PREFIX."cms_category.categoryid = ".TABLE_PREFIX."cms_nodecategory.categoryid WHERE ".TABLE_PREFIX."cms_category.categoryid IN ($category) AND (".TABLE_PREFIX."cms_node.setpublish != 0) ORDER BY ".TABLE_PREFIX."cms_node.publishdate DESC LIMIT $limit "); while($articleinfo = vB::$db->fetch_array($articlegrab)) { $title = $articleinfo['title']; $image = $articleinfo['previewimage']; $text = $articleinfo['previewtext']; $nodeid = $articleinfo['nodeid']; $url = $articleinfo['url']; $unixdate = $articleinfo['publishdate']; $date = date("F j, Y, g:i a", $unixdate); $fulltext = strip_bbcode($fulltext); $text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text); $text = strip_bbcode($text); $text = preg_replace('/\[ATTACH\=CONFIG\]\d\d\[\/ATTACH\]/', '', $text); $text = strip_bbcode($text); if($text == '') $text = substr($fulltext, 0,150); $output .= '<center>'; if($image != '') $output .= "<img src='".$image."' width='".$width."px' height='".$height."px' /><br />"; $output .= "<a href='content.php?".$nodeid."-".$url."'>".$title."</a><br /><p>Publish Date: ".$date."</p></br></center><p>".$text." <a href='content.php?".$nodeid."-".$url."'>Read More <img alt='Read More' src='images/cms/read_more-right.png' title='Read More' border='0'></a></a></p><br />"; |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|