XF 1.0 Creating a Simple Modification

By exposing code events and allowing listeners to attach to them, XenForo makes it easy to alter its default functionality with simple callback classes.

The API for doing this is well-defined and documented, so modifications made in this way stand a very good chance of remaining backward compatible through future version updates.

This video shows me creating a simple add-on that allows us to see how an existing thread would look with over a thousand pages.

To view this content we will need your consent to set third party cookies.
For more detailed information, see our cookies page.

As usual, it's a large, HD video, so I suggest you view it at its original size by clicking the full-screen gadget in the bottom-right corner of the video.

Edit: If for whatever reason you can't view the video here, view it directly on Vimeo (but please leave comments here, not there).
 
Excellent! And the display of a brief description of event arguments when the event is selected from the dropdown menu, is great too.

So we still need at leat 10,000 posts in the long thread to see what 5 digit page number would look like. No time to waste! :D
You just won't back down. :D
Maybe Kier/Mike can make a plugin with this code:
PHP:
class Sandman_Listener_Pagenav
{
    public static function listen(XenForo_Visitor &$visitor)
    {
        // Check if the user is "The Sandman"
        if ($visitor->getUserId() == 507)
        {
            // At least 2 billion messages per page. Keep him going.
            XenForo_Application::get('options')->messagesPerPage = PHP_INT_MAX;
        }
    }
}
:evil_smile:
 
You just won't back down. :D
Maybe Kier/Mike can made a plugin with this code:
PHP:
class Sandman_Listener_Pagenav
{
    public static function listen(XenForo_Visitor &$visitor)
    {
        // Check if the user is "The Sandman"
        if ($visitor->getUserId() == 507)
        {
            // At least 2 billion messages per page. Keep him going.
            XenForo_Application::get('options')->messagesPerPage = PHP_INT_MAX;
        }
    }
}
:evil_smile:

27.gif
 
Optimise for the common case. Threads with over 9,999 pages? I don't think I've ever seen one.
That would be one big thread...

199,980 posts when showing 20 posts per page
99,990 posts when showing 10 posts per page

I haven't seen one yet, but they probably exist?

So adding more width to the box is not possible?

So we still need at leat 10,000 posts in the long thread to see what a 5 digit page number would look like. No time to waste!
lol, we need someone with a lot of time on his/her hands.
 
As an example of what I am talking about http://www.gaiaonline.com/forum/welcome-to-gaia/f.57/ has a forum with 26,000 pages of threads... the same navigation animation is on forum pages as it is on thread pages... so in this case... how would the 26,285 pages look in the nav... I see only two options... 1 it will overlap the box or 2 it will be made smaller again in which case the text may become unreadable.

Another example is http://forums.d2jsp.org/forum.php?f=71 now I know these are some of the biggest boards/forums there are but still this one has 17,000 pages of threads, it happens and the current nav would break.
 
Top Bottom