vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB4 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=251)
-   -   Sort Articles by View Count (https://vborg.vbsupport.ru/showthread.php?t=281655)

kontagio.us 04-17-2012 01:24 AM

Sort Articles by View Count
 
Hey I want a list of my top articles. I know you can do it from the Section Edit page but would like to post it publicly. Maybe have a dynamic "Top 10" list. Thank you. :up:

kontagio.us 04-28-2012 04:30 PM

Bump, please. :)

kh99 04-29-2012 12:33 PM

There is a node viewcount available, so if you wanted to rank article by views you could modify the recent article widget to sort by viewcount instead of publish date.

kontagio.us 04-29-2012 04:34 PM

Thanks for the response, it seems simple enough. I did a search for a widget folder but couldn't come up with a way to edit the default widgets. Could you help me find a way to copy the recent article widget and copy it into a new one that I could customize? Thanks. :)

kh99 04-29-2012 11:20 PM

Well, to be honest when I made that suggestion I didn't really think is was a problem, now I realize that I don't know how to create a new widget type. I don't think there's any way to do it except to write to the cms_widget tables in the database. Paul M has some widget mods with install code that does it, but I haven't looked through it all yet. If I can figure it out I'll let you know.

I guess another way would be to make a php direct execution widget and somehow use the (modified) code from the existing widget. Maybe someone else will have an idea.

ETA: I found this article: www.vbulletin.org/forum/showthread.php?t=236224 which seems to outline the necessary steps.

kontagio.us 05-07-2012 07:46 PM

I tried following that tutorial but my knowledge of PHP is not strong enough to build one myself. Anyone good with PHP?

kontagio.us 05-22-2012 07:28 PM

Bump, please.


All times are GMT. The time now is 01:10 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.00916 seconds
  • Memory Usage 1,718KB
  • 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)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (7)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete