Search found 699 matches

by posey
Mon Apr 23, 2018 9:24 am
Forum: phpBB Custom Coding
Topic: External Page Recent Topics Problem
Replies: 5
Views: 88

Re: External Page Recent Topics Problem

Do you have the page_header() and page_footer() functions in your php file? page_header('External page'); $template->set_filenames(array( 'body' => 'external_body.html' )); page_footer(); @see: https://wiki.phpbb.com/Practical.Displaying_posts_and_topics_on_external_pages#Footer_and_conclusion
by posey
Mon Apr 23, 2018 9:18 am
Forum: Extension Writers Discussion
Topic: Calling request class from controller causes blank screens.
Replies: 6
Views: 119

Re: Calling request class from controller causes blank screens.

The request_var is also outdated / deprecated. What you want to be using is the request class. - https://github.com/phpbb/phpbb/blob/master/phpBB/phpbb/request/request.php - https://area51.phpbb.com/docs/code/3.1.x/phpbb/request/request.html You have the html: <form id="something" method="post" acti...
by posey
Sun Apr 22, 2018 8:05 pm
Forum: phpBB Custom Coding
Topic: External Page Recent Topics Problem
Replies: 5
Views: 88

Re: External Page Recent Topics Problem

https://wiki.phpbb.com/Practical.Displa ... base_calls
Note: If you are using phpBB 3.1.x references to topic_approved in the following examples must be changed to topic_visibility.
by posey
Sat Apr 21, 2018 6:50 am
Forum: Extensions in Development
Topic: [BETA] Sidebar Menu
Replies: 53
Views: 902

Re: [BETA] Sidebar Menu

Just remove one of the lines. It has to return a boolean, whether it is installed already are not. If either one is present it is safe to assume both are. So just remove one of the lines ;)
by posey
Fri Apr 20, 2018 9:35 pm
Forum: Extensions in Development
Topic: [BETA] Sidebar Menu
Replies: 53
Views: 902

Re: [BETA] Sidebar Menu

Just a tip for you, https://github.com/Sniper-E/Sidebar-Menu/blob/master/migrations/sidebarmenu_schema.php#L16 You can only have one return statement there. And I'm quite interested in how you did this and I'll have to test it out myself, but; The problem extension writers usually walk into is that ...
by posey
Fri Apr 20, 2018 1:42 pm
Forum: Extension Writers Discussion
Topic: Confirm_box call causes error
Replies: 8
Views: 234

Re: Confirm_box call causes error

I'm beginning to understad what you're trying to do. So you're not working during the actual editing of a post, but just inside a viewtopic. Then it might be better to use a route and a controller . I've put together a basic set up for you, to work with: evo.zip Confirm box works. - https://prnt.sc/...
by posey
Fri Apr 20, 2018 12:40 pm
Forum: Extension Writers Discussion
Topic: Autocomplete and store with jQuery
Replies: 2
Views: 119

Re: Autocomplete and store with jQuery

I'm not familiar with the jQuery auto-complete functionallity, but have you tried calling it on the select field with the options in place? It might just take the available options. Otherwise you can just use all child options from your select as the 'auto complete tags'. Moreover, I personally am v...
by posey
Sun Apr 15, 2018 2:43 pm
Forum: Extension Writers Discussion
Topic: user_add and fun with newest_user_colour
Replies: 12
Views: 241

Re: user_add and fun with newest_user_colour

I might be missing the point here, but it looks like you just want to grab the latest registered user? Cause the way the code is currently coded, the newest_user_colour is always set to the group colour of the group with the identifier 2. To easily display the latest registered user you can do: $sql...
by posey
Sun Apr 15, 2018 2:23 pm
Forum: Extension Writers Discussion
Topic: Confirm_box call causes error
Replies: 8
Views: 234

Re: Confirm_box call causes error

To what event are you subscribing in your event listener? Do you have a github repository that is viewable? Cause your code still shows a few issues. $topic_id = $this->functions->get_topic_id($topic_id, $post_id); The first parameter for the get_topic_id() function ( $topic_id ) is not set/defined ...
by posey
Sat Apr 14, 2018 9:30 pm
Forum: Extension Writers Discussion
Topic: Confirm_box call causes error
Replies: 8
Views: 234

Re: Confirm_box call causes error

It would once again, really help if you would actually post the error and the code. Moreover, Some information about the confirm_box() : https://wiki.phpbb.com/Function.confirm_box if (confirm_box(true)) { // Perform the action ... // Log the action $this->log->add('user', $this->user->data['user_id...
by posey
Fri Apr 13, 2018 7:31 am
Forum: Extension Requests
Topic: Characters counter
Replies: 17
Views: 473

Re: Characters counter

It's used by phpBB btw: https://github.com/phpbb/phpbb/blob/master/phpBB/includes/utf/utf_tools.php#L115 That's phpBB's utr8_strlen() . /** * Return the length (in characters) of a UTF-8 string * @ignore */ function utf8_strlen($text) { return mb_strlen($text, 'utf-8'); } My main question would be: ...
by posey
Fri Apr 13, 2018 7:25 am
Forum: Extension Writers Discussion
Topic: Redirect within an Event used by an extension
Replies: 2
Views: 136

Re: Redirect within an Event used by an extension

Really hard to judge without code and thoughts behind the code.
But it sounds like, when you set the cancel to true, the initial action will not go through at all.
Might be better to set an additional parameter and check for that parameter after submit and redirect to the appropiate url.
by posey
Sun Apr 08, 2018 8:53 pm
Forum: Extension Writers Discussion
Topic: Adding a block_var array to another block_var array
Replies: 13
Views: 370

Re: Adding a block_var array to another block_var array

Twig {% for %}

Just to add to martti, twig uses the |length filter.

Code: Select all

{% if some_loop|length %}
    The loop has items in it ..
{% endif %}
What also is possible is:

Code: Select all

{% for item in some_loop %}
    Do loop stuff
{% else %}
    Triggered when the loop is empty
{% endfor %}
by posey
Sat Apr 07, 2018 8:56 am
Forum: phpBB Custom Coding
Topic: PHP Redirect of vbulletin urls to phpbb forum
Replies: 4
Views: 245

Re: PHP Redirect of vbulletin urls to phpbb forum

In addition to what Jack said, you are also missing a semi-colon (;). <?php $forum = (int) $_GET['p']; if (!empty($forum)) { if ($forum == 724166) { $forum = 2330; } header('HTTP/1.1 301 Moved Permanently'); header('Location: http://hundredbling.net/viewtopic.php?t=' . $forum); } ?> And what confuse...

Go to advanced search