vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=4)
-   -   Download Thread (https://vborg.vbsupport.ru/showthread.php?t=40981)

alpha2503 09-20-2002 11:53 AM

hi folks...

i'm also using the IE6 and the board only opens a blank page if i click on the download link ! hopefully someone get's a solution for this :) !

greetz

chitown 09-20-2002 12:22 PM

hey alpha my problem was a call to a .php extension and i use .php3 extensions. when ever i add a hack i have to make sure that i change the extensions. I hope that may be your problem.

alpha2503 09-20-2002 07:25 PM

it isn't cause i only use the *.php extension... i run the board locally on a windows webserver but as i know the javascript variables and so on are given over on the browser or client side so this shouldn't be the fault...

i really checked the hacked code many many times, but there's nothing wrong with it :ermm:... it may be a problem of IE6 + service pack 1 which is included in the windows xp version with service pack 1 but i don't know...

Logician 09-20-2002 08:27 PM

Quote:

Originally posted by alpha2503
i run the board locally on a windows webserver but as i know the javascript variables and so on are given over on the browser or client side so this shouldn't be the fault...

i really checked the hacked code many many times, but there's nothing wrong with it :ermm:... it may be a problem of IE6 + service pack 1 which is included in the windows xp version with service pack 1 but i don't know...

Some thoughts:
1- It does not matter for the hack whether you are in Windows or unix. My board is on unix server while my localhost is on Windows and the hack works well on both servers..

2- Your post gave me the impression that your problem is related to your file type associations or your browser. Here are some steps to find out:
a) Try to right click on Download Thread Link and choose "Save Target As" from the menu, does it download now?
b) Try to use different browsers like Netscape, Opera or Mozzilla, does it work?
c) Is it only you who have the problem? Can your users download without problems?
d) Cant you download from other boards' download thread link either? Say, try here:
http://www.bimmervibe.com/phorum/sho...=&threadid=415

If your answer is YES for either of above, it means the problem is not related to the hack but your file type settings/browser.

What can be your problem then? When you download a program with .xxx extension for the first time, Windows asks you what to do: Open it or Save it. And there is a small box there, Always ask before opening this type of file". If you accidently clear that for ".txt" files and choose to "OPEN" it once, then your IE will be associated with txt files and whenever you click one, IE will automatically open it, instead of save it (or ask what to do). If this is your problem you have to cancel .txt file associations with your IE. To do this either choose a .txt file SHIFT-Right mouse Click/Open With and choose notepad or My computer/View/Tools/Folder Options/File Types and cancel IE's relation with txt files..

I hope this will help..

alpha2503 09-20-2002 08:35 PM

hi logician !

a) it will download the showthread.htm
b) this ++++in' nutscrape and the other ones have all the same problem
c) i don't like other users on my local pc :D
d) it work's on this board so i think it's the hack itself

if you're good in php i can send you the files which are involved in this hack so that you can look at them, but i think i'm not bad in this by myself so that you wouldn't find any errors ;) but if you want you can try :)

greetz

Logician 09-20-2002 09:04 PM

Quote:

Originally posted by alpha2503
if you're good in php i can send you the files which are involved in this hack so that you can look at them, but i think i'm not bad in this by myself so that you wouldn't find any errors ;) but if you want you can try :)

If it would help, yes I could check by myself but I believe it wouldnt. The hack is very simple with 1 step only and since you are not a newbie it's certain that you didnt apply the code incorrectly. My checking it would not do any good, since the same code already works in my system. Your problem should be related to PHP/Server settings or maybe the server program itself. (BTW. are you using Apache?) May I suggest applying the hack to your real board? If its your local host settings that cause the problem, the hack should work in your real board. There are hundreds of users installed the hack and using it without any problems anyway..

marocnl 10-12-2002 07:48 PM

Hi there!

This is a great hack, but i just have one problem. When i try to download a thread it sends me to the nopermission_error template. I'm an Admin. How the hell is that possible?;)

this is what checks the perms:

// Check Permissions so that a smartass wouldnt download a thread he doesnt allowed to see
$getperms=getpermissions($thread['forumid'],-1,-1,$forum['parentlist']);
if (!$getperms['canview'] or !$thread['visible'])
{show_nopermission();}
if (!$getperms['canviewothers'] and ($thread['postuserid']!=$bbuserinfo['userid'] or $bbuserinfo['userid']==0))
{show_nopermission();}

What is going wrong here?

Logician 10-13-2002 08:40 AM

Quote:

Originally posted by marocnl
Hi there!

This is a great hack, but i just have one problem. When i try to download a thread it sends me to the nopermission_error template. I'm an Admin. How the hell is that possible?;)

Can you please apply this (as STEP 2) and tell me if your problem is cured? Thanks..

marocnl 10-13-2002 09:07 AM

Works great. Thnx man! :knockedout:

One question which has nothing to do with ur hack. :)

Does the amount of tables in a (MySql) database has any effect on the speed of that database?

Logician 10-13-2002 09:31 AM

Quote:

Originally posted by marocnl
One question which has nothing to do with ur hack. :)
Does the amount of tables in a (MySql) database has any effect on the speed of that database?

The answer is no for you.. If you are asking for a bank database or smt., I keep my right to change the answer.. ;)

marocnl 10-13-2002 10:40 AM

Quote:

Originally posted by Logician

The answer is no for you.. If you are asking for a bank database or smt., I keep my right to change the answer.. ;)

I thought so......thnx 4 the confirmation. :knockedout:

ukbill69 10-23-2002 08:08 PM

I would like to say that to add this txt to the showthread becuase i have found that there was no space and divider. So here it is:
PHP Code:

    |
<!-- 
Download Thread Hack Start -->
<
img src="{imagesfolder}/sortasc.gif" alt="" border="0" align="absmiddle"> <a href="showthread.php?s=$session[sessionhash]&threadid=$threadid&action=download">Download Thread</a></table>
<!-- 
Download Thread Hack Finnish --> 


kreatiV 10-27-2002 07:08 AM

This seems like a great hack to me I am close to installing it. Is there a chance that Usergroup Permissions can be applied to this in a new version?

I would like only certain Usergroups to be able to download threads and not everybody that is registered on my board.

Logician 10-27-2002 08:08 AM

Quote:

I would like only certain Usergroups to be able to download threads and not
yep possible..

Find:

Quote:

if (!$threadid OR $threadid<1) {show_nopermission();}
After that add:

Quote:

if ($bbuserinfo[usergroupid]!=X AND $bbuserinfo[usergroupid]!=y AND $bbuserinfo[usergroupid]!=z) {show_nopermission();}
This will allow only usergroup X, Y, Z to download the thread..

kreatiV 10-27-2002 08:52 AM

Cool! I gotta grab that hack now and install it later on.

FleaBag 10-28-2002 10:53 PM

Works with 2.2.8. Cheers. :D

N9ne 10-29-2002 12:03 AM

Excellent hack, working flawlessly on 2.2.8. Just one thing though, you should add a space after the img code in the showthread template, so the Download this thread link isn't right next to the image :).

filburt1 11-04-2002 11:09 PM

Logician, I hope you don't mind: http://www.vbulletintemplates.com/mo...&threadid=1845 :)

SRozhon 11-06-2002 10:05 PM

This looks awesome, but I have a quick question. In step 1 it says
Quote:

Edit Template SHOW THREAD TEMPLATES/showthread
I feel like an idiot but what file is this that I should edit? Thank you!

Logician 11-06-2002 10:13 PM

Quote:

Originally posted by SRozhon
This looks awesome, but I have a quick question. In step 1 it says

I feel like an idiot but what file is this that I should edit? Thank you!

it's not a file, it's a template editing.. You have to login to your Admin CP, choose Modify Template, then find the template mentioned and edit it.. ;)

SRozhon 11-06-2002 10:41 PM

Oh geesh thank you...guess I'm more tired than I thought..lol Thanks again!

Dynamic One 11-11-2002 09:16 AM

Thanks Logician. Great hack you made m8.

geniuscrew 11-20-2002 11:02 PM

Works like a charm! *installs*

Boofo 01-15-2003 05:15 PM

I just installed this on 2.2.9 and I have a thread title with quotes in it. When I go to download the thread it shows it as the following:
Quote:

Do you believe in & quot
(NOTE: I had to put a space bewteen the & and the quot. The disable code hack doesn't work here now for some reason.)

when the actual name of the thread is:
Quote:

Do you believe in "signs"?
How can I parse out the quotes in the title?

MalaK_3araby 01-18-2003 10:37 AM

Thanks for this hack.

- Installs

N9ne 01-18-2003 02:40 PM

I noticed the same bug as Boofo did, when there is a html character in the thread title, it will screw up the file name, something somewhere needs to be unhtmlcharacter'd

Boofo 01-19-2003 10:51 PM

N9ne, I found a fix for our problem. I tried it and it works on my end. Test it out and let me know if it fixes it for you. You have to change it in 3 places so the file will have the html characters in the thread title and any post title you have those characters in also.

Replace:

PHP Code:

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

With:

PHP Code:

$filename=preg_replace("/[.!:\\\?\^\'\"\$]/"''unhtmlspecialchars($thread[title])); 

Replace:

PHP Code:

  print ("THREAD : $thread_db[title]\r\n"); 

With:

PHP Code:

  print ("THREAD : ".unhtmlspecialchars($thread_db[title])."\r\n"); 

Replace:

PHP Code:

  if ($post[title]) {print ("Title : ".$post[title]."\r\n");} 

With:

PHP Code:

  if ($post[title]) {print ("Title : ".unhtmlspecialchars($post[title])."\r\n");} 


Logician 01-20-2003 08:10 AM

Quote:

Originally posted by Boofo
N9ne, I found a fix for our problem.
Looks good and should work.. Well done..

Boofo 01-20-2003 08:16 AM

Quote:

Originally posted by Logician

Looks good and should work.. Well done..

Coming from you, Sinan, that means more than you will ever know. I mean that. ;)

And thank you for not running to bail me out when I first ran into this problem and posted it in the thread here. I never would have figured it out myself, if you had given me the code. You forced me to learn something (as little as it was). :)

Logician 01-20-2003 08:47 AM

Quote:

Originally posted by Boofo

And thank you for not running to bail me out when I first ran into this problem and posted it in the thread here. I never would have figured it out myself, if you had given me the code. You forced me to learn something (as little as it was). :)

It was not my intention.. I just cant always find time to answer promptly but I'm glad it did some good.. :)

Boofo 01-20-2003 09:02 AM

I'm sorry. I didn't mean for that to sound in a negative way. I meant that by you being busy, it helped me to force myself to try and figure it out on my own, which is always better for learning. Sorry, if it sounded like something else. :)

Geminy 03-13-2003 05:18 PM

This is the Italian translate of the hack

Questa ? la traduzione in Italiano dell'Hack.

Thanks to LOGICIAN to have I date the licence to translate this Hack :) .

Grazie a LOGICIAN per aver dato il permesso di tradurre questo Hack.

cirisme 03-14-2003 04:19 PM

Excellent hack!

(thumbs up)

tmapm 06-15-2003 12:19 PM

You should ass Boofo's update to the hack :p ANyways this hack works great. Thanks!

Giveit2u43 07-27-2003 06:14 PM

Well, I love this hack it`s a great idea but the users where complaining about the different tags showing up in the downloaded messages, I added the following to remove them.. (don`t know if this is the best way of doing this, but it works and for the users that`s all that counts)

add:
Code:

$dlt = $post[pagetext];
 $dlt = htmlspecialchars($dlt);
 $dlt = preg_replace("/(\[quote])/siU", "\r\n******************************************************************************\r\n", $dlt);
 $dlt = preg_replace("/(\[\/quote])/siU", "\r\n******************************************************************************", $dlt);
 $dlt = preg_replace("/(\[)(.*)(\])/siU", "", $dlt);
 $dlt = preg_replace("/(\[\/)(.*)(\])/siU", "", $dlt);
 $dlt = preg_replace("/(\[\*\])/siU", "", $dlt);

after:
Code:

while ($post=$DB_site->fetch_array($post_db))
 {

and change:
Code:

print ("\r\n$post[pagetext]\r\n\r\n");
to:
Code:

print ("\r\n$dlt\r\n\r\n");

Logician 07-27-2003 06:36 PM

thx for sharing.. not the best way to handle it as bbcode can change from board to board but still very useful for boards which are in English language and using default bbcodes.

Giveit2u43 07-27-2003 06:56 PM

Yep, you where right.. actually, after I thought about this a little more I realised that if I stripped everything between the [ ]'s that`ll work too.. So I`ve updated the original post with a much simpilier way of doing this that should be more suitable for those not using standard bbcodes or english ones ;)

Logician 07-27-2003 07:15 PM

Quote:

Today at 10:56 PM Giveit2u43 said this in Post #77
Yep, you where right.. actually, after I thought about this a little more I realised that if I stripped everything between the [ ]'s that`ll work too.. So I`ve updated the original post with a much simpilier way of doing this that should be more suitable for those not using standard bbcodes or english ones ;)
As a matter of fact I believe that the other code was better and more flexible for customization. :) Arent this code not only removing bbcode but also any texts that appears in [ ] but not a bbcode? :)

Giveit2u43 07-27-2003 08:48 PM

Well the other code was more flexible for customization as it removed each code seperately, but I found it did add quite a bit to the creation time for the download page, doing it with less preg_replaces is quicker (at least in my tests)

And yes that code will remove EVERYTHING in [ ]'s BBCode or Otherwise, and I`ve made a point of adding a notice to the post pages informing all users that text in [ ]'s is stripped from the downloaded thread's so they shouldn`t be used... (not that they have ever been used for anything but bbcodes, but well now people know *g*)

I`m really just a beginner and wanted something effective that would stop users from complaining, this worked and in my test the only ill effect is that URL`s are stripped so if a URL is posted in a thread it`ll just display the name that was used not the URL, and I haven`t quite found a workaround for that which looks okay.. I can get it to display:

http://www.domain.com]Link Name

but can`t replace that ] with a space or a : to make the layout nicer.. maybe a better answer will come as I continue to investigate the PHP stripping, trimming, replacing functions..

Thanks for your comments..

MindTrix 09-27-2003 02:02 PM

Cudnt get the hack to work, kept gettin sent bck to the same page, then realised i hadnt re-uploaded the php file **dumbass** works brilliant thanks a bunch :>


All times are GMT. The time now is 10:59 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.01418 seconds
  • Memory Usage 1,850KB
  • 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
  • (4)bbcode_code_printable
  • (7)bbcode_php_printable
  • (16)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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