Page 2 of 13

Re: [DEV] Hide BBcode

Posted: Fri Jan 23, 2015 11:54 am
by marcovo
I'm sorry, what are you saying? I guess you'll have to rephrase your post because at the moment I think it's rather rude.

Re: [DEV] Hide BBcode

Posted: Fri Jan 23, 2015 12:11 pm
by marcovo
I got stuck on some piece of code. The extension is mostly working right now, but I wonder whether the extension will pass the phpBB extension validation this way... I started a topic on this issue, it can be found here.

------------

It would be nice if someone would help with testing the extension. There might be some cases I haven't yet noticed, in which the extension might react weird or sth like that, and I want to fix those cases before submitting the extension.

Re: [DEV] Hide BBcode

Posted: Sat Jan 24, 2015 9:04 am
by ansysko
Hi when you reply to this topic lists error

Code: Select all

General Error
SQL ERROR [ mysqli ]

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 'AND poster_id = 7783' at line 4 [1064]

SQL

SELECT poster_id, topic_id FROM phpbb_posts WHERE topic_id = AND poster_id = 7783

BACKTRACE

FILE: (not given by php)
LINE: (not given by php)
CALL: msg_handler()

FILE: [ROOT]/phpbb/db/driver/driver.php
LINE: 855
CALL: trigger_error()

FILE: [ROOT]/phpbb/db/driver/mysqli.php
LINE: 194
CALL: phpbb\db\driver\driver->sql_error()

FILE: [ROOT]/phpbb/db/driver/factory.php
LINE: 329
CALL: phpbb\db\driver\mysqli->sql_query()

FILE: [ROOT]/ext/marcovo/hide_bbcode/event/listener.php
LINE: 149
CALL: phpbb\db\driver\factory->sql_query()

FILE: [ROOT]/ext/marcovo/hide_bbcode/event/listener.php
LINE: 129
CALL: marcovo\hide_bbcode\event\listener->check_user_posted_by_topicId()

FILE: [ROOT]/ext/marcovo/hide_bbcode/event/listener.php
LINE: 93
CALL: marcovo\hide_bbcode\event\listener->check_user_posted_by_postId()

FILE: (not given by php)
LINE: (not given by php)
CALL: marcovo\hide_bbcode\event\listener->check_user_posted_posting()

FILE: [ROOT]/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php
LINE: 164
CALL: call_user_func()

FILE: [ROOT]/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/EventDispatcher.php
LINE: 53
CALL: Symfony\Component\EventDispatcher\EventDispatcher->doDispatch()

FILE: [ROOT]/vendor/symfony/event-dispatcher/Symfony/Component/EventDispatcher/ContainerAwareEventDispatcher.php
LINE: 167
CALL: Symfony\Component\EventDispatcher\EventDispatcher->dispatch()

FILE: [ROOT]/phpbb/event/dispatcher.php
LINE: 40
CALL: Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch()

FILE: [ROOT]/posting.php
LINE: 104
CALL: phpbb\event\dispatcher->trigger_event() 

Re: [DEV] Hide BBcode

Posted: Sat Jan 24, 2015 10:04 am
by marcovo
How could I not have seen that... I uploaded a fix :) .

Re: [DEV] Hide BBcode

Posted: Sat Jan 24, 2015 2:39 pm
by tom40
it's working on my test site :D

Re: [DEV] Hide BBcode

Posted: Sat Jan 24, 2015 10:38 pm
by ansysko
Marcovo thank you it works perfectly

Re: [DEV] Hide BBcode

Posted: Mon Jan 26, 2015 4:53 pm
by marcovo
I fixed a few issues today, note that the initial post has been adjusted accordingly. The event test.decode_message_after isn't used any more, but in place 2 other edits will have to be done. This fixes issues with content being hidden while it shouldn't be hidden, in case one is previewing a post or saving/loading a draft, for example. The changes made today are only in the parts of posting (composing & submitting posts) and drafts.

If no bugs are found in this version, I guess the extension is ready to be released, apart from some feature requests in this topic I haven't heared about any more.

So please test the latest version. If everything is right I'll request the two core edits on a51, and hopefully this extension might be available when the next version of phpBB3.1 is released. The main questions are:
- Is everything hidden when it should be? And is it shown when it should be shown?
- Are there any side-effects I might have overlooked?

Re: [DEV] Hide BBcode

Posted: Tue Jan 27, 2015 9:11 am
by ansysko
There was also be linked from the

Code: Select all

[DEV] Thanks for posts
when the user acknowledge the contribution that he previewed unhide only one contribution in the topic?

Re: [DEV] Hide BBcode

Posted: Tue Jan 27, 2015 11:37 am
by marcovo
I don't get what you're saying, can you please rephrase it? Are you requesting a link with the Thanks for posts extension? Or was your post a question?

Re: [DEV] Hide BBcode

Posted: Wed Jan 28, 2015 3:42 am
by ansysko
Yes I would need to unhide BBCode only the contribution for which the user thanked

Re: [DEV] Hide BBcode

Posted: Sat Jan 31, 2015 9:56 am
by infinitiv
Thank you, marcovo, I'll test it next week.

Re: [DEV] Hide BBcode

Posted: Tue Feb 17, 2015 1:18 am
by parshakov
I need a BBCode that hides the text from guests and users who have less than a certain amount of posts; [hide=30]text[/hide]

marcovo, could you add this option in your ext?

Re: [DEV] Hide BBcode

Posted: Tue Feb 17, 2015 1:12 pm
by infinitiv
OK, so there's an issue with searching. No matter if user replied in a topic or not, search.php always gives the "You need to reply to this topic (...)" message. It happens for all users, moderatrors included. AFAIK there's no other bugs, but my tests aren't over yet.

Re: [DEV] Hide BBcode

Posted: Tue Feb 17, 2015 7:02 pm
by marcovo
@parshavok: I will look into this.

@infinitiv: thanks for testing. I must admit, I guess I've overlooked search.php, I really haven't thought about doing something with it. I wonder whether it was implemented in the 3.0 MOD? I will investigate what is possible in search.php, but I think it does not have a very high priority as the information is in fact available, the only inconvenience being that one has to click more often... But of course it would be nice if I could fix it ;)

Re: [DEV] Hide BBcode

Posted: Wed Feb 18, 2015 8:17 am
by alhitary
Can we hide it from visitors ( members who not register log in ) ?
So they should login to see the post ?

Something like an option in ACP to choose "hide from visitors" or "hide from who not post"