当前位置: 首页>>代码示例>>PHP>>正文


PHP qa_html_theme_base::main_parts方法代码示例

本文整理汇总了PHP中qa_html_theme_base::main_parts方法的典型用法代码示例。如果您正苦于以下问题:PHP qa_html_theme_base::main_parts方法的具体用法?PHP qa_html_theme_base::main_parts怎么用?PHP qa_html_theme_base::main_parts使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在qa_html_theme_base的用法示例。


在下文中一共展示了qa_html_theme_base::main_parts方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: main_parts

 function main_parts($content)
 {
     if ($this->template == 'admin' && $this->request == 'admin/plugins') {
         $fields['plugins'] = array('type' => 'custom', 'label' => '<a name="plugin_contents">Plugin Settings:</a>', 'html' => '');
         $moduletypes = qa_list_module_types();
         foreach ($moduletypes as $moduletype) {
             $plugins[] = qa_load_modules_with($moduletype, 'option_default');
         }
         $anchors = array();
         foreach ($content as $key => $part) {
             if (strpos($key, 'form_') === 0) {
                 $content[$key]['title'] .= ' <font size="1" style="cursor:pointer; color:blue" onclick="jQuery(document).scrollTop(0)">top</font>';
                 foreach ($content[$key]['fields'] as $idx => $field) {
                     if (isset($field['tags']) && preg_match('|name="([^"]+)"|i', $field['tags'], $name)) {
                         $name = $name[1];
                         foreach ($plugins as $modules) {
                             foreach ($modules as $module) {
                                 $value = $module->option_default($name);
                                 $value = preg_replace('|\\n|', '\\\\n', $value);
                                 $value = str_replace('"', '&quot;', $value);
                                 $value = str_replace('\'', '\\\'', $value);
                                 if (strlen($value)) {
                                     $content[$key]['fields'][$idx]['label'] = @$content[$key]['fields'][$idx]['label'] . '&nbsp;<input type="button" onclick="$(\'[name=' . $name . ']\').val(\'' . $value . '\')" value="r" style="font-size:8pt; width:10px" title="reset to default value">';
                                 }
                             }
                         }
                     }
                 }
             }
         }
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:NoahY,项目名称:q2a-admin-plus,代码行数:33,代码来源:qa-admin-layer.php

示例2: main_parts

 function main_parts($content)
 {
     if (qa_opt('buddypress_integration_enable') && $this->template == 'user' && !qa_get('tab')) {
         $content = $this->user_buddypress_form($content);
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:NoahY,项目名称:q2a-buddypress,代码行数:7,代码来源:qa-bp-layer.php

示例3: main_parts

 function main_parts($content)
 {
     $userid = qa_get_logged_in_userid();
     if (qa_opt('news_plugin_active') && $this->template == 'user' && qa_opt('news_plugin_send') && !qa_get('tab') && $content['raw']['userid'] == $userid) {
         $content['form-newsletter'] = $this->newsletterForm();
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:8,代码来源:qa-news-layer.php

示例4: main_parts

 function main_parts($content)
 {
     if ($this->template == 'user' && qa_get('tab') == 'history' && qa_opt('event_logger_to_database') && qa_opt('user_act_list_active')) {
         $content = array();
         $content['form-activity-list'] = $this->user_activity_form();
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:ruuttt,项目名称:question2answer_sandbox,代码行数:8,代码来源:qa-history-layer.php

示例5: main_parts

 function main_parts($content)
 {
     if (qa_opt('priv_active') && $this->template == 'user' && qa_get('tab') == 'privileges') {
         $content = array();
         $content['form-privileges-list'] = $this->user_priv_form();
         // this shouldn't happen
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:NoahY,项目名称:q2a-privileges,代码行数:9,代码来源:qa-priv-layer.php

示例6: main_parts

 function main_parts($content)
 {
     if (qa_opt('badge_active') && $this->template == 'user' && qa_opt('badge_admin_user_field') && (qa_get('tab') == 'badges' || qa_opt('badge_admin_user_field_no_tab')) && isset($content['raw']['userid'])) {
         $userid = $content['raw']['userid'];
         if (!qa_opt('badge_admin_user_field_no_tab')) {
             foreach ($content as $i => $v) {
                 if (strpos($i, 'form') === 0) {
                     unset($content[$i]);
                 }
             }
         }
         $content['form-badges-list'] = qa_badge_plugin_user_form($userid);
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:architbakliwal,项目名称:Q2A,代码行数:15,代码来源:qa-badge-layer.php

示例7: main_parts

    function main_parts($content)
    {
        qa_html_theme_base::main_parts($content);
        if (qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN and $this->template == 'question' and qa_opt('useo_meta_editor_enable')) {
            $this->output('<div class="qa-widgets-main qa-widgets-main-low">');
            $this->output('<form name="useo-meta-editor" action="' . qa_self_html() . '" method="post">');
            $this->output('
			<h2> Page Title And Meta Tags </h2>
			<strong>Only administrators can see this section.</strong>
			<table class="qa-form-tall-table">
				<tbody>
					<tr>
						<td class="qa-form-tall-label">
							Page Title
						</td>
					</tr>
					<tr>
						<td class="qa-form-tall-data">
							<input placeholder="' . $this->content['q_view']['raw']['title'] . '" id="useo-meta-editor-title" class="qa-form-tall-text" type="text" value="' . $this->meta_title . '" name="useo-meta-editor-title">
						</td>
					</tr>
				</tbody>

				<tbody>
					<tr>
						<td class="qa-form-tall-label">
							Description Meta Tag
						</td>
					</tr>
					<tr>
						<td class="qa-form-tall-data">
							<textarea placeholder="' . $this->content['description'] . '" id="useo-meta-editor-description" class="qa-form-tall-text" cols="40" rows="3" name="useo-meta-editor-description">' . $this->meta_description . '</textarea>
						</td>
					</tr>
				</tbody>
				<tbody id="useo-meta-keywords">
					<tr>
						<td class="qa-form-tall-label">
							Keywords Meta Tag
						</td>
					</tr>
					<tr>
						<td class="qa-form-tall-data">
							<input placeholder="' . $this->content['keywords'] . '" id="useo-meta-editor-keywords" class="qa-form-tall-text" type="text" value="' . $this->meta_keywords . '" name="useo-meta-editor-keywords">
							<div class="qa-form-tall-note">A comma separated list of your most important keywords</div>
						</td>
					</tr>
				</tbody>
				<tbody>
					<tr>
						<td  id="useo_buttons_container_meta" class="qa-form-tall-buttons" colspan="1">
							<input id="useo_save_meta" class="qa-form-tall-button qa-form-tall-button-save" type="submit" title="" value="Save Options">
						</td>
					</tr>
				</tbody>
			</table>
			');
            $this->output('</form>');
            $this->output('<hr /></div>');
        }
        if (qa_get_logged_in_level() >= QA_USER_LEVEL_ADMIN and $this->template == 'question' and qa_opt('useo_social_enable_editor')) {
            $this->output('<div class="qa-widgets-main qa-widgets-main-low">');
            $this->output('<form name="useo-meta-editor" action="' . qa_self_html() . '" method="post">');
            $this->output('
			<h2> Social Tags Editor </h2>
			<p>Only administrators can see this section.</p>
			<h3>Open Graph</h3>
			<table class="qa-form-tall-table">
				<tbody>
					<tr>
						<td class="qa-form-tall-label">
							Site Title
						</td>
					</tr>
					<tr>
						<td class="qa-form-tall-data">
							<input placeholder="' . @$this->metas['og-sitename']['content'] . '" id="useo-og-sitename" class="qa-form-tall-text" type="text" value="' . @$this->social_metas['og-sitename'] . '" name="useo-meta-editor-title">
						</td>
					</tr>
				</tbody>
				<tbody>
					<tr>
						<td class="qa-form-tall-label">
							Page Title
						</td>
					</tr>
					<tr>
						<td class="qa-form-tall-data">
							<input placeholder="' . @$this->metas['og-title']['content'] . '" id="useo-og-title" class="qa-form-tall-text" type="text" value="' . @$this->social_metas['og-title'] . '" name="useo-meta-editor-title">
						</td>
					</tr>
				</tbody>
				<tbody>
					<tr>
						<td class="qa-form-tall-label">
							Description Meta Tag
						</td>
					</tr>
					<tr>
						<td class="qa-form-tall-data">
//.........这里部分代码省略.........
开发者ID:Kailashaghera,项目名称:Q2A-Ultimate-SEO,代码行数:101,代码来源:layer.php

示例8: main_parts

 function main_parts($content)
 {
     $this->output('<article class="qa-q-content-article' . (qa_opt('it_layout_lists') == 'qlist' ? ' qlist-defaul' : '') . '">');
     qa_html_theme_base::main_parts($content);
     $this->output('</article>');
 }
开发者ID:swuit,项目名称:swuit-q2a,代码行数:6,代码来源:qa-layer-base.php

示例9: main_parts

 function main_parts($content)
 {
     if ($this->template == 'user' && qa_get_logged_in_handle() === $this->_user_handle()) {
         if (qa_get('tab') == qa_opt('expert_question_page_url')) {
             $our_form = $this->expert_question_form();
             $content = array();
             if ($our_form) {
                 $content['form-expert-list'] = $our_form;
             }
         }
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:rkarimabadi,项目名称:q2a-expert-questions,代码行数:13,代码来源:qa-expert-layer.php

示例10: main_parts

 function main_parts($content)
 {
     if (qa_opt('bookmarks_plugin_enable') && $this->template == 'user' && !qa_get('tab')) {
         if ($content['q_list']) {
             // paranoia
             $keys = array_keys($content);
             $vals = array_values($content);
             $insertBefore = array_search('q_list', $keys);
             $keys2 = array_splice($keys, $insertBefore);
             $vals2 = array_splice($vals, $insertBefore);
             $keys[] = 'form-bookmarks-list';
             $vals[] = $this->bookmarks_plugin_form();
             $content = array_merge(array_combine($keys, $vals), array_combine($keys2, $vals2));
         } else {
             $content['form-bookmarks-list'] = $this->bookmarks_plugin_form();
         }
         // this shouldn't happen
     }
     qa_html_theme_base::main_parts($content);
 }
开发者ID:NoahY,项目名称:q2a-bookmarks,代码行数:20,代码来源:qa-bookmarks-layer.php

示例11: main_parts

 function main_parts($content)
 {
     if ($this->is_print_view) {
         foreach ($content as $key => $part) {
             if (strpos($key, 'custom') === 0) {
                 $this->output_raw($part);
             } elseif (strpos($key, 'form') === 0) {
                 $this->form($part);
             } elseif (strpos($key, 'q_view') === 0) {
                 $this->q_view($part);
             } elseif (strpos($key, 'a_list') === 0) {
                 $this->a_list($part);
             } elseif (strpos($key, 'ranking') === 0) {
                 $this->ranking($part);
             }
         }
     } else {
         qa_html_theme_base::main_parts($content);
     }
 }
开发者ID:NoahY,项目名称:q2a-print,代码行数:20,代码来源:qa-print-layer.php


注:本文中的qa_html_theme_base::main_parts方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。