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)

Boofo 07-13-2002 06:39 PM

The original line in your text file had an extra \ in it (right before the '). You didn't add that to what you told him to replace. Is it supposed to be there? (It isn't showing in here for some reason)

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

Quote:

Originally posted by Logician
I tried parse out special characters from thread title so that file name will be nice but some may be missed. In your example it was : char. It's no big deal but if it bothers you, there are 2 possible solutions:

1- edit line:

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


and replace it as:

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

(This will parse out : char too)



Logician 07-13-2002 08:10 PM

Quote:

Originally posted by Boofo
The original line in your text file had an extra \ in it (right before the '). You didn't add that to what you told him to replace. Is it supposed to be there? (It isn't showing in here for some reason)

parsing in board playing tricks on us.. Just add a : in my original code right before ! char

Technical info: This line removes some special chars from thread title when forming file name and by adding : char we make it remove that char too..

Boofo 07-13-2002 08:14 PM

Ok, I just wanted to make sure in case the extra \ was needed. :)

lordnet 07-13-2002 08:16 PM

Great hack ;)

my best wish...

LORD :)

Reverend 07-13-2002 08:57 PM

Nice one Logician.
Works great. :cool:

Ryangel 07-13-2002 11:43 PM

Quote:

Originally posted by Boofo
The original line in your text file had an extra \ in it (right before the '). You didn't add that to what you told him to replace. Is it supposed to be there? (It isn't showing in here for some reason)

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


Thanks for pointing that out !

*Goes to fix code*

Boofo 07-13-2002 11:57 PM

No problem. :)

Quote:

Originally posted by Ryangel


Thanks for pointing that out !

*Goes to fix code*


DWZ 07-15-2002 03:15 AM

Looks like a great idea, can someone post the format of the .txt file...

i.e. download a thread then paste it (or part of it) here in the [code] tag?

Thanks :)

Logician 07-15-2002 05:33 AM

Quote:

Originally posted by DWZ
can someone post the format of the .txt file...

sample downloaded thread.. here you go..

FleaBag 07-16-2002 11:02 PM

You uploaded the template instructions as a text file and hence vB.org is parsing the replacements. So everyone is leeching sortasc.gif from this site. ;) Besides that, great addition to my forums; working well on 2.2.6. Thanks. :)


All times are GMT. The time now is 07:59 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.01073 seconds
  • Memory Usage 1,734KB
  • 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
  • (5)bbcode_quote_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