[RC] Hide BBcode

Any abandoned Extensions will be moved to this forum.

WARNING: Extensions in this forum are not currently being supported or maintained by the original Extension author. Proceed at your own risk.
Forum rules
IMPORTANT: Extension Development Forum rules

WARNING: Extensions in this forum are not currently being supported nor updated by the original Extension author. Proceed at your own risk.
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post 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.
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post 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.
ansysko
Registered User
Posts: 55
Joined: Wed Feb 03, 2010 4:03 pm

Re: [DEV] Hide BBcode

Post 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() 
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post by marcovo »

How could I not have seen that... I uploaded a fix :) .
tom40
Registered User
Posts: 7
Joined: Sat Jan 24, 2015 2:15 pm

Re: [DEV] Hide BBcode

Post by tom40 »

it's working on my test site :D
ansysko
Registered User
Posts: 55
Joined: Wed Feb 03, 2010 4:03 pm

Re: [DEV] Hide BBcode

Post by ansysko »

Marcovo thank you it works perfectly
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post 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?
ansysko
Registered User
Posts: 55
Joined: Wed Feb 03, 2010 4:03 pm

Re: [DEV] Hide BBcode

Post 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?
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post 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?
ansysko
Registered User
Posts: 55
Joined: Wed Feb 03, 2010 4:03 pm

Re: [DEV] Hide BBcode

Post by ansysko »

Yes I would need to unhide BBCode only the contribution for which the user thanked
infinitiv
Registered User
Posts: 166
Joined: Sat Nov 15, 2014 3:47 pm
Location: PL
Name: Ficjusz

Re: [DEV] Hide BBcode

Post by infinitiv »

Thank you, marcovo, I'll test it next week.
parshakov
Registered User
Posts: 36
Joined: Sun Jul 28, 2013 8:03 pm

Re: [DEV] Hide BBcode

Post 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?
infinitiv
Registered User
Posts: 166
Joined: Sat Nov 15, 2014 3:47 pm
Location: PL
Name: Ficjusz

Re: [DEV] Hide BBcode

Post 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.
marcovo
Registered User
Posts: 239
Joined: Fri Nov 16, 2012 12:19 pm
Location: The Netherlands
Name: Marco

Re: [DEV] Hide BBcode

Post 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 ;)
User avatar
alhitary
Registered User
Posts: 868
Joined: Wed Jan 17, 2007 7:51 am
Location: ROY
Name: Bassel Taha

Re: [DEV] Hide BBcode

Post 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"

Return to “Abandoned Extensions”