Search found 701 matches

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: 691

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: 750

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...
by posey
Sat Apr 07, 2018 8:53 am
Forum: phpBB Custom Coding
Topic: Track Users
Replies: 11
Views: 1052

Re: Track Users

What have you already tried ? Your listener.php inside the event folder of your extension: <?php namespace acme\demo\event; use Symfony\Component\EventDispatcher\EventSubscriberInterface; /** * Event listener */ class listener implements EventSubscriberInterface { /** * Assign functions defined in t...
by posey
Mon Mar 19, 2018 10:41 pm
Forum: Extension Requests
Topic: Limit Forum Description On Index To X Number Of Characters
Replies: 14
Views: 779

Re: Limit Forum Description On Index To X Number Of Characters

Remove one ( infront of 'truncate'.
However, I am not familar with the interaction, bit what happens if a bbcode is opening within the first 50 chars but the closing tag is beyond that. Will that give problems with the display?
by posey
Mon Mar 19, 2018 6:58 pm
Forum: phpBB Custom Coding
Topic: navigation changes
Replies: 74
Views: 2870

Re: navigation changes

That's cause you have set a fixed width for the tabs (at a glance of 95px), and the text is exceeding that width. That's why it's continuing the text on a new line. You either have to set the display to inline-block, change the font size or the width.
by posey
Fri Mar 16, 2018 5:32 pm
Forum: Extension Writers Discussion
Topic: Parse/render twig template in php
Replies: 10
Views: 1060

Re: Parse/render twig template in php

Not too sure what you mean / how you mean it. Tried couple of ways but all keep throwing an error, expecting the 1st parameter to setExtensions to be an array, and NULL is given. Is it not somehow possible to render a template twice? Like a template file with: {{ PAGE_HEADER }} {{ PAGE_CONTENT }} {{...
by posey
Fri Mar 16, 2018 4:19 pm
Forum: Extension Writers Discussion
Topic: Parse/render twig template in php
Replies: 10
Views: 1060

Re: Parse/render twig template in php

Alright, that sounds do-able.
How about including the built in functions such as {{ lang() }}, etc?
by posey
Fri Mar 16, 2018 2:35 pm
Forum: Extension Writers Discussion
Topic: Parse/render twig template in php
Replies: 10
Views: 1060

Re: Parse/render twig template in php

Alright, I'm resurrecting this cause I am running into a similar problem. I want to be able to render a 'string' - retrieved from the database - with custom AND common variables. I tried the above posted method by Kasimi, but that doesn't seem to parse a common variable like U_INDEX , it does howeve...
by posey
Mon Mar 12, 2018 10:59 am
Forum: phpBB Custom Coding
Topic: PHPBB bbcode help - event countdown timer
Replies: 7
Views: 637

Re: PHPBB bbcode help - event countdown timer

canonknipser wrote:
Sat Mar 10, 2018 9:52 pm
posey wrote:
Sat Mar 10, 2018 9:41 pm
There is an actual php class for this:
I don't know if you can call php scripts in a custom bbCode ...
Yeah you're right, blanked out here. :flushed:
by posey
Sat Mar 10, 2018 9:41 pm
Forum: phpBB Custom Coding
Topic: PHPBB bbcode help - event countdown timer
Replies: 7
Views: 637

Re: PHPBB bbcode help - event countdown timer

There is an actual php class for this: DateInterval. Have a look at it. It will do all the calculations for you, including how many days there are in februari.
by posey
Thu Mar 08, 2018 3:45 pm
Forum: Extension Writers Discussion
Topic: Incorrect URL when changing dropdown value
Replies: 14
Views: 648

Re: Incorrect URL when changing dropdown value

You have a different refesh data url. I meant to omit the s parameter from the FORM action, that is assigned to the template further down.
Otherwise I can send the adjusted code back,later tonight.
by posey
Wed Mar 07, 2018 10:09 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 62
Views: 6354

Re: [3.1][3.2][RC] Twig Converter

Currently on my phone and I hate the search on it, my bad :flushed:

And I am writing a style based on prosilver for personal use and due to extension writing I am now more used to the twig syntax than phpbb's.

Anyway, thanks for the quick response.
by posey
Wed Mar 07, 2018 9:54 pm
Forum: Extension Writers Discussion
Topic: Incorrect URL when changing dropdown value
Replies: 14
Views: 648

Re: Incorrect URL when changing dropdown value

Forgot to mention that I exuded the s parameter from the Form action url on php-side.

Anyways, you got it working?
by posey
Wed Mar 07, 2018 9:29 pm
Forum: Extensions in Development
Topic: [3.1][3.2][RC] Twig Converter
Replies: 62
Views: 6354

Re: [3.1][3.2][RC] Twig Converter

Out of curiosity;
Is it possible to run a vanilla prosilver through this converter and receive a working style? Or are there any files that will need adjusting afterwards? Have you (or anyone else for that matter) tried that already?
by posey
Tue Mar 06, 2018 10:25 pm
Forum: phpBB Discussion
Topic: New GDPR (General Data Protection Regulation) and phpBB
Replies: 462
Views: 25513

Re: New GDPR (General Data Protection Regulation) and phpBB

Has anyone from the phpbb team taken the problem of GDPR seriously? Can I just say that I find this very rude. There are multiple phpBB team members, including developers, in this topic discussiong the situation and what could be done. If you've looked further down this board, you will see that doe...

Go to advanced search