language.inc.php in mboard

Is message board greying out your hair (at least what's left of it)? Let us help you here
Locked
LRod
Posts: 9
Joined: Wed Apr 09, 2008 10:47 pm

language.inc.php in mboard

Post by LRod »

I'm loving gbook 1.6 and I'm reasonably impressed with mboard 1.3 (although I haven't implemented it on my http://www.mcarthur64.com site, yet). For a variety of reasons, I'd like to try and implement an external language.inc.php file for mboard akin to the version used in gbook. The first couple of commands I tried changing netted a blank screen (always a clue that the code has gone bad). I reverted to the original and all is well so far as functionality is concerned.

I still have this burning desire to use an external language.inc.php file (it's the style-sheet-geek inside me, I guess). As a beginner in php (but pretty good at HTML and CSS, and marginally competent in structured programming), I wonder if you'd assess the likelihood of success in making this modification. I'm not asking you to write the code for me, nor am I asking you to get cracking on version 1.x. Just asking if you think, in concept, it's reasonably doable without a massive rewrite of the code. I guess I'm wondering about any local loops or semi-secret subroutines which would keep me from success even after I've conquered the obvious stuff.

Something tells me that if I have to ask this question I shouldn't be messing with it anyway. As always, thanks for your help.
LRod
Klemen
Site Admin
Posts: 10116
Joined: Fri Feb 11, 2005 4:04 pm

Post by Klemen »

I'm somehow reluctant to add an external language file to MBoard as it would make customization the appearance of generated messages (html pages with posts) much trickier than it is now.

You can try tackling with it some more yourself (use the GBook as a guidance), just be careful what needs to be replaced. For example if you have text within double quotes ( "some text" ) then any double quotes within the text must be escaped with a \

This will throw an error:
"here's a quote " inside some text"

This will work:
"here's a quote \" inside some text"

And similarly for single quotes, if text is enclosed with single quotes you need to escape any single quotes in the text. This will show an error:
'I'm hangin' around'

This will work:
'I\'m hangin\' around'

Try doing it step-by-step. Change a few lines, test if it work. Then do a few more lines, test, ...
Klemen, creator of HESK and PHPJunkyardWas this helpful? You can buy me a drink here Image

Image You should follow me on Twitter here

Help desk software | Cloud help desk | Guestbook | Link manager | Click counter | more PHP Scripts ...

Also browse for php hosting companies, read php books, find php resources and use webmaster tools
Locked