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)

thanasis1 12-12-2010 10:58 AM

hello all,
i need some help...
i inserted the code but the widget is empty.
i tried to create a new widget by default "Recent articles" and this is not displayed too.
is there any parameter that i have to edit in order to display the widget content?
i created another one (media library) succesfully but this is still empty.
thank you

Mark4865 02-01-2011 10:20 AM

Hello,

This widget is exactly what I need, can someone PLEASE help me with exact code needed just to show article title, link and preview image and NOTHING else.

Also I have sections with just video, if I use it in those sections with above requirements will it work???

All help greatly appreciated I am very technically challenged and need serious HELP PLEASE

Mark4865 02-05-2011 10:46 AM

hello,

I have manageed to remove some of the stuff I didnot want (publish date etc) how do I remove the "read more" image and text from what is left below. I seem to get errors with everything I try

$output .= "<a href='content.php?".$nodeid."-".$url."'>".$title."</a><br /></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 />";
}

Mark4865 02-05-2011 02:46 PM

[QUOTE=OcR Envy;1978198]Find:

PHP Code:

    $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."'>(more)</a></p><br />"

Replace with something like this:

PHP Code:

    $output .= '<div style="float: right; width:255px;">';
    if(
$image != ''$output .= "<img src='".$image."' width='".$width."px' height='".$height."px' style="floatleft;" /><br />";
    
$output .= "<a href='content.php?".$nodeid."-".$url."'>".$title."</a><br /><p>Publish Date: ".$date."</p></br><p>".$text." <a href='content.php?".$nodeid."-".$url."'>(more)</a></p><br /></div>"

Hello I tried this and it just came up as an error has anyone else got it to work with the picture on the left and text on the right??

I also only want picture and title to show, everything else removed including read more

HELP PLEASE ANYONE

Mark4865 02-11-2011 09:22 AM

Will seriously pay someone to help me get this working how I want

ANYONE PLEASE!!

nakedanvil 02-28-2011 06:18 PM

How do/did you remove publish date?

Mark4865 03-01-2011 12:59 PM

This is the code I used which removes everything but the title and the picture

// Set Your Section ID Here
$section = '1';
// Set The Number of Articles To Display
$limit = '5';
// Set The Height of The Thumbnail Image
$height = '100';
// Set The Width of The Thumbnail Image
$width = '150';

$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.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.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'];
$nodeid = $articleinfo['nodeid'];
$url = $articleinfo['url'];
$fulltext = strip_bbcode($fulltext);
$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 /></br></center><p>".$text." </p><br />";
}

nakedanvil 03-01-2011 07:59 PM

Thanks Mark, worked great. Just what I've been looking for.

Mark4865 03-03-2011 01:41 PM

perfect glad I could actually help someone

Mark4865 03-05-2011 12:28 PM

Hello,

I have this mod install using above code that I changed a bit to remove everything but thumbnail and title, works fantastically, thanks to orignal coder.

Can anyone tell me how to get the pictures on the left and title on the right using same modified code above PLEASE


All times are GMT. The time now is 11:50 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.01306 seconds
  • Memory Usage 1,751KB
  • 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
  • (2)bbcode_php_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