Page 2 of 5
Re: Forum Problems
Posted: Fri Feb 10, 2017 8:29 pm
by bartbes
I know, but look at
math.sqrt!
Re: Forum Problems
Posted: Fri Feb 10, 2017 8:52 pm
by zorg
Okay, but one can easily prepend "pdf-" to those, but no one can delete that extra added string if they would want to (easily) reference a chapter... the fact that it's not obvious that that needs to go there is another thing :v
I don't know which would be better to be honest.
Re: Forum Problems
Posted: Fri Feb 10, 2017 9:09 pm
by Nixola
How much logic can a bb-code have? Can phpbb figure out whether to prepend pdf-?
Re: Forum Problems
Posted: Fri Feb 10, 2017 10:07 pm
by airstruck
Nixola wrote:How much logic can a bb-code have? Can phpbb figure out whether to prepend pdf-?
Doesn't look like there's any such thing as "dynamic evaluation" when applying bbcode, it's just simple text replacement (at least, as set up in the admin control panel). As far as the Lua manual goes, it looks like "pdf-" only gets prepended to things that aren't section numbers, so if the thing doesn't start with a number it should get "pdf-" and otherwise it shouldn't.
I suppose you could cheat by using inline JS to figure this out and set window.location when those links are clicked (using onclick attribute instead of href). Or I guess you could have 2 manual tags with different names, one for section numbers and one for everything else.
Re: Forum Problems
Posted: Fri Feb 10, 2017 11:19 pm
by bartbes
You're a difficult lot. Here you go, section
2.3 and function
string.find. I had to invoke some proper dark magic to get it to do this.
By the way, if you want to override the text of a section, you need to use [manual section=num].
example
Re: Forum Problems
Posted: Fri Feb 10, 2017 11:22 pm
by zorg
I, for one, bow down to our arcane magician overlords.
Edit: [manual section=2.4]doesn't like spaces[/manual]
Re: Forum Problems
Posted: Fri Feb 10, 2017 11:41 pm
by bartbes
That has now been fixed! With the extra bonus that [ manual=2.4 ] now works.
EDIT: With bonus [ wiki ] update:
Version History
Re: Forum Problems
Posted: Fri Feb 10, 2017 11:45 pm
by zorg
Yeah, it's 1am and i can't think of any more ways to break your noble efforts, so i'll call it a night.

Re: Forum Problems
Posted: Fri Feb 10, 2017 11:49 pm
by Nixola
zorg wrote:
Yeah, it's 1am and i can't think of any more ways to break your noble efforts, so i'll call it a night.
No need to think.
This is broken, in the original post; the link is truncated to "#pdf-". (Sorry bartbes)
Re: Forum Problems
Posted: Fri Feb 10, 2017 11:57 pm
by zorg
All 3 are in his original post, but as long as all new ones will work, that's a small/non-issue i think.
On the other hand, the reference arrows and user profile links from quotes might have vanished...