Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 General Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #51  
Old 12-20-2002, 09:52 PM
SloppyGoat's Avatar
SloppyGoat SloppyGoat is offline
 
Join Date: Feb 2002
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #52  
Old 12-20-2002, 09:54 PM
SloppyGoat's Avatar
SloppyGoat SloppyGoat is offline
 
Join Date: Feb 2002
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Ok, one thing that puzzles me...why did my reply go up here? I replied after you posted the alternate code!
Reply With Quote
  #53  
Old 12-20-2002, 09:59 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!
Reply With Quote
  #54  
Old 12-20-2002, 10:01 PM
SloppyGoat's Avatar
SloppyGoat SloppyGoat is offline
 
Join Date: Feb 2002
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Reply With Quote
  #55  
Old 12-20-2002, 10:02 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

*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 '';
  } 
Reply With Quote
  #56  
Old 12-20-2002, 11:09 PM
SloppyGoat's Avatar
SloppyGoat SloppyGoat is offline
 
Join Date: Feb 2002
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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!!!!!
Reply With Quote
  #57  
Old 12-21-2002, 05:45 AM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

geez lol you learn something every day

- miSt
Reply With Quote
  #58  
Old 12-21-2002, 06:50 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 
Reply With Quote
  #59  
Old 12-21-2002, 07:49 PM
SloppyGoat's Avatar
SloppyGoat SloppyGoat is offline
 
Join Date: Feb 2002
Posts: 339
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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

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.
Reply With Quote
  #60  
Old 12-21-2002, 08:00 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Glad to share the knowlage *remembers what it was like not to know how to add a template!*
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 03:56 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04392 seconds
  • Memory Usage 2,267KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (5)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete