vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.8 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=235)
-   -   Major Additions - DownloadsII (https://vborg.vbsupport.ru/showthread.php?t=120122)

Liquid_N2 07-29-2006 09:46 PM

file sizes vary, as does the delay it seems

HappyPike 07-29-2006 11:48 PM

hey westpointer, any idea how I could make it so it doesn't remove <, > and tags enclosed in <> from file descriptions?

CyberRanger 07-30-2006 01:50 AM

Quote:

Originally Posted by HappyPike
My member reported that he has issue using the > and < characters inside the descriptions for the files even inside of the code, html, and quote tags. I just tried it and the >, <, and tags all get removed in the description.

For example, when I try with this code:

Code:

<ModInfo>
    <Type>IMPROVEMENT</Type>
    <Description>IMPROVEMENT_INN</Description>
</ModInfo>

It changes the code to just:

Code:

    IMPROVEMENT
    IMPROVEMENT_INN

!

If the user is using the "Enhanced Interface - Full WYSIWYG Editing" this will not occur. However, from my testing, it does occur using the other two editors. I'll look into it more.:cross-eyed:

CyberRanger 07-30-2006 01:55 AM

Quote:

Originally Posted by Liquid_N2
I seem to have an issue where a user cannot download for 1165 seconds after clicking a download no matter what I set the time to.

Any ideas?

There is a built in delay based on the size of the file that was downloaded last. The idea is to prevent someone from launching a denial of service attack on your site by repeatedly downloading a very large file in short periods of time. If you want to disable this feature, in downloads.php

FIND (on or about line 513):
PHP Code:

if ((TIMENOW - ($temptime['time'] + $temptime['filesize']/400000)) < OR (TIMENOW $temptime['time']  < $vbulletin->options['ecdownloaddelay'])) 

REPLACE WITH:
PHP Code:

if ((TIMENOW + ($temptime['time'] + $temptime['filesize']/400000)) < OR (TIMENOW $temptime['time']  < $vbulletin->options['ecdownloaddelay'])) 

(The first minus is changed to a plus. The only "delay" check will now be based on what you set in admincp.

Liquid_N2 07-30-2006 09:06 AM

thank you very much that has sorted that.

HappyPike 07-30-2006 02:50 PM

Quote:

Originally Posted by westpointer
If the user is using the "Enhanced Interface - Full WYSIWYG Editing" this will not occur. However, from my testing, it does occur using the other two editors. I'll look into it more.:cross-eyed:

Thanks. I told my users who need to use those characters to switch to WYSIWYG for now.

project-Buckfas 07-30-2006 03:58 PM

Hey,

Some of my downloads link to the download page on another site (link to file), but they open in the same page after clicking download meaning users are leaving my site to view that page.

How can I make it open in a new window after clicking download?

Thanks

HappyPike 07-30-2006 05:58 PM

Quote:

Originally Posted by project-Buckfas
Hey,

Some of my downloads link to the download page on another site (link to file), but they open in the same page after clicking download meaning users are leaving my site to view that page.

How can I make it open in a new window after clicking download?

Thanks

Try searching fo the variable $download in the downloads.php file. When you find it you can add a target="_blank" to the link...

HappyPike 07-30-2006 06:09 PM

Hi westpointer and Jelle, I received a second report from my users (in Registered group) that delete comment doesn't work for them. It simply reloads the page w/o deleting the comment. I confirmed the report using a test account.

I can delete comment fine using my admin account.

HappyPike 07-30-2006 09:16 PM

I managed to show forum style rating stars on the category file listing page using template conditions. If anyone is interested, here is the code to use:

Code:

<!-- Star Rating -->
<if condition="$file['rating'] >= 9.5">
    <span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_5.gif" border="0" alt="Rating" /></span>
<else />
    <if condition="$file['rating'] >= 8.5">
        <span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_4.gif" border="0" alt="Rating" /></span>
    <else />
                <if condition="$file['rating'] >= 7.5">
                        <span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_3.gif" border="0" alt="Rating" /></span>
                <else />
                            <if condition="$file['rating'] >= 6.5">
                                        <span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_2.gif" border="0" alt="Rating" /></span>
                                <else />
                                        <if condition="($file['rating'] >= 5) AND ($file['rating'] < 6.5)">
                                                <span style="float:$stylevar[right]"><img class="inlineimg" src="$stylevar[imgdir_rating]/rating_1.gif" border="0" alt="Rating" /></span>
                                        </if>
                                </if>
                </if>
    </if>
</if>
<!-- Star Rating End -->

Just edit the downloads_cat_filebit template and put the above code right before the file name link
<a href="downloads.php?do=file&amp;id={$file['id']}">{$file['name']}</a>.

You can also use the above code to put the rating stars in the file details page, replacing the A+ to F grades. The template to edit for this is downloads_file .

You can tweak the numbers in the codes to anything you want. Just remember the rating is between 5 and 10, and unrated files have 0 as default value.


All times are GMT. The time now is 03:09 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.03837 seconds
  • Memory Usage 1,755KB
  • 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
  • (3)bbcode_code_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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