Quantcast
Channel: phpBB.com
Viewing all articles
Browse latest Browse all 2220

phpBB Custom Coding • Best way to include vars?

$
0
0
One page on my site will have a big table of information that will be updated (manually by me) everyday. So I made a new page by cloning index2.php, index_body2.html, forumlist_body2.html, and just blanking out the forums list (in forumlistbody) and replacing it with my table. I added the table structure, variables, and added data appropriately to the language file (languages/en/common.php).

I'm using the twig/language method: (html) <div>{L_SOMEVAR}</div> (and language) SOMEVAR = => 'My data';

The chart worked beautifully.

But because the chart has about a hundred variables I wanted to house that in another file so that "en/common.php" wouldn't be digesting all that extra code on every page when it's only needed on that one page.

Everything works great when the vars are inside the "en/common.php" file.

When I mock up a blank language page (like you'd use if you were writing an extension) and try to include it, it doesn't call the vars. Nothing I have tried works to include the vars separately. (Page has no errors, renders properly, but no vars display.)

I have spent a couple days trying every way I could find and searching google and the phpbb support area (forums and knowledgebase) for a solution. It would seem like a fairly vanilla operation but no answer is apparent.

Any suggestions on how to include a file of vars?

THANK YOU!

Statistics: Posted by pxdetroit — Sun Mar 30, 2025 2:54 pm



Viewing all articles
Browse latest Browse all 2220

Trending Articles