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)

Boofo 12-20-2002 05:01 PM

I think this is what it should be without the else.

Code:

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


Dean C 12-20-2002 05:03 PM

Hehe i must have had the brainwave at the same time as you :)

- miSt

Boofo 12-20-2002 05:04 PM

Quote:

Originally posted by Mist
PHP Code:

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


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 [/B]
You still have too many. First count all the brackets thast face left and then count all the brackets that face right. They should be the same amount. You have the right amount this time but I don't think you need to have 2 of them at the start. I could be all wrong on this. :)

Boofo 12-20-2002 05:06 PM

Quote:

Originally posted by Mist
Hehe i must have had the brainwave at the same time as you :)

- miSt

They say great minds think alike. ;)

Dean C 12-20-2002 06:16 PM

oooopseeee..

PHP Code:

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


Im blind to that extra bracket!

Yes great minds do think alike :p

- miSt

SloppyGoat 12-20-2002 08:21 PM

Ok,I'll try the last one then. Although I don't know php at all, I can't see how this one works, when I could kind of understand the first ones. :confused:

I'll let ya know what happens. ;)

Boofo 12-20-2002 09:11 PM

Quote:

Originally posted by Mist
oooopseeee..

Code:

if LL!issetL$parseurlR and L$threadinfo['forumid']!=22]RR  {
$parseurlchecked="CHECKED";
}

Im blind to that extra bracket!

Yes great minds do think alike :p

- miSt

Ok, I will put an L where you have left brackets and an R where you have right brackets. You have 4 left brackets and 3 right brackets. Do you see what I mean?

It should be like this:
Code:

if L!issetL$parseurlR and L$threadinfo['forumid']!=22]RR  {
$parseurlchecked="CHECKED";
}


NTLDR 12-20-2002 09:20 PM

This threads been buggin me loads, so here we go, proper working coded, checked, double checked and tested on localhost:

PHP Code:

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


Boofo 12-20-2002 09:23 PM

It takes a Master to put all of us Grasshoppers in our place. Good job, sir. :)

Dean C 12-20-2002 09:36 PM

hehe thanks NTDLR ;)

But why doesn't my code work ?

- mist

SloppyGoat 12-20-2002 09:52 PM

Quote:

Originally posted by NTLDR
This threads been buggin me loads, so here we go, proper working coded, checked, double checked and tested on localhost:

PHP Code:

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


YES!!!! It works!!! Thank you so much!!! You're a master! I'm simply ecstatic!!!! :banana:

SloppyGoat 12-20-2002 09:54 PM

Ok, one thing that puzzles me...why did my reply go up here? I replied after you posted the alternate code! :rolleyes:

NTLDR 12-20-2002 09:59 PM

Thinking about I I expect we were using and and should have been using or. In the end if I can't get it to work like I want I give up and do it the way I posted!

SloppyGoat 12-20-2002 10:01 PM

Ok, I guess I forgot to set my time zone here. DOH!

[edit] But it's still above the last post! WTH? Is the clock screwed up here? It's 10:58PM here now. :cross-eyed:

NTLDR 12-20-2002 10:02 PM

*lol* After all this we used the wrong "and" this code also works:

PHP Code:

  if ((!isset($parseurl)) && ($foruminfo[forumid]!=2)) {
      
$parseurlchecked="CHECKED";
  } else {
        
$parseurlchecked '';
  } 


SloppyGoat 12-20-2002 11:09 PM

Quote:

Originally posted by NTLDR
*lol* After all this we used the wrong "and" this code also works:

PHP Code:

  if ((!isset($parseurl)) && ($foruminfo[forumid]!=2)) {
      
$parseurlchecked="CHECKED";
  } else {
        
$parseurlchecked '';
  } 


So, all it needed was "&&" instead of "and"? :knockedout:


BTW, any idea how to do this in editpost.php too? I'm sure this is the line that needs to be changed, right?
PHP Code:

$parseurlchecked="CHECKED"

Do I just use part of that code in this case?

[edit]
Ok, I tried the same code replacement. It worked just fine! WooooHOOOO!!!!! :D

Dean C 12-21-2002 05:45 AM

geez lol you learn something every day :)

- miSt

NTLDR 12-21-2002 06:50 PM

Quote:

Originally posted by SloppyGoat
So, all it needed was "&&" instead of "and"? :knockedout:
Due to the order of precedence in PHP I guess, as thats the olny difference between "and" and "&&" and "or" and "||".

PHP has the following order of precedence (Left being highest):

PHP Code:

++ (Increment), -- (Decrement), /, *, %, +, -, <, <=, =>, >,
==, ===, !=, &&, ||, =, +=, -=, /=, *=, %=, .=,
and, xor, or 


SloppyGoat 12-21-2002 07:49 PM

It's Greek to me, but maybe I'll be forced to understand it eventually. LOL :D

Thanks again to all who've put forth the effort to help me out here. You're good people. I'm still relatively new to vB, and I really appreciate you sharing your knowledge. ;)

NTLDR 12-21-2002 08:00 PM

Glad to share the knowlage :D *remembers what it was like not to know how to add a template!*

Boofo 12-21-2002 08:26 PM

We can "ADD" templates in vBulletin now? Damn!

SloppyGoat 12-26-2002 03:53 AM

Yep, right in the CP too. ;)

Velocd 12-26-2002 04:03 AM

Heh, what a funny thread. It's funny to see how long it took you guys to notice that one particular bracket, which I spotted erroneous from the first page ;)

Code:

($threadinfo['forumid']!=22]))
:p

SloppyGoat 12-26-2002 01:08 PM

Well! Where were YOU? LOL :D

SloppyGoat 04-11-2003 01:57 AM

In case you don't feel like reading this entire thread, I'll sum it up for you. This is a hack to exclude autoparsing url's in a single forum....not globally.

Ok, a new interesting, but horrible issue has developed with this hack. My quickreply box ignores this code.
PHP Code:

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


I assume it's because of this line in the replybox template:
Code:

<input type="hidden" name="parseurl" value="yes">
[edit] Nope, actually, I just tried setting it to no, and it still parsed.
[edit2] But if I remove that line, it stops parsing globally. Hmmmm

Does anyone know how I can edit this to exclude just one of my forums, but not all? Can someone help stop the madness, please? :confused:

notorious 05-13-2003 12:20 PM

i have looked at this code and instead of just one forum how would i use it so it was gobal and so that all the auto parse codes was unchecked

SloppyGoat 05-13-2003 08:34 PM

I could be wrong, but try replacing this

Code:

$parseurlchecked="CHECKED";
with this

Code:

$parseurlchecked = '';
(That is two single quotes - not one double. Not sure if it matters.)

Or, this is a way that it could be done globally without hacking. Although, I haven't tried it.

'newthread' and 'newreply' templates (I'd guess the edit template too)

Edit the following code in those templates. (Should be pretty self explanitory)

Code:

<input type="checkbox" name="parseurl"
value="yes" $parseurlchecked> <b>Automatically parse URLs:</b>
automatically adds http://and around internet addresses.


Boofo 05-13-2003 09:13 PM

Wouldn't it be?

PHP Code:

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


SloppyGoat 05-13-2003 09:28 PM

No, I don't think so. There is no "else" in the original lines. ;)

Code:

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


notorious 05-17-2003 11:16 AM

this is the way my php is set up

i did as SloppyGoat said

and changed this

Code:

<br><input type="checkbox" name="email" value="yes" $emailchecked >
<b>Email Notification

to this


Code:

<br><input type="checkbox" name="email" value="yes" $email>
<b>Email Notification


thx for your help

SloppyGoat 05-17-2003 02:31 PM

I thought you were trying to disable autoparsing? Not email notification. Oh well, if it works, it works. https://vborg.vbsupport.ru/external/2003/10/1.gif

SloppyGoat 05-19-2003 08:25 AM

How can I make this apply to my quick reply box??? It doesn't work with it.

MrNoname 11-17-2010 04:53 AM

Work great! Thanks so much!

And this is for VBB4. Working good!

Code:

if (!isset($checked['parseurl']))               
        {
                                if ($foruminfo[forumid]!=19)
                              {
                        $checked['parseurl'] = 'checked="checked"';
                }else
                {
                        $checked['parseurl'] = '';       
                }
        }


SloppyGoat 11-17-2010 05:09 AM

It works on the later version too, eh? Glad to hear it works! I haven't updated yet, so haven't had a chance to see. The only thing is, WYSIWYG mode will always parse, so you have to set your default to standard editor and tell people not to use the WYSIWYG editor.
I'd still love it if someone could figure out a way to fix that too. It took me a long time to figure this out. I finally got a programmer buddy of mine to help, along with some people here. Between the people here and him, it's been working great every since! I released it as an official version (without support) somewhere here, a long time ago.

Here it is...

https://vborg.vbsupport.ru/showthread.php?t=202666


All times are GMT. The time now is 04:17 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.01293 seconds
  • Memory Usage 1,834KB
  • 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
  • (12)bbcode_code_printable
  • (10)bbcode_php_printable
  • (6)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
  • (34)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