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

phpBB Custom Coding • Re: UCP menu logic issue.

$
0
0
Searching for BLOCK_NAME returns the same results as for S_BLOCK_NAME. Leaving the S_ prefix off makes no difference.

I did manage to find definitions for l_block1 and t_block2 in functions_module.php, but the comments don't make sense.

Code:

$current_depth = 0;$linear_offset = 'l_block1';$tabular_offset = 't_block2';// Generate the list of modules, we'll do this in two ways ...// 1) In a linear fashion// 2) In a combined tabbed + linear fashion ... tabs for the categories
In the case of the MCP menu, both sets of blocks are prefixed l_ (for linear). Even the tabs. And, in the case of the UCP menu, both sets of blocks are prefixed t_, even the linear ones. :D So ok, whatever. Skip that for now.

The S_ROW_NUM (or S_ROW_COUNT) variables are odd ones. I can call those up to set ID's and/or classes on li's and anchor's. No problem there. As as example, this works:

Code:

id="block1_{l_block1.S_ROW_NUM}"
That will spit out id="block1_0", id="block1_1", etc. Obviously that can be extended to the *_block2 level easily enough, if necessary.

But, if I try to do a match with an integer it still gives me a white page. This is despite the syntax I'm using matching what is given in docs/coding-guidelines.html under "Extended syntax for Blocks/Loops", AFAICT, so that's another weird one that has me stumped. Probably don't really need to match an integer though. Just being able to set custom ID's and classes should be sufficient.

TBH that docs section is not all that clear. I don't doubt there is coherent logic behind the UCP menu templating, but it is certainly not a normal menu by any stretch of the imagination. I can bodgy it up for now, but getting it done the way I really want it is obviously going to require picking the entire template logic apart and rebuilding it. I might put that on the back burner, since nobody seems to know much about it.

OTOH, the MCP menu is a piece of cake to revamp (although its layout is slightly eccentric in some ways).

Statistics: Posted by Gumboots — Tue Sep 17, 2024 8:53 am



Viewing all articles
Browse latest Browse all 1998

Trending Articles