Twigs Discussion

Extensions, styles and support for everything else about phpBB
Post Reply
User avatar
Mr_LonEly
Posts: 14
Joined: 09 Mar 2017, 05:02

Twigs Discussion

#1

Post by Mr_LonEly » 14 Sep 2018, 22:27

Hi Dear Kasimi

May be My Problem is not Relevant to Mchat but you Can Solve

I Want to Use All Twigs on Index page Like {RANK_IMG} {RANK_TITLE} and Many Others on Index Page
How I can define any Twig Which is Defined in other file like viewtopic and etc But I want to use them on Index.php
and off curse in index_body.html

As you are a Best Ever extentions Developer you Know Better about these Change Please Tell me complete process of
to use any Twig in any file which things are need .Thank You

EVO_VV
Posts: 40
Joined: 23 Jun 2017, 16:03

Re: Twigs Discussion

#2

Post by EVO_VV » 15 Sep 2018, 03:57

Maybe having a look at this might help :-
https://www.phpbb.com/community/viewtop ... &t=2424606

User avatar
Mr_LonEly
Posts: 14
Joined: 09 Mar 2017, 05:02

Re: Twigs Discussion

#3

Post by Mr_LonEly » 15 Sep 2018, 04:32

EVO_VV wrote:
15 Sep 2018, 03:57
Maybe having a look at this might help :-
https://www.phpbb.com/community/viewtop ... &t=2424606
Thanks but this is not problem Kisimi Knows What I am Asking :wave: :|

User avatar
kasimi
mChat developer
Posts: 699
Joined: 06 Oct 2016, 09:56
Location: Germany
Contact:

Re: Twigs Discussion

#4

Post by kasimi » 19 Sep 2018, 09:04

Hi Mr Lonely,

I think I understand what you mean but it's not as easy as you might have hoped.

To display information about the current user's ranks, you need to add this line: https://github.com/phpbb/phpbb/blob/rel ... .php#L1354 here: https://github.com/phpbb/phpbb/blob/rel ... x.php#L202. Instead of $row, you need to pass $user->data. Now you can access the rank information like this: https://github.com/phpbb/phpbb/blob/rel ... 1355-L1357 Add the fields you need as template variables here: https://github.com/phpbb/phpbb/blob/rel ... x.php#L222

By the way, all of this could be done in an extension, without having to edit any core code.

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest