vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Advanced Warning System (AWS) (https://vborg.vbsupport.ru/forumdisplay.php?f=105)
-   -   Would you be interested in a version which ..... (https://vborg.vbsupport.ru/showthread.php?t=77952)

sv1cec 03-12-2005 05:04 AM

Would you be interested in a version which .....
 
Gentlemen,

I have a friend here, who keeps bugging me to edit the code of AWS, to use $vboptions variables, instead of storing the warning system options in a separate table. This, reduces the number of queries AWS does, by one, every time you run Warn.php to warn someone or to view someone warnings. It doesn't query the `warning_options` table, the info is now stored in the `setting` table and cached in the $vboptions variables.

Admitedly, this friend has done a lot of work to help me change AWS to this form, but there is still work to be done by me, and of course, I need to use my live board as a test engironment, for this version (my Sun decided that it had enough and started going south on me, so I do not have another test environment).

So, if you are so kind, please vote in the poll here, to let me know if such a change would interest you.

Kind regards

lasto 03-12-2005 05:18 AM

well tbh anything that uses less queries would be of great benefit and if u can release this top hack with same functions,with less then im all for it.

SkyShadow 03-12-2005 07:36 AM

I think it would be great for the performance.
I vote for a change.
Also it would be fine if you can make a "fully phrased" version.

Revan 03-12-2005 08:20 AM

Guess 15 times what I voted ;)

What other work needs to be done? Unless the native warning templates contain references to $warn_opts (I know I forgot to bundle these) then it does work.
(So if you are referencing to these new templates then I will make an .xml file)

sv1cec 03-12-2005 08:35 AM

Quote:

Originally Posted by Revan
Guess 15 times what I voted ;)

What other work needs to be done? Unless the native warning templates contain references to $warn_opts (I know I forgot to bundle these) then it does work.
(So if you are referencing to these new templates then I will make an .xml file)

So, do you mean, that I can go ahead and use this version on my active site, and it will work, as is? I do not think the templates contain references to $warn_opts, but I can check that out easily. Is Warn.php done already? I didn't check everything you send me, just the installation script and the admin_warn.php.

Back to do more work.

Revan 03-12-2005 04:44 PM

Yes, every single file and file/template edit will work as is.

sv1cec 03-14-2005 08:30 AM

Quote:

Originally Posted by Revan
Yes, every single file and file/template edit will work as is.

Well, I uploaded the files and then run your script. It looks as if the $vboptions are set properly, BUT when you go to admin_warn to see (or reset them, AdminCP/Manage Warning Options) they do not show up correctly. What's the issue?

From what I saw, the script updated the $vboptions, with "Yes" and "No" values, instead of "1" and "0" values. The admin_warn.php expects to find 1 and zeros. All the program expects Yes and Nos, so I guess the admin_warn should be changed accordingly, to use Yes or Nos, these are used in templates as well.

Also, in the files you send me, there are a lot of things you have changed for your own environment (rpg_user for example). Could you please remove them?

Thanks and Rgds

Revan 03-14-2005 02:29 PM

First of all, the Warning Options shows up just fine here.
Second, if you look through the Warn.php and the template edits, you will see it expects to see 1 and 0 too. As for the templates, this is something you have to change for yourself as I already stated I did not do those.
Thirdly, there is no such reference to "rpg_user" on my forum, as this would cause errors (since no such table exists). I will check it out though, and edit this post.

As I thought, NO files I sent you contain such a code. I have checked EVERY file. Please recheck your facts and files.
The word "rpg" appears a few times, because you included some redundant code that looks like ZT wrote, "rpg_option" and sum sh*t you obviously don't need.

Could you be more specific as to what exactly does not work in the warning options?
Error messages?

sv1cec 03-14-2005 02:55 PM

Quote:

Originally Posted by Revan
First of all, the Warning Options shows up just fine here.
Second, if you look through the Warn.php and the template edits, you will see it expects to see 1 and 0 too. As for the templates, this is something you have to change for yourself as I already stated I did not do those.
Thirdly, there is no such reference to "rpg_user" on my forum, as this would cause errors (since no such table exists). I will check it out though, and edit this post.

As I thought, NO files I sent you contain such a code. I have checked EVERY file. Please recheck your facts and files.
The word "rpg" appears a few times, because you included some redundant code that looks like ZT wrote, "rpg_option" and sum sh*t you obviously don't need.

Could you be more specific as to what exactly does not work in the warning options?
Error messages?

Revan,

you were right about the rpg_ whatever thing, it is not your code. It's something ZT wrote and I inherited, I'll have to go through it and remove it.

The problem with the warning options is that when I run your warn_install_setting.php script, the $vboptions values are populated with 'Yes' and 'No's for the fields which are a Yes/No field. Then the admin_warn compares these values to 1's and 0's and of course, it never finds the proper values.

I am going to try it again, but I did follow your instructions, uploaded the files and run the script. The values in the `setting` table are 'Yes' and 'No's. If Warn.php checks for 1/0s and if the instructions for the template edits are for 1/0's then your script should set the value of the $vboptions not to Yes/No but to 1/0.

Does it make sense?

Update: I cleaned up the setting table and the phrase table and then re_run the script. The problem exists for the Yes/No fields. Again, the values it enters in the setting table are NOT 1 and 0 they are Yes and No. I assume you need to change your script a little so that when it finds a value of Yes, it replaces that with 1 and when it finds a value of No (in warning_options) it replaces that with 0.

Rgds

Revan 03-14-2005 03:39 PM

Of course of course of the back of a horse! NOW I see!
I will write you a parser to fix this right away :)

Ok, this should do the trick.
In warn_install_setting.php, find (both instances of)
PHP Code:

                    if ($custom == true)
                    { 

Add AFTER
PHP Code:

                        if ($insert == 'Yes')
                        {
                            
$insert 1;
                        }
                        else if (
$insert == 'No')
                        {
                            
$insert 0;
                        } 



All times are GMT. The time now is 08:40 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.01249 seconds
  • Memory Usage 1,750KB
  • 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
  • (2)bbcode_php_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)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