homepage Welcome to WebmasterWorld Guest from 54.211.219.178
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Articles widget design
I just need to add a bullet in front of each article displayed in the widge
mircea1st




msg:4396696
 7:50 pm on Dec 11, 2011 (gmt 0)

Hi ,
I have a Vbulletin forum and there's a "Week Most Viewed" widget .
Problem is the content looks bad ...

I just need to add a bullet in front of each article displayed in the widget ...

Can i do that ?



ob_start();
// Current Week Most Viewed
$mostpopularweekget = vB::$db->query_read("
select ".TABLE_PREFIX."cms_node.nodeid as nodeid, ".TABLE_PREFIX."cms_nodeinfo.title as title FROM ".TABLE_PREFIX."cms_node, ".TABLE_PREFIX."cms_nodeinfo where ".TABLE_PREFIX."cms_node.nodeid = ".TABLE_PREFIX."cms_nodeinfo.nodeid AND ".TABLE_PREFIX."cms_node.setpublish = 1 AND ".TABLE_PREFIX."cms_node.publishdate >'".$starttime."' ORDER BY ".TABLE_PREFIX."cms_nodeinfo.viewcount desc LIMIT 10;
");
$outputbits = '';
while($article = vB::$db->fetch_array($mostpopularweekget))
{

$outputbits .='<div class = "cms_widget_post_bit"><h4 class = "cms_widget_post_header">
<a rel="nofollow" href="content.php?r='.$article[nodeid].'">'.$article[title].'</a> </h4> </div>';
}
$output = $outputbits;
ob_end_clean();



Thank you !

 

Habtom




msg:4396889
 5:13 am on Dec 12, 2011 (gmt 0)

Best done by editing the CSS file. Look for this : cms_widget_post_header

As a quick solution on the page though, add <li> before <a and </li> after </a> as shown below:

<li><a ..... </a> </li>

rocknbil




msg:4397145
 6:05 pm on Dec 12, 2011 (gmt 0)

Agreed, lose the div (itis) and h4, style those li's, you're set.

mircea1st




msg:4397750
 11:11 am on Dec 14, 2011 (gmt 0)

I have searched in templates and i could not find the cms_widget_post_header , can i add some changes directly to the code above ?

Thanks Habtom and rocknbil !

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved