The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
![]() |
|||||||||||||||||||||||||||
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:
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!) PHP Code:
For Category Mod See Here: https://vborg.vbsupport.ru/showthread.php?t=232440 Screenshots
Show Your Support
|
3 благодарности(ей) от: | ||
case-dk, Oxylis, Toorak Times |
Comments |
#92
|
||||
|
||||
![]()
Sorry cant help I am not a coder so knowledge is very limited
|
#93
|
|||
|
|||
![]()
hi there,
how to make just link and publish date appear , i don't want to have half of article and images shown in the box/. thanks |
#94
|
|||
|
|||
![]()
Thank you for your work, but if I want to use a horizontally widget?
Grazie. :up: |
#95
|
|||
|
|||
![]()
This is my code
Code:
// Set Your Section ID Here $section = '51'; // Set The Number of Articles To Display $limit = '5'; // Set The Height of The Thumbnail Image $height = '91'; // Set The Width of The Thumbnail Image $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_node.setpublish FROM ".TABLE_PREFIX."cms_article , ".TABLE_PREFIX."cms_nodeinfo , ".TABLE_PREFIX."cms_node WHERE (".TABLE_PREFIX."cms_nodeinfo.nodeid = ".TABLE_PREFIX."cms_node.nodeid) AND (".TABLE_PREFIX."cms_article.contentid = ".TABLE_PREFIX."cms_node.contentid) AND (".TABLE_PREFIX."cms_node.parentnode IN ($section)) 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); $output .= '<center>'; if($image != '') $output .= "<a href='content.php?".$nodeid."-".$url."'><img src='".$image."' width='".$width."px' height='".$height."px' align='left' /></a><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."'> <img alt='Read More' src='images/cms/read_more-right.png' title='Read More' border='0'></a></p><br />"; } - links doesn't work because i have installed vbseo - preview text doesn't appear. I see only title and date.... Anybody can help me? |
#96
|
|||
|
|||
![]() Quote:
I have the same problem, I used the code of the previous post, because the others don't work well, but I don't understand what is the variable that contains the preview of text, or if I do a preview function that cuts the text after a No. number of characters. Also, how can I change the url to make it work with vbseo? Thanks ![]() |
#97
|
|||
|
|||
![]()
Hi, i change this:
// Set The Height of The Thumbnail Image $height = '250'; // Set The Width of The Thumbnail Image $width = '250'; with // Set The Height of The Thumbnail Image $height = '50%'; // Set The Width of The Thumbnail Image $width = '50%'; and it work fine, but with chrome don't resize verticaly, any idea? Thanks |
#98
|
|||
|
|||
![]()
Hy MScotti and davide91plus.
Do you find how to work with vbseo? Do you see the preview text in your script or only title and preview image? Thanks |
#99
|
|||
|
|||
![]() Quote:
- Anteprima immagine e titolo - data pubblicazione |
#100
|
|||
|
|||
![]()
In the code there's
$text = $articleinfo['previewtext']; How it works? Anybody can help us? |
#101
|
|||
|
|||
![]() Quote:
I'd like to be able to preview the text of articles ... ![]() |
![]() |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|