MyBB Community Forums

Full Version: hideuntilpost plugin error
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
when i am trying to install hideuntilpost plugin in my forum (mybb 1.6.12)
i am getting this error.

MyBB SQL Error
MyBB has experienced an
internal SQL error and cannot
continue.
SQL Error:
1366 - Incorrect integer value:
'no' for column 'isdefault' at
row 1
Query:
INSERT INTO hg6o_
settinggroups
(name,title,description,`
disporder,isdefault`) VALUES
('hideUntilPost_settings','Hides
Links and Attachments until
Post','Hides Links and
Attachments until Post a Post
has been made on the
thread.','50','no')
Please contact the MyBB Group
for support.
.
.

Please help me to solve it.
Open plugin and change this

('hideUntilPost_settings','Hides
Links and Attachments until
Post','Hides Links and
Attachments until Post a Post
has been made on the
thread.','50','no')

To this.

('hideUntilPost_settings','Hides
Links and Attachments until
Post','Hides Links and
Attachments until Post a Post
has been made on the
thread.','50','0')

This can be solve your issue, but i recomend you to use my own plugin Hide Content Until Reply, and configure as you wish if you wish, but i think you want to hide only when have some post maded. But you can put this with only one var more of postnum xD.
The row for 'isdefault' must be an integer. 'No' is a var - so in order to ensure it's an int you can use intval.

If intval($example) returns 1 - it means that either $example = 1 or a string.
now getting this error after editing "no" to "0"
SQL Error:
1366 - Incorrect integer value:
'' for column 'tid' at row 1
Query:
INSERT INTO hg6o_templates
(tid,title,template,sid)
VALUES ('','hideUntilPost_box','
{$msg}
','-1')
Wrong query.

Post your plugin file here. I will fix it.
(2014-03-23, 03:37 PM)Cedric Wrote: [ -> ]Wrong query.

Post your plugin file here. I will fix it.

here its the plugin. Thanks waiting for your reply.