News:

Wondering if this will always be free?  See why free is better.

Main Menu

Language Strings 2.1

Started by vbgamer45, December 29, 2014, 10:51:10 AM

Previous topic - Next topic

vbgamer45

Where is the best place to place them? I been adding them to modifications.english.php instead of having to load the whole language file for the mod but seems like in some cases the strings are not loaded before the hooks? For the menus/admins menus.  I haven't' been able to recreate it on my test site but one user seems to have the issue.

Thinking also maybe a mapping of the order in which hooks are called might help and what major functions are loaded before it.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Arantor

In the hooked function call loadLanguage before you modify the array.

Such a map would be enormous and convoluted.

Suki

If you put them on your own file then you need to load that file before you can use them as SMF won't load that file for you.

If you use the Modifications language file then it would be available everywhere.

If you enable the debug setting then you will see a list of called hooks for the particular page you're at, that list gets created as they were called so the order indicates which hook was called first.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Bigguy

I got rid of the errors by moving all the language strings to Modifications.english.php I also had to add a txt string for downloads_menu cause it was not there. But, even after installing it still says I should install it in the package manager.

vbgamer45

Odd the mod should add all these to the modificaitons.english.php file

// Begin Download System Text Strings
$txt['downloads_menu'] = 'Downloads';
$txt['downloads_admin'] = 'Downloads Configuration';
$txt['downloads_text_settings'] = 'Settings';

$txt['downloads_form_approvedownloads'] = 'Approve Downloads';
$txt['downloads_form_reportdownloads'] = 'Reported Downloads';
$txt['downloads_form_approvecomments'] = 'Approve Comments';
$txt['downloads_filespace'] = 'File Space Manager';
$txt['downloads_text_catpermlist2'] = 'Category Permissions';
$txt['downloads_txt_import'] = 'Import';

// Permissions
$txt['permissiongroup_downloads'] = 'Downloads System';
$txt['permissiongroup_simple_downloads'] = 'Downloads System';

$txt['permissionname_downloads_view'] = 'View Downloads';
$txt['permissionhelp_downloads_view'] = 'Allows the user to view the Downloads';
$txt['cannot_downloads_view'] = 'You are not allowed to view the Downloads';

$txt['permissionname_downloads_add'] = 'Add Download';
$txt['permissionhelp_downloads_add'] = 'Allows the user to add a download.';
$txt['cannot_downloads_add'] = 'You are not allowed to add a download.';

$txt['permissionname_downloads_edit'] = 'Edit own Download';
$txt['permissionhelp_downloads_edit'] = 'Allows the user to edit their own download.';
$txt['cannot_downloads_edit'] = 'You are not allowed to edit that download';

$txt['permissionname_downloads_delete'] = 'Delete own Download';
$txt['permissionhelp_downloads_delete'] = 'Allows the user to delete their own download.';
$txt['cannot_downloads_delete'] = 'You are not allowed to delete that download.';

$txt['permissionname_downloads_ratefile'] = 'Rate Downloads';
$txt['permissionhelp_downloads_ratefile'] = 'Allows the user to rate a file.';
$txt['cannot_downloads_ratefile'] = 'You are not allowed to rate that file.';

$txt['permissionname_downloads_editcomment'] = 'Edit own Comment';
$txt['permissionhelp_downloads_editcomment'] = 'Allows the user to edit their own comments.';
$txt['cannot_downloads_editcomment'] = 'You are not allowed to edit that comment.';

$txt['permissionname_downloads_comment'] = 'Leave Comments';
$txt['permissionhelp_downloads_comment'] = 'Allows the user to leave comments on a download.';
$txt['cannot_downloads_comment'] = 'You are not allowed to leave comments.';

$txt['permissionname_downloads_report'] = 'Report Pictures/Comments';
$txt['permissionhelp_downloads_report'] = 'Allows the user to report downloads and comments.';
$txt['cannot_downloads_report'] = 'You are not allowed to report content.';

$txt['permissionname_downloads_autocomment'] = 'Auto Approve Comments';
$txt['permissionhelp_downloads_autocomment'] = 'Comments do not need to wait for approval.';

$txt['permissionname_downloads_autoapprove'] = 'Auto Approve Downloads';
$txt['permissionhelp_downloads_autoapprove'] = 'Downloads do not need to wait for approval.';


$txt['permissionname_downloads_manage'] = 'Admin Download System';
$txt['permissionhelp_downloads_manage'] = 'Allows the user to add/delete/edit all catagories. Delete Comments, Delete Downloads, Approve Downloads';
$txt['cannot_downloads_manage'] = 'You are not allowed to manage the downloads.';

// END Download System Text Strings
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Bigguy

Also had to add downloads_admin txt string as it was missing as well. No errors no in the error log and all works great. Just have to figure out why it says install beside it and not uninstall.

vbgamer45

I have it listed in the modifications.english.php file edit? My question was that file modified at all? Or did you have to add all the strings?

It is sounding like it didn't' fully install? Since there is no reason for those things to happen.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Bigguy

The Modifications.english.php file was completely empty. I had to add everything. When installing the description beside all the files that says what they are supposed to be doing was blank as well.

vbgamer45

Something didn't happen. Right check your earliest error log maybe a clue there...
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Bigguy

When I was looking at the error log there was nothing in it about the installation just all the language string errors. I have since cleared the log file so there will be no help there. I guess if I need to uninstall it it's just as simple as overwriting the files anyway

Advertisement: