News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Language costumization for Info-Texts of Forums

Started by sangham.net, March 06, 2014, 09:49:52 PM

Previous topic - Next topic

sangham.net

Dear SMF-Team,
Dear SMF-Supporters,
Dear SMF-Friends,

is there a possibility to customize the header and/or info texts (class=info) for the certain forums in the forum overview? Something similar as Tinyportal has for the headers of blocks.

If not, does anybody have a good idea for a trick?

Thanks for hints in advanced.

metta & mudita

Kindred

First of all, why would you want to dress a language up?

Second...   What?
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

sangham.net

Thanks for your back questioning, Kindred.

We use to run our forum bilingual. In regard of headers of forums and infotext, it is a little much text at least and it's not even possible to vary them by layout (color, italized...)

Just as reference for thoughts. If you see a certain forum like a block in tinyportal, one would be able to give certain head-lines in accordance with the costumer language or even make the whole block appear according the language.

Just search for a solution to make it easier to discriminate the much information. If you like to take a look, please feel invited: http://sangham.net/index.php?action=forum (most you would be able to read)




sangham.net

#3
I got the hint, that the lines accept html, so I hacked ( I guess that is the usual expression for such kind of work) it into the headerline in this way:

ENGLISCH NAME</a> - <a class="subject_de" href="LINKS OF THE BOARD">[GERMAN NAME] <small>3 LANGUAGE</small>

Some modifications in the css are necessary if one likes to display in other colors. If not wished, change class into subject (which is the original in the curve theme)

It of course splits the board link, but it seems to work fine in all kinds of displays for now.

The Infotext "loves" html, so I made a hover solution for now. The css structure is a little complicated - if one likes to change the outlook - as it is different used in the different tables.

Just for the case somebody has use of it.



Bobby

Quote from: Johann B on March 09, 2014, 09:20:02 AM
I got the hint, that the lines accept html, so I hacked ( I guess that is the usual expression for such kind of work) it into the headerline in this way:

ENGLISCH NAME</a> - <a class="subject_de" href="LINKS OF THE BOARD">[GERMAN NAME] <small>3 LANGUAGE</small></a>

Some modifications in the css are necessary if one likes to display in other colors. If not wished, change class into subject (which is the original in the curve theme)

It of course splits the board link, but it seems to work fine in all kinds of displays for now.

The Infotext "loves" html, so I made a hover solution for now. The css structure is a little complicated - if one likes to change the outlook - as it is different used in the different tables.

Just for the case somebody has use of it.
Why did you modify your board links manually? It'll be hard to upgrade SMF later!
With your portal, you could make some language files as Custom.english.php and Custom.german.php, and call their variable (ex: $txt['whatever_text'] = 'Whatever Text here';) on your block!
You can also add a Google Translate tool on your forum!


sangham.net

Thanks Bobby for your hints!

I would not know why an upgrade should be a problem, since it is just put into the Textwindow of the normal modify able palce for the forum name. It would be a problem if a later version does not allow html for this date section, or?

Quoteyou could make some language files as Custom.english.php and Custom.german.php, and call their variable (ex: $txt['whatever_text'] = 'Whatever Text here

That sounds interesting, but would be hard to change later. Or is it possible to put a "bring me this info"-code like some available for messages?
Thought that the boards might be changed form time to time, which is relative easy to manage in the original customizations possibilities.

Google Translate tool is no solution for it, although we have such.

Thanks a lot for all your inspirations.



Bobby

I've just seen your forum. Did you change your BoardIndex.template.php that shows the board links in bilingual, ex: Infos and general questions - [Infos und generelle Fragen] - it shows the same url: http://sangham.net/index.php/board,1.0.html. This means it'll maybe get the problem when you upgrade SMF as I said!
By the way, is that your forum's content related Buddhism? And I love Buddhism, too! :-)
P/S: sorry for my bad English!

Lou69

How about a language selector box, or something of that nature? You have one for searching in different languages; maybe use one to display the board in the selected language?

http://custom.simplemachines.org/mods/index.php?mod=598

http://custom.simplemachines.org/mods/index.php?mod=2705

You can go to Mods and do a search for 'language' to see what is there.

sangham.net

#8
Quote from: Bobby on March 09, 2014, 11:06:33 AM
I've just seen your forum. Did you change your BoardIndex.template.php that shows the board links in bilingual, ex: Infos and general questions - [Infos und generelle Fragen] - it shows the same url: http://sangham.net/index.php/board,1.0.html. This means it'll maybe get the problem when you upgrade SMF as I said!
By the way, is that your forum's content related Buddhism? And I love Buddhism, too! :-)
P/S: sorry for my bad English!

Dear Bobby,

not my personal forum, I just do the admin, but a little dominate at this time of works. You are welcome every time.

No php files are changed to make the different headline color, I just changed the class in css. Nothing else. The rest is text (html) in the customer line. So all make simply in the original costumer settings.

Original this line whats to be feed with a text < a href=boardnumber....>COSTUMER PLACE< / a>, and I cut the line, and put the second url into as text.

< a href=boardnumber....>ENGLISCH NAME</a> - <a class="subject_de" href="LINKS OF THE BOARD">[GERMAN NAME] <small>3 LANGUAGE</small></a>< / a>, that's it.

If there is no upgrade in regard of dis-allowance of html tags in this customer text field I I would not see a problem yet.

Quote from: Lou69 on March 09, 2014, 11:16:49 AM
How about a language selector box, or something of that nature? You have one for searching in different languages; maybe use one to display the board in the selected language?

http://custom.simplemachines.org/mods/index.php?mod=598

http://custom.simplemachines.org/mods/index.php?mod=2705

You can go to Mods and do a search for 'language' to see what is there.

Thanks for your hints and shares, dear Lou69

I am aware of those, we even have this. Two problems. How to get and change the costumer titles of the boards later on? When the forum-language is set on a language you dont know, you would not find any anchor of interest, seeing another language. Since it is bilingual, which language as default forum language?
In the special case here, there are also about 100 Boards and it will be not a firm structure, so to maintain the language phps would be maybe problem.





sangham.net

Just for information that might be useful for somebody.

If you don't like to cut the link into peaces and don't like to touch the css, you can put the text parts you like to style as a whole or in parts under a <span ...> tag.

For example "We just Talk about <span style="color: red; font-size: 120%">You</span>"

We just talk about YOU

And it would be displayed where ever the Link of your Forum Header appears.

I guess there are pretty much possibilities. Thanks for all hints and I guess that part is solved.


sangham.net

Quote from: Bobby on March 09, 2014, 10:10:39 AM
Quote from: Johann B on March 09, 2014, 09:20:02 AM
I got the hint, that the lines accept html, so I hacked ( I guess that is the usual expression for such kind of work) it into the headerline in this way:

ENGLISCH NAME</a> - <a class="subject_de" href="LINKS OF THE BOARD">[GERMAN NAME] <small>3 LANGUAGE</small></a>

Some modifications in the css are necessary if one likes to display in other colors. If not wished, change class into subject (which is the original in the curve theme)

It of course splits the board link, but it seems to work fine in all kinds of displays for now.

The Infotext "loves" html, so I made a hover solution for now. The css structure is a little complicated - if one likes to change the outlook - as it is different used in the different tables.

Just for the case somebody has use of it.
Why did you modify your board links manually? It'll be hard to upgrade SMF later!
With your portal, you could make some language files as Custom.english.php and Custom.german.php, and call their variable (ex: $txt['whatever_text'] = 'Whatever Text here';) on your block!
You can also add a Google Translate tool on your forum!

I would like to come back to your solution, Bobby.

Is it possible to make such for the Board headers? How do adress them there? With $whatever_text. How does the pages know that the Custom.german.php should be loaded and how does the header text "generator knows which php should be choosen?

Could you give me more ideas or a solution, I am not a specialist but I guess I understand you genious idea now better and adding a third language now make it view much more easier in this way you pointed out if possible.

Advertisement: