vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   Uncheck Auto Parse by default (https://vborg.vbsupport.ru/showthread.php?t=46244)

SloppyGoat 11-30-2002 05:35 PM

Uncheck Auto Parse by default
 
Is there a way to have Auto Parse URL's unchecked by default, or disabled altogether, in a particular forum? Keep in mind, I don't want this to be global.

Dean C 11-30-2002 08:22 PM

You can do it by default yes.... with no hacking :D (I can help you with that if you like)

But in a particular forum would require hacking :)

- miSt

SloppyGoat 12-01-2002 09:18 PM

Any idea how to do it? I only want it disabled, or unchecked by default, in one forum.

Dean C 12-03-2002 03:29 PM

In one forum would require hacking..

Let me look into it :D...

Dean C 12-03-2002 03:34 PM

Ok here it is

Not tested but should work :D

In newreply.php

replace this:

PHP Code:

  if (!isset($parseurl)) {
    
$parseurlchecked="CHECKED";
  } 

with this:

PHP Code:

if (!isset($parseurl)) and ($forum[forumid]!=x]) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked=""

Repeat these steps in newthread.php too :D

Remember to replace x to the forumid of the forum you want the parseurl box to be not checked in :D

Let me know if it works

Regards

- miSt

SloppyGoat 12-03-2002 03:49 PM

Thanks! I'll give it a try when I get home. I'll let ya know how it works. Mucho gracias! :classic:

SloppyGoat 12-04-2002 03:21 AM

Hmmmmmm....that doesn't seem to work, unless I did something wrong. The forum ID is just the name of the forum, right?

Parse error: parse error in newreply.php on line 464

How do you learn php coding anyway? It makes no sense to me. :confused: :lick:

Dean C 12-04-2002 04:03 PM

Yes thats my poor PHP coding..

I'm sure one of our local geniuses will help fix that code i posted :)

- miSt

SloppyGoat 12-04-2002 09:10 PM

Oh! I think I see what you mean now. The forum ID is at the end of the url to that forum? I'll try that instead... :confused:

Nope, that didn't work either. DOH! :nervous:

Help!!!! :disappointed:

NTLDR 12-04-2002 09:48 PM

Try using $threadinfo['forumid'] and not $forum[forumid]

SloppyGoat 12-05-2002 03:13 AM

Like this???
PHP Code:

if (!isset($parseurl)) and ($threadinfo['forumid']!=22]) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked=""

That doesn't seem to work either. I tried it with and without the single quote around forumid, too. :disappointed:

The error is in that first line somewhere. That's line 464, anyway.

Dean C 12-06-2002 03:37 PM

Try this:

PHP Code:

if (!isset($parseurl) and ($threadinfo['forumid']!=22]) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked=""


SloppyGoat 12-06-2002 04:36 PM

Ah, maybe too many parenthesis? I'll try it. :o

NTLDR 12-06-2002 04:48 PM

That won't work as the is a ) missing.

This is what it should look like:

PHP Code:

if (!isset($parseurl) and ($threadinfo[forumid]!=X])) { 

Assuming $threadinfo[forumid] is the correct variable.

Dean C 12-06-2002 05:36 PM

But why is there an extra bracket NTDLR on the end of the line?

I'm still learning php so please feel free to explain it to me :D

- miSt

NTLDR 12-06-2002 05:50 PM

To match up with the one at the start ;)

Quote:

if (!isset($parseurl) and ($threadinfo[forumid]!=X])) {
The colours shows where the brackets match up :)

SloppyGoat 12-07-2002 05:05 AM

I get the same error. This is what I used....

PHP Code:

if (!isset($parseurl) and ($threadinfo[forumid]!=22])) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked=""

Damnit! This isn't turning out to be an easy thing to do, I guess. :p

Dean C 12-07-2002 12:05 PM

Yes NTDLR but look at your post you didn't have the correct number of brackets :) Lol i hope im right there

Try this:

PHP Code:

if ((!isset($parseurl) and ($threadinfo[forumid]!=22])) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked=""

Regards

- miSt

SloppyGoat 12-07-2002 05:18 PM

Ok, I'll try this. :D I'll let ya know. ;)

Dean C 12-07-2002 06:54 PM

Lol please do :)

- miSt

NTLDR 12-07-2002 07:30 PM

Quote:

Originally posted by Mist
Yes NTDLR but look at your post you didn't have the correct number of brackets :)
Yep your right, all that vBcode and brackets all over the place sure is confusing, I hope I made the point about brackets matching up though :)

SloppyGoat 12-07-2002 08:16 PM

Nope, there must be something else wrong. Same thing. :confused: Damn, php is some confusing sh*t, ain't it? LOL

Dean C 12-08-2002 06:09 PM

Lol i got the syntax right :)

Hmmm...

Sloppygoat - post up the errors your getting :)

- miSt

SloppyGoat 12-09-2002 11:18 AM

It's the same error as before. It just says "Parse error in line 464" in newreply.php", when I replace that section....no matter what I do. I've tried a bunch of combo's now and kept track of all of them. Here's what hasn't worked....

if (!isset($parseurl)) and ($threadinfo[forumid]!=22]) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked="";

if (!isset($parseurl)) and ($forum[forumid]!=22]) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked="";

if (!isset($parseurl) and ($threadinfo[forumid]!=22])) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked="";

if (!isset($parseurl) and ($forum[forumid]!=22])) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked="";

if ((!isset($parseurl) and ($threadinfo[forumid]!=22])) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked="";

if ((!isset($parseurl) and ($forum[forumid]!=22])) {
$parseurlchecked="CHECKED";
} else {
$parseurlchecked="";

SloppyGoat 12-12-2002 10:53 PM

Bump! Anyone else have any ideas? I gotta find someone who can figure this one out. It's driving me crazy. :(

SloppyGoat 12-18-2002 02:41 AM

Damnit! Someone's gotta know this one. :(

Boofo 12-18-2002 03:15 AM

Try this:

Code:

if (!isset($parseurl) and ($threadinfo['forumid']!=22])) {
$parseurlchecked='CHECKED';
} else {
$parseurlchecked='';


filburt1 12-18-2002 03:24 AM

No offense but has anybody heard of the phpinclude template? No hacking required.

Boofo 12-18-2002 03:42 AM

But don't you start getting a load on the server doing it that way? Because it adds it to every page instead of just where he needs it.

SloppyGoat 12-18-2002 06:37 PM

I'd much rather have a hack to do this, since it is only needed in one thread, and should be a small and simple change....if I just knew exactly how to do it. :ermm:

Thanks Boofo, I'll give that a try too.

Dean C 12-18-2002 07:00 PM

Yes filburt... not everyone loves the phpinclude template as much as you hehe ;)

Boofo 12-19-2002 09:30 PM

Mist, where's the bee? I like the bee much better. ;)

SloppyGoat 12-20-2002 04:18 AM

Quote:

Originally posted by Boofo
Try this:

Code:

if (!isset($parseurl) and ($threadinfo['forumid']!=22])) {
$parseurlchecked='CHECKED';
} else {
$parseurlchecked='';


Nope, same parse error in line 464. :cry: Could I be using the wrong forumid or something? This is what it says at the end of the url in the main directory of that particular forum, so I assumed that's the id I should use? (forumdisplay.php?s=&forumid=22) Of course, the reply id changes depending on which thread you're replying to.....and I've been testing this on the newreply.php each time.
[edit]
I also tested it in newthread.php, just out of curiosity, and I get the same error there too. (different line number, of course)

Boofo 12-20-2002 04:23 AM

Try this. I forgot the bracket.

Code:

if (!isset($parseurl) and ($threadinfo['forumid']!=22])) {
$parseurlchecked='CHECKED';
} else {
$parseurlchecked='';
}


SloppyGoat 12-20-2002 04:30 AM

Nope. Damn! Man, this isn't turning out to be the easiest hack, but I just know it's something pretty simple like what you guys are suggesting. I'm sure we're on the right track, anyway.

Boofo 12-20-2002 04:31 AM

Ok, give me the place you are trying to insert it at and I will try it here.

Dean C 12-20-2002 08:28 AM

Make sure you are replacing the right code snippet again and try this:

PHP Code:

if ((!isset($parseurl) and ($threadinfo['forumid']!=22])) {
$parseurlchecked='CHECKED';
} else {
$parseurlchecked='';


Boofo forgot the bracket again... i have no idea why your getting these errors..

- miSt

Boofo 12-20-2002 03:45 PM

Mist, you have 1 too many brackets now. You need a right bracket for every left one. You have 4 left brackets and 3 right ones. :)

SloppyGoat 12-20-2002 04:23 PM

Quote:

Originally posted by Boofo
Ok, give me the place you are trying to insert it at and I will try it here.
replace: (starts on line 464 in my newreply.php)

if (!isset($parseurl)) {
$parseurlchecked="CHECKED";
}

with:

All the suggested code so far....except the one above, which I'll try when I get home tonight. :lick:

Dean C 12-20-2002 04:56 PM

Ahhh i think i might have it this time!

Replace this:

PHP Code:

if (!isset($parseurl)) {
$parseurlchecked="CHECKED";


with this:

PHP Code:

if ((!isset($parseurl)) and ($threadinfo['forumid']!=22]))  {
$parseurlchecked="CHECKED";


I dont think an else is possible (possible brainwave hehe) :)

That shouldn't give you a parse error and boofo i don't have an extra bracket do i? You missed out the one on the left which I highlighted

- miSt


All times are GMT. The time now is 04:46 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.01275 seconds
  • Memory Usage 1,825KB
  • 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
  • (10)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)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