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)
-   -   Miscellaneous Hacks - Stop autoparsing in a particular forum (https://vborg.vbsupport.ru/showthread.php?t=202666)

SloppyGoat 01-21-2009 10:00 PM

Stop autoparsing in a particular forum
 
1 Attachment(s)
A friend of mine helped me figure this out some time ago, when I was still using 3.6.5. Well, it still seems to work perfectly in 3.8.0. I'm no coder, but I managed to figure out where to put these lines in the new php files. This will stop autoparsing of links in every way...even the quick reply.

This is a manual hack, since it requires changing the php files, and also requires you to change the forum ID to whichever you choose. Fortunately, it's also very easy.

In editpost.php, find:

PHP Code:

$edit['parseurl'] = true

replace with:

PHP Code:

$edit['parseurl'] = ($foruminfo['forumid'] != 10); 

In newreply.php, find:

PHP Code:

$newpost['parseurl'] = ($foruminfo['allowbbcode'] AND $vbulletin->GPC['parseurl']); 

replace with:

PHP Code:

$newpost['parseurl'] = ($foruminfo['allowbbcode'] AND $vbulletin->GPC['parseurl'] AND $foruminfo['forumid'] != 10); 

In newpost.php, find:

PHP Code:

$newpost['parseurl'] = ($foruminfo['allowbbcode'] AND $vbulletin->GPC['parseurl']); 

replace with:

PHP Code:

$newpost['parseurl'] = ($foruminfo['allowbbcode'] AND $vbulletin->GPC['parseurl'] AND $foruminfo['forumid'] != 10); 

____________________________________________

10 would be the forum ID which you do not want to autoparse URL's. All other forums will act completely normal. I can't support this, so if you have any questions or problems, you're on your own. Sorry, I'm no PHP coder. I just thought someone else might find this useful. Feel free to improve this hack. I'm sure, with some effort, a GUI could be made to assign whatever forum(s) you want? ;)

Rene Kriest 01-22-2009 05:54 AM

Interesting topic.

You did a pretty good job fixing your problems. However there must be better solutions available. I kinda dislika hacking the .php source code without giving further options via variables.

SloppyGoat 01-22-2009 06:03 AM

Good luck with another solution. WYSIWYG makes that impossible, from what I've been told. Actually, if you use the WYSIWYG editor, it still parses URL's. I just checked. So, if you want it to parse a URL for some reason, you can always toggle.

Rene Kriest 01-22-2009 06:07 AM

Just curious: What was the particular reason you switched auto-parse off?

SEOvB 01-22-2009 11:14 AM

Does this disable the "Automatically parse links in text" by default for certain forums? Or does it do something else?

SloppyGoat 01-22-2009 02:35 PM

Quote:

Just curious: What was the particular reason you switched auto-parse off?
It's a hidden forum, and I don't want any live external links in this particular forum. No live links = no referrals.

Yes, it disables autoparsing completely, for the forum ID of your choice. It is only in standard editor mode. You can still toggle to WYSIWYG and it will autoparse, since it does it as you type.

Actually, this only works in the standard editor. It does not work in WYSIWYG. I guess there truly is no way to disable that. Nobody who has access to that forum would use the WYSIWYG editor though, unless they're linking internally.

OmniBuzz 05-28-2010 03:03 PM

How can I make it work for the whole vbulletin installation and not one forum ?

SloppyGoat 05-28-2010 03:50 PM

As stated above, there really is no tech support for this hack since I am not a coder, but I would suggest just adding all forum ID's. There is a way to do this to the entire forum, somewhere. I've seen it posted here before when I was searching for my solution. Sorry I can't be of more assistance. It is what it is. If/when you find a solution, please do post it here for others. ;)

SloppyGoat 11-17-2010 05:24 AM

I've been informed that this works in version 4.x, too.


All times are GMT. The time now is 06:32 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.01929 seconds
  • Memory Usage 1,740KB
  • 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
  • (6)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete