Форум программистов
 

Восстановите пароль или Зарегистрируйтесь на форуме, о проблемах и с заказом рекламы пишите сюда - alarforum@yandex.ru, проверяйте папку спам!

Вернуться   Форум программистов > Скриптовые языки программирования > PHP
Регистрация

Восстановить пароль
Повторная активизация e-mail

Купить рекламу на форуме - 42 тыс руб за месяц

Ответ
 
Опции темы Поиск в этой теме
Старый 12.06.2013, 23:55   #1
olgamar
Пользователь
 
Регистрация: 15.11.2012
Сообщений: 14
По умолчанию Перевод контактной формы

Привет!
Моя компания купила тему, я почти все перевела, но застряла на форме контактной связи. Я поняла, что все изменения надо делать в файле Inc_Form_Shortcode.php Знаний в php нет, только дизайн, html и css. Я попробовала изменить английские названия полей на русские, но ничего не произошло. Буду благодарна за любую подсказку, где правильно изменить названия полей с английских на русские. Проблемная страница здесь
Кусок кода
PHP код:
function get_visual_editor_form()
    {
        
$example1 '[input '.Inc_Form_Shortcode::$ID_ATTR.'="name-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Name" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="text" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="name" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]';
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="email-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Email" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]';
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="url-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="URL" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="false"][/input]';
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="subject-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Subject" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="text" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="subject" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]';
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="message-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Message" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="textarea" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="message" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]';
        
$example1 htmlspecialchars($example1);
        
$example1 str_replace(array('['']'), array('['']'), $example1);

        
$example2 '[input '.Inc_Form_Shortcode::$ID_ATTR.'="tf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Text Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="text" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="name" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]';
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="ef-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Email Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]';
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="erlf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="URL Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="false"][/input]';
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="cf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Checkbox Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="checkbox" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="checkbox" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]';
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="custf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Custom Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="custom" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"]<select id="custf-id" name="custom"><option value="op1">Option 1</option><option value="op2">Option 2</option></select>[/input]';
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="taf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Textarea Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="textarea" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="textarea" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
olgamar вне форума Ответить с цитированием
Старый 13.06.2013, 22:53   #2
TranceSmile
Смайлик :)
Форумчанин
 
Аватар для TranceSmile
 
Регистрация: 12.12.2010
Сообщений: 445
По умолчанию

PHP код:
function get_visual_editor_form() 
    { 
        
$example1 '[input '.Inc_Form_Shortcode::$ID_ATTR.'="name-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Name" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="text" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="name" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="email-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Эл. Почта" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="url-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Сайт" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="false"][/input]'
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="subject-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Тема" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="text" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="subject" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
        
$example1 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="message-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Сообщения" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="textarea" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="message" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
        
$example1 htmlspecialchars($example1); 
        
$example1 str_replace(array('['']'), array('['']'), $example1); 

        
$example2 '[input '.Inc_Form_Shortcode::$ID_ATTR.'="tf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Text Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="text" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="name" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="ef-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Email Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="email" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="erlf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="URL Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="url" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="false"][/input]'
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="cf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Checkbox Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="checkbox" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="checkbox" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="custf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Custom Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="custom" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"]<select id="custf-id" name="custom"><option value="op1">Option 1</option><option value="op2">Option 2</option></select>[/input]'
        
$example2 .= '[input '.Inc_Form_Shortcode::$ID_ATTR.'="taf-id" '.Inc_Form_Shortcode::$INPUT_LABEL_ATTR.'="Textarea Field" ' Inc_Form_Shortcode::$INPUT_TYPE_ATTR '="textarea" ' Inc_Form_Shortcode::$INPUT_NAME_ATTR '="textarea" ' Inc_Form_Shortcode::$INPUT_REQUIRED_ATTR '="true"][/input]'
Самый перспективный framework Yii (c)
TranceSmile вне форума Ответить с цитированием
Ответ


Купить рекламу на форуме - 42 тыс руб за месяц



Похожие темы
Тема Автор Раздел Ответов Последнее сообщение
Как мне из формы, генерить другие формы, нажимая на кнопку? RISagitov Microsoft Office Excel 5 21.05.2012 00:57
Перевод формы misher Общие вопросы Delphi 14 08.09.2010 00:59
Заголовок Child формы имеет цвет неактивной формы, хотя форма активна? PrimaryPro Общие вопросы Delphi 0 12.03.2010 11:12
как привязать размеры содержимого формы к размерам самой формы acid_bmstu Общие вопросы Delphi 4 05.02.2010 05:02