![]() |
Refering to the warned post being marked, I was thinking about this and I want to share those thoughts with you.
At the moment, the only place where the warned postid is stored, is in the table warnings. If we were to have a "red flag" for posts that have been warned, that means that I should add a query, which will read the warnings table, for each post. Too much server overload I think. The alternative would be, to mark the post as "warned" in the "post" table. In that way, when the post is read, to be displayed, the warned red flag is read as well. But, that means that almost all files that issue "post-related" warnings, will have to be edited (off my head right now, I would say that these are three or four files, but maybe I can make it less). I think I should do it that way, otherwise I know one member here, whose hair will stand up, if we add another query per shown post. Rgds |
I like the alternative option. Doesn't have to be included right away, if done in a next release I would be more than happy :)
Thanks for being so cooperative and active responding! |
Maybe another possibility (but hey I'm just a php/mysql noob) ... just give a pop up or warning to the moderator when they try to give a second warning to an already warned post.
That why I think you only got to store the id's of the marked posts and query them when a new warning is been issued. But then again, I'm just a noob in these things. |
Well folks, here is what I've done. I added a column in the post table. Every time a post is warned, I add 1 to that column. Every time a warning is removed, I subtract 1 from that column. If that column is >0, then there is at least one warning for that post. If this is so, a large stop-like sign appears in the postbit, in that post.
I just uploaded 3.0.6. One more thing. If there are any users who still have problems with 3.0.5 or any previous release, please let me know now. Thanks and Rgds |
Thnx, works fine, but :
In users management, still it just takes me to a blank screen with a Internal Server Error when I selecting Warn User. |
Quote:
Rgds |
Quote:
From the users management the link brings me nowhere. Maby it's a problem of my forum DIR, I have my home page in the root en than a forum DIR. |
Database error in vBulletin 3.0.4:
Invalid SQL: insert into warnings values('','30','1','1105040863','','256','2','N',' A','','') mysql error: Column count doesn't match value count at row 1 mysql error number: 1136 |
Quote:
|
Quote:
Do this test. While you are in your admincp, go to the address bar of your browser and enter this : http://www.mysite.nl/forum/admincp/../Warn.php?$session[sessionurl]do=WarnUserNoPost&return=user&id=61 Does that bring you anything? Rgds |
Quote:
|
PLEASE DO NOT USE THE AUTOMATIC WARNING FEATURE OF THIS HACK.
I have discovered a bug, where the automatic warning is attributed not to the post that issued it, but to the post before it. I am working on the solution, but until I have everything finalize, please turn off the Automatic Warnings for posts. Thank you and I am sorry for the inconvenience. |
Version 3.0.7 was just uploaded, which corrects the bug in the Automatic Warnings for posts.
The bug affected only replies posted in a thread, not the first post in a thread, or edits done to an existing post. For those who have "ObsceneWords"-type of warnings in your forum, I think you should check them out. I had only 3 of them, and the one was the first in a thread, so it was not affected. The rest were fixed easily with a little investigating work in the post table and a few SQL commands. Gentlemen, I am really sorry for any inconvenience I caused you. :-( |
sql syntax help please
ALTER TABLE `".TABLE_PREFIX."post` ADD COLUMN `warn_flag` int(5) default 0 AFTER attach my prefix is vb3 but i thought it would be like this: ALTER TABLE vb3_post ADD COLUMN `warn_flag` int(5) default 0 AFTER attach but i keep getting a syntax error MySQL said: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default0 AFTER attach' at line 1 please help |
Quote:
HTML Code:
http://www.mysite.nl/forum/admincp/../Warn.php?do=WarnUserNoPost&return=user&id=61 Rgds |
Dangit, John! What do you think we're paying you all that good money for! ;) lol
Thanks for all of your hard work. I'll be upgrading tonight. :) |
Quote:
I feel really sorry. I have done tests on tests and more tests on anything, and this slipped my attention. I guess I can blame vB a little, because somwhere above my code, it calls a function, with the parameter $_POST['postid'], so I assumed (without checking, the idiot), that that parameter was the postid of the new reply. However, this was not the case, this is the id of the previous post in the thread, and is used inside the called function to link the posts together. It is inside that function that the new reply's id is generated. So I goofed big time! At least I had the fix out within one hour I noticed the problem. Time to go to bed, it's 2:30 am here. Rgds |
Quote:
i'm not sql guy thanks in advance |
Quote:
I'll wait for you to tell me. I'll have another cigarette. Rgds |
Quote:
ALTER TABLE vb3_post ADD COLUMN `warn_flag` int(5) default 0 AFTER attach and got this: Error SQL-query : ALTER TABLE vb3_post ADD COLUMN `warn_flag` int( 5 ) default 0 AFTER attach MySQL said: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'default0 AFTER attach' at line 1 there is a space between default and 0 |
MySQL 4.0.22
|
Quote:
Sorry, have to go to bed, I have to take the twins to school tomorrow morning and it's the first day after the holidays, so I need to get up really early to face all the ... tornados they'll have for me. Rgds |
Quote:
HTML Code:
http://www.mysite.nl/forum/Warn.php?do=WarnUserNoPost&id=61 |
where you quoted this when upgrading from 3.0.5 to 3.0.6:
Quote:
mind you your hack is the only hack that has altered my postbit and postbit legacy. |
Quote:
Change the file and you are done. |
Quote:
Goodnight!!! |
Quote:
<if condition="$viewoption=='All'"> |
Quote:
But what and in which file must I editting so that the fix is there. Sorry, but with the little update's of you, I am ff the way lost. Then the 3.0.5 to 3.0.6 update : You say : Edit your postbit template and find: PHP Code:
PHP Code:
PHP Code:
|
Quote:
PHP Code:
As for the last replace instructions, yes, enter my code above the one you mention. If I remember correctly, the User ID was something I added for my convenience in my forum. Sorry! |
Quote:
That part of the code exists since the first release (or to be more accurate since version 1.3). If you do not have it, then you haven't installed the hack properly. Shall we take it from scratch? What version do you have installed? Which version do you try to install now? Are you installing for the first time? Nubian, sorry but I can't remember everything, especially today, I went to bed a 03:30 am yesterday night and it's 08:00 right now, so please do not expect too much from me. Rgds |
Quote:
I have only added the 2 points at the beginning of that rule, and it works perfectly now, the page opened now in my admincp themselves. Thanks once again PS : And now I see that there is another update of vBulletin :confused: |
Quote:
also the sql sntax error i was getting.... my sql doesn't like: Code:
ALTER TABLE vb3_post ADD COLUMN `warn_flag` int( 5 ) default 0 AFTER attach Code:
ALTER TABLE 'vb3_post' ADD COLUMN `warn_flag` int( 5 ) default '0' AFTER attach thank you |
Quote:
|
Quote:
|
Okay Im gonna start remaking this version now, to work with $vboptions
sv1, I seem to remember some guy saying that he wasn't gonna release new versions every 3 days *sees 2 update emails in his inbox just today* *cough* XD |
Hack seem to work perfectly with VBB 3.0.5
|
sv1cec,
This is an awesome hack, thanks for sharing. A question, though. I'm doing the file mods and at this step in your instructions: 9. Open file includes/functions_newpost.php and find: global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $_REQUEST; Replace that with: global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $wehavecensoredwords, $weneedacounter, $newpostid, $_REQUEST; I can't find that line. I doubled-checked in versions 3.0.3 and 3.0.5 - which I'm running. The line I can find is global $DB_site, $vboptions, $vbphrase, $bbuserinfo, $forumperms, $usergroupcache, $_REQUEST; which is pretty close. Shouldn't the variables $wehavecensoredwords, $weneedacounter be just in the second line...? Thanks, |
Quote:
i just replaced what seemed to be the closest one there since you aren't removing any line of code but simply just adding. |
Thanks nubian. :up:
|
Quote:
If you are installing from scratch, yes you are right, these two variables should be only in the second line. I had a mistake in the installation instructions (corrected). But if you are just ugrading, then these variables were there, from the previous version, actually they are there since version 2.0 if memory serves me right. Rgds |
All times are GMT. The time now is 10:20 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 | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|