Advertisement:

Author Topic: Can the words "Child Boards" be changed...  (Read 6569 times)

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Can the words "Child Boards" be changed...
« on: December 29, 2014, 02:41:19 AM »
fairly easily to something like "Additional Boards" "Related Boards" or something on that order?

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,767
  • Master of BBC Abuse
Re: Can the words "Child Boards" be changed...
« Reply #1 on: December 29, 2014, 02:50:08 AM »
Yes. Admin language editor > General strings. Take a look and see how you go. ;)

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #2 on: December 29, 2014, 04:12:13 AM »
please excuse my ignorance but im not seeing anything like that

admin language editor>general strings

where will i find such a thing? ;D

Offline Bobby

  • Jr. Member
  • **
  • Posts: 140
  • Gender: Male
  • I'm SMF Fan!
    • layphatvn on Facebook
    • layphat.com
Re: Can the words "Child Boards" be changed...
« Reply #3 on: December 29, 2014, 04:36:02 AM »
Go to Themes/default/languages/index.english.php
Search for: $txt['parent_boards'] = 'Child Boards';
Replace with: $txt['parent_boards'] = 'Additional Boards or Related Boards';

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #4 on: December 29, 2014, 05:19:04 AM »
thank you i will give that a try on my test forum  :)

Offline Burke ♞ Knight

  • SMF Hero
  • ******
  • Posts: 3,534
Re: Can the words "Child Boards" be changed...
« Reply #5 on: December 29, 2014, 06:08:16 AM »
There's always this, which changes it to Sub-Boards, like it is now in 2.1 Beta.

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

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Can the words "Child Boards" be changed...
« Reply #6 on: December 29, 2014, 08:48:44 AM »
Or better yet, this one that allows you to change it to whatever you want:

http://custom.simplemachines.org/mods/index.php?mod=1867
Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,665
    • StoryBB/StoryBB on GitHub
Re: Can the words "Child Boards" be changed...
« Reply #7 on: December 29, 2014, 08:50:16 AM »
Or better yet use the in-built language editor that Antechinus pointed out ;)

* Arantor continues to be glad he changed this in 2.1 though
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Can the words "Child Boards" be changed...
« Reply #8 on: December 29, 2014, 08:55:05 AM »
Then I'll ask the same question as Debido ... where will I find such a thing?
Online Manual

Please do not PM me for support.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,665
    • StoryBB/StoryBB on GitHub
Re: Can the words "Child Boards" be changed...
« Reply #9 on: December 29, 2014, 08:57:31 AM »
Admin > Languages > click the name of the language > select General Strings from the dropdown.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,301
Re: Can the words "Child Boards" be changed...
« Reply #10 on: December 29, 2014, 09:04:21 AM »
although if you edit the strings that way and you have no backup and wish to revert your changes you may run into issues. IMO FTP and a text editor is a better way to edit the strings.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Can the words "Child Boards" be changed...
« Reply #11 on: December 29, 2014, 09:06:12 AM »
Well slap my @ss and call me Sally ... that's awesome ... one mod I can get rid of. Thanks Arantor and Antechinus! :D


At Illori, one should always have a backup before making changes, yes?
Online Manual

Please do not PM me for support.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,301
Re: Can the words "Child Boards" be changed...
« Reply #12 on: December 29, 2014, 09:09:47 AM »
yes you should have a backup, but doing the edits that way it may not be aparent what file is being edited for you so you know which file to backup.

it is very important to have a backup, how many people do we see here that forget or do not make backup's?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,665
    • StoryBB/StoryBB on GitHub
Re: Can the words "Child Boards" be changed...
« Reply #13 on: December 29, 2014, 09:12:37 AM »
If only there were a way of doing all of this that didn't require file edits, like putting the content into a database and making safe edits to it.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Can the words "Child Boards" be changed...
« Reply #14 on: December 29, 2014, 09:15:58 AM »
yes you should have a backup, but doing the edits that way it may not be aparent what file is being edited for you so you know which file to backup.

it is very important to have a backup, how many people do we see here that forget or do not make backup's?

My question was rhetorical but in any case, it's amazing how often people make infrequent, or worse, no backups.

And not knowing which file to edit is most often the case for some of us. I know how to edit (and have a backup of) them but most times I don't know what file to look for.
Online Manual

Please do not PM me for support.

Offline Illori

  • Project Manager
  • SMF Legend
  • *
  • Posts: 51,301
Re: Can the words "Child Boards" be changed...
« Reply #15 on: December 29, 2014, 09:20:19 AM »
And not knowing which file to edit is most often the case for some of us. I know how to edit (and have a backup of) them but most times I don't know what file to look for.

if you have a local copy of your SMF files, you can use notepad++ or other editors to search your files for certain words. do a search for "Home" in your Themes/default/languages folder and see what you find, or any similar word you see. now you can search and reply any word(s) you want.

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Can the words "Child Boards" be changed...
« Reply #16 on: December 29, 2014, 09:23:08 AM »
That's a good idea. I should have thought of that ... getting old sucks ... ;)
Online Manual

Please do not PM me for support.

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #17 on: December 30, 2014, 04:07:30 AM »
Thank you all, I did change it and it was very easy!  ;D

Once I knew how  ;)

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #18 on: December 31, 2014, 01:29:29 AM »
ok i did change the words from child boards to "related boards."

Now the related boards show up normally under the main board name as they do on this SMF board, but my "related boards" aka the child boards all show up above the main board name if you click on the main board, hope i am explaining it right.

In other words i have a board called "Area news" then have related boards under that, but when you click on the "area news" board it shows all the related boards stacked above the main area news board ;D ;D and the area news board is down on the page, does that make sense? something doesnt seem right, please help  :)

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,767
  • Master of BBC Abuse
Re: Can the words "Child Boards" be changed...
« Reply #19 on: December 31, 2014, 02:18:46 AM »
Yeah that's standard. You can switch it around if you like. I actually made a mod for it. You can install that if you like, or if you want to just nick teh code and modify your template yourself, go for it.

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

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #20 on: December 31, 2014, 03:49:29 AM »
Thank you! That looks like what I need  ;)

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #21 on: December 31, 2014, 06:14:16 AM »
I dled it but it wont install, should i install it as an older version of smf? or what would i tweak to do this without a mod?

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,665
    • StoryBB/StoryBB on GitHub
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,767
  • Master of BBC Abuse
Re: Can the words "Child Boards" be changed...
« Reply #23 on: December 31, 2014, 03:28:01 PM »
It already has the <install for="2.0, 2.0.1 -2.0.99"> in package-info.xml, so I doubt emulation will make any difference. It's more likely the template has been altered by another mod (or a human).

If you attach your template here I'll take a look at it.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,506
  • Gender: Male
    • Kindred-999 on GitHub
Re: Can the words "Child Boards" be changed...
« Reply #24 on: December 31, 2014, 04:08:04 PM »
Debido, when you report an issue -- using the EXACT terms is important

"won't install" is basically pointless, since there are at least 3 different conditions which could be described that way.

was it Unable to install because the package was empty?
was it unable to install because the package was for the wrong version?
or
were there errors on the installation that caused you to stop installation?

In each case, there are actions which you can perform to correct the issue...   
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #25 on: December 31, 2014, 11:32:28 PM »
just says failed to execute and do not proceed kindred, its a rather general vague reason but looking at ot further now i am assuming its because its for an older version of smf so i will try to emulate the version it was made for.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,506
  • Gender: Male
    • Kindred-999 on GitHub
Re: Can the words "Child Boards" be changed...
« Reply #26 on: January 01, 2015, 12:18:49 AM »
Wait..it says, do not continue?
In other words you get to the point of the test installation and it shows you error messages?

Or it does not even make it to the test?

If the first, then the error list actually tells you what you need to edit in order to correctly install the mod...

If the second, then read the link that Arantor posted.

The error messages are actually very clear and very specific.
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,767
  • Master of BBC Abuse
Re: Can the words "Child Boards" be changed...
« Reply #27 on: January 01, 2015, 12:43:44 AM »
It still installs just fine on a default 2.0.9 template without requiring emulation. I know. I wrote the damned thing. I just tested it again too.

If it's not installing, the template has probably been edited previously. This is the most likely explanation, which I why I suggested attaching it here.

Come to think of it, I could rewrite the xml so installation was close to bulletproof, even if the template had been edited. If there was enough call for it I'd consider doing that, but with over 900 downloads and no complaints I'm not sure it's worth the hassle.

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #28 on: January 01, 2015, 12:57:24 AM »
perhaps you're right, probably a conflict with another mod

Offline Steve

  • Freak
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 4,500
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Can the words "Child Boards" be changed...
« Reply #29 on: January 01, 2015, 01:46:52 AM »
Ah, that's the standard message Kindred alluded to when you try to install a mod and your particular configuration doesn't pass its tests. That's usually because another mod has modified a file it wants to change (or a 'conflict' with another mod if you prefer).

Below that message are the lines that failed and you can see what file it's looking in, what it's looking for and what change it wants to make.

Take a look here:

http://wiki.simplemachines.org/smf/Error_in_mod_installation

Online Manual

Please do not PM me for support.

Offline Debido

  • Jr. Member
  • **
  • Posts: 121
Re: Can the words "Child Boards" be changed...
« Reply #30 on: January 01, 2015, 01:54:01 AM »
oh ok i got you now, but without knowing what/where to change if a mod just doesnt install easily im leary of making manual changes unless i knew exactly what to change and to what, for fear of messing up the forum  :(

so i will just mark this subject solved and move on

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,767
  • Master of BBC Abuse
Re: Can the words "Child Boards" be changed...
« Reply #31 on: January 01, 2015, 01:58:38 AM »
Ok, so don't worry about the silly old mod. If you've already edited your template (somehow) then you'll want the edited version moved around anyway (assuming you wanted the edits or you wouldn't have made them).

This is not hard to do manually. Look in template. Find this, about Line 20:

Code: [Select]
if (!empty($context['boards']) && (!empty($options['show_children']) || $context['start'] == 0))
{


Now go down to around Line 120 and find this:

Code: [Select]
echo '
</tbody>
</table>
</div>
</div>';
}

That last curly bracket there is the one that matches up with the first curly bracket up top. Everything between those brackets is the child boards stuff. You need to copy all of that, including the two brackets that wrap it, and including the if statement before the first bracket. Just get your code editor, highlight all of that crud with the nifty "begin/end select" function any code editor should have, hit copy,  then paste it into the right place.

The right place is just before this:

Code: [Select]
// Show breadcrumbs at the bottom too.

That's all you have to do, except that you will now have two lots of child boards. :D So, comment out the original ones by putting /* before the first if statement and */ after the second curly bracket. Easy. This will turn them into non-read comments instead of functional code, which is all good.

Make a backup copy of the template before you try this stuff. ;)