1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Top Threads - Sidebar

Discussion in 'Add-on Releases [Archive]' started by yilmaz, Nov 4, 2010.

  1. yilmaz

    yilmaz Active Member

    Unzip the package.

    Send to folder library with ftp

    You import the admin panel "addon_yilmaz_top_thread.xml"
    Just "forum_list".
    Search Template;

    Above this add:
    <xen:include template="yilmaz_top_threads" />
    Please click LIKE:)

    Attached Files:

    maszd, zzhunterzz, quynhkr and 21 others like this.
  2. Edrondol

    Edrondol Well-Known Member

    Downloading and installing on my test site now. Hope this works as great as it looks!
    yilmaz likes this.
  3. cobra1162

    cobra1162 Active Member

    thanks good job
    yilmaz likes this.
  4. Edrondol

    Edrondol Well-Known Member

    Just a dumb question (which I hear are the easiest to answer!).

    Doing a Search Template for "</xen:sidebar>" brings up six hits. Do I need to alter all six areas in the template? Or just "forum_list"?
    yilmaz likes this.
  5. Shelley

    Shelley Well-Known Member

    Just "forum_list".
    yilmaz likes this.
  6. Edrondol

    Edrondol Well-Known Member

    Okay. That's what I thought. In that case it's a bit broke.

    Top Threads Cap.png
    yilmaz likes this.
  7. CyberAP

    CyberAP Well-Known Member

    Nice plugin! But can it count by thread views? :)
    yilmaz likes this.
  8. kkm323

    kkm323 Well-Known Member

    looks great so far
    feature i request
    • top threads in x days
    • to likes thread in x days
    • top poster in x days
    • top likes poster in x days
    yilmaz and CyberAP like this.
  9. Edrondol

    Edrondol Well-Known Member

    Any reason why I'd be showing doubles?
  10. Edrondol

    Edrondol Well-Known Member

    yilmaz, I'm glad you liked my post showing the double threads....Any ideas on how to fix it? ;)
  11. yilmaz

    yilmaz Active Member

    Surprisingly, re-reviewed, double does not show me, I could not find a reason not to double show.
  12. dutchbb

    dutchbb Well-Known Member

    Thanks for writing the add-on.
  13. ragtek

    ragtek Guest

    Hm, nice Add-on Idea BUT

    1. You don't checkt the userpermissions
                    $TTArray $db->fetchAll$db->limit"SELECT * FROM xf_thread as thread WHERE NOT ISNULL(thread.thread_id) $excludedforums AND  thread.discussion_state = 'visible' ORDER BY reply_count DESC"$numShown ));
    2. Why does your class extend XenForo_Model_User ??
    Do you need any method from this Class?
    I can't see anything! IMHO it would make more sense, to extend it from XenForo_Model_Thread because this class contains all thread fetch methods,

    3. You have
    $options XenForo_Application::get('options');
    but you don't use it anywhere because you use allways XenForo_Application::get('options')->yilmaz_tt_show; ;)

    This shouldn#t be critic, this are only some little tips from an code reviewer;)
    Alien, Shelley, yilmaz and 1 other person like this.
  14. Gustavo Fernandez

    Gustavo Fernandez Active Member

    I need to show the last 5 post of each category ...

    example: category one - category two

    help me?
  15. CyberAP

    CyberAP Well-Known Member

    How to make it count by post views:

    Open library\Yilmaz\TopThread\Model\TTopThread.php

    $TTArray $db->fetchAll$db->limit"SELECT * FROM xf_thread as thread WHERE NOT ISNULL(thread.thread_id) $excludedforums AND  thread.discussion_state = 'visible' ORDER BY reply_count DESC"$numShown ));
    $TTArray $db->fetchAll$db->limit"SELECT * FROM xf_thread as thread WHERE NOT ISNULL(thread.thread_id) $excludedforums AND  thread.discussion_state = 'visible' ORDER BY view_count DESC"$numShown ));
    and find
    $Yilmaz_TopThread[] = array("user" => $userObjs[$TT['user_id']], "userid" => $TT['user_id'], "threadstarter" => $TT['username'], "title" => $TT['title'], "time" => $TT['post_date'], "replycount" => $TT['reply_count'], "lastpostusername" => $TT['last_post_username'], "lastpostdate" => $TT['last_post_date'], "lastpostuserid" => $TT['last_post_user_id'], "href" => $hrefx);
    and replace it with
    $Yilmaz_TopThread[] = array("user" => $userObjs[$TT['user_id']], "userid" => $TT['user_id'], "threadstarter" => $TT['username'], "title" => $TT['title'], "time" => $TT['post_date'], "viewcount" => $TT['view_count'], "lastpostusername" => $TT['last_post_username'], "lastpostdate" => $TT['last_post_date'], "lastpostuserid" => $TT['last_post_user_id'], "href" => $hrefx);
    Then install an addon and find a template called yilmaz_top_threads.
    Change there
    {xen:phrase messages}: <b>{$TThread.replycount}</b
    {xen:phrase views}: <b>{$TThread.viewcount}</b>
    mrWilson and yilmaz like this.
  16. Teddy Scott

    Teddy Scott Active Member

    awesome! I love this. Keep up the cool work guys!
  17. karev

    karev Active Member

    yes very cool but i need to add this to the footer template instead of the sidebar to match my design please any idea how can i do this ?????
  18. karev

    karev Active Member

    hello i see that the recent_status addons 3.0 is a rendred version so we can display it anywhere we want here is a portion code from the templateHooks.php i tried to manipulate it to match your mod but no way to make it work so please can you be kind and update your mods to a rendred version

    class RecentStatus_Listener_TemplateHook
        public static function 
    template_hook($name, &$contents, array $paramsXenForo_Template_Abstract $template)
    // Choose the hook you want to manipulate
    if ($name === 'forum_list_sidebar')
    // Change the value of $contents in any way you want
    $xfRecentStatus RecentStatus_Model_StatusList::getStatusArray();
    $params = array('xfRecentStatus' => $xfRecentStatus['status'],
    'xfRecentStatusComments' => $xfRecentStatus['comments'],
    'visitor' => XenForo_Visitor::getInstance(),

    $contents .= $template->create('recent_status',$params)->render();
  19. Puntocom

    Puntocom Well-Known Member

    I get this when trying to unzip:

    With unzip & 7zip on Ubuntu. No problem with other Addons.
  20. yavuz

    yavuz Well-Known Member

    Try the one I've attached. I heard this problem before, it seems that some archives sometimes doesn't act well with archive program.

    Attached Files:

    Puntocom likes this.

Share This Page