vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Download Forum Thread To Your Computer (Vb3.x) (https://vborg.vbsupport.ru/showthread.php?t=65536)

JirQUEST 07-07-2004 07:34 AM

yup. upgraded and it still worked without a hitch :D man, great hack :D

Frzzy 07-11-2004 09:33 PM

/me clicks install...

Hmmm... no attachments support, any way to include link to attachments into the file instead of simply ditch them?

Michael Morris 07-13-2004 10:26 AM

Great hack, my board's subscribed users will love this. I applied a couple mods.

I only want one group - subscribed users - to use this feature. I replaced the unallowed users lines with a call to vbulletin's is_member_of function, hence

PHP Code:

if (!is_member_of($bbuserinfo9))
{
echo 
standard_error("I'm sorry, but you are attempting to access a feature limited to community supporters only!"''1);


was used in place of

PHP Code:

$unallowed_downloaders = array(9);

if (!
is_array($unallowed_downloaders) AND in_array($bbuserinfo[usergroupid],$unallowed_downloaders)) {echo standard_error("Sorry this feature is not meant for your usage!"''1);} 


Michael Morris 07-13-2004 10:32 AM

I don't want to display a button to a function folks can't use. The second mod was placed in the showthread template part of Logician's instructions. Surround the code for the buttons with a conditional as follows:

Code:

<if condition="is_member_of($bbuserinfo, 9)">
        <tr>
                <td class="vbmenu_option"><img class="inlineimg" src="$stylevar[imgdir_button]/sortasc.gif" alt="Download This Thread" /> <a href="dt.php?$session[sessionurl]t=$threadid">Download This Thread</a></td>
        </tr>
        </if>

Note - you can change the usergroup # to whatever you like of course - '9' happens to be our board's subscribed usergroup's number.

(BTW, I split this post in two because I have a router that blocks html sends over a certain size that I haven't figured out how to solve. Sorry for the inconvenience).

turbidblue 07-16-2004 01:26 AM

thank you! very easy!!

[high]* turbidblue clicks install!
[/high]

;)

Blam Forumz 08-13-2004 03:13 PM

/me clicks install

luck777jojo 08-16-2004 07:51 PM

After line:
Code:

  $filename=preg_replace("/[.&!:\\\?\^\'\"\$]/", '', $thread[title]);
I added:
Code:

  $filename=preg_replace('/\s+/', '_', $filename);
Just in case anyone with mozilla, or another browser had trouble downloading the file with spaces in the name... I hope this is ok with hack creator? Nice job by the way :). I like this a lot.

David G. Rigg 08-18-2004 12:17 AM

Way cool, much appreciated.

y2krazy 08-30-2004 12:57 AM

/me clicks install!

phprus 09-04-2004 09:37 AM

phprus clicks install!


All times are GMT. The time now is 07:04 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.01299 seconds
  • Memory Usage 1,736KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (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