IntegraMOD / IntegraMOD151

The most complete premodded forum software
http://integramod.com
4 stars 4 forks source link

KB Language Keys Missing #22

Closed MWE001 closed 5 years ago

MWE001 commented 8 years ago

Found this issue through Icy Phoenix KB Plugin and what do you know, it is the very same problem we have here. I take no credit for finding this one. Thank the fellas at Icy Phoenix.

admin_kb_cat.php

if (!$cat_name) { echo "Please put a category name in!"; }

And this one

if (($comments_forum_type != 'f') || !is_numeric($comments_forum_id) || ($comments_forum_id == 0)) { mx_message_die(GENERAL_MESSAGE , 'Select a Forum'); }

MWE001 commented 8 years ago

Here is the code I am trying to use but it busts the KB bad. I know the code is good, it is my placement of it that is not good. I have tried everything I can think of. Not only on Icy Phoenix plugin but my Integra project as well. I'm dual trying.

$message = $lang['Cat_name'] . '<br /><br />' . sprintf($lang['Click_return_cat_manager'], '<a href="' . append_sid('admin_kb_cat.' . PHP_EXT) . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_admin_index'], '<a href="' . append_sid(IP_ROOT_PATH . ADM . '/index.' . PHP_EXT . '?pane=right') . '">', '</a>'); mx_message_die(GENERAL_MESSAGE, $message); }

and in language file 'Cat_name' => 'Please choose a category name.'

MWE001 commented 8 years ago

When I try to use the above code no matter where I try, I get a all white page when viewing the KB and in the acp, I loose all acp functions of the KB, meaning all pages are white.

MWE001 commented 8 years ago

Looks like in all my infinite wisdom, i am not going to get it. I come real close once. I'm hanging on to the code I used and will try again later.

IntegraMOD commented 8 years ago

You dont want to add cat_name to the language file because it is not a lang var. It is a db entry. I think it should be something like this

if ( !$cat_name ) { $message = $lang['Add_cat_name']; } THEN FIND $template->assign_vars( array( 'L_EDIT_TITLE' => $lang['Edit_cat'], 'L_EDIT_DESCRIPTION' => $lang['Edit_description'], 'L_CATEGORY' => $lang['Category'], AFTER ADD 'L_ADD_CAT_NAME' => $lang['Add_cat_name'],

in lang_kb.php FIND //cat manager $lang['Create_cat'] = 'Create New Category:'; AFTER ADD $lang['Add_cat_name'] = 'Please choose a category name.';

vendethiel commented 8 years ago

Sounds about right

MWE001 commented 8 years ago

That has got to be a better method than echoing a message. Looks like a decent call to me.

MWE001 commented 7 years ago

Any headway with this one? I wish I knew enough of this stuff to help out more. I am really good at building things and breaking them in action other then that, I'm on the fence watching. :-(

vendethiel commented 7 years ago

Sorry, I forgot about that one

vendethiel commented 5 years ago

I'll fix that along with #64.