Jump to content

Downloads Stats on Board Index Sidebar


Adriano Faria

Recommended Posts

%7Boption%7D



File Name: Downloads Stats on Board Index Sidebar

File Submitter: Adriano Faria

File Submitted: 09 Jun 2013

File Category: Integration

Supported Versions: IP.Board 3.4.x, IP.Downloads 2.5.x



This hook will crate a new block on board index sidebar to show the following stats from IP.Downloads:

  • Latest files
  • Latest Updated
  • Featured Files
  • Most Popular (tied to Nexus. Most Popular: FREE and Most Popular: PAID)
  • Most Reviewed
  • Broken Files


The block will be updated via ajax to show files from the chosen option.

Settings:
  • Number of files to show on the block
  • Number of Characters to truncate file name
  • Default filter
  • Menu speed (seconds)
  • Per filter visibility (admin can show hide all filters, except LATEST FILES)
  • Show file tags (Featured and Broken)
  • Exclude user groups from viewing the block


Update Notice (1.1.0 => 1.2.X):
  • Uninstall the version 1.1.0 and install the version 1.2.X. Also remember to upload the PHP file.



here to download this file

Link to comment
Share on other sites

  • 3 weeks later...

How about settings for which filters to display, just like with the Topic Stats?

What's New in Version 1.0.2:

  • Added setting to select which filters to show (Latest Files and Latest Updated are fixed)
  • Added setting to select which badges to show
  • Added setting to truncate file name (number of characters)
Link to comment
Share on other sites

  • 2 months later...

This menu was done by IPS for the current version of IP.Blog. Anyway, taking a look on script.aculo.us Effect.SlideDown documentation, I see the duration (defaults to 1.0) option.

Open the hook XML and find:

new Effect.SlideDown( 'idmajaxcontentWrapper' );

Change to:

new Effect.SlideDown( 'idmajaxcontentWrapper', { duration: 0.5 } );

Untested.

Reinstall the hook and let me know if it works. I'll add a setting for this in a future version.

Link to comment
Share on other sites

I tested it and it works partially only. It goes like this: you select a new filter then it collapses in usual speed and it expands faster. and it is always like this. collapse is always the same and expanding is whatever you set in duration.

Link to comment
Share on other sites

Try this:

                        new Effect.SlideUp( 'idmajaxcontentWrapper', { duration: 0.5 }
                        {
                            afterFinish: function()
                            {
                                $( 'idmtitle' ).update( t.responseJSON['title'] );
                                $( 'idmajaxcontentWrapper' ).update( t.responseJSON['data'] );
                                new Effect.SlideDown( 'idmajaxcontentWrapper', { duration: 0.5 } );
                            }    
                        });

Effect.SlideUp has a duration option as well.

Link to comment
Share on other sites

  • 1 month later...

Try this:

                        new Effect.SlideUp( 'idmajaxcontentWrapper', { duration: 0.5 }
                        {
                            afterFinish: function()
                            {
                                $( 'idmtitle' ).update( t.responseJSON['title'] );
                                $( 'idmajaxcontentWrapper' ).update( t.responseJSON['data'] );
                                new Effect.SlideDown( 'idmajaxcontentWrapper', { duration: 0.5 } );
                            }    
                        });

Effect.SlideUp has a duration option as well.

And also I have tested that much more and I see that this is still not working. As I have said I have tested out SlideDOWN - it works perfectly. BUT if I also use SlideUP modification - the menu does not even open and shoots the whole page back to the top (like back to top button). Something is still missing from SlideUP code. Can you help me figure it out? :)

Link to comment
Share on other sites

hi, I have a question. how do I switch sides of the language and value? which template is it? I cant find it.

dwn.png

Open (Downloads) External Downloads -> idmSidebarStats_insert template and find:

                        <if test="$type == 'new' OR $type=='update' OR $type=='featured'">
                            {parse template="userHoverCard" group="global" params="$row"} - {$text} {parse date="$row[$column]" format="short"}
                        <else />
                            {parse template="userHoverCard" group="global" params="$row"} - {parse format_number="$row[$column]"} {$text}
                        </if>

Change to:

                        <if test="$type == 'new' OR $type=='update' OR $type=='featured'">
                            {parse template="userHoverCard" group="global" params="$row"} - {$text} {parse date="$row[$column]" format="short"}
                        <else />
                            {parse template="userHoverCard" group="global" params="$row"} - {$text} {parse format_number="$row[$column]"}
                        </if>

This will also affect the MOST REVIEWED filter.

And also I have tested that much more and I see that this is still not working. As I have said I have tested out SlideDOWN - it works perfectly. BUT if I also use SlideUP modification - the menu does not even open and shoots the whole page back to the top (like back to top button). Something is still missing from SlideUP code. Can you help me figure it out? :smile:

It was untested.

What's New in Version 1.1.0:

  • Added setting to admin choose the speed (in seconds) of the expand/collapse animation
Link to comment
Share on other sites

thanks. but ohh, its too bad that is also touches most reviewed. is there a way perhaps to add extra if statement something like

                        <if test="$type == 'new' OR $type=='update' OR $type=='featured'">
                            {parse template="userHoverCard" group="global" params="$row"} - {$text} {parse date="$row[$column]" format="short"}
                        <else />
                        <if else test="$type=='most reviewed'">
                            {parse template="userHoverCard" group="global" params="$row"} - {parse date="$row[$column]" format="short"} {$text}
                        <else />
                            {parse template="userHoverCard" group="global" params="$row"} - {$text} {parse format_number="$row[$column]"}
                        </if>

i have no idea how to code but thats the logic behind that :D

Link to comment
Share on other sites

i have no idea how to code but thats the logic behind that :D

Try this:

                        <if test="$type == 'new' OR $type=='update' OR $type=='featured'">
                            {parse template="userHoverCard" group="global" params="$row"} - {$text} {parse date="$row[$column]" format="short"}
                        </if>
                        <if test="$type == 'downloads'">
                            {parse template="userHoverCard" group="global" params="$row"} - {$text} {parse format_number="$row[$column]"}
                        </if>
                        <if test="$type == 'comments'">
                            {parse template="userHoverCard" group="global" params="$row"} - {parse format_number="$row[$column]"} {$text}
                        </if>
Link to comment
Share on other sites

  • 2 months later...

Honestly I don't remember of using the 3 hooks together. I'll need to make some tests tonight.

leave it. I find a solution - i have to disable another of your hooks : (SOS34) Galery Albums in Board Index v1.0.1

after that - everything works fine :smile: have to uninstall it :smile:

Link to comment
Share on other sites

  • 3 weeks later...

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...