• Welcome to League Of Reason Forums! Please read the rules before posting.
    If you are willing and able please consider making a donation to help with site overheads.
    Donations can be made via here

Quick reply and GD-based algorithms

Status
Not open for further replies.

Neffi

New Member
arg-fallbackName="Neffi"/>
Two suggestions I've got to streamline the act of posting. Firstly, for somebody who knows all of the BB codes already and doesn't need to bother with the advanced post-topic form, it would be nice to see a quick-reply box at the bottom of the thread-view page. It would be especially nice for when you're on a slow or otherwise problematic connection.

Another is more of a question: on the new server, do you guys have access to a GD-library for image creation? If so, would it be possible to include some PHP algorithm that'll give us a BB tag for generating math algorithm images directly within posts, sort of like the <math> tag on Wikipedia?

Since we run phpBB I'm sure there's probably patches somewhere on the net for both. It would be real nice to see each feature.
 
arg-fallbackName="CosmicSpork"/>
The quick reply will come, I'm trying to get the new theme sorted out first, and then I can start making improvements :)

I have access to the server in all but a physical sense, so yes, we have GD and can put other things on as necessary, including ImageMagick etc...

As for the math thing, I also considered this and suggested it to AndromedasWake, originally he suggested that people use this:
http://www.codecogs.com/components/equationeditor/equationeditor.php
And upload the image as needed, however this was when we couldn't modify the forum, LaTeX do provide a phpBB compatible installation to use their tools in the forum, and if this is wanted I'll install it when I am able... As for alternatives, I have yet to look for one.
 
arg-fallbackName="Fordi"/>
CosmicSpork said:
The quick reply will come, I'm trying to get the new theme sorted out first, and then I can start making improvements :)

I have access to the server in all but a physical sense, so yes, we have GD and can put other things on as necessary, including ImageMagick etc...

As for the math thing, I also considered this and suggested it to AndromedasWake, originally he suggested that people use this:
http://www.codecogs.com/components/equationeditor/equationeditor.php
And upload the image as needed, however this was when we couldn't modify the forum, LaTeX do provide a phpBB compatible installation to use their tools in the forum, and if this is wanted I'll install it when I am able... As for alternatives, I have yet to look for one.

I posted this guy a few days ago, but didn't get much further due to life: http://forums.leagueofreason.co.uk/viewtopic.php?f=8&t=926

I can tell you that doing it in GD would be ornerous; one would have to implement a LaTeX parser in PHP using GD and Freetype - a slow proposition at best, and server-grinding at worst.

The lib I built is based on the textogif perlscript that is used by Code Cogs' editor for rendering, and essentially does exactly the same thing: makes a few calls to common unix progs to get the job done.

The tricky bit is proving to be integration into phpBB - I'm looking into how the modules work, but they don't seem in any way straightforward.

It's alright, though; this is what I do for a living; I'll figure it out.
 
arg-fallbackName="CosmicSpork"/>
Modifying phpbb is in no way straight forward unfortunately... I would have hoped they would provide hooks like Wordpress do, but they seem to force you to modify core code which is less than desirable.

I have found a couple of threads that have approached this using phpMathPublisher that seem to work quite well. I don't know how similar the code you have provided is, at the moment I don't have the time to look into it too deeply.

Another possible solution I've found is: http://www.phpbb.com/community/viewtopic.php?f=72&t=653165&p=3671325&hilit=latex#p3671325
But I haven't looked at how intensive the code would be on the server.

Very much appreciate the effort you are putting into this :)
 
arg-fallbackName="Fordi"/>
CosmicSpork said:
Modifying phpbb is in no way straight forward unfortunately... I would have hoped they would provide hooks like Wordpress do, but they seem to force you to modify core code which is less than desirable.

I assure you that's not the case; the modules system does allow you to hook into any part. The trick, I've found, is getting your code in before the BBCode (LaTeX syntax is occasionally picked up by BBCode).
CosmicSpork said:
I have found a couple of threads that have approached this using phpMathPublisher that seem to work quite well. I don't know how similar the code you have provided is, at the moment I don't have the time to look into it too deeply.

Entirely so; phpMathPublisher is written entirely using PHP. It has its own syntax, rather than using and parsing latex (not gonna bitch, actually).

Though, it means I can't just steal the CodeCogs' interface...
CosmicSpork said:
Another possible solution I've found is: http://www.phpbb.com/community/viewtopic.php?f=72&t=653165&p=3671325&hilit=latex#p3671325
But I haven't looked at how intensive the code would be on the server.

Actually... and this is embarrassing ... that's exactly what I've been trying to make - or at least, start with. It uses the server-side binary latex parser and imagemagick to generate the image - though it does it in fewer steps than my code (good thing). I'd say that's your least-server-bashing option there.
 
arg-fallbackName="CosmicSpork"/>
Fordi said:
I assure you that's not the case; the modules system does allow you to hook into any part. The trick, I've found, is getting your code in before the BBCode (LaTeX syntax is occasionally picked up by BBCode).

I'm interested to know how, as of yet I've been unable to find how, and any modifications I've seen on phpBB's site require editing of existing code in order to make them work. I know that the admin control panel, user control panel and moderators control panel all allow 'modules' but they tend to be seperate from other parts of the forum rather than hooking into scripts like the posting script.

I know there is a hooking system in phpBB but I've not seen it used in any modifcations I've examined, yet at least
 
arg-fallbackName="Fordi"/>
CosmicSpork said:
I'm interested to know how, as of yet I've been unable to find how, and any modifications I've seen on phpBB's site require editing of existing code in order to make them work. I know that the admin control panel, user control panel and moderators control panel all allow 'modules' but they tend to be seperate from other parts of the forum rather than hooking into scripts like the posting script.

I know there is a hooking system in phpBB but I've not seen it used in any modifcations I've examined, yet at least

In this case, it's not necessary. BBCode is implemented as a module - we should be able to implement TeX math as a module similarly.
 
Status
Not open for further replies.
Back
Top