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: CMS Most Viewed Articles This Week (https://vborg.vbsupport.ru/showthread.php?t=240904)

sticky 07-24-2010 08:36 PM

I'm on 4.0.2, doesn't work.

BadgerDog 07-24-2010 10:26 PM

Perhaps there's something else interfering?

Regards,
Badger

vivamexico55 07-24-2010 11:15 PM

Doesn't work on 4.04, only displays:

%24-%b-%2010

mgcom 07-25-2010 08:12 AM

comes up blank on 4.0.5

BryceW 08-07-2010 07:24 PM

Second that it comes up blank on 4.0.5

magmf 09-23-2010 12:25 PM

I changed the code and now it's working for me

Code:

ob_start();
  // Current Week Most Viewed
  $starttime = time() - (3600*24*7);
  $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 = vbcms_nodeinfo.nodeid AND ".TABLE_PREFIX."cms_node.setpublish = 1 AND ".TABLE_PREFIX."cms_nodeinfo.publishdate >'".$starttime."' ORDER BY ".TABLE_PREFIX."cms_nodeinfo.viewcount desc LIMIT 5;
    ");
  $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();

Please let me know if worked for you

BadgerDog 09-23-2010 02:31 PM

Quote:

Originally Posted by magmf (Post 2102229)
I changed the code and now it's working for me

Code:

ob_start();
  // Current Week Most Viewed
  $starttime = time() - (3600*24*7);
  $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 = vbcms_nodeinfo.nodeid AND ".TABLE_PREFIX."cms_node.setpublish = 1 AND ".TABLE_PREFIX."cms_nodeinfo.publishdate >'".$starttime."' ORDER BY ".TABLE_PREFIX."cms_nodeinfo.viewcount desc LIMIT 5;
    ");
  $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();

Please let me know if worked for you

Tried this and just ended up with a major SQL database error ....

Regards,
Badger

magmf 09-23-2010 05:52 PM

My fault


try this

Code:

ob_start();
  // Current Week Most Viewed
  $starttime = time() - (3600*24*7);
  $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 = vbcms_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 5;
    ");
  $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();


BadgerDog 09-23-2010 08:06 PM

Nope, that doesn't work either ... thanks anyway...

Quote:

Database error in vBulletin 4.0.4:

Invalid SQL:

select cms_node.nodeid as nodeid, cms_nodeinfo.title as title FROM cms_node, cms_nodeinfo where cms_node.nodeid = vbcms_nodeinfo.nodeid AND cms_node.setpublish = 1 AND cms_node.publishdate >'1284671090' ORDER BY cms_nodeinfo.viewcount desc LIMIT 5;;

MySQL Error : Unknown column 'vbcms_nodeinfo.nodeid' in 'where clause'
Error Number : 1054
Request Date : Thursday, September 23rd 2010 @ 05:04:50 PM
Error Date : Thursday, September 23rd 2010 @ 05:04:50 PM
Script : http://www.xxxxxx.com/content.php
Referrer : http://www.xxxxxx.com/index.php
IP Address : xx.xx.xxx.xxxx
Username : Tester
Classname : vB_Database
MySQL Version : 5.0.77

magmf 09-23-2010 09:00 PM

let me fix for you again.....


Code:

ob_start();
  // Current Week Most Viewed
  $starttime = time() - (3600*24*7);
  $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 5;
    ");
  $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();

Please if you get another error paste the error here for me so i can check again... But i think now will work was a small issue related to my table names... :)


All times are GMT. The time now is 01:48 PM.

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.01085 seconds
  • Memory Usage 1,750KB
  • 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
  • (4)bbcode_code_printable
  • (2)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