vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin CMS Widgets - Widget: Latest Articles In Section (https://vborg.vbsupport.ru/showthread.php?t=232443)

Mark4865 03-18-2011 12:17 PM

Sorry cant help I am not a coder so knowledge is very limited

peterkohar 09-05-2011 09:18 AM

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

MScotti 10-04-2011 10:07 AM

Thank you for your work, but if I want to use a horizontally widget?

Grazie. :up:

dang3rzon3 10-07-2011 07:29 PM

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 />";
}

I have 2 problems:
- links doesn't work because i have installed vbseo
- preview text doesn't appear. I see only title and date....

Anybody can help me?

davide91plus 10-15-2011 09:30 AM

Quote:

Originally Posted by dang3rzon3 (Post 2254446)
I have 2 problems:
- links doesn't work because i have installed vbseo
- preview text doesn't appear. I see only title and date....

Anybody can help me?



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 :)

MScotti 10-18-2011 10:25 AM

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

dang3rzon3 10-18-2011 12:34 PM

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

MScotti 10-18-2011 12:52 PM

Quote:

Originally Posted by dang3rzon3 (Post 2258560)
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

- Non ho vbseo
- Anteprima immagine e titolo
- data pubblicazione

dang3rzon3 10-18-2011 01:57 PM

In the code there's

$text = $articleinfo['previewtext'];

How it works?

Anybody can help us?

davide91plus 10-22-2011 08:34 AM

Quote:

Originally Posted by dang3rzon3 (Post 2258579)
In the code there's

$text = $articleinfo['previewtext'];

How it works?

Anybody can help us?

Something new about that?

I'd like to be able to preview the text of articles ... :(


All times are GMT. The time now is 10:00 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01301 seconds
  • Memory Usage 1,745KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete