Custom Language Editor

← News & Stuff — Started 26 May, 2010

Tomm
26 May, 2010, 7:38 am (This post was last modified: 26 May, 2010 7:50 am by Tomm.)
In the How does MyNetwork, work? thread, the way MyNetwork imitates some MyBB systems is explained. However, one of the major systems that isn't explained properly is the use of MyBB's language system, and how MyNetwork interacts with it.

All of MyNetwork's Modules and Features use the standard language system - so there's nothing new to learn or get your head around. However, MyNetwork Core has a Custom Language Editor (CLE) that I used to help create, edit and remove language files when I developed plugins for it.

Previously, plugin developers (and code editors alike) had to manually create a new file, and start from scratch when making language files. It further caused me chaos when it came to translating them. I, personally, found this extremely tedious - and where the idea for the CLE came from.

So with the CLE, it's easy to create a new file for any (or all) language packs and it's really simple to add a new string to the file as well. By clicking "Add Another Tag", you're able to dynamically add as many language strings as you want to any file - whether it's a default MyBB file or a brand new one you've just created.

Of course, it's impossible to overwrite any language string that already exists in the file, and it's really easy to remove your custom tags too. So, really, the CLE makes it stupidly simple to create, edit and add to MyBB's Language System.
0  
Reply
This is rather cool too. I also have a kind of connected question - on css in MyTracker and MyNetwork. I have a LOT of imageless themes with CSS buttons - will that kind of functionality be supported? The reason I ask is because I am trying (and failing) to do CSS buttons for my current installation of MyTracker 1.02.
[Image: leelink.gif]
( Loves Opera 11.50)
0  
Reply
Hmm, the idea behind MyNetwork is integration into MyBB so I'm not too sure why you'd find it too difficult; they both use the theme and template system just like normal themes do. Is there any particular code that's causing a problem?
1  
Reply
Well, its probably because I am a noob, and am still learning. I wanted to change the edit, delete approve and new issue/new feature buttons to css buttons on ONE of my themes. It should be possible because there are templates for everything and they are theme based, not global.

Here is an example from template mytracker_issue_button_edit.

Code:
<a href="edit.php?issue={$issue['issid']}" name="jscript" onclick="jQuery.facebox({ ajax: 'tracker_misc.php?action=quickedit&amp;issue={$issue['issid']}' });"><img src="../images/tracker/english/edit.gif" alt="{4lang->iss_edit_issue}" title="{$lang->iss_edit_issue}}" /></a>

I changed it to
Code:
<a href="edit.php?issue={$issue['issid']}" name="jscript" onclick="jQuery.facebox({ ajax: 'tracker_misc.php?action=quickedit&amp;issue={$issue['issid']}' });"><span style="postbutton">EDIT</span></a>

and I added the css for the button into the mytracker.css. The button remains unstyled - its just text, no little box around the word edit.
[Image: leelink.gif]
( Loves Opera 11.50)
0  
Reply
Shouldn't that span have a class, not style?...
0  
Reply
leesester
27 May, 2010, 10:59 pm (This post was last modified: 27 May, 2010 10:59 pm by leesester.)
Nope, I tried both class and style, I can't get the background to show at all. Maybe some kind of z: positioning?
[Image: leelink.gif]
( Loves Opera 11.50)
0  
Reply
Uhm, I'll double check but I'm not sure it's z positioned...
0  
Reply
Hi Tomm, I installed but I dont see the add a new tag option in my language packs.... maybe its because Ive got a funny forum. Sad
[Image: leelink.gif]
( Loves Opera 11.50)
0  
Reply
So you've gone to edit a language file and there are no options to add?
0  
Reply
Hi Tomm, yes, but wait til you get back off holiday - no rush. I just posted so I would not forget Smile
[Image: leelink.gif]
( Loves Opera 11.50)
0  
Reply

User(s) browsing this thread: 1 Guest(s)