You've already forked joomla_test
							
							first commit
This commit is contained in:
		
							
								
								
									
										24
									
								
								administrator/components/com_content/access.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										24
									
								
								administrator/components/com_content/access.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,24 @@ | ||||
| <?xml version="1.0" encoding="utf-8" ?> | ||||
| <access component="com_content"> | ||||
| 	<section name="component"> | ||||
| 		<action name="core.admin" title="JACTION_ADMIN" description="JACTION_ADMIN_COMPONENT_DESC" /> | ||||
| 		<action name="core.manage" title="JACTION_MANAGE" description="JACTION_MANAGE_COMPONENT_DESC" /> | ||||
| 		<action name="core.create" title="JACTION_CREATE" description="JACTION_CREATE_COMPONENT_DESC" /> | ||||
| 		<action name="core.delete" title="JACTION_DELETE" description="JACTION_DELETE_COMPONENT_DESC" /> | ||||
| 		<action name="core.edit" title="JACTION_EDIT" description="JACTION_EDIT_COMPONENT_DESC" /> | ||||
| 		<action name="core.edit.state" title="JACTION_EDITSTATE" description="JACTION_EDITSTATE_COMPONENT_DESC" /> | ||||
| 		<action name="core.edit.own" title="JACTION_EDITOWN" description="JACTION_EDITOWN_COMPONENT_DESC" /> | ||||
| 	</section> | ||||
| 	<section name="category"> | ||||
| 		<action name="core.create" title="JACTION_CREATE" description="COM_CATEGORIES_ACCESS_CREATE_DESC" /> | ||||
| 		<action name="core.delete" title="JACTION_DELETE" description="COM_CATEGORIES_ACCESS_DELETE_DESC" /> | ||||
| 		<action name="core.edit" title="JACTION_EDIT" description="COM_CATEGORIES_ACCESS_EDIT_DESC" /> | ||||
| 		<action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_CATEGORIES_ACCESS_EDITSTATE_DESC" /> | ||||
| 		<action name="core.edit.own" title="JACTION_EDITOWN" description="COM_CATEGORIES_ACCESS_EDITOWN_DESC" /> | ||||
| 	</section> | ||||
| 	<section name="article"> | ||||
| 		<action name="core.delete" title="JACTION_DELETE" description="COM_CONTENT_ACCESS_DELETE_DESC" /> | ||||
| 		<action name="core.edit" title="JACTION_EDIT" description="COM_CONTENT_ACCESS_EDIT_DESC" /> | ||||
| 		<action name="core.edit.state" title="JACTION_EDITSTATE" description="COM_CONTENT_ACCESS_EDITSTATE_DESC" /> | ||||
| 	</section> | ||||
| </access> | ||||
							
								
								
									
										930
									
								
								administrator/components/com_content/config.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										930
									
								
								administrator/components/com_content/config.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,930 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <config> | ||||
| 	<fieldset | ||||
| 		name="articles" | ||||
| 		label="JGLOBAL_ARTICLES" | ||||
| 		description="COM_CONTENT_CONFIG_ARTICLE_SETTINGS_DESC"> | ||||
|  | ||||
| 		<field | ||||
| 			name="article_layout" type="componentlayout" | ||||
| 			label="JGLOBAL_FIELD_LAYOUT_LABEL" | ||||
| 			description="JGLOBAL_FIELD_LAYOUT_DESC" | ||||
| 			menuitems="true" | ||||
| 			extension="com_content" | ||||
| 			view="article" | ||||
| 		/> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_title" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_SHOW_TITLE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_TITLE_DESC"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="link_titles" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_LINKED_TITLES_LABEL" | ||||
| 			description="JGLOBAL_LINKED_TITLES_DESC"> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_intro" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_SHOW_INTRO_LABEL" | ||||
| 			description="JGLOBAL_SHOW_INTRO_DESC"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="info_block_position" | ||||
| 			type="list" | ||||
| 			default="0" | ||||
| 			label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL" | ||||
| 			description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC"> | ||||
| 			<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option> | ||||
| 			<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option> | ||||
| 			<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_category" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_CATEGORY_LABEL" | ||||
| 			description="JGLOBAL_SHOW_CATEGORY_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="link_category" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_LINK_CATEGORY_LABEL" | ||||
| 			description="JGLOBAL_LINK_CATEGORY_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_parent_category" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL" | ||||
| 			description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="link_parent_category" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL" | ||||
| 			description="JGLOBAL_LINK_PARENT_CATEGORY_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JNo</option> | ||||
| 			<option | ||||
| 				value="1">JYes</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="spacer1" | ||||
| 			type="spacer" | ||||
| 			hr="true" | ||||
| 			/> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_author" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_AUTHOR_LABEL" | ||||
| 			description="JGLOBAL_SHOW_AUTHOR_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="link_author" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_LINK_AUTHOR_LABEL" | ||||
| 			description="JGLOBAL_LINK_AUTHOR_DESC" | ||||
| 			default="0"> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_create_date" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_CREATE_DATE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_CREATE_DATE_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_modify_date" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_MODIFY_DATE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_MODIFY_DATE_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_publish_date" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_PUBLISH_DATE_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_item_navigation" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_NAVIGATION_LABEL" | ||||
| 			description="JGLOBAL_SHOW_NAVIGATION_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_vote" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_VOTE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_VOTE_DESC" | ||||
| 			default="0"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="show_readmore" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_READMORE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_READMORE_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_readmore_title" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_READMORE_TITLE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_READMORE_TITLE_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="readmore_limit" | ||||
| 			type="text" | ||||
| 			label="JGLOBAL_SHOW_READMORE_LIMIT_LABEL" | ||||
| 			description="JGLOBAL_SHOW_READMORE_LIMIT_DESC" | ||||
| 			default="100" | ||||
| 		/> | ||||
|  | ||||
| 		<field | ||||
| 			id="show_tags" | ||||
| 			name="show_tags" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL" | ||||
| 			description="COM_CONTENT_FIELD_SHOW_TAGS_DESC"> | ||||
| 			<option value="0">JHIDE</option> | ||||
| 			<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="spacer2" | ||||
| 			type="spacer" | ||||
| 			hr="true" | ||||
| 			/> | ||||
| 		<field | ||||
| 			name="show_icons" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_ICONS_LABEL" | ||||
| 			description="JGLOBAL_SHOW_ICONS_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_print_icon" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_PRINT_ICON_LABEL" | ||||
| 			description="JGLOBAL_SHOW_PRINT_ICON_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_email_icon" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_EMAIL_ICON_LABEL" | ||||
| 			description="JGLOBAL_SHOW_EMAIL_ICON_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_hits" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_HITS_LABEL" | ||||
| 			description="JGLOBAL_SHOW_HITS_DESC" | ||||
| 			default="1"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_noauth" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="0" | ||||
| 			label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL" | ||||
| 			description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
| 			<field | ||||
| 			name="urls_position" | ||||
| 			type="list" | ||||
| 			default="0" | ||||
| 			label="COM_CONTENT_FIELD_URLSPOSITION_LABEL" | ||||
| 			description="COM_CONTENT_FIELD_URLSPOSITION_DESC"> | ||||
| 			<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option> | ||||
| 			<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option> | ||||
| 		</field> | ||||
| 	</fieldset> | ||||
| 	<fieldset name="editinglayout" label="COM_CONTENT_EDITING_LAYOUT" | ||||
| 				description="COM_CONTENT_CONFIG_EDITOR_LAYOUT"> | ||||
| 		<field | ||||
| 			name="show_publishing_options" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_LABEL" | ||||
| 			description="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_DESC" | ||||
| 			> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="show_article_options" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="COM_CONTENT_SHOW_ARTICLE_OPTIONS_LABEL" | ||||
| 			description="COM_CONTENT_SHOW_ARTICLE_OPTIONS_DESC" | ||||
| 			> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="show_urls_images_frontend" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="0" | ||||
| 			label="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_LABEL" | ||||
| 			description="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_DESC" | ||||
| 			> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="show_urls_images_backend" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="0" | ||||
| 			label="COM_CONTENT_SHOW_IMAGES_URLS_BACK_LABEL" | ||||
| 			description="COM_CONTENT_SHOW_IMAGES_URLS_BACK_DESC" | ||||
| 			> | ||||
| 			<option | ||||
| 				value="0">JNO</option> | ||||
| 			<option | ||||
| 				value="1">JYES</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="spacer3" | ||||
| 			type="spacer" | ||||
| 			hr="true" | ||||
| 			/> | ||||
| 		<field | ||||
| 			name="targeta" | ||||
| 			type="list" | ||||
| 			label="COM_CONTENT_URL_FIELD_A_BROWSERNAV_LABEL" | ||||
| 			description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC" | ||||
| 			default="Parent" | ||||
| 			filter="int" | ||||
| 			class="inputbox"> | ||||
| 				<option value="0">JBROWSERTARGET_PARENT</option> | ||||
| 				<option value="1">JBROWSERTARGET_NEW</option> | ||||
| 				<option value="2">JBROWSERTARGET_POPUP</option> | ||||
| 				<option value="3">JBROWSERTARGET_MODAL</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="targetb" | ||||
| 			type="list" | ||||
| 			label="COM_CONTENT_URL_FIELD_B_BROWSERNAV_LABEL" | ||||
| 			description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC" | ||||
| 			default="Parent" | ||||
| 			filter="int" | ||||
| 			class="inputbox"> | ||||
| 				<option value="0">JBROWSERTARGET_PARENT</option> | ||||
| 				<option value="1">JBROWSERTARGET_NEW</option> | ||||
| 				<option value="2">JBROWSERTARGET_POPUP</option> | ||||
| 				<option value="3">JBROWSERTARGET_MODAL</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="targetc" | ||||
| 			type="list" | ||||
| 			label="COM_CONTENT_URL_FIELD_C_BROWSERNAV_LABEL" | ||||
| 			description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC" | ||||
| 			default="Parent" | ||||
| 			filter="int" | ||||
| 			class="inputbox"> | ||||
| 				<option value="0">JBROWSERTARGET_PARENT</option> | ||||
| 				<option value="1">JBROWSERTARGET_NEW</option> | ||||
| 				<option value="2">JBROWSERTARGET_POPUP</option> | ||||
| 				<option value="3">JBROWSERTARGET_MODAL</option> | ||||
| 		</field>	 | ||||
| 		<field | ||||
| 			name="spacer4" | ||||
| 			type="spacer" | ||||
| 			hr="true" | ||||
| 			/> | ||||
|  | ||||
| 		<field | ||||
| 			name="float_intro" | ||||
| 			type="list" | ||||
| 			label="COM_CONTENT_FLOAT_INTRO_LABEL" | ||||
| 			description="COM_CONTENT_FLOAT_DESC"> | ||||
| 				<option value="right">COM_CONTENT_RIGHT</option> | ||||
| 				<option value="left">COM_CONTENT_LEFT</option> | ||||
| 				<option value="none">COM_CONTENT_NONE</option> | ||||
| 		</field> | ||||
| 		<field | ||||
| 			name="float_fulltext" | ||||
| 			type="list" | ||||
| 			label="COM_CONTENT_FLOAT_FULLTEXT_LABEL" | ||||
| 			description="COM_CONTENT_FLOAT_DESC"> | ||||
| 				<option value="right">COM_CONTENT_RIGHT</option> | ||||
| 				<option value="left">COM_CONTENT_LEFT</option> | ||||
| 				<option value="none">COM_CONTENT_NONE</option> | ||||
| 		</field> | ||||
|  | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fieldset name="category" | ||||
| 		label="JCATEGORY" | ||||
| 		description="COM_CONTENT_CONFIG_CATEGORY_SETTINGS_DESC" | ||||
| 		> | ||||
|  | ||||
| 		<field | ||||
| 			name="category_layout" type="componentlayout" | ||||
| 			label="JGLOBAL_FIELD_LAYOUT_LABEL" | ||||
| 			description="JGLOBAL_FIELD_LAYOUT_DESC" | ||||
| 			menuitems="true" | ||||
| 			extension="com_content" | ||||
| 			view="category" | ||||
| 		/> | ||||
| 		<field  | ||||
| 			name="show_category_heading_title_text" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
|  			label="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_LABEL" | ||||
| 			description="JGLOBAL_SHOW_CATEGORY_HEADING_TITLE_TEXT_DESC" | ||||
| 			default="1"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field>	 | ||||
| 		<field name="show_category_title" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_CATEGORY_TITLE" | ||||
| 			description="JGLOBAL_SHOW_CATEGORY_TITLE_DESC" | ||||
| 			default="1" | ||||
| 			> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_description" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_LABEL" | ||||
| 			description="JGLOBAL_SHOW_CATEGORY_DESCRIPTION_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_description_image" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="0" | ||||
| 			label="JGLOBAL_SHOW_CATEGORY_IMAGE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_CATEGORY_IMAGE_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="maxLevel" type="list" | ||||
| 				description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC" | ||||
| 				label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL" | ||||
| 				default="-1" | ||||
| 			> | ||||
| 				<option value="0">JNONE</option> | ||||
| 				<option value="-1">JALL</option> | ||||
| 				<option value="1">J1</option> | ||||
| 				<option value="2">J2</option> | ||||
| 				<option value="3">J3</option> | ||||
| 				<option value="4">J4</option> | ||||
| 				<option value="5">J5</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_empty_categories" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL" | ||||
| 			description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC" | ||||
| 			default="0" | ||||
| 			> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_no_articles" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="COM_CONTENT_NO_ARTICLES_LABEL" | ||||
| 			description="COM_CONTENT_NO_ARTICLES_DESC" | ||||
| 			default="1" | ||||
| 				> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_subcat_desc" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL" | ||||
| 			description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC" | ||||
| 			default="1" | ||||
| 			> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_cat_num_articles" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL" | ||||
| 			description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC" | ||||
| 			default="1" | ||||
| 				> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_tags" type="radio" | ||||
| 			label="COM_CONTENT_FIELD_SHOW_CAT_TAGS_LABEL" | ||||
| 			description="COM_CONTENT_FIELD_SHOW_CAT_TAGS_DESC" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 		> | ||||
| 			<option value="0">JHIDE</option> | ||||
| 			<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fieldset name="categories" | ||||
| 		label="JCATEGORIES" | ||||
| 		description="COM_CONTENT_CONFIG_CATEGORIES_SETTINGS_DESC" | ||||
| 		> | ||||
| 		<field name="show_base_description" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_LABEL" | ||||
| 			description="JGLOBAL_FIELD_SHOW_BASE_DESCRIPTION_DESC" | ||||
| 			> | ||||
|  | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="maxLevelcat" type="list" | ||||
| 				default="-1" | ||||
| 				description="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_DESC" | ||||
| 				label="JGLOBAL_MAXIMUM_CATEGORY_LEVELS_LABEL" | ||||
| 			> | ||||
| 				<option value="-1">JALL</option> | ||||
| 				<option value="1">J1</option> | ||||
| 				<option value="2">J2</option> | ||||
| 				<option value="3">J3</option> | ||||
| 				<option value="4">J4</option> | ||||
| 				<option value="5">J5</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="show_empty_categories_cat" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				default="0" | ||||
| 				label="JGLOBAL_SHOW_EMPTY_CATEGORIES_LABEL" | ||||
| 				description="COM_CONTENT_SHOW_EMPTY_CATEGORIES_DESC" | ||||
| 			> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="show_subcat_desc_cat" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				default="1" | ||||
| 				label="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_LABEL" | ||||
| 				description="JGLOBAL_SHOW_SUBCATEGORIES_DESCRIPTION_DESC" | ||||
| 			> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="show_cat_num_articles_cat" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				default="1" | ||||
| 				label="COM_CONTENT_NUMBER_CATEGORY_ITEMS_LABEL" | ||||
| 				description="COM_CONTENT_NUMBER_CATEGORY_ITEMS_DESC" | ||||
| 			> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fieldset name="blog_default_parameters" | ||||
| 		label="COM_CONTENT_CONFIG_BLOG_SETTINGS_LABEL" | ||||
| 		description="COM_CONTENT_CONFIG_BLOG_SETTINGS_DESC" | ||||
| 		> | ||||
|  | ||||
| 		<field name="num_leading_articles" | ||||
| 			type="text" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_NUM_LEADING_ARTICLES_LABEL" | ||||
| 			description="JGLOBAL_NUM_LEADING_ARTICLES_DESC"> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="num_intro_articles" | ||||
| 			type="text" | ||||
| 			default="4" | ||||
| 			label="JGLOBAL_NUM_INTRO_ARTICLES_LABEL" | ||||
| 			description="JGLOBAL_NUM_INTRO_ARTICLES_DESC"> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="num_columns" | ||||
| 			type="text" | ||||
| 			default="2" | ||||
| 			label="JGLOBAL_NUM_COLUMNS_LABEL" | ||||
| 			description="JGLOBAL_NUM_COLUMNS_DESC"> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="num_links" | ||||
| 			type="text" | ||||
| 			default="4" | ||||
| 			label="JGLOBAL_NUM_LINKS_LABEL" | ||||
| 			description="JGLOBAL_NUM_LINKS_DESC"> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="multi_column_order" | ||||
| 			type="list" | ||||
| 			default="0" | ||||
| 			label="JGLOBAL_MULTI_COLUMN_ORDER_LABEL" | ||||
| 			description="JGLOBAL_MULTI_COLUMN_ORDER_DESC"> | ||||
| 			<option | ||||
| 				value="0">JGLOBAL_DOWN</option> | ||||
| 			<option | ||||
| 				value="1">JGLOBAL_ACROSS</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="spacer1" | ||||
| 			type="spacer" | ||||
| 			hr="true" | ||||
| 			/> | ||||
| 		<field name="subcategories" type="spacer" class="spacer" | ||||
| 					label="JGLOBAL_SUBSLIDER_BLOG_EXTENDED_LABEL" | ||||
| 			/> | ||||
|  | ||||
| 		<field name="show_subcategory_content" type="list" | ||||
| 				default="0" | ||||
| 				description="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_DESC" | ||||
| 				label="JGLOBAL_SHOW_SUBCATEGORY_CONTENT_LABEL" | ||||
| 			> | ||||
| 				<option value="0">JNONE</option> | ||||
| 				<option value="-1">JALL</option> | ||||
| 				<option value="1">J1</option> | ||||
| 				<option value="2">J2</option> | ||||
| 				<option value="3">J3</option> | ||||
| 				<option value="4">J4</option> | ||||
| 				<option value="5">J5</option> | ||||
| 			</field> | ||||
| 		</fieldset> | ||||
|  | ||||
| 	<fieldset name="list_default_parameters" | ||||
| 		label="JGLOBAL_LIST_LAYOUT_OPTIONS" | ||||
| 		description="COM_CONTENT_CONFIG_LIST_SETTINGS_DESC" | ||||
| 		> | ||||
|  | ||||
| 		<field name="show_pagination_limit" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_DISPLAY_SELECT_LABEL" | ||||
| 			description="JGLOBAL_DISPLAY_SELECT_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="filter_field" | ||||
| 			type="list" | ||||
| 			default="hide" | ||||
| 			label="JGLOBAL_FILTER_FIELD_LABEL" | ||||
| 			description="JGLOBAL_FILTER_FIELD_DESC"> | ||||
| 				<option value="hide">JHIDE</option> | ||||
| 				<option value="title">JGLOBAL_TITLE</option> | ||||
| 				<option value="author">JAUTHOR</option> | ||||
| 				<option value="hits">JGLOBAL_HITS</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_headings" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_SHOW_HEADINGS_LABEL" | ||||
| 			description="JGLOBAL_SHOW_HEADINGS_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="list_show_date" | ||||
| 			type="list" | ||||
| 			default="0" | ||||
| 			label="JGLOBAL_SHOW_DATE_LABEL" | ||||
| 			description="JGLOBAL_SHOW_DATE_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="created">JGLOBAL_CREATED</option> | ||||
| 				<option value="modified">JGLOBAL_MODIFIED</option> | ||||
| 				<option value="published">JPUBLISHED</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="date_format" | ||||
| 			type="text" | ||||
| 			size="15" | ||||
| 			label="JGLOBAL_DATE_FORMAT_LABEL" | ||||
| 			description="JGLOBAL_DATE_FORMAT_DESC" /> | ||||
|  | ||||
| 		<field name="list_show_hits" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_LIST_HITS_LABEL" | ||||
| 			description="JGLOBAL_LIST_HITS_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="list_show_author" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_LIST_AUTHOR_LABEL" | ||||
| 			description="JGLOBAL_LIST_AUTHOR_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fieldset name="shared" | ||||
| 		label="COM_CONTENT_SHARED_LABEL" | ||||
| 		description="COM_CONTENT_SHARED_DESC" | ||||
| 		> | ||||
| 	<field name="orderby_pri" | ||||
| 			type="list" | ||||
| 			default="none" | ||||
| 			label="JGLOBAL_CATEGORY_ORDER_LABEL" | ||||
| 			description="JGLOBAL_CATEGORY_ORDER_DESC"> | ||||
| 			<option | ||||
| 				value="none">JGLOBAL_NO_ORDER</option> | ||||
| 			<option | ||||
| 				value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option> | ||||
| 			<option | ||||
| 				value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option> | ||||
| 			<option | ||||
| 				value="order">JGLOBAL_CATEGORY_MANAGER_ORDER</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="orderby_sec" | ||||
| 			type="list" | ||||
| 			default="rdate" | ||||
| 			label="JGLOBAL_Article_Order_Label" | ||||
| 			description="JGLOBAL_Article_Order_Desc"> | ||||
| 			<option | ||||
| 				value="rdate">JGLOBAL_MOST_RECENT_FIRST</option> | ||||
| 			<option | ||||
| 				value="date">JGLOBAL_OLDEST_FIRST</option> | ||||
| 			<option | ||||
| 				value="alpha">JGLOBAL_TITLE_ALPHABETICAL</option> | ||||
| 			<option | ||||
| 				value="ralpha">JGLOBAL_TITLE_REVERSE_ALPHABETICAL</option> | ||||
| 			<option | ||||
| 				value="author">JGLOBAL_AUTHOR_ALPHABETICAL</option> | ||||
| 			<option | ||||
| 				value="rauthor">JGLOBAL_AUTHOR_REVERSE_ALPHABETICAL</option> | ||||
| 			<option | ||||
| 				value="hits">JGLOBAL_MOST_HITS</option> | ||||
| 			<option | ||||
| 				value="rhits">JGLOBAL_LEAST_HITS</option> | ||||
| 			<option | ||||
| 				value="order">JGLOBAL_ARTICLE_MANAGER_ORDER</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="order_date" type="list" | ||||
| 				default="published" | ||||
| 				description="JGLOBAL_ORDERING_DATE_DESC" | ||||
| 				label="JGLOBAL_ORDERING_DATE_LABEL" | ||||
| 			> | ||||
| 				<option value="created">JGLOBAL_CREATED</option> | ||||
| 				<option value="modified">JGLOBAL_MODIFIED</option> | ||||
| 				<option value="published">JPUBLISHED</option> | ||||
| 			</field> | ||||
|  | ||||
| 		<field name="show_pagination" | ||||
| 			type="list" | ||||
| 			default="2" | ||||
| 			label="JGLOBAL_Pagination_Label" | ||||
| 			description="JGLOBAL_Pagination_Desc"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 				<option value="2">JGLOBAL_AUTO</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="show_pagination_results" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_PAGINATION_RESULTS_LABEL" | ||||
| 			description="JGLOBAL_PAGINATION_RESULTS_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fieldset name="integration" | ||||
| 		label="JGLOBAL_INTEGRATION_LABEL" | ||||
| 		description="COM_CONTENT_CONFIG_INTEGRATION_SETTINGS_DESC" | ||||
| 		> | ||||
|  | ||||
| 		<field | ||||
| 			name="show_feed_link" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			default="1" | ||||
| 			label="JGLOBAL_SHOW_FEED_LINK_LABEL" | ||||
| 			description="JGLOBAL_SHOW_FEED_LINK_DESC"> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="feed_summary" | ||||
| 			type="list" | ||||
| 			label="JGLOBAL_FEED_SUMMARY_LABEL" | ||||
| 			description="JGLOBAL_FEED_SUMMARY_DESC" | ||||
| 			default="0"> | ||||
| 			<option | ||||
| 				value="0">JGLOBAL_INTRO_TEXT</option> | ||||
| 			<option | ||||
| 				value="1">JGLOBAL_FULL_TEXT</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="feed_show_readmore" | ||||
| 			type="radio" | ||||
| 			class="btn-group" | ||||
| 			label="JGLOBAL_FEED_SHOW_READMORE_LABEL" | ||||
| 			description="JGLOBAL_FEED_SHOW_READMORE_DESC" | ||||
| 			default="0"> | ||||
| 			<option | ||||
| 				value="0">JHIDE</option> | ||||
| 			<option | ||||
| 				value="1">JSHOW</option> | ||||
| 		</field> | ||||
|  | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fieldset | ||||
| 		name="permissions" | ||||
| 		label="JCONFIG_PERMISSIONS_LABEL" | ||||
| 		description="JCONFIG_PERMISSIONS_DESC" | ||||
| 		> | ||||
|  | ||||
| 		<field | ||||
| 			name="rules" | ||||
| 			type="rules" | ||||
| 			label="JCONFIG_PERMISSIONS_LABEL" | ||||
| 			class="inputbox" | ||||
| 			validate="rules" | ||||
| 			filter="rules" | ||||
| 			component="com_content" | ||||
| 			section="component" /> | ||||
| 	</fieldset> | ||||
| </config> | ||||
							
								
								
									
										21
									
								
								administrator/components/com_content/content.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								administrator/components/com_content/content.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,21 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| if (!JFactory::getUser()->authorise('core.manage', 'com_content')) | ||||
| { | ||||
| 	return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR')); | ||||
| } | ||||
|  | ||||
| JLoader::register('ContentHelper', __DIR__ . '/helpers/content.php'); | ||||
|  | ||||
| $controller = JControllerLegacy::getInstance('Content'); | ||||
| $controller->execute(JFactory::getApplication()->input->get('task')); | ||||
| $controller->redirect(); | ||||
							
								
								
									
										45
									
								
								administrator/components/com_content/content.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										45
									
								
								administrator/components/com_content/content.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,45 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <extension type="component" version="3.1" method="upgrade"> | ||||
| 	<name>com_content</name> | ||||
| 	<author>Joomla! Project</author> | ||||
| 	<creationDate>April 2006</creationDate> | ||||
| 	<copyright>(C) 2005 - 2013 Open Source Matters. All rights reserved.	</copyright> | ||||
| 	<license>GNU General Public License version 2 or later; see	LICENSE.txt</license> | ||||
| 	<authorEmail>admin@joomla.org</authorEmail> | ||||
| 	<authorUrl>www.joomla.org</authorUrl> | ||||
| 	<version>3.0.0</version> | ||||
| 	<description>COM_CONTENT_XML_DESCRIPTION</description> | ||||
|  | ||||
| 	<files folder="site"> | ||||
| 		<filename>content.php</filename> | ||||
| 		<filename>controller.php</filename> | ||||
| 		<filename>index.html</filename> | ||||
| 		<filename>router.php</filename> | ||||
| 		<folder>helpers</folder> | ||||
| 		<folder>models</folder> | ||||
| 	</files> | ||||
| 	<languages folder="site"> | ||||
| 		<language tag="en-GB">language/en-GB.com_content.ini</language> | ||||
| 	</languages> | ||||
| 	<administration> | ||||
| 		<files folder="admin"> | ||||
| 			<filename>access.xml</filename> | ||||
| 			<filename>config.xml</filename> | ||||
| 			<filename>content.php</filename> | ||||
| 			<filename>controller.php</filename> | ||||
| 			<filename>index.html</filename> | ||||
| 			<folder>controllers</folder> | ||||
| 			<folder>elements</folder> | ||||
| 			<folder>helpers</folder> | ||||
| 			<folder>models</folder> | ||||
| 			<folder>tables</folder> | ||||
| 			<folder>views</folder> | ||||
| 		</files> | ||||
| 		<languages folder="admin"> | ||||
| 			<language tag="en-GB">language/en-GB.com_content.ini</language> | ||||
| 			<language tag="en-GB">language/en-GB.com_content.sys.ini</language> | ||||
| 		</languages> | ||||
| 	</administration> | ||||
| </extension> | ||||
|  | ||||
|  | ||||
							
								
								
									
										58
									
								
								administrator/components/com_content/controller.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										58
									
								
								administrator/components/com_content/controller.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,58 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * Component Controller | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.5 | ||||
|  */ | ||||
| class ContentController extends JControllerLegacy | ||||
| { | ||||
| 	/** | ||||
| 	 * @var		string	The default view. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected $default_view = 'articles'; | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to display a view. | ||||
| 	 * | ||||
| 	 * @param   boolean			If true, the view output will be cached | ||||
| 	 * @param   array  An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}. | ||||
| 	 * | ||||
| 	 * @return  JController		This object to support chaining. | ||||
| 	 * | ||||
| 	 * @since   1.5 | ||||
| 	 */ | ||||
| 	public function display($cachable = false, $urlparams = false) | ||||
| 	{ | ||||
| 		$view   = $this->input->get('view', 'articles'); | ||||
| 		$layout = $this->input->get('layout', 'articles'); | ||||
| 		$id     = $this->input->getInt('id'); | ||||
|  | ||||
| 		// Check for edit form. | ||||
| 		if ($view == 'article' && $layout == 'edit' && !$this->checkEditId('com_content.edit.article', $id)) | ||||
| 		{ | ||||
| 			// Somehow the person just went to the form - we don't allow that. | ||||
| 			$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id)); | ||||
| 			$this->setMessage($this->getError(), 'error'); | ||||
| 			$this->setRedirect(JRoute::_('index.php?option=com_content&view=articles', false)); | ||||
|  | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		parent::display(); | ||||
|  | ||||
| 		return $this; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										160
									
								
								administrator/components/com_content/controllers/article.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										160
									
								
								administrator/components/com_content/controllers/article.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,160 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class ContentControllerArticle extends JControllerForm | ||||
| { | ||||
| 	/** | ||||
| 	 * Class constructor. | ||||
| 	 * | ||||
| 	 * @param   array  $config  A named array of configuration variables. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function __construct($config = array()) | ||||
| 	{ | ||||
| 		parent::__construct($config); | ||||
|  | ||||
| 		// An article edit form can come from the articles or featured view. | ||||
| 		// Adjust the redirect view on the value of 'return' in the request. | ||||
| 		if ($this->input->get('return') == 'featured') | ||||
| 		{ | ||||
| 			$this->view_list = 'featured'; | ||||
| 			$this->view_item = 'article&return=featured'; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method override to check if you can add a new record. | ||||
| 	 * | ||||
| 	 * @param   array  $data  An array of input data. | ||||
| 	 * | ||||
| 	 * @return  boolean | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function allowAdd($data = array()) | ||||
| 	{ | ||||
| 		$user = JFactory::getUser(); | ||||
| 		$categoryId = JArrayHelper::getValue($data, 'catid', $this->input->getInt('filter_category_id'), 'int'); | ||||
| 		$allow = null; | ||||
|  | ||||
| 		if ($categoryId) | ||||
| 		{ | ||||
| 			// If the category has been passed in the data or URL check it. | ||||
| 			$allow = $user->authorise('core.create', 'com_content.category.' . $categoryId); | ||||
| 		} | ||||
|  | ||||
| 		if ($allow === null) | ||||
| 		{ | ||||
| 			// In the absense of better information, revert to the component permissions. | ||||
| 			return parent::allowAdd(); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			return $allow; | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method override to check if you can edit an existing record. | ||||
| 	 * | ||||
| 	 * @param   array   $data  An array of input data. | ||||
| 	 * @param   string  $key   The name of the key for the primary key. | ||||
| 	 * | ||||
| 	 * @return  boolean | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function allowEdit($data = array(), $key = 'id') | ||||
| 	{ | ||||
| 		$recordId = (int) isset($data[$key]) ? $data[$key] : 0; | ||||
| 		$user = JFactory::getUser(); | ||||
| 		$userId = $user->get('id'); | ||||
|  | ||||
| 		// Check general edit permission first. | ||||
| 		if ($user->authorise('core.edit', 'com_content.article.' . $recordId)) | ||||
| 		{ | ||||
| 			return true; | ||||
| 		} | ||||
|  | ||||
| 		// Fallback on edit.own. | ||||
| 		// First test if the permission is available. | ||||
| 		if ($user->authorise('core.edit.own', 'com_content.article.' . $recordId)) | ||||
| 		{ | ||||
| 			// Now test the owner is the user. | ||||
| 			$ownerId = (int) isset($data['created_by']) ? $data['created_by'] : 0; | ||||
| 			if (empty($ownerId) && $recordId) | ||||
| 			{ | ||||
| 				// Need to do a lookup from the model. | ||||
| 				$record = $this->getModel()->getItem($recordId); | ||||
|  | ||||
| 				if (empty($record)) | ||||
| 				{ | ||||
| 					return false; | ||||
| 				} | ||||
|  | ||||
| 				$ownerId = $record->created_by; | ||||
| 			} | ||||
|  | ||||
| 			// If the owner matches 'me' then do the test. | ||||
| 			if ($ownerId == $userId) | ||||
| 			{ | ||||
| 				return true; | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		// Since there is no asset tracking, revert to the component permissions. | ||||
| 		return parent::allowEdit($data, $key); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to run batch operations. | ||||
| 	 * | ||||
| 	 * @param   object  $model  The model. | ||||
| 	 * | ||||
| 	 * @return  boolean   True if successful, false otherwise and internal error is set. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function batch($model = null) | ||||
| 	{ | ||||
| 		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); | ||||
|  | ||||
| 		// Set the model | ||||
| 		$model = $this->getModel('Article', '', array()); | ||||
|  | ||||
| 		// Preset the redirect | ||||
| 		$this->setRedirect(JRoute::_('index.php?option=com_content&view=articles' . $this->getRedirectToListAppend(), false)); | ||||
|  | ||||
| 		return parent::batch($model); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Function that allows child controller access to model data after the data has been saved. | ||||
| 	 * | ||||
| 	 * @param   JModelLegacy  $model  The data model object. | ||||
| 	 * @param   array         $validData   The validated data. | ||||
| 	 * | ||||
| 	 * @return	void | ||||
| 	 * | ||||
| 	 * @since	3.1 | ||||
| 	 */ | ||||
| 	protected function postSaveHook(JModelLegacy $model, $validData = array()) | ||||
| 	{ | ||||
|  | ||||
| 		return; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										122
									
								
								administrator/components/com_content/controllers/articles.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										122
									
								
								administrator/components/com_content/controllers/articles.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,122 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * Articles list controller class. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class ContentControllerArticles extends JControllerAdmin | ||||
| { | ||||
| 	/** | ||||
| 	 * Constructor. | ||||
| 	 * | ||||
| 	 * @param   array  $config	An optional associative array of configuration settings. | ||||
|  | ||||
| 	 * @return  ContentControllerArticles | ||||
| 	 * @see     JController | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function __construct($config = array()) | ||||
| 	{ | ||||
| 		parent::__construct($config); | ||||
|  | ||||
| 		// Articles default form can come from the articles or featured view. | ||||
| 		// Adjust the redirect view on the value of 'view' in the request. | ||||
| 		if ($this->input->get('view') == 'featured') | ||||
| 		{ | ||||
| 			$this->view_list = 'featured'; | ||||
| 		} | ||||
|  | ||||
| 		$this->registerTask('unfeatured',	'featured'); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to toggle the featured setting of a list of articles. | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function featured() | ||||
| 	{ | ||||
| 		// Check for request forgeries | ||||
| 		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); | ||||
|  | ||||
| 		$user   = JFactory::getUser(); | ||||
| 		$ids    = $this->input->get('cid', array(), 'array'); | ||||
| 		$values = array('featured' => 1, 'unfeatured' => 0); | ||||
| 		$task   = $this->getTask(); | ||||
| 		$value  = JArrayHelper::getValue($values, $task, 0, 'int'); | ||||
|  | ||||
| 		// Access checks. | ||||
| 		foreach ($ids as $i => $id) | ||||
| 		{ | ||||
| 			if (!$user->authorise('core.edit.state', 'com_content.article.'.(int) $id)) | ||||
| 			{ | ||||
| 				// Prune items that you can't change. | ||||
| 				unset($ids[$i]); | ||||
| 				JError::raiseNotice(403, JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED')); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		if (empty($ids)) | ||||
| 		{ | ||||
| 			JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED')); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			// Get the model. | ||||
| 			$model = $this->getModel(); | ||||
|  | ||||
| 			// Publish the items. | ||||
| 			if (!$model->featured($ids, $value)) | ||||
| 			{ | ||||
| 				JError::raiseWarning(500, $model->getError()); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		$this->setRedirect('index.php?option=com_content&view=articles'); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Proxy for getModel. | ||||
| 	 * | ||||
| 	 * @param   string	$name	The name of the model. | ||||
| 	 * @param   string	$prefix	The prefix for the PHP class name. | ||||
| 	 * | ||||
| 	 * @return  JModel | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function getModel($name = 'Article', $prefix = 'ContentModel', $config = array('ignore_request' => true)) | ||||
| 	{ | ||||
| 		$model = parent::getModel($name, $prefix, $config); | ||||
|  | ||||
| 		return $model; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Function that allows child controller access to model data | ||||
| 	 * after the item has been deleted. | ||||
| 	 * | ||||
| 	 * @param   JModelLegacy  $model  The data model object. | ||||
| 	 * @param   integer       $ids    The array of ids for items being deleted. | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 * | ||||
| 	 * @since   12.2 | ||||
| 	 */ | ||||
| 	protected function postDeleteHook(JModelLegacy $model, $ids = null) | ||||
| 	{ | ||||
| 	} | ||||
|  | ||||
| } | ||||
| @ -0,0 +1,90 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| require_once __DIR__ . '/articles.php'; | ||||
|  | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  */ | ||||
| class ContentControllerFeatured extends ContentControllerArticles | ||||
| { | ||||
| 	/** | ||||
| 	 * Removes an item | ||||
| 	 */ | ||||
| 	public function delete() | ||||
| 	{ | ||||
| 		// Check for request forgeries | ||||
| 		JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN')); | ||||
|  | ||||
| 		$user = JFactory::getUser(); | ||||
| 		$ids  = $this->input->get('cid', array(), 'array'); | ||||
|  | ||||
| 		// Access checks. | ||||
| 		foreach ($ids as $i => $id) | ||||
| 		{ | ||||
| 			if (!$user->authorise('core.delete', 'com_content.article.'.(int) $id)) | ||||
| 			{ | ||||
| 				// Prune items that you can't delete. | ||||
| 				unset($ids[$i]); | ||||
| 				JError::raiseNotice(403, JText::_('JERROR_CORE_DELETE_NOT_PERMITTED')); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		if (empty($ids)) | ||||
| 		{ | ||||
| 			JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED')); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			// Get the model. | ||||
| 			$model = $this->getModel(); | ||||
|  | ||||
| 			// Remove the items. | ||||
| 			if (!$model->featured($ids, 0)) | ||||
| 			{ | ||||
| 				JError::raiseWarning(500, $model->getError()); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		$this->setRedirect('index.php?option=com_content&view=featured'); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to publish a list of articles. | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 * @since   1.0 | ||||
| 	 */ | ||||
| 	public function publish() | ||||
| 	{ | ||||
| 		parent::publish(); | ||||
|  | ||||
| 		$this->setRedirect('index.php?option=com_content&view=featured'); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to get a model object, loading it if required. | ||||
| 	 * | ||||
| 	 * @param   string  $name    The model name. Optional. | ||||
| 	 * @param   string  $prefix  The class prefix. Optional. | ||||
| 	 * @param   array   $config  Configuration array for model. Optional. | ||||
| 	 * | ||||
| 	 * @return  object  The model. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function getModel($name = 'Feature', $prefix = 'ContentModel', $config = array('ignore_request' => true)) | ||||
| 	{ | ||||
| 		$model = parent::getModel($name, $prefix, $config); | ||||
| 		return $model; | ||||
| 	} | ||||
| } | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										104
									
								
								administrator/components/com_content/helpers/content.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										104
									
								
								administrator/components/com_content/helpers/content.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,104 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * Content component helper. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class ContentHelper | ||||
| { | ||||
| 	public static $extension = 'com_content'; | ||||
|  | ||||
| 	/** | ||||
| 	 * Configure the Linkbar. | ||||
| 	 * | ||||
| 	 * @param   string	$vName	The name of the active view. | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public static function addSubmenu($vName) | ||||
| 	{ | ||||
| 		JHtmlSidebar::addEntry( | ||||
| 			JText::_('JGLOBAL_ARTICLES'), | ||||
| 			'index.php?option=com_content&view=articles', | ||||
| 			$vName == 'articles' | ||||
| 		); | ||||
| 		JHtmlSidebar::addEntry( | ||||
| 			JText::_('COM_CONTENT_SUBMENU_CATEGORIES'), | ||||
| 			'index.php?option=com_categories&extension=com_content', | ||||
| 			$vName == 'categories'); | ||||
| 		JHtmlSidebar::addEntry( | ||||
| 			JText::_('COM_CONTENT_SUBMENU_FEATURED'), | ||||
| 			'index.php?option=com_content&view=featured', | ||||
| 			$vName == 'featured' | ||||
| 		); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Gets a list of the actions that can be performed. | ||||
| 	 * | ||||
| 	 * @param   integer  The category ID. | ||||
| 	 * @param   integer  The article ID. | ||||
| 	 * | ||||
| 	 * @return  JObject | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public static function getActions($categoryId = 0, $articleId = 0) | ||||
| 	{ | ||||
| 		// Reverted a change for version 2.5.6 | ||||
| 		$user	= JFactory::getUser(); | ||||
| 		$result	= new JObject; | ||||
|  | ||||
| 		if (empty($articleId) && empty($categoryId)) | ||||
| 		{ | ||||
| 			$assetName = 'com_content'; | ||||
| 		} | ||||
| 		elseif (empty($articleId)) | ||||
| 		{ | ||||
| 			$assetName = 'com_content.category.'.(int) $categoryId; | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			$assetName = 'com_content.article.'.(int) $articleId; | ||||
| 		} | ||||
|  | ||||
| 		$actions = array( | ||||
| 			'core.admin', 'core.manage', 'core.create', 'core.edit', 'core.edit.own', 'core.edit.state', 'core.delete' | ||||
| 		); | ||||
|  | ||||
| 		foreach ($actions as $action) | ||||
| 		{ | ||||
| 			$result->set($action,	$user->authorise($action, $assetName)); | ||||
| 		} | ||||
|  | ||||
| 		return $result; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Applies the content tag filters to arbitrary text as per settings for current user group | ||||
| 	 * | ||||
| 	 * @param   text  $text  The string to filter | ||||
| 	 * | ||||
| 	 * @return  string  The filtered string | ||||
| 	 * | ||||
| 	 * @deprecated  4.0  Use JComponentHelper::filterText() instead. | ||||
| 	*/ | ||||
| 	public static function filterText($text) | ||||
| 	{ | ||||
| 		JLog::add('ContentHelper::filterText() is deprecated. Use JComponentHelper::filterText() instead.', JLog::WARNING, 'deprecated'); | ||||
|  | ||||
| 		return JComponentHelper::filterText($text); | ||||
| 	} | ||||
| } | ||||
| @ -0,0 +1,126 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| JLoader::register('ContentHelper', JPATH_ADMINISTRATOR . '/components/com_content/helpers/content.php'); | ||||
|  | ||||
| /** | ||||
|  * Content HTML helper | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @since       3.0 | ||||
|  */ | ||||
| abstract class JHtmlContentAdministrator | ||||
| { | ||||
| 	/** | ||||
| 	 * Render the list of associated items | ||||
| 	 * | ||||
| 	 * @param   int  $articleid  The article item id | ||||
| 	 * | ||||
| 	 * @return  string  The language HTML | ||||
| 	 */ | ||||
| 	public static function association($articleid) | ||||
| 	{ | ||||
| 		// Defaults | ||||
| 		$html = ''; | ||||
|  | ||||
| 		// Get the associations | ||||
| 		if ($associations = JLanguageAssociations::getAssociations('com_content', '#__content', 'com_content.item', $articleid)) | ||||
| 		{ | ||||
| 			foreach ($associations as $tag => $associated) | ||||
| 			{ | ||||
| 				$associations[$tag] = (int) $associated->id; | ||||
| 			} | ||||
|  | ||||
| 			// Get the associated menu items | ||||
| 			$db = JFactory::getDbo(); | ||||
| 			$query = $db->getQuery(true) | ||||
| 				->select('c.*') | ||||
| 				->select('l.sef as lang_sef') | ||||
| 				->from('#__content as c') | ||||
| 				->select('cat.title as category_title') | ||||
| 				->join('LEFT', '#__categories as cat ON cat.id=c.catid') | ||||
| 				->where('c.id IN (' . implode(',', array_values($associations)) . ')') | ||||
| 				->join('LEFT', '#__languages as l ON c.language=l.lang_code') | ||||
| 				->select('l.image') | ||||
| 				->select('l.title as language_title'); | ||||
| 			$db->setQuery($query); | ||||
|  | ||||
| 			try | ||||
| 			{ | ||||
| 				$items = $db->loadObjectList('id'); | ||||
| 			} | ||||
| 			catch (RuntimeException $e) | ||||
| 			{ | ||||
| 				throw new Exception($e->getMessage(), 500); | ||||
| 			} | ||||
|  | ||||
| 			if ($items) | ||||
| 			{ | ||||
| 				foreach ($items as &$item) | ||||
| 				{ | ||||
| 					$text = strtoupper($item->lang_sef); | ||||
| 					$url = JRoute::_('index.php?option=com_content&task=article.edit&id=' . (int) $item->id); | ||||
| 					$tooltipParts = array( | ||||
| 						JHtml::_('image', 'mod_languages/' . $item->image . '.gif', | ||||
| 							$item->language_title, | ||||
| 							array('title' => $item->language_title), | ||||
| 							true | ||||
| 						), | ||||
| 						$item->title, | ||||
| 						'(' . $item->category_title . ')' | ||||
| 					); | ||||
| 					$item->link = JHtml::_('tooltip', implode(' ', $tooltipParts), null, null, $text, $url, null, 'hasTooltip label label-association label-' . $item->lang_sef); | ||||
| 				} | ||||
| 			} | ||||
|  | ||||
| 			$html = JLayoutHelper::render('joomla.content.associations', $items); | ||||
| 		} | ||||
|  | ||||
| 		return $html; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Show the feature/unfeature links | ||||
| 	 * | ||||
| 	 * @param   int      $value      The state value | ||||
| 	 * @param   int      $i          Row number | ||||
| 	 * @param   boolean  $canChange  Is user allowed to change? | ||||
| 	 * | ||||
| 	 * @return  string       HTML code | ||||
| 	 */ | ||||
| 	public static function featured($value = 0, $i, $canChange = true) | ||||
| 	{ | ||||
| 		JHtml::_('bootstrap.tooltip'); | ||||
|  | ||||
| 		// Array of image, task, title, action | ||||
| 		$states	= array( | ||||
| 			0	=> array('unfeatured',	'articles.featured',	'COM_CONTENT_UNFEATURED',	'COM_CONTENT_TOGGLE_TO_FEATURE'), | ||||
| 			1	=> array('featured',	'articles.unfeatured',	'COM_CONTENT_FEATURED',		'COM_CONTENT_TOGGLE_TO_UNFEATURE'), | ||||
| 		); | ||||
| 		$state	= JArrayHelper::getValue($states, (int) $value, $states[1]); | ||||
| 		$icon	= $state[0]; | ||||
|  | ||||
| 		if ($canChange) | ||||
| 		{ | ||||
| 			$html	= '<a href="#" onclick="return listItemTask(\'cb' . $i . '\',\'' . $state[1] . '\')" class="btn btn-micro hasTooltip' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[3]) . '"><i class="icon-' | ||||
| 					. $icon . '"></i></a>'; | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			$html	= '<a class="btn btn-micro hasTooltip disabled' . ($value == 1 ? ' active' : '') . '" title="' . JHtml::tooltipText($state[2]) . '"><i class="icon-' | ||||
| 					. $icon . '"></i></a>'; | ||||
| 		} | ||||
|  | ||||
| 		return $html; | ||||
| 	} | ||||
| } | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										1
									
								
								administrator/components/com_content/helpers/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								administrator/components/com_content/helpers/index.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										1
									
								
								administrator/components/com_content/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								administrator/components/com_content/index.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										725
									
								
								administrator/components/com_content/models/article.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										725
									
								
								administrator/components/com_content/models/article.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,725 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| require_once JPATH_COMPONENT_ADMINISTRATOR . '/helpers/content.php'; | ||||
|  | ||||
| /** | ||||
|  * Item Model for an Article. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class ContentModelArticle extends JModelAdmin | ||||
| { | ||||
| 	/** | ||||
| 	 * @var        string    The prefix to use with controller messages. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected $text_prefix = 'COM_CONTENT'; | ||||
|  | ||||
| 	/** | ||||
| 	 * Batch copy items to a new category or current. | ||||
| 	 * | ||||
| 	 * @param   integer  $value     The new category. | ||||
| 	 * @param   array    $pks       An array of row IDs. | ||||
| 	 * @param   array    $contexts  An array of item contexts. | ||||
| 	 * | ||||
| 	 * @return  mixed  An array of new IDs on success, boolean false on failure. | ||||
| 	 * | ||||
| 	 * @since   11.1 | ||||
| 	 */ | ||||
| 	protected function batchCopy($value, $pks, $contexts) | ||||
| 	{ | ||||
| 		$categoryId = (int) $value; | ||||
|  | ||||
| 		$table = $this->getTable(); | ||||
| 		$i = 0; | ||||
|  | ||||
| 		// Check that the category exists | ||||
| 		if ($categoryId) | ||||
| 		{ | ||||
| 			$categoryTable = JTable::getInstance('Category'); | ||||
| 			if (!$categoryTable->load($categoryId)) | ||||
| 			{ | ||||
| 				if ($error = $categoryTable->getError()) | ||||
| 				{ | ||||
| 					// Fatal error | ||||
| 					$this->setError($error); | ||||
| 					return false; | ||||
| 				} | ||||
| 				else | ||||
| 				{ | ||||
| 					$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_MOVE_CATEGORY_NOT_FOUND')); | ||||
| 					return false; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		if (empty($categoryId)) | ||||
| 		{ | ||||
| 			$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_MOVE_CATEGORY_NOT_FOUND')); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		// Check that the user has create permission for the component | ||||
| 		$extension = JFactory::getApplication()->input->get('option', ''); | ||||
| 		$user = JFactory::getUser(); | ||||
| 		if (!$user->authorise('core.create', $extension . '.category.' . $categoryId)) | ||||
| 		{ | ||||
| 			$this->setError(JText::_('JLIB_APPLICATION_ERROR_BATCH_CANNOT_CREATE')); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		// Parent exists so we let's proceed | ||||
| 		while (!empty($pks)) | ||||
| 		{ | ||||
| 			// Pop the first ID off the stack | ||||
| 			$pk = array_shift($pks); | ||||
|  | ||||
| 			$table->reset(); | ||||
|  | ||||
| 			// Check that the row actually exists | ||||
| 			if (!$table->load($pk)) | ||||
| 			{ | ||||
| 				if ($error = $table->getError()) | ||||
| 				{ | ||||
| 					// Fatal error | ||||
| 					$this->setError($error); | ||||
| 					return false; | ||||
| 				} | ||||
| 				else | ||||
| 				{ | ||||
| 					// Not fatal error | ||||
| 					$this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_BATCH_MOVE_ROW_NOT_FOUND', $pk)); | ||||
| 					continue; | ||||
| 				} | ||||
| 			} | ||||
|  | ||||
| 			// Alter the title & alias | ||||
| 			$data = $this->generateNewTitle($categoryId, $table->alias, $table->title); | ||||
| 			$table->title = $data['0']; | ||||
| 			$table->alias = $data['1']; | ||||
|  | ||||
| 			// Reset the ID because we are making a copy | ||||
| 			$table->id = 0; | ||||
|  | ||||
| 			// New category ID | ||||
| 			$table->catid = $categoryId; | ||||
|  | ||||
| 			// TODO: Deal with ordering? | ||||
| 			//$table->ordering	= 1; | ||||
|  | ||||
| 			// Get the featured state | ||||
| 			$featured = $table->featured; | ||||
|  | ||||
| 			// Check the row. | ||||
| 			if (!$table->check()) | ||||
| 			{ | ||||
| 				$this->setError($table->getError()); | ||||
| 				return false; | ||||
| 			} | ||||
|  | ||||
| 			// Store the row. | ||||
| 			if (!$table->store()) | ||||
| 			{ | ||||
| 				$this->setError($table->getError()); | ||||
| 				return false; | ||||
| 			} | ||||
|  | ||||
| 			// Get the new item ID | ||||
| 			$newId = $table->get('id'); | ||||
|  | ||||
| 			// Add the new ID to the array | ||||
| 			$newIds[$i] = $newId; | ||||
| 			$i++; | ||||
|  | ||||
| 			// Check if the article was featured and update the #__content_frontpage table | ||||
| 			if ($featured == 1) | ||||
| 			{ | ||||
| 				$db = $this->getDbo(); | ||||
| 				$query = $db->getQuery(true) | ||||
| 					->insert($db->quoteName('#__content_frontpage')) | ||||
| 					->values($newId . ', 0'); | ||||
| 				$db->setQuery($query); | ||||
| 				$db->execute(); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		// Clean the cache | ||||
| 		$this->cleanCache(); | ||||
|  | ||||
| 		return $newIds; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to test whether a record can be deleted. | ||||
| 	 * | ||||
| 	 * @param   object    $record    A record object. | ||||
| 	 * | ||||
| 	 * @return  boolean  True if allowed to delete the record. Defaults to the permission set in the component. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function canDelete($record) | ||||
| 	{ | ||||
| 		if (!empty($record->id)) | ||||
| 		{ | ||||
| 			if ($record->state != -2) | ||||
| 			{ | ||||
| 				return; | ||||
| 			} | ||||
| 			$user = JFactory::getUser(); | ||||
| 			return $user->authorise('core.delete', 'com_content.article.' . (int) $record->id); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to test whether a record can have its state edited. | ||||
| 	 * | ||||
| 	 * @param   object    $record    A record object. | ||||
| 	 * | ||||
| 	 * @return  boolean  True if allowed to change the state of the record. Defaults to the permission set in the component. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function canEditState($record) | ||||
| 	{ | ||||
| 		$user = JFactory::getUser(); | ||||
|  | ||||
| 		// Check for existing article. | ||||
| 		if (!empty($record->id)) | ||||
| 		{ | ||||
| 			return $user->authorise('core.edit.state', 'com_content.article.' . (int) $record->id); | ||||
| 		} | ||||
| 		// New article, so check against the category. | ||||
| 		elseif (!empty($record->catid)) | ||||
| 		{ | ||||
| 			return $user->authorise('core.edit.state', 'com_content.category.' . (int) $record->catid); | ||||
| 		} | ||||
| 		// Default to component settings if neither article nor category known. | ||||
| 		else | ||||
| 		{ | ||||
| 			return parent::canEditState('com_content'); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Prepare and sanitise the table data prior to saving. | ||||
| 	 * | ||||
| 	 * @param   JTable    A JTable object. | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function prepareTable($table) | ||||
| 	{ | ||||
| 		// Set the publish date to now | ||||
| 		$db = $this->getDbo(); | ||||
| 		if ($table->state == 1 && (int) $table->publish_up == 0) | ||||
| 		{ | ||||
| 			$table->publish_up = JFactory::getDate()->toSql(); | ||||
| 		} | ||||
|  | ||||
| 		if ($table->state == 1 && intval($table->publish_down) == 0) | ||||
| 		{ | ||||
| 			$table->publish_down = $db->getNullDate(); | ||||
| 		} | ||||
|  | ||||
| 		// Increment the content version number. | ||||
| 		$table->version++; | ||||
|  | ||||
| 		// Reorder the articles within the category so the new article is first | ||||
| 		if (empty($table->id)) | ||||
| 		{ | ||||
| 			$table->reorder('catid = ' . (int) $table->catid . ' AND state >= 0'); | ||||
| 		} | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Returns a Table object, always creating it. | ||||
| 	 * | ||||
| 	 * @param   type      The table type to instantiate | ||||
| 	 * @param   string    A prefix for the table class name. Optional. | ||||
| 	 * @param   array     Configuration array for model. Optional. | ||||
| 	 * | ||||
| 	 * @return  JTable    A database object | ||||
| 	 */ | ||||
| 	public function getTable($type = 'Content', $prefix = 'JTable', $config = array()) | ||||
| 	{ | ||||
| 		return JTable::getInstance($type, $prefix, $config); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to get a single record. | ||||
| 	 * | ||||
| 	 * @param   integer    The id of the primary key. | ||||
| 	 * | ||||
| 	 * @return  mixed  Object on success, false on failure. | ||||
| 	 */ | ||||
| 	public function getItem($pk = null) | ||||
| 	{ | ||||
| 		if ($item = parent::getItem($pk)) | ||||
| 		{ | ||||
| 			// Convert the params field to an array. | ||||
| 			$registry = new JRegistry; | ||||
| 			$registry->loadString($item->attribs); | ||||
| 			$item->attribs = $registry->toArray(); | ||||
|  | ||||
| 			// Convert the metadata field to an array. | ||||
| 			$registry = new JRegistry; | ||||
| 			$registry->loadString($item->metadata); | ||||
| 			$item->metadata = $registry->toArray(); | ||||
|  | ||||
| 			// Convert the images field to an array. | ||||
| 			$registry = new JRegistry; | ||||
| 			$registry->loadString($item->images); | ||||
| 			$item->images = $registry->toArray(); | ||||
|  | ||||
| 			// Convert the urls field to an array. | ||||
| 			$registry = new JRegistry; | ||||
| 			$registry->loadString($item->urls); | ||||
| 			$item->urls = $registry->toArray(); | ||||
|  | ||||
| 			$item->articletext = trim($item->fulltext) != '' ? $item->introtext . "<hr id=\"system-readmore\" />" . $item->fulltext : $item->introtext; | ||||
|  | ||||
| 			if (!empty($item->id)) | ||||
| 			{ | ||||
| 				$item->tags = new JHelperTags; | ||||
| 				$item->tags->getTagIds($item->id, 'com_content.article'); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		// Load associated content items | ||||
| 		$app = JFactory::getApplication(); | ||||
| 		$assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
|  | ||||
| 		if ($assoc) | ||||
| 		{ | ||||
| 			$item->associations = array(); | ||||
|  | ||||
| 			if ($item->id != null) | ||||
| 			{ | ||||
| 				$associations = JLanguageAssociations::getAssociations('com_content', '#__content', 'com_content.item', $item->id); | ||||
|  | ||||
| 				foreach ($associations as $tag => $association) | ||||
| 				{ | ||||
| 					$item->associations[$tag] = $association->id; | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		return $item; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to get the record form. | ||||
| 	 * | ||||
| 	 * @param   array      $data        Data for the form. | ||||
| 	 * @param   boolean    $loadData    True if the form is to load its own data (default case), false if not. | ||||
| 	 * | ||||
| 	 * @return  mixed  A JForm object on success, false on failure | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function getForm($data = array(), $loadData = true) | ||||
| 	{ | ||||
| 		// Get the form. | ||||
| 		$form = $this->loadForm('com_content.article', 'article', array('control' => 'jform', 'load_data' => $loadData)); | ||||
| 		if (empty($form)) | ||||
| 		{ | ||||
| 			return false; | ||||
| 		} | ||||
| 		$jinput = JFactory::getApplication()->input; | ||||
|  | ||||
| 		// The front end calls this model and uses a_id to avoid id clashes so we need to check for that first. | ||||
| 		if ($jinput->get('a_id')) | ||||
| 		{ | ||||
| 			$id = $jinput->get('a_id', 0); | ||||
| 		} | ||||
| 		// The back end uses id so we use that the rest of the time and set it to 0 by default. | ||||
| 		else | ||||
| 		{ | ||||
| 			$id = $jinput->get('id', 0); | ||||
| 		} | ||||
| 		// Determine correct permissions to check. | ||||
| 		if ($this->getState('article.id')) | ||||
| 		{ | ||||
| 			$id = $this->getState('article.id'); | ||||
| 			// Existing record. Can only edit in selected categories. | ||||
| 			$form->setFieldAttribute('catid', 'action', 'core.edit'); | ||||
| 			// Existing record. Can only edit own articles in selected categories. | ||||
| 			$form->setFieldAttribute('catid', 'action', 'core.edit.own'); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			// New record. Can only create in selected categories. | ||||
| 			$form->setFieldAttribute('catid', 'action', 'core.create'); | ||||
| 		} | ||||
|  | ||||
| 		$user = JFactory::getUser(); | ||||
|  | ||||
| 		// Check for existing article. | ||||
| 		// Modify the form based on Edit State access controls. | ||||
| 		if ($id != 0 && (!$user->authorise('core.edit.state', 'com_content.article.' . (int) $id)) | ||||
| 			|| ($id == 0 && !$user->authorise('core.edit.state', 'com_content')) | ||||
| 		) | ||||
| 		{ | ||||
| 			// Disable fields for display. | ||||
| 			$form->setFieldAttribute('featured', 'disabled', 'true'); | ||||
| 			$form->setFieldAttribute('ordering', 'disabled', 'true'); | ||||
| 			$form->setFieldAttribute('publish_up', 'disabled', 'true'); | ||||
| 			$form->setFieldAttribute('publish_down', 'disabled', 'true'); | ||||
| 			$form->setFieldAttribute('state', 'disabled', 'true'); | ||||
|  | ||||
| 			// Disable fields while saving. | ||||
| 			// The controller has already verified this is an article you can edit. | ||||
| 			$form->setFieldAttribute('featured', 'filter', 'unset'); | ||||
| 			$form->setFieldAttribute('ordering', 'filter', 'unset'); | ||||
| 			$form->setFieldAttribute('publish_up', 'filter', 'unset'); | ||||
| 			$form->setFieldAttribute('publish_down', 'filter', 'unset'); | ||||
| 			$form->setFieldAttribute('state', 'filter', 'unset'); | ||||
| 		} | ||||
|  | ||||
| 		// Prevent messing with article language and category when editing existing article with associations | ||||
| 		$app = JFactory::getApplication(); | ||||
| 		$assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
|  | ||||
| 		if ($app->isSite() && $assoc && $this->getState('article.id')) | ||||
| 		{ | ||||
| 			$form->setFieldAttribute('language', 'readonly', 'true'); | ||||
| 			$form->setFieldAttribute('catid', 'readonly', 'true'); | ||||
| 			$form->setFieldAttribute('language', 'filter', 'unset'); | ||||
| 			$form->setFieldAttribute('catid', 'filter', 'unset'); | ||||
| 		} | ||||
|  | ||||
| 		return $form; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to get the data that should be injected in the form. | ||||
| 	 * | ||||
| 	 * @return  mixed  The data for the form. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function loadFormData() | ||||
| 	{ | ||||
| 		// Check the session for previously entered form data. | ||||
| 		$app = JFactory::getApplication(); | ||||
| 		$data = $app->getUserState('com_content.edit.article.data', array()); | ||||
|  | ||||
| 		if (empty($data)) | ||||
| 		{ | ||||
| 			$data = $this->getItem(); | ||||
|  | ||||
| 			// Prime some default values. | ||||
| 			if ($this->getState('article.id') == 0) | ||||
| 			{ | ||||
| 				$data->set('catid', $app->input->getInt('catid', $app->getUserState('com_content.articles.filter.category_id'))); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		$this->preprocessData('com_content.article', $data); | ||||
|  | ||||
| 		return $data; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to save the form data. | ||||
| 	 * | ||||
| 	 * @param   array  The form data. | ||||
| 	 * | ||||
| 	 * @return  boolean  True on success. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function save($data) | ||||
| 	{ | ||||
| 		$app = JFactory::getApplication(); | ||||
|  | ||||
| 		if (isset($data['images']) && is_array($data['images'])) | ||||
| 		{ | ||||
| 			$registry = new JRegistry; | ||||
| 			$registry->loadArray($data['images']); | ||||
| 			$data['images'] = (string) $registry; | ||||
| 		} | ||||
|  | ||||
| 		if (isset($data['urls']) && is_array($data['urls'])) | ||||
| 		{ | ||||
|  | ||||
| 			foreach ($data['urls'] as $i => $url) | ||||
| 			{ | ||||
| 				if ($url != false && ($i == 'urla' || $i == 'urlb' || $i = 'urlc')) | ||||
| 				{ | ||||
| 					$data['urls'][$i] = JStringPunycode::urlToPunycode($url); | ||||
| 				} | ||||
|  | ||||
| 			} | ||||
| 			$registry = new JRegistry; | ||||
| 			$registry->loadArray($data['urls']); | ||||
| 			$data['urls'] = (string) $registry; | ||||
| 		} | ||||
|  | ||||
| 		// Alter the title for save as copy | ||||
| 		if ($app->input->get('task') == 'save2copy') | ||||
| 		{ | ||||
| 			list($title, $alias) = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']); | ||||
| 			$data['title'] = $title; | ||||
| 			$data['alias'] = $alias; | ||||
| 			$data['state'] = 0; | ||||
| 		} | ||||
|  | ||||
| 		if (parent::save($data)) | ||||
| 		{ | ||||
|  | ||||
| 			if (isset($data['featured'])) | ||||
| 			{ | ||||
| 				$this->featured($this->getState($this->getName() . '.id'), $data['featured']); | ||||
| 			} | ||||
|  | ||||
| 			$assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
| 			if ($assoc) | ||||
| 			{ | ||||
| 				$id = (int) $this->getState($this->getName() . '.id'); | ||||
| 				$item = $this->getItem($id); | ||||
|  | ||||
| 				// Adding self to the association | ||||
| 				$associations = $data['associations']; | ||||
|  | ||||
| 				foreach ($associations as $tag => $id) | ||||
| 				{ | ||||
| 					if (empty($id)) | ||||
| 					{ | ||||
| 						unset($associations[$tag]); | ||||
| 					} | ||||
| 				} | ||||
|  | ||||
| 				// Detecting all item menus | ||||
| 				$all_language = $item->language == '*'; | ||||
|  | ||||
| 				if ($all_language && !empty($associations)) | ||||
| 				{ | ||||
| 					JError::raiseNotice(403, JText::_('COM_CONTENT_ERROR_ALL_LANGUAGE_ASSOCIATED')); | ||||
| 				} | ||||
|  | ||||
| 				$associations[$item->language] = $item->id; | ||||
|  | ||||
| 				// Deleting old association for these items | ||||
| 				$db = JFactory::getDbo(); | ||||
| 				$query = $db->getQuery(true) | ||||
| 					->delete('#__associations') | ||||
| 					->where('context=' . $db->quote('com_content.item')) | ||||
| 					->where('id IN (' . implode(',', $associations) . ')'); | ||||
| 				$db->setQuery($query); | ||||
| 				$db->execute(); | ||||
|  | ||||
| 				if ($error = $db->getErrorMsg()) | ||||
| 				{ | ||||
| 					$this->setError($error); | ||||
| 					return false; | ||||
| 				} | ||||
|  | ||||
| 				if (!$all_language && count($associations)) | ||||
| 				{ | ||||
| 					// Adding new association for these items | ||||
| 					$key = md5(json_encode($associations)); | ||||
| 					$query->clear() | ||||
| 						->insert('#__associations'); | ||||
|  | ||||
| 					foreach ($associations as $id) | ||||
| 					{ | ||||
| 						$query->values($id . ',' . $db->quote('com_content.item') . ',' . $db->quote($key)); | ||||
| 					} | ||||
|  | ||||
| 					$db->setQuery($query); | ||||
| 					$db->execute(); | ||||
|  | ||||
| 					if ($error = $db->getErrorMsg()) | ||||
| 					{ | ||||
| 						$this->setError($error); | ||||
| 						return false; | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
|  | ||||
| 			return true; | ||||
| 		} | ||||
|  | ||||
| 		return false; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to toggle the featured setting of articles. | ||||
| 	 * | ||||
| 	 * @param   array    The ids of the items to toggle. | ||||
| 	 * @param   integer  The value to toggle to. | ||||
| 	 * | ||||
| 	 * @return  boolean  True on success. | ||||
| 	 */ | ||||
| 	public function featured($pks, $value = 0) | ||||
| 	{ | ||||
| 		// Sanitize the ids. | ||||
| 		$pks = (array) $pks; | ||||
| 		JArrayHelper::toInteger($pks); | ||||
|  | ||||
| 		if (empty($pks)) | ||||
| 		{ | ||||
| 			$this->setError(JText::_('COM_CONTENT_NO_ITEM_SELECTED')); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		$table = $this->getTable('Featured', 'ContentTable'); | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$db = $this->getDbo(); | ||||
| 			$query = $db->getQuery(true) | ||||
| 						->update($db->quoteName('#__content')) | ||||
| 						->set('featured = ' . (int) $value) | ||||
| 						->where('id IN (' . implode(',', $pks) . ')'); | ||||
| 			$db->setQuery($query); | ||||
| 			$db->execute(); | ||||
|  | ||||
| 			if ((int) $value == 0) | ||||
| 			{ | ||||
| 				// Adjust the mapping table. | ||||
| 				// Clear the existing features settings. | ||||
| 				$query = $db->getQuery(true) | ||||
| 							->delete($db->quoteName('#__content_frontpage')) | ||||
| 							->where('content_id IN (' . implode(',', $pks) . ')'); | ||||
| 				$db->setQuery($query); | ||||
| 				$db->execute(); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				// first, we find out which of our new featured articles are already featured. | ||||
| 				$query = $db->getQuery(true) | ||||
| 					->select('f.content_id') | ||||
| 					->from('#__content_frontpage AS f') | ||||
| 					->where('content_id IN (' . implode(',', $pks) . ')'); | ||||
| 				//echo $query; | ||||
| 				$db->setQuery($query); | ||||
|  | ||||
| 				$old_featured = $db->loadColumn(); | ||||
|  | ||||
| 				// we diff the arrays to get a list of the articles that are newly featured | ||||
| 				$new_featured = array_diff($pks, $old_featured); | ||||
|  | ||||
| 				// Featuring. | ||||
| 				$tuples = array(); | ||||
| 				foreach ($new_featured as $pk) | ||||
| 				{ | ||||
| 					$tuples[] = $pk . ', 0'; | ||||
| 				} | ||||
| 				if (count($tuples)) | ||||
| 				{ | ||||
| 					$db = $this->getDbo(); | ||||
| 					$columns = array('content_id', 'ordering'); | ||||
| 					$query = $db->getQuery(true) | ||||
| 						->insert($db->quoteName('#__content_frontpage')) | ||||
| 						->columns($db->quoteName($columns)) | ||||
| 						->values($tuples); | ||||
| 					$db->setQuery($query); | ||||
| 					$db->execute(); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		catch (Exception $e) | ||||
| 		{ | ||||
| 			$this->setError($e->getMessage()); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		$table->reorder(); | ||||
|  | ||||
| 		$this->cleanCache(); | ||||
|  | ||||
| 		return true; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * A protected method to get a set of ordering conditions. | ||||
| 	 * | ||||
| 	 * @param   object    A record object. | ||||
| 	 * | ||||
| 	 * @return  array  An array of conditions to add to add to ordering queries. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function getReorderConditions($table) | ||||
| 	{ | ||||
| 		$condition = array(); | ||||
| 		$condition[] = 'catid = ' . (int) $table->catid; | ||||
| 		return $condition; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Auto-populate the model state. | ||||
| 	 * | ||||
| 	 * Note. Calling getState in this method will result in recursion. | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 * @since    3.0 | ||||
| 	 */ | ||||
| 	protected function preprocessForm(JForm $form, $data, $group = 'content') | ||||
| 	{ | ||||
| 		// Association content items | ||||
| 		$app = JFactory::getApplication(); | ||||
| 		$assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
| 		if ($assoc) | ||||
| 		{ | ||||
| 			$languages = JLanguageHelper::getLanguages('lang_code'); | ||||
|  | ||||
| 			// force to array (perhaps move to $this->loadFormData()) | ||||
| 			$data = (array) $data; | ||||
|  | ||||
| 			$addform = new SimpleXMLElement('<form />'); | ||||
| 			$fields = $addform->addChild('fields'); | ||||
| 			$fields->addAttribute('name', 'associations'); | ||||
| 			$fieldset = $fields->addChild('fieldset'); | ||||
| 			$fieldset->addAttribute('name', 'item_associations'); | ||||
| 			$fieldset->addAttribute('description', 'COM_CONTENT_ITEM_ASSOCIATIONS_FIELDSET_DESC'); | ||||
| 			$add = false; | ||||
| 			foreach ($languages as $tag => $language) | ||||
| 			{ | ||||
| 				if (empty($data['language']) || $tag != $data['language']) | ||||
| 				{ | ||||
| 					$add = true; | ||||
| 					$field = $fieldset->addChild('field'); | ||||
| 					$field->addAttribute('name', $tag); | ||||
| 					$field->addAttribute('type', 'modal_article'); | ||||
| 					$field->addAttribute('language', $tag); | ||||
| 					$field->addAttribute('label', $language->title); | ||||
| 					$field->addAttribute('translate_label', 'false'); | ||||
| 					$field->addAttribute('edit', 'true'); | ||||
| 					$field->addAttribute('clear', 'true'); | ||||
| 				} | ||||
| 			} | ||||
| 			if ($add) | ||||
| 			{ | ||||
| 				$form->load($addform, false); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		parent::preprocessForm($form, $data, $group); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Custom clean the cache of com_content and content modules | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function cleanCache($group = null, $client_id = 0) | ||||
| 	{ | ||||
| 		parent::cleanCache('com_content'); | ||||
| 		parent::cleanCache('mod_articles_archive'); | ||||
| 		parent::cleanCache('mod_articles_categories'); | ||||
| 		parent::cleanCache('mod_articles_category'); | ||||
| 		parent::cleanCache('mod_articles_latest'); | ||||
| 		parent::cleanCache('mod_articles_news'); | ||||
| 		parent::cleanCache('mod_articles_popular'); | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										372
									
								
								administrator/components/com_content/models/articles.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										372
									
								
								administrator/components/com_content/models/articles.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,372 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * Methods supporting a list of article records. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  */ | ||||
| class ContentModelArticles extends JModelList | ||||
| { | ||||
| 	/** | ||||
| 	 * Constructor. | ||||
| 	 * | ||||
| 	 * @param   array  $config  An optional associative array of configuration settings. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 * @see     JController | ||||
| 	 */ | ||||
| 	public function __construct($config = array()) | ||||
| 	{ | ||||
| 		if (empty($config['filter_fields'])) | ||||
| 		{ | ||||
| 			$config['filter_fields'] = array( | ||||
| 				'id', 'a.id', | ||||
| 				'title', 'a.title', | ||||
| 				'alias', 'a.alias', | ||||
| 				'checked_out', 'a.checked_out', | ||||
| 				'checked_out_time', 'a.checked_out_time', | ||||
| 				'catid', 'a.catid', 'category_title', | ||||
| 				'state', 'a.state', | ||||
| 				'access', 'a.access', 'access_level', | ||||
| 				'created', 'a.created', | ||||
| 				'created_by', 'a.created_by', | ||||
| 				'created_by_alias', 'a.created_by_alias', | ||||
| 				'ordering', 'a.ordering', | ||||
| 				'featured', 'a.featured', | ||||
| 				'language', 'a.language', | ||||
| 				'hits', 'a.hits', | ||||
| 				'publish_up', 'a.publish_up', | ||||
| 				'publish_down', 'a.publish_down', | ||||
| 			); | ||||
|  | ||||
| 			$app = JFactory::getApplication(); | ||||
| 			$assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
| 			if ($assoc) | ||||
| 			{ | ||||
| 				$config['filter_fields'][] = 'association'; | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		parent::__construct($config); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to auto-populate the model state. | ||||
| 	 * | ||||
| 	 * Note. Calling getState in this method will result in recursion. | ||||
| 	 * | ||||
| 	 * @param   string  $ordering   An optional ordering field. | ||||
| 	 * @param   string  $direction  An optional direction (asc|desc). | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function populateState($ordering = null, $direction = null) | ||||
| 	{ | ||||
| 		$app = JFactory::getApplication(); | ||||
|  | ||||
| 		// Adjust the context to support modal layouts. | ||||
| 		if ($layout = $app->input->get('layout')) | ||||
| 		{ | ||||
| 			$this->context .= '.' . $layout; | ||||
| 		} | ||||
|  | ||||
| 		$search = $this->getUserStateFromRequest($this->context . '.filter.search', 'filter_search'); | ||||
| 		$this->setState('filter.search', $search); | ||||
|  | ||||
| 		$access = $this->getUserStateFromRequest($this->context . '.filter.access', 'filter_access', 0, 'int'); | ||||
| 		$this->setState('filter.access', $access); | ||||
|  | ||||
| 		$authorId = $app->getUserStateFromRequest($this->context . '.filter.author_id', 'filter_author_id'); | ||||
| 		$this->setState('filter.author_id', $authorId); | ||||
|  | ||||
| 		$published = $this->getUserStateFromRequest($this->context . '.filter.published', 'filter_published', ''); | ||||
| 		$this->setState('filter.published', $published); | ||||
|  | ||||
| 		$categoryId = $this->getUserStateFromRequest($this->context . '.filter.category_id', 'filter_category_id'); | ||||
| 		$this->setState('filter.category_id', $categoryId); | ||||
|  | ||||
| 		$level = $this->getUserStateFromRequest($this->context . '.filter.level', 'filter_level', 0, 'int'); | ||||
| 		$this->setState('filter.level', $level); | ||||
|  | ||||
| 		$language = $this->getUserStateFromRequest($this->context . '.filter.language', 'filter_language', ''); | ||||
| 		$this->setState('filter.language', $language); | ||||
|  | ||||
| 		// force a language | ||||
| 		$forcedLanguage = $app->input->get('forcedLanguage'); | ||||
| 		if (!empty($forcedLanguage)) | ||||
| 		{ | ||||
| 			$this->setState('filter.language', $forcedLanguage); | ||||
| 			$this->setState('filter.forcedLanguage', $forcedLanguage); | ||||
| 		} | ||||
|  | ||||
| 		$tag = $this->getUserStateFromRequest($this->context . '.filter.tag', 'filter_tag', ''); | ||||
| 		$this->setState('filter.tag', $tag); | ||||
|  | ||||
| 		// List state information. | ||||
| 		parent::populateState('a.title', 'asc'); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to get a store id based on model configuration state. | ||||
| 	 * | ||||
| 	 * This is necessary because the model is used by the component and | ||||
| 	 * different modules that might need different sets of data or different | ||||
| 	 * ordering requirements. | ||||
| 	 * | ||||
| 	 * @param   string  $id    A prefix for the store id. | ||||
| 	 * | ||||
| 	 * @return  string  A store id. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function getStoreId($id = '') | ||||
| 	{ | ||||
| 		// Compile the store id. | ||||
| 		$id .= ':' . $this->getState('filter.search'); | ||||
| 		$id .= ':' . $this->getState('filter.access'); | ||||
| 		$id .= ':' . $this->getState('filter.published'); | ||||
| 		$id .= ':' . $this->getState('filter.category_id'); | ||||
| 		$id .= ':' . $this->getState('filter.author_id'); | ||||
| 		$id .= ':' . $this->getState('filter.language'); | ||||
|  | ||||
| 		return parent::getStoreId($id); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Build an SQL query to load the list data. | ||||
| 	 * | ||||
| 	 * @return  JDatabaseQuery | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function getListQuery() | ||||
| 	{ | ||||
| 		// Create a new query object. | ||||
| 		$db = $this->getDbo(); | ||||
| 		$query = $db->getQuery(true); | ||||
| 		$user = JFactory::getUser(); | ||||
| 		$app = JFactory::getApplication(); | ||||
|  | ||||
| 		// Select the required fields from the table. | ||||
| 		$query->select( | ||||
| 			$this->getState( | ||||
| 				'list.select', | ||||
| 				'a.id, a.title, a.alias, a.checked_out, a.checked_out_time, a.catid' . | ||||
| 					', a.state, a.access, a.created, a.created_by, a.created_by_alias, a.ordering, a.featured, a.language, a.hits' . | ||||
| 					', a.publish_up, a.publish_down' | ||||
| 			) | ||||
| 		); | ||||
| 		$query->from('#__content AS a'); | ||||
|  | ||||
| 		// Join over the language | ||||
| 		$query->select('l.title AS language_title') | ||||
| 			->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language'); | ||||
|  | ||||
| 		// Join over the users for the checked out user. | ||||
| 		$query->select('uc.name AS editor') | ||||
| 			->join('LEFT', '#__users AS uc ON uc.id=a.checked_out'); | ||||
|  | ||||
| 		// Join over the asset groups. | ||||
| 		$query->select('ag.title AS access_level') | ||||
| 			->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); | ||||
|  | ||||
| 		// Join over the categories. | ||||
| 		$query->select('c.title AS category_title') | ||||
| 			->join('LEFT', '#__categories AS c ON c.id = a.catid'); | ||||
|  | ||||
| 		// Join over the users for the author. | ||||
| 		$query->select('ua.name AS author_name') | ||||
| 			->join('LEFT', '#__users AS ua ON ua.id = a.created_by'); | ||||
|  | ||||
| 		// Join over the associations. | ||||
| 		$assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
| 		if ($assoc) | ||||
| 		{ | ||||
| 			$query->select('COUNT(asso2.id)>1 as association') | ||||
| 				->join('LEFT', '#__associations AS asso ON asso.id = a.id AND asso.context=' . $db->quote('com_content.item')) | ||||
| 				->join('LEFT', '#__associations AS asso2 ON asso2.key = asso.key') | ||||
| 				->group('a.id'); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by access level. | ||||
| 		if ($access = $this->getState('filter.access')) | ||||
| 		{ | ||||
| 			$query->where('a.access = ' . (int) $access); | ||||
| 		} | ||||
|  | ||||
| 		// Implement View Level Access | ||||
| 		if (!$user->authorise('core.admin')) | ||||
| 		{ | ||||
| 			$groups = implode(',', $user->getAuthorisedViewLevels()); | ||||
| 			$query->where('a.access IN (' . $groups . ')'); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by published state | ||||
| 		$published = $this->getState('filter.published'); | ||||
| 		if (is_numeric($published)) | ||||
| 		{ | ||||
| 			$query->where('a.state = ' . (int) $published); | ||||
| 		} | ||||
| 		elseif ($published === '') | ||||
| 		{ | ||||
| 			$query->where('(a.state = 0 OR a.state = 1)'); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by a single or group of categories. | ||||
| 		$baselevel = 1; | ||||
| 		$categoryId = $this->getState('filter.category_id'); | ||||
| 		if (is_numeric($categoryId)) | ||||
| 		{ | ||||
| 			$cat_tbl = JTable::getInstance('Category', 'JTable'); | ||||
| 			$cat_tbl->load($categoryId); | ||||
| 			$rgt = $cat_tbl->rgt; | ||||
| 			$lft = $cat_tbl->lft; | ||||
| 			$baselevel = (int) $cat_tbl->level; | ||||
| 			$query->where('c.lft >= ' . (int) $lft) | ||||
| 				->where('c.rgt <= ' . (int) $rgt); | ||||
| 		} | ||||
| 		elseif (is_array($categoryId)) | ||||
| 		{ | ||||
| 			JArrayHelper::toInteger($categoryId); | ||||
| 			$categoryId = implode(',', $categoryId); | ||||
| 			$query->where('a.catid IN (' . $categoryId . ')'); | ||||
| 		} | ||||
|  | ||||
| 		// Filter on the level. | ||||
| 		if ($level = $this->getState('filter.level')) | ||||
| 		{ | ||||
| 			$query->where('c.level <= ' . ((int) $level + (int) $baselevel - 1)); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by author | ||||
| 		$authorId = $this->getState('filter.author_id'); | ||||
| 		if (is_numeric($authorId)) | ||||
| 		{ | ||||
| 			$type = $this->getState('filter.author_id.include', true) ? '= ' : '<>'; | ||||
| 			$query->where('a.created_by ' . $type . (int) $authorId); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by search in title. | ||||
| 		$search = $this->getState('filter.search'); | ||||
| 		if (!empty($search)) | ||||
| 		{ | ||||
| 			if (stripos($search, 'id:') === 0) | ||||
| 			{ | ||||
| 				$query->where('a.id = ' . (int) substr($search, 3)); | ||||
| 			} | ||||
| 			elseif (stripos($search, 'author:') === 0) | ||||
| 			{ | ||||
| 				$search = $db->quote('%' . $db->escape(substr($search, 7), true) . '%'); | ||||
| 				$query->where('(ua.name LIKE ' . $search . ' OR ua.username LIKE ' . $search . ')'); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				$search = $db->quote('%' . $db->escape($search, true) . '%'); | ||||
| 				$query->where('(a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search . ')'); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		// Filter on the language. | ||||
| 		if ($language = $this->getState('filter.language')) | ||||
| 		{ | ||||
| 			$query->where('a.language = ' . $db->quote($language)); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by a single tag. | ||||
| 		$tagId = $this->getState('filter.tag'); | ||||
| 		if (is_numeric($tagId)) | ||||
| 		{ | ||||
| 			$query->where($db->quoteName('tagmap.tag_id') . ' = ' . (int) $tagId) | ||||
| 				->join( | ||||
| 					'LEFT', $db->quoteName('#__contentitem_tag_map', 'tagmap') | ||||
| 					. ' ON ' . $db->quoteName('tagmap.content_item_id') . ' = ' . $db->quoteName('a.id') | ||||
| 					. ' AND ' . $db->quoteName('tagmap.type_alias') . ' = ' . $db->quote('com_content.article') | ||||
| 				); | ||||
| 		} | ||||
|  | ||||
| 		// Add the list ordering clause. | ||||
| 		$orderCol = $this->state->get('list.ordering', 'a.title'); | ||||
| 		$orderDirn = $this->state->get('list.direction', 'asc'); | ||||
| 		if ($orderCol == 'a.ordering' || $orderCol == 'category_title') | ||||
| 		{ | ||||
| 			$orderCol = 'c.title ' . $orderDirn . ', a.ordering'; | ||||
| 		} | ||||
| 		//sqlsrv change | ||||
| 		if ($orderCol == 'language') | ||||
| 		{ | ||||
| 			$orderCol = 'l.title'; | ||||
| 		} | ||||
| 		if ($orderCol == 'access_level') | ||||
| 		{ | ||||
| 			$orderCol = 'ag.title'; | ||||
| 		} | ||||
| 		$query->order($db->escape($orderCol . ' ' . $orderDirn)); | ||||
|  | ||||
| 		// echo nl2br(str_replace('#__','jos_',$query)); | ||||
| 		return $query; | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Build a list of authors | ||||
| 	 * | ||||
| 	 * @return  JDatabaseQuery | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function getAuthors() | ||||
| 	{ | ||||
| 		// Create a new query object. | ||||
| 		$db = $this->getDbo(); | ||||
| 		$query = $db->getQuery(true); | ||||
|  | ||||
| 		// Construct the query | ||||
| 		$query->select('u.id AS value, u.name AS text') | ||||
| 			->from('#__users AS u') | ||||
| 			->join('INNER', '#__content AS c ON c.created_by = u.id') | ||||
| 			->group('u.id, u.name') | ||||
| 			->order('u.name'); | ||||
|  | ||||
| 		// Setup the query | ||||
| 		$db->setQuery($query); | ||||
|  | ||||
| 		// Return the result | ||||
| 		return $db->loadObjectList(); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to get a list of articles. | ||||
| 	 * Overridden to add a check for access levels. | ||||
| 	 * | ||||
| 	 * @return  mixed  An array of data items on success, false on failure. | ||||
| 	 * @since   1.6.1 | ||||
| 	 */ | ||||
| 	public function getItems() | ||||
| 	{ | ||||
| 		$items = parent::getItems(); | ||||
| 		$app = JFactory::getApplication(); | ||||
| 		if ($app->isSite()) | ||||
| 		{ | ||||
| 			$user = JFactory::getUser(); | ||||
| 			$groups = $user->getAuthorisedViewLevels(); | ||||
|  | ||||
| 			for ($x = 0, $count = count($items); $x < $count; $x++) | ||||
| 			{ | ||||
| 				//Check the access level. Remove articles the user shouldn't see | ||||
| 				if (!in_array($items[$x]->access, $groups)) | ||||
| 				{ | ||||
| 					unset($items[$x]); | ||||
| 				} | ||||
| 			} | ||||
| 		} | ||||
| 		return $items; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										47
									
								
								administrator/components/com_content/models/feature.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										47
									
								
								administrator/components/com_content/models/feature.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,47 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| require_once __DIR__ . '/article.php'; | ||||
|  | ||||
| /** | ||||
|  * Feature model. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  */ | ||||
| class ContentModelFeature extends ContentModelArticle | ||||
| { | ||||
| 	/** | ||||
| 	 * Returns a Table object, always creating it. | ||||
| 	 * | ||||
| 	 * @param   type	The table type to instantiate | ||||
| 	 * @param   string	A prefix for the table class name. Optional. | ||||
| 	 * @param   array  Configuration array for model. Optional. | ||||
| 	 * @return  JTable	A database object | ||||
| 	*/ | ||||
| 	public function getTable($type = 'Featured', $prefix = 'ContentTable', $config = array()) | ||||
| 	{ | ||||
| 		return JTable::getInstance($type, $prefix, $config); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * A protected method to get a set of ordering conditions. | ||||
| 	 * | ||||
| 	 * @param   object	A record object. | ||||
| 	 * @return  array  An array of conditions to add to add to ordering queries. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function getReorderConditions($table) | ||||
| 	{ | ||||
| 		$condition = array(); | ||||
| 		return $condition; | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										173
									
								
								administrator/components/com_content/models/featured.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										173
									
								
								administrator/components/com_content/models/featured.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,173 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| require_once __DIR__ . '/articles.php'; | ||||
|  | ||||
| /** | ||||
|  * About Page Model | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  */ | ||||
| class ContentModelFeatured extends ContentModelArticles | ||||
| { | ||||
| 	/** | ||||
| 	 * Constructor. | ||||
| 	 * | ||||
| 	 * @param   array  An optional associative array of configuration settings. | ||||
| 	 * @see     JController | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	public function __construct($config = array()) | ||||
| 	{ | ||||
| 		if (empty($config['filter_fields'])) | ||||
| 		{ | ||||
| 			$config['filter_fields'] = array( | ||||
| 				'id', 'a.id', | ||||
| 				'title', 'a.title', | ||||
| 				'alias', 'a.alias', | ||||
| 				'checked_out', 'a.checked_out', | ||||
| 				'checked_out_time', 'a.checked_out_time', | ||||
| 				'catid', 'a.catid', 'category_title', | ||||
| 				'state', 'a.state', | ||||
| 				'access', 'a.access', 'access_level', | ||||
| 				'created', 'a.created', | ||||
| 				'created_by', 'a.created_by', | ||||
| 				'created_by_alias', 'a.created_by_alias', | ||||
| 				'ordering', 'a.ordering', | ||||
| 				'featured', 'a.featured', | ||||
| 				'language', 'a.language', | ||||
| 				'hits', 'a.hits', | ||||
| 				'publish_up', 'a.publish_up', | ||||
| 				'publish_down', 'a.publish_down', | ||||
| 				'fp.ordering', | ||||
| 			); | ||||
| 		} | ||||
|  | ||||
| 		parent::__construct($config); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * @param   boolean    True to join selected foreign information | ||||
| 	 * | ||||
| 	 * @return  string | ||||
| 	 */ | ||||
| 	protected function getListQuery($resolveFKs = true) | ||||
| 	{ | ||||
| 		// Create a new query object. | ||||
| 		$db = $this->getDbo(); | ||||
| 		$query = $db->getQuery(true); | ||||
|  | ||||
| 		// Select the required fields from the table. | ||||
| 		$query->select( | ||||
| 			$this->getState( | ||||
| 				'list.select', | ||||
| 				'a.id, a.title, a.alias, a.checked_out, a.checked_out_time, a.catid, a.state, a.access, a.created, a.hits,' . | ||||
| 					'a.language, a.created_by_alias, a.publish_up, a.publish_down' | ||||
| 			) | ||||
| 		); | ||||
| 		$query->from('#__content AS a'); | ||||
|  | ||||
| 		// Join over the language | ||||
| 		$query->select('l.title AS language_title') | ||||
| 			->join('LEFT', $db->quoteName('#__languages') . ' AS l ON l.lang_code = a.language'); | ||||
|  | ||||
| 		// Join over the content table. | ||||
| 		$query->select('fp.ordering') | ||||
| 			->join('INNER', '#__content_frontpage AS fp ON fp.content_id = a.id'); | ||||
|  | ||||
| 		// Join over the users for the checked out user. | ||||
| 		$query->select('uc.name AS editor') | ||||
| 			->join('LEFT', '#__users AS uc ON uc.id=a.checked_out'); | ||||
|  | ||||
| 		// Join over the asset groups. | ||||
| 		$query->select('ag.title AS access_level') | ||||
| 			->join('LEFT', '#__viewlevels AS ag ON ag.id = a.access'); | ||||
|  | ||||
| 		// Join over the categories. | ||||
| 		$query->select('c.title AS category_title') | ||||
| 			->join('LEFT', '#__categories AS c ON c.id = a.catid'); | ||||
|  | ||||
| 		// Join over the users for the author. | ||||
| 		$query->select('ua.name AS author_name') | ||||
| 			->join('LEFT', '#__users AS ua ON ua.id = a.created_by'); | ||||
|  | ||||
| 		// Filter by access level. | ||||
| 		if ($access = $this->getState('filter.access')) | ||||
| 		{ | ||||
| 			$query->where('a.access = ' . (int) $access); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by published state | ||||
| 		$published = $this->getState('filter.published'); | ||||
| 		if (is_numeric($published)) | ||||
| 		{ | ||||
| 			$query->where('a.state = ' . (int) $published); | ||||
| 		} | ||||
| 		elseif ($published === '') | ||||
| 		{ | ||||
| 			$query->where('(a.state = 0 OR a.state = 1)'); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by a single or group of categories. | ||||
| 		$baselevel = 1; | ||||
| 		$categoryId = $this->getState('filter.category_id'); | ||||
| 		if (is_numeric($categoryId)) | ||||
| 		{ | ||||
| 			$cat_tbl = JTable::getInstance('Category', 'JTable'); | ||||
| 			$cat_tbl->load($categoryId); | ||||
| 			$rgt = $cat_tbl->rgt; | ||||
| 			$lft = $cat_tbl->lft; | ||||
| 			$baselevel = (int) $cat_tbl->level; | ||||
| 			$query->where('c.lft >= ' . (int) $lft) | ||||
| 				->where('c.rgt <= ' . (int) $rgt); | ||||
| 		} | ||||
| 		elseif (is_array($categoryId)) | ||||
| 		{ | ||||
| 			JArrayHelper::toInteger($categoryId); | ||||
| 			$categoryId = implode(',', $categoryId); | ||||
| 			$query->where('a.catid IN (' . $categoryId . ')'); | ||||
| 		} | ||||
|  | ||||
| 		// Filter on the level. | ||||
| 		if ($level = $this->getState('filter.level')) | ||||
| 		{ | ||||
| 			$query->where('c.level <= ' . ((int) $level + (int) $baselevel - 1)); | ||||
| 		} | ||||
|  | ||||
| 		// Filter by search in title | ||||
| 		$search = $this->getState('filter.search'); | ||||
| 		if (!empty($search)) | ||||
| 		{ | ||||
| 			if (stripos($search, 'id:') === 0) | ||||
| 			{ | ||||
| 				$query->where('a.id = ' . (int) substr($search, 3)); | ||||
| 			} | ||||
| 			else | ||||
| 			{ | ||||
| 				$search = $db->quote('%' . $db->escape($search, true) . '%'); | ||||
| 				$query->where('a.title LIKE ' . $search . ' OR a.alias LIKE ' . $search); | ||||
| 			} | ||||
| 		} | ||||
|  | ||||
| 		// Filter on the language. | ||||
| 		if ($language = $this->getState('filter.language')) | ||||
| 		{ | ||||
| 			$query->where('a.language = ' . $db->quote($language)); | ||||
| 		} | ||||
|  | ||||
| 		// Add the list ordering clause. | ||||
| 		$query->order($db->escape($this->getState('list.ordering', 'a.title')) . ' ' . $db->escape($this->getState('list.direction', 'ASC'))); | ||||
|  | ||||
| 		//echo nl2br(str_replace('#__','jos_',(string)$query)); | ||||
| 		return $query; | ||||
| 	} | ||||
| } | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
| @ -0,0 +1,159 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('JPATH_BASE') or die; | ||||
|  | ||||
| /** | ||||
|  * Supports a modal article picker. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class JFormFieldModal_Article extends JFormField | ||||
| { | ||||
| 	/** | ||||
| 	 * The form field type. | ||||
| 	 * | ||||
| 	 * @var		string | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected $type = 'Modal_Article'; | ||||
|  | ||||
| 	/** | ||||
| 	 * Method to get the field input markup. | ||||
| 	 * | ||||
| 	 * @return  string	The field input markup. | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function getInput() | ||||
| 	{ | ||||
| 		$allowEdit		= ((string) $this->element['edit'] == 'true') ? true : false; | ||||
| 		$allowClear		= ((string) $this->element['clear'] != 'false') ? true : false; | ||||
|  | ||||
| 		// Load language | ||||
| 		JFactory::getLanguage()->load('com_content', JPATH_ADMINISTRATOR); | ||||
|  | ||||
| 		// Load the modal behavior script. | ||||
| 		JHtml::_('behavior.modal', 'a.modal'); | ||||
|  | ||||
| 		// Build the script. | ||||
| 		$script = array(); | ||||
|  | ||||
| 		// Select button script | ||||
| 		$script[] = '	function jSelectArticle_'.$this->id.'(id, title, catid, object) {'; | ||||
| 		$script[] = '		document.getElementById("'.$this->id.'_id").value = id;'; | ||||
| 		$script[] = '		document.getElementById("'.$this->id.'_name").value = title;'; | ||||
|  | ||||
| 		if ($allowEdit) | ||||
| 		{ | ||||
| 			$script[] = '		jQuery("#'.$this->id.'_edit").removeClass("hidden");'; | ||||
| 		} | ||||
|  | ||||
| 		if ($allowClear) | ||||
| 		{ | ||||
| 			$script[] = '		jQuery("#'.$this->id.'_clear").removeClass("hidden");'; | ||||
| 		} | ||||
|  | ||||
| 		$script[] = '		SqueezeBox.close();'; | ||||
| 		$script[] = '	}'; | ||||
|  | ||||
| 		// Clear button script | ||||
| 		static $scriptClear; | ||||
|  | ||||
| 		if ($allowClear && !$scriptClear) | ||||
| 		{ | ||||
| 			$scriptClear = true; | ||||
|  | ||||
| 			$script[] = '	function jClearArticle(id) {'; | ||||
| 			$script[] = '		document.getElementById(id + "_id").value = "";'; | ||||
| 			$script[] = '		document.getElementById(id + "_name").value = "'.htmlspecialchars(JText::_('COM_CONTENT_SELECT_AN_ARTICLE', true), ENT_COMPAT, 'UTF-8').'";'; | ||||
| 			$script[] = '		jQuery("#"+id + "_clear").addClass("hidden");'; | ||||
| 			$script[] = '		if (document.getElementById(id + "_edit")) {'; | ||||
| 			$script[] = '			jQuery("#"+id + "_edit").addClass("hidden");'; | ||||
| 			$script[] = '		}'; | ||||
| 			$script[] = '		return false;'; | ||||
| 			$script[] = '	}'; | ||||
| 		} | ||||
|  | ||||
| 		// Add the script to the document head. | ||||
| 		JFactory::getDocument()->addScriptDeclaration(implode("\n", $script)); | ||||
|  | ||||
| 		// Setup variables for display. | ||||
| 		$html	= array(); | ||||
| 		$link	= 'index.php?option=com_content&view=articles&layout=modal&tmpl=component&function=jSelectArticle_'.$this->id; | ||||
|  | ||||
| 		if (isset($this->element['language'])) | ||||
| 		{ | ||||
| 			$link .= '&forcedLanguage='.$this->element['language']; | ||||
| 		} | ||||
|  | ||||
| 		$db	= JFactory::getDbo(); | ||||
| 		$db->setQuery( | ||||
| 			'SELECT title' . | ||||
| 			' FROM #__content' . | ||||
| 			' WHERE id = '.(int) $this->value | ||||
| 		); | ||||
|  | ||||
| 		try | ||||
| 		{ | ||||
| 			$title = $db->loadResult(); | ||||
| 		} | ||||
| 		catch (RuntimeException $e) | ||||
| 		{ | ||||
| 			JError::raiseWarning(500, $e->getMessage()); | ||||
| 		} | ||||
|  | ||||
| 		if (empty($title)) | ||||
| 		{ | ||||
| 			$title = JText::_('COM_CONTENT_SELECT_AN_ARTICLE'); | ||||
| 		} | ||||
| 		$title = htmlspecialchars($title, ENT_QUOTES, 'UTF-8'); | ||||
|  | ||||
| 		// The active article id field. | ||||
| 		if (0 == (int) $this->value) | ||||
| 		{ | ||||
| 			$value = ''; | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			$value = (int) $this->value; | ||||
| 		} | ||||
|  | ||||
| 		// The current article display field. | ||||
| 		$html[] = '<span class="input-append">'; | ||||
| 		$html[] = '<input type="text" class="input-medium" id="'.$this->id.'_name" value="'.$title.'" disabled="disabled" size="35" />'; | ||||
| 		$html[] = '<a class="modal btn hasTooltip" title="'.JHtml::tooltipText('COM_CONTENT_CHANGE_ARTICLE').'"  href="'.$link.'&'.JSession::getFormToken().'=1" rel="{handler: \'iframe\', size: {x: 800, y: 450}}"><i class="icon-file"></i> '.JText::_('JSELECT').'</a>'; | ||||
|  | ||||
| 		// Edit article button | ||||
| 		if ($allowEdit) | ||||
| 		{ | ||||
| 			$html[] = '<a class="btn hasTooltip'.($value ? '' : ' hidden').'" href="index.php?option=com_content&layout=modal&tmpl=component&task=article.edit&id=' . $value. '" target="_blank" title="'.JHtml::tooltipText('COM_CONTENT_EDIT_ARTICLE').'" ><span class="icon-edit"></span> ' . JText::_('JACTION_EDIT') . '</a>'; | ||||
| 		} | ||||
|  | ||||
| 		// Clear article button | ||||
| 		if ($allowClear) | ||||
| 		{ | ||||
| 			$html[] = '<button id="'.$this->id.'_clear" class="btn'.($value ? '' : ' hidden').'" onclick="return jClearArticle(\''.$this->id.'\')"><span class="icon-remove"></span> ' . JText::_('JCLEAR') . '</button>'; | ||||
| 		} | ||||
|  | ||||
| 		$html[] = '</span>'; | ||||
|  | ||||
| 		// class='required' for client side validation | ||||
| 		$class = ''; | ||||
| 		if ($this->required) | ||||
| 		{ | ||||
| 			$class = ' class="required modal-value"'; | ||||
| 		} | ||||
|  | ||||
| 		$html[] = '<input type="hidden" id="'.$this->id.'_id"'.$class.' name="'.$this->name.'" value="'.$value.'" />'; | ||||
|  | ||||
| 		return implode("\n", $html); | ||||
| 	} | ||||
| } | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										838
									
								
								administrator/components/com_content/models/forms/article.xml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										838
									
								
								administrator/components/com_content/models/forms/article.xml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,838 @@ | ||||
| <?xml version="1.0" encoding="utf-8"?> | ||||
| <form> | ||||
| 	<fieldset addfieldpath="/administrator/components/com_categories/models/fields" > | ||||
| 		<field name="id"  type="text" class="readonly" label="JGLOBAL_FIELD_ID_LABEL" | ||||
| 			description ="JGLOBAL_FIELD_ID_DESC" size="10" default="0" | ||||
| 			readonly="true" /> | ||||
|  | ||||
| 		<field name="asset_id" type="hidden" filter="unset" /> | ||||
|  | ||||
| 		<field name="title" type="text" label="JGLOBAL_TITLE" | ||||
| 			description="JFIELD_TITLE_DESC" class="input-xlarge" size="30" | ||||
| 			required="true" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="alias" type="text" label="JFIELD_ALIAS_LABEL" | ||||
| 			description="JFIELD_ALIAS_DESC" class="inputbox" size="45" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="articletext" type="editor" class="inputbox" | ||||
| 			label="COM_CONTENT_FIELD_ARTICLETEXT_LABEL" description="COM_CONTENT_FIELD_ARTICLETEXT_DESC" | ||||
| 			filter="JComponentHelper::filterText" buttons="true" /> | ||||
|  | ||||
| 		<field name="state" type="list" label="JSTATUS" | ||||
| 			description="JFIELD_PUBLISHED_DESC" class="span12 small" | ||||
| 			filter="intval" size="1" default="1" | ||||
| 		> | ||||
| 			<option value="1"> | ||||
| 				JPUBLISHED</option> | ||||
| 			<option value="0"> | ||||
| 				JUNPUBLISHED</option> | ||||
| 			<option value="2"> | ||||
| 				JARCHIVED</option> | ||||
| 			<option value="-2"> | ||||
| 				JTRASHED</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="catid" type="categoryedit" | ||||
| 			label="JCATEGORY" description="JFIELD_CATEGORY_DESC" | ||||
| 			class="inputbox" required="true" | ||||
| 		> | ||||
| 		</field> | ||||
|  | ||||
| 		<field | ||||
| 			name="buttonspacer" | ||||
| 			description="JGLOBAL_ACTION_PERMISSIONS_DESCRIPTION" | ||||
| 			type="spacer" /> | ||||
|  | ||||
| 		<field name="created" type="calendar" label="COM_CONTENT_FIELD_CREATED_LABEL" | ||||
| 			description="COM_CONTENT_FIELD_CREATED_DESC" class="inputbox" size="22" | ||||
| 			format="%Y-%m-%d %H:%M:%S" filter="user_utc" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="created_by" type="user" | ||||
| 			label="COM_CONTENT_FIELD_CREATED_BY_LABEL" description="COM_CONTENT_FIELD_CREATED_BY_DESC" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="created_by_alias" type="text" | ||||
| 			label="COM_CONTENT_FIELD_CREATED_BY_ALIAS_LABEL" description="COM_CONTENT_FIELD_CREATED_BY_ALIAS_DESC" | ||||
| 			class="inputbox" size="20" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="modified" type="calendar" class="readonly" | ||||
| 			label="JGLOBAL_FIELD_MODIFIED_LABEL" description="COM_CONTENT_FIELD_MODIFIED_DESC" | ||||
| 			size="22" readonly="true" format="%Y-%m-%d %H:%M:%S" filter="user_utc" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="modified_by" type="user" | ||||
| 		label="JGLOBAL_FIELD_MODIFIED_BY_LABEL" | ||||
| 		class="readonly" | ||||
| 		readonly="true" | ||||
| 		filter="unset" | ||||
| 		labelclass="control-label" | ||||
| 		 /> | ||||
|  | ||||
| 		<field name="checked_out" type="hidden" filter="unset" /> | ||||
|  | ||||
| 		<field name="checked_out_time" type="hidden" filter="unset" /> | ||||
|  | ||||
| 		<field name="publish_up" type="calendar" | ||||
| 			label="COM_CONTENT_FIELD_PUBLISH_UP_LABEL" description="COM_CONTENT_FIELD_PUBLISH_UP_DESC" | ||||
| 			class="inputbox" format="%Y-%m-%d %H:%M:%S" size="22" | ||||
| 			filter="user_utc" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="publish_down" type="calendar" | ||||
| 			label="COM_CONTENT_FIELD_PUBLISH_DOWN_LABEL" description="COM_CONTENT_FIELD_PUBLISH_DOWN_DESC" | ||||
| 			class="inputbox" format="%Y-%m-%d %H:%M:%S" size="22" | ||||
| 			filter="user_utc" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="version" type="text" class="readonly" | ||||
| 			label="COM_CONTENT_FIELD_VERSION_LABEL" size="6" description="COM_CONTENT_FIELD_VERSION_DESC" | ||||
| 			readonly="true" filter="unset" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="ordering" type="text" label="JFIELD_ORDERING_LABEL" | ||||
| 			description="JFIELD_ORDERING_DESC" class="inputbox" size="6" | ||||
| 			default="0" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="metakey" type="textarea" | ||||
| 			label="JFIELD_META_KEYWORDS_LABEL" description="JFIELD_META_KEYWORDS_DESC" | ||||
| 			class="inputbox" rows="3" cols="30" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="metadesc" type="textarea" | ||||
| 			label="JFIELD_META_DESCRIPTION_LABEL" description="JFIELD_META_DESCRIPTION_DESC" | ||||
| 			class="inputbox" rows="3" cols="30" labelclass="control-label" /> | ||||
|  | ||||
| 		<field name="access" type="accesslevel" label="JFIELD_ACCESS_LABEL" | ||||
| 			description="JFIELD_ACCESS_DESC" class="span12 small" size="1" /> | ||||
|  | ||||
| 		<field name="hits" type="text" label="JGLOBAL_HITS" | ||||
| 			description="COM_CONTENT_FIELD_HITS_DESC" class="readonly" size="6" | ||||
| 			readonly="true" filter="unset" /> | ||||
|  | ||||
| 		<field name="language" type="contentlanguage" label="JFIELD_LANGUAGE_LABEL" | ||||
| 			description="COM_CONTENT_FIELD_LANGUAGE_DESC" class="span12 small" | ||||
| 		> | ||||
| 			<option value="*">JALL</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="featured" type="list" | ||||
| 			label="JFEATURED" | ||||
| 			description="COM_CONTENT_FIELD_FEATURED_DESC" | ||||
| 			default="0" | ||||
| 			class="span12 small" | ||||
| 		> | ||||
| 			<option value="0">JNO</option> | ||||
| 			<option value="1">JYES</option> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="tags"  | ||||
| 			type="tag" | ||||
| 			label="JTAG" | ||||
| 			description="JTAG_DESC" | ||||
| 			class="inputbox span12 small" | ||||
| 			multiple="true" | ||||
| 		> | ||||
| 		</field> | ||||
|  | ||||
| 		<field name="rules" type="rules" label="JFIELD_RULES_LABEL" | ||||
| 			translate_label="false" class="inputbox" filter="rules" | ||||
| 			component="com_content" section="article" validate="rules" | ||||
| 		/> | ||||
|  | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<fields name="attribs"> | ||||
| 		<fieldset name="basic" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"> | ||||
| 			<field | ||||
| 				name="show_title" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_TITLE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_TITLE_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_titles" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_LINKED_TITLES_LABEL" | ||||
| 				description="JGLOBAL_LINKED_TITLES_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JNO</option> | ||||
| 				<option value="1">JYES</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="show_tags" type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="COM_CONTENT_FIELD_SHOW_TAGS_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_SHOW_TAGS_DESC" | ||||
| 				labelclass="control-label" | ||||
| 			> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="show_intro" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				description="JGLOBAL_SHOW_INTRO_DESC" | ||||
| 				label="JGLOBAL_SHOW_INTRO_LABEL" | ||||
| 				labelclass="control-label" | ||||
| 				> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option value="1">JSHOW</option> | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="info_block_position" | ||||
| 				type="list" | ||||
| 				default="" | ||||
| 				label="COM_CONTENT_FIELD_INFOBLOCK_POSITION_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_INFOBLOCK_POSITION_DESC"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option> | ||||
| 				<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option> | ||||
| 				<option value="2">COM_CONTENT_FIELD_OPTION_SPLIT</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_category" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_SHOW_CATEGORY_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_category" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_LINK_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_LINK_CATEGORY_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JNO</option> | ||||
| 				<option	value="1">JYES</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_parent_category" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option	value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_parent_category" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_LINK_PARENT_CATEGORY_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JNO</option> | ||||
| 				<option	value="1">JYES</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_author" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_AUTHOR_LABEL" | ||||
| 				description="JGLOBAL_SHOW_AUTHOR_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option	value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_author" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_LINK_AUTHOR_LABEL" | ||||
| 				description="JGLOBAL_LINK_AUTHOR_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option	value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JNO</option> | ||||
| 				<option	value="1">JYES</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_create_date" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_CREATE_DATE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_CREATE_DATE_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option	value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_modify_date" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_MODIFY_DATE_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option	value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_publish_date" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_PUBLISH_DATE_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_item_navigation" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_NAVIGATION_LABEL" | ||||
| 				description="JGLOBAL_SHOW_NAVIGATION_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_icons" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_ICONS_LABEL" | ||||
| 				description="JGLOBAL_SHOW_ICONS_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_print_icon" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_PRINT_ICON_LABEL" | ||||
| 				description="JGLOBAL_SHOW_PRINT_ICON_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_email_icon" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_EMAIL_ICON_LABEL" | ||||
| 				description="JGLOBAL_SHOW_EMAIL_ICON_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option	value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_vote" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_VOTE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_VOTE_DESC" | ||||
| 				labelclass="control-label" | ||||
| 			> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_hits" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_HITS_LABEL" | ||||
| 				description="JGLOBAL_SHOW_HITS_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option	value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option	value="0">JHIDE</option> | ||||
| 				<option	value="1">JSHOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_noauth" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL" | ||||
| 				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 						<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 						<option value="0">JNO</option> | ||||
| 						<option value="1">JYES</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="urls_position" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				label="COM_CONTENT_FIELD_URLSPOSITION_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_URLSPOSITION_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">COM_CONTENT_FIELD_OPTION_ABOVE</option> | ||||
| 				<option value="1">COM_CONTENT_FIELD_OPTION_BELOW</option> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="spacer2" | ||||
| 				type="spacer" | ||||
| 				hr="true" | ||||
| 			/> | ||||
|  | ||||
| 			<field name="alternative_readmore" type="inputbox" | ||||
| 				label="JFIELD_READMORE_LABEL" | ||||
| 				description="JFIELD_READMORE_DESC" | ||||
| 				class="inputbox" size="25" labelclass="control-label" /> | ||||
|  | ||||
| 			<field name="article_layout" type="componentlayout" | ||||
| 				label="JFIELD_ALT_LAYOUT_LABEL" | ||||
| 				description="JFIELD_ALT_COMPONENT_LAYOUT_DESC" | ||||
| 				useglobal="true" | ||||
| 				extension="com_content" view="article" labelclass="control-label" | ||||
| 			/> | ||||
| 		</fieldset> | ||||
|  | ||||
| 		<fieldset name="editorConfig"> | ||||
| 			<field | ||||
| 				name="show_publishing_options" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				default="" | ||||
| 				label="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_LABEL" | ||||
| 				description="COM_CONTENT_SHOW_PUBLISHING_OPTIONS_DESC" labelclass="control-label" | ||||
| 				> | ||||
| 						<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 						<option value="0">JNO</option> | ||||
| 						<option value="1">JYES</option> | ||||
|  | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="show_article_options" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				default="" | ||||
| 				label="COM_CONTENT_SHOW_ARTICLE_OPTIONS_LABEL" | ||||
| 				description="COM_CONTENT_SHOW_ARTICLE_OPTIONS_DESC" | ||||
| 				labelclass="control-label" | ||||
| 				> | ||||
| 						<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 						<option value="0">JNO</option> | ||||
| 						<option value="1">JYES</option> | ||||
|  | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="show_urls_images_backend" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				default="" | ||||
| 				label="COM_CONTENT_SHOW_IMAGES_URLS_BACK_LABEL" | ||||
| 				description="COM_CONTENT_SHOW_IMAGES_URLS_BACK_DESC" | ||||
| 				labelclass="control-label" | ||||
| 				> | ||||
| 						<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 						<option value="0">JNO</option> | ||||
| 						<option value="1">JYES</option> | ||||
|  | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="show_urls_images_frontend" | ||||
| 				type="radio" | ||||
| 				class="btn-group" | ||||
| 				default="" | ||||
| 				label="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_LABEL" | ||||
| 				description="COM_CONTENT_SHOW_IMAGES_URLS_FRONT_DESC" | ||||
| 				labelclass="control-label" | ||||
| 				> | ||||
| 						<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 						<option value="0">JNO</option> | ||||
| 						<option value="1">JYES</option> | ||||
| 			</field> | ||||
| 		</fieldset> | ||||
|  | ||||
| 		<fieldset name="basic-limited" label="COM_CONTENT_ATTRIBS_FIELDSET_LABEL"> | ||||
| 			<field | ||||
| 				name="show_title" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_TITLE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_TITLE_DESC" | ||||
| 				> | ||||
|  | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_titles" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_LINKED_TITLES_LABEL" | ||||
| 				description="JGLOBAL_LINKED_TITLES_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="show_intro" | ||||
| 				type="hidden" | ||||
| 				description="JGLOBAL_SHOW_INTRO_DESC" | ||||
| 				label="JGLOBAL_SHOW_INTRO_LABEL" | ||||
| 				> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_category" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_SHOW_CATEGORY_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_category" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_LINK_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_LINK_CATEGORY_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_parent_category" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_PARENT_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_SHOW_PARENT_CATEGORY_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_parent_category" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_LINK_PARENT_CATEGORY_LABEL" | ||||
| 				description="JGLOBAL_LINK_PARENT_CATEGORY_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_author" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_AUTHOR_LABEL" | ||||
| 				description="JGLOBAL_SHOW_AUTHOR_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="link_author" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_LINK_AUTHOR_LABEL" | ||||
| 				description="JGLOBAL_LINK_AUTHOR_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_create_date" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_CREATE_DATE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_CREATE_DATE_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_modify_date" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_MODIFY_DATE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_MODIFY_DATE_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_publish_date" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_PUBLISH_DATE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_PUBLISH_DATE_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_item_navigation" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_NAVIGATION_LABEL" | ||||
| 				description="JGLOBAL_SHOW_NAVIGATION_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_icons" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_ICONS_LABEL" | ||||
| 				description="JGLOBAL_SHOW_ICONS_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_print_icon" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_PRINT_ICON_LABEL" | ||||
| 				description="JGLOBAL_SHOW_PRINT_ICON_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_email_icon" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_EMAIL_ICON_LABEL" | ||||
| 				description="JGLOBAL_SHOW_EMAIL_ICON_DESC"> | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="show_vote" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_VOTE_LABEL" | ||||
| 				description="JGLOBAL_SHOW_VOTE_DESC" | ||||
| 			> | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="show_hits" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_HITS_LABEL" | ||||
| 				description="JGLOBAL_SHOW_HITS_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field | ||||
| 				name="show_noauth" | ||||
| 				type="hidden" | ||||
| 				label="JGLOBAL_SHOW_UNAUTH_LINKS_LABEL" | ||||
| 				description="JGLOBAL_SHOW_UNAUTH_LINKS_DESC"> | ||||
| 			</field> | ||||
|  | ||||
| 			<field name="alternative_readmore" type="hidden" | ||||
| 				label="JFIELD_READMORE_LABEL" | ||||
| 				description="JFIELD_READMORE_DESC" | ||||
| 				class="inputbox" size="25" /> | ||||
|  | ||||
| 			<field name="article_layout" type="hidden" | ||||
| 				label="JFIELD_ALT_LAYOUT_LABEL" | ||||
| 				description="JFIELD_ALT_COMPONENT_LAYOUT_DESC" | ||||
| 				useglobal="true" | ||||
| 				extension="com_content" view="article" | ||||
| 			/> | ||||
| 		</fieldset> | ||||
| 	</fields> | ||||
|  | ||||
| 	<field name="xreference" type="text" | ||||
| 		label="JFIELD_KEY_REFERENCE_LABEL" | ||||
| 		description="JFIELD_KEY_REFERENCE_DESC" | ||||
| 		class="inputbox" size="20" labelclass="control-label" /> | ||||
|  | ||||
| 	<fields name="images"> | ||||
| 			<field | ||||
| 				name="image_intro" | ||||
| 				type="media" | ||||
| 				label="COM_CONTENT_FIELD_INTRO_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_INTRO_DESC" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field | ||||
| 				name="float_intro" | ||||
| 				type="list" | ||||
| 				label="COM_CONTENT_FLOAT_LABEL" | ||||
| 				description="COM_CONTENT_FLOAT_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 					<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 					<option value="right">COM_CONTENT_RIGHT</option> | ||||
| 					<option value="left">COM_CONTENT_LEFT</option> | ||||
| 					<option value="none">COM_CONTENT_NONE</option> | ||||
| 			</field> | ||||
| 			<field name="image_intro_alt" | ||||
| 				type="text" | ||||
| 				label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_IMAGE_ALT_DESC" | ||||
| 				class="inputbox" | ||||
| 				size="20" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field name="image_intro_caption" | ||||
| 				type="text" | ||||
| 				label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_IMAGE_CAPTION_DESC" | ||||
| 				class="inputbox" | ||||
| 				size="20" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field | ||||
| 				name="spacer1" | ||||
| 				type="spacer" | ||||
| 				hr="true" | ||||
| 				/> | ||||
| 			<field | ||||
| 				name="image_fulltext" | ||||
| 				type="media" | ||||
| 				label="COM_CONTENT_FIELD_FULL_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_FULL_DESC" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field | ||||
| 				name="float_fulltext" | ||||
| 				type="list" | ||||
| 				label="COM_CONTENT_FLOAT_LABEL" | ||||
| 				description="COM_CONTENT_FLOAT_DESC" | ||||
| 				labelclass="control-label"> | ||||
| 					<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 					<option value="right">COM_CONTENT_RIGHT</option> | ||||
| 					<option value="left">COM_CONTENT_LEFT</option> | ||||
| 					<option value="none">COM_CONTENT_NONE</option> | ||||
| 			</field> | ||||
| 			<field name="image_fulltext_alt" | ||||
| 				type="text" | ||||
| 				label="COM_CONTENT_FIELD_IMAGE_ALT_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_IMAGE_ALT_DESC" | ||||
| 				class="inputbox" | ||||
| 				size="20" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field name="image_fulltext_caption" | ||||
| 				type="text" | ||||
| 				label="COM_CONTENT_FIELD_IMAGE_CAPTION_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_IMAGE_CAPTION_DESC" | ||||
| 				class="inputbox" | ||||
| 				size="20" | ||||
| 				labelclass="control-label"/> | ||||
| 	</fields> | ||||
| 	<fields name="urls"> | ||||
| 			<field | ||||
| 				name="urla" | ||||
| 				type="url" | ||||
| 				validate="url" | ||||
| 				filter="url" | ||||
| 				label="COM_CONTENT_FIELD_URLA_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_URL_DESC" | ||||
| 				labelclass="control-label" /> | ||||
| 			<field name="urlatext" | ||||
| 				type="text" | ||||
| 				label="COM_CONTENT_FIELD_URLA_LINK_TEXT_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_URL_LINK_TEXT_DESC" | ||||
| 				class="inputbox" | ||||
| 				size="20" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field | ||||
| 				name="targeta" | ||||
| 				type="list" | ||||
| 				label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL" | ||||
| 				description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC" | ||||
| 				default="" | ||||
| 				filter="options" | ||||
| 				class="inputbox" | ||||
| 				labelclass="control-label"> | ||||
| 				<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 				<option value="0">JBROWSERTARGET_PARENT</option> | ||||
| 				<option value="1">JBROWSERTARGET_NEW</option> | ||||
| 				<option value="2">JBROWSERTARGET_POPUP</option> | ||||
| 				<option value="3">JBROWSERTARGET_MODAL</option> | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="spacer3" | ||||
| 				type="spacer" | ||||
| 				hr="true" | ||||
| 				/> | ||||
| 			<field | ||||
| 				name="urlb" | ||||
| 				type="url" | ||||
| 				validate="url" | ||||
| 				filter="url" | ||||
| 				label="COM_CONTENT_FIELD_URLB_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_URL_DESC" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field name="urlbtext" | ||||
| 				type="text" | ||||
| 				label="COM_CONTENT_FIELD_URLB_LINK_TEXT_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_URL_LINK_TEXT_DESC" | ||||
| 				class="inputbox" | ||||
| 				size="20" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field | ||||
| 				name="targetb" | ||||
| 				type="list" | ||||
| 				label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL" | ||||
| 				description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC" | ||||
| 				default="" | ||||
| 				filter="options" | ||||
| 				class="inputbox" | ||||
| 				labelclass="control-label"> | ||||
| 					<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 					<option value="0">JBROWSERTARGET_PARENT</option> | ||||
| 					<option value="1">JBROWSERTARGET_NEW</option> | ||||
| 					<option value="2">JBROWSERTARGET_POPUP</option> | ||||
| 					<option value="3">JBROWSERTARGET_MODAL</option> | ||||
| 			</field> | ||||
| 			<field | ||||
| 				name="spacer4" | ||||
| 				type="spacer" | ||||
| 				hr="true" | ||||
| 				/> | ||||
| 			<field | ||||
| 				name="urlc" | ||||
| 				type="url" | ||||
| 				validate="url" | ||||
| 				filter="url" | ||||
| 				label="COM_CONTENT_FIELD_URLC_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_URL_DESC" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field | ||||
| 				name="urlctext" | ||||
| 				type="text" | ||||
| 				label="COM_CONTENT_FIELD_URLC_LINK_TEXT_LABEL" | ||||
| 				description="COM_CONTENT_FIELD_URL_LINK_TEXT_DESC" | ||||
| 				class="inputbox" | ||||
| 				size="20" | ||||
| 				labelclass="control-label"/> | ||||
| 			<field | ||||
| 				name="targetc" | ||||
| 				type="list" | ||||
| 				label="COM_CONTENT_URL_FIELD_BROWSERNAV_LABEL" | ||||
| 				description="COM_CONTENT_URL_FIELD_BROWSERNAV_DESC" | ||||
| 				default="" | ||||
| 				filter="options" | ||||
| 				class="inputbox" | ||||
| 				labelclass="control-label"> | ||||
| 					<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 					<option value="0">JBROWSERTARGET_PARENT</option> | ||||
| 					<option value="1">JBROWSERTARGET_NEW</option> | ||||
| 					<option value="2">JBROWSERTARGET_POPUP</option> | ||||
| 					<option value="3">JBROWSERTARGET_MODAL</option> | ||||
| 			</field> | ||||
|  | ||||
| 		</fields> | ||||
| 	<fields name="metadata"> | ||||
| 		<fieldset name="jmetadata" | ||||
| 			label="JGLOBAL_FIELDSET_METADATA_OPTIONS"> | ||||
| 	 | ||||
| 				<field name="robots" | ||||
| 					type="list" | ||||
| 					label="JFIELD_METADATA_ROBOTS_LABEL" | ||||
| 					description="JFIELD_METADATA_ROBOTS_DESC" | ||||
| 					labelclass="control-label" | ||||
| 					> | ||||
| 					<option value="">JGLOBAL_USE_GLOBAL</option> | ||||
| 					<option value="index, follow">JGLOBAL_INDEX_FOLLOW</option> | ||||
| 					<option value="noindex, follow">JGLOBAL_NOINDEX_FOLLOW</option> | ||||
| 					<option value="index, nofollow">JGLOBAL_INDEX_NOFOLLOW</option> | ||||
| 					<option value="noindex, nofollow">JGLOBAL_NOINDEX_NOFOLLOW</option> | ||||
| 				</field> | ||||
| 	 | ||||
| 				<field name="author" type="text" | ||||
| 					label="JAUTHOR" description="JFIELD_METADATA_AUTHOR_DESC" | ||||
| 					size="20" labelclass="control-label" /> | ||||
| 	 | ||||
| 				<field name="rights" type="textarea" label="JFIELD_META_RIGHTS_LABEL" | ||||
| 					description="JFIELD_META_RIGHTS_DESC" required="false" filter="string" | ||||
| 					cols="30" rows="2" labelclass="control-label" /> | ||||
| 				<field name="xreference" type="text" | ||||
| 					label="COM_CONTENT_FIELD_XREFERENCE_LABEL" | ||||
| 					description="COM_CONTENT_FIELD_XREFERENCE_DESC" | ||||
| 					class="inputbox" size="20" labelclass="control-label" /> | ||||
|  | ||||
| 		</fieldset> | ||||
| 	</fields> | ||||
|  | ||||
| </form> | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										1
									
								
								administrator/components/com_content/models/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								administrator/components/com_content/models/index.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										25
									
								
								administrator/components/com_content/tables/featured.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								administrator/components/com_content/tables/featured.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  */ | ||||
| class ContentTableFeatured extends JTable | ||||
| { | ||||
| 	/** | ||||
| 	 * @param   JDatabaseDriver  A database connector object | ||||
| 	 */ | ||||
| 	public function __construct(&$db) | ||||
| 	{ | ||||
| 		parent::__construct('#__content_frontpage', 'content_id', $db); | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										1
									
								
								administrator/components/com_content/tables/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								administrator/components/com_content/tables/index.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
							
								
								
									
										297
									
								
								administrator/components/com_content/views/article/tmpl/edit.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										297
									
								
								administrator/components/com_content/views/article/tmpl/edit.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,297 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| // Include the component HTML helpers. | ||||
| JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); | ||||
|  | ||||
| JHtml::_('behavior.formvalidation'); | ||||
| JHtml::_('behavior.keepalive'); | ||||
| JHtml::_('formbehavior.chosen', 'select'); | ||||
|  | ||||
| // Create shortcut to parameters. | ||||
| $params = $this->state->get('params'); | ||||
| $params = $params->toArray(); | ||||
|  | ||||
| // This checks if the config options have ever been saved. If they haven't they will fall back to the original settings. | ||||
| $editoroptions = isset($params['show_publishing_options']); | ||||
|  | ||||
| $app = JFactory::getApplication(); | ||||
| $input = $app->input; | ||||
|  | ||||
| $assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
|  | ||||
| if (!$editoroptions) | ||||
| { | ||||
| 	$params['show_publishing_options'] = '1'; | ||||
| 	$params['show_article_options'] = '1'; | ||||
| 	$params['show_urls_images_backend'] = '0'; | ||||
| 	$params['show_urls_images_frontend'] = '0'; | ||||
| } | ||||
|  | ||||
| // Check if the article uses configuration settings besides global. If so, use them. | ||||
| if (!empty($this->item->attribs['show_publishing_options'])) | ||||
| { | ||||
| 	$params['show_publishing_options'] = $this->item->attribs['show_publishing_options']; | ||||
| } | ||||
|  | ||||
| if (!empty($this->item->attribs['show_article_options'])) | ||||
| { | ||||
| 	$params['show_article_options'] = $this->item->attribs['show_article_options']; | ||||
| } | ||||
|  | ||||
| if (!empty($this->item->attribs['show_urls_images_backend'])) | ||||
| { | ||||
| 	$params['show_urls_images_backend'] = $this->item->attribs['show_urls_images_backend']; | ||||
| } | ||||
|  | ||||
| ?> | ||||
|  | ||||
| <script type="text/javascript"> | ||||
| 	Joomla.submitbutton = function(task) | ||||
| 	{ | ||||
| 		if (task == 'article.cancel' || document.formvalidator.isValid(document.id('item-form'))) | ||||
| 		{ | ||||
| 			<?php echo $this->form->getField('articletext')->save(); ?> | ||||
| 			Joomla.submitform(task, document.getElementById('item-form')); | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
|  | ||||
| <form action="<?php echo JRoute::_('index.php?option=com_content&layout=edit&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate"> | ||||
|  | ||||
| 	<?php echo JLayoutHelper::render('joomla.edit.item_title', $this); ?> | ||||
|  | ||||
| 	<div class="row-fluid"> | ||||
| 		<!-- Begin Content --> | ||||
| 		<div class="span10 form-horizontal"> | ||||
| 			<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'general')); ?> | ||||
|  | ||||
| 				<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'general', JText::_('COM_CONTENT_ARTICLE_DETAILS', true)); ?> | ||||
| 					<fieldset class="adminform"> | ||||
| 						<div class="control-group form-inline"> | ||||
| 							<?php echo $this->form->getLabel('title'); ?> <?php echo $this->form->getInput('title'); ?> <?php echo $this->form->getLabel('catid'); ?> <?php echo $this->form->getInput('catid'); ?> | ||||
| 						</div> | ||||
| 						<?php echo $this->form->getInput('articletext'); ?> | ||||
| 					</fieldset> | ||||
| 					<?php | ||||
| 						// The url and images fields only show if the configuration is set to allow them. This is for legacy reasons. | ||||
| 					?> | ||||
| 					<?php if ($params['show_urls_images_backend']) : ?> | ||||
| 						<div class="row-fluid"> | ||||
| 							<div class="span6"> | ||||
| 								<h4><?php echo JText::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES');?></h4> | ||||
| 								<div class="control-group"> | ||||
| 									<?php echo $this->form->getLabel('images'); ?> | ||||
| 									<div class="controls"> | ||||
| 										<?php echo $this->form->getInput('images'); ?> | ||||
| 									</div> | ||||
| 								</div> | ||||
| 								<?php foreach ($this->form->getGroup('images') as $field) : ?> | ||||
| 									<div class="control-group"> | ||||
| 										<?php if (!$field->hidden) : ?> | ||||
| 											<?php echo $field->label; ?> | ||||
| 										<?php endif; ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $field->input; ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 								<?php endforeach; ?> | ||||
| 							</div> | ||||
| 							<div class="span6"> | ||||
| 								<?php foreach ($this->form->getGroup('urls') as $field) : ?> | ||||
| 									<div class="control-group"> | ||||
| 										<?php if (!$field->hidden) : ?> | ||||
| 												<?php echo $field->label; ?> | ||||
| 										<?php endif; ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $field->input; ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 								<?php endforeach; ?> | ||||
| 							</div> | ||||
| 						</div> | ||||
| 					<?php endif; ?> | ||||
| 				<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
|  | ||||
| 				<?php // Do not show the publishing options if the edit form is configured not to. ?> | ||||
| 					<?php  if ($params['show_publishing_options'] || ( $params['show_publishing_options'] = '' && !empty($editoroptions)) ) : ?> | ||||
| 						<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('COM_CONTENT_FIELDSET_PUBLISHING', true)); ?> | ||||
| 							<div class="row-fluid"> | ||||
| 								<div class="span6"> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('alias'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('alias'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<div class="control-label"> | ||||
| 											<?php echo $this->form->getLabel('id'); ?> | ||||
| 										</div> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('id'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('created_by'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('created_by'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('created_by_alias'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('created_by_alias'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('created'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('created'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 								</div> | ||||
| 								<div class="span6"> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('publish_up'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('publish_up'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('publish_down'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('publish_down'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<?php if ($this->item->modified_by) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $this->form->getLabel('modified_by'); ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('modified_by'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $this->form->getLabel('modified'); ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('modified'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endif; ?> | ||||
|  | ||||
| 									<?php if ($this->item->version) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $this->form->getLabel('version'); ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('version'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endif; ?> | ||||
|  | ||||
| 									<?php if ($this->item->hits) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<div class="control-label"> | ||||
| 												<?php echo $this->form->getLabel('hits'); ?> | ||||
| 											</div> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('hits'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endif; ?> | ||||
| 								</div> | ||||
| 							</div> | ||||
| 						<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 					<?php  endif; ?> | ||||
|  | ||||
| 					<?php if ($params['show_article_options'] || (( $params['show_article_options'] == '' && !empty($editoroptions) ))) : ?> | ||||
| 						<?php $fieldSets = $this->form->getFieldsets('attribs'); ?> | ||||
| 						<?php foreach ($fieldSets as $name => $fieldSet) : ?> | ||||
|  | ||||
| 							<?php if ($name != 'editorConfig' && $name != 'basic-limited') : ?> | ||||
| 								<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'attrib-' . $name, JText::_($fieldSet->label, true)); ?> | ||||
| 							<?php endif; ?> | ||||
|  | ||||
| 							<?php // If the parameter says to show the article options or if the parameters have never been set, we will show the article options.?> | ||||
| 							<?php if ($params['show_article_options'] || (( $params['show_article_options'] == '' && !empty($editoroptions) ))) : ?> | ||||
| 								<?php // Go through all the fieldsets except the configuration and basic-limited, which are handled separately below.?> | ||||
| 								<?php if ($name != 'editorConfig' && $name != 'basic-limited') : ?> | ||||
| 									<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?> | ||||
| 										<p class="tip"><?php echo $this->escape(JText::_($fieldSet->description));?></p> | ||||
| 									<?php endif; ?> | ||||
| 									<?php foreach ($this->form->getFieldset($name) as $field) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $field->label; ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $field->input; ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endforeach; ?> | ||||
| 								<?php endif; ?> | ||||
| 							<?php // If we are not showing the options we need to use the hidden fields so the values are not lost.?> | ||||
| 							<?php elseif ($name == 'basic-limited'): | ||||
| 								foreach ($this->form->getFieldset('basic-limited') as $field) : | ||||
| 									echo $field->input; | ||||
| 								endforeach; | ||||
| 							endif;?> | ||||
|  | ||||
| 							<?php if ($name != 'editorConfig' && $name != 'basic-limited') : ?> | ||||
| 								<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 							<?php endif; ?> | ||||
|  | ||||
| 						<?php endforeach; ?> | ||||
| 					<?php endif; ?> | ||||
|  | ||||
| 					<?php // We need to make a separate space for the configuration | ||||
| 						// so that those fields always show to those wih permissions | ||||
| 					?> | ||||
| 					<?php if ($this->canDo->get('core.admin')):  ?> | ||||
| 						<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'editor', JText::_('COM_CONTENT_SLIDER_EDITOR_CONFIG', true)); ?> | ||||
| 							<?php foreach ($this->form->getFieldset('editorConfig') as $field) : ?> | ||||
| 								<div class="control-group"> | ||||
| 									<?php echo $field->label; ?> | ||||
| 									<div class="controls"> | ||||
| 										<?php echo $field->input; ?> | ||||
| 									</div> | ||||
| 								</div> | ||||
| 							<?php endforeach; ?> | ||||
| 						<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 					<?php endif ?> | ||||
|  | ||||
| 					<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'metadata', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS', true)); ?> | ||||
| 							<?php echo $this->loadTemplate('metadata'); ?> | ||||
| 					<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
|  | ||||
| 					<?php if ($assoc) : ?> | ||||
| 						<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'associations', JText::_('JGLOBAL_FIELDSET_ASSOCIATIONS', true)); ?> | ||||
| 							<?php echo $this->loadTemplate('associations'); ?> | ||||
| 						<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 					<?php endif; ?> | ||||
|  | ||||
| 					<?php if ($this->canDo->get('core.admin')) : ?> | ||||
| 						<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'permissions', JText::_('COM_CONTENT_FIELDSET_RULES', true)); ?> | ||||
| 							<fieldset> | ||||
| 								<?php echo $this->form->getInput('rules'); ?> | ||||
| 							</fieldset> | ||||
| 						<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 					<?php endif; ?> | ||||
|  | ||||
| 			<?php echo JHtml::_('bootstrap.endTabSet'); ?> | ||||
|  | ||||
| 			<input type="hidden" name="task" value="" /> | ||||
| 			<input type="hidden" name="return" value="<?php echo $input->getCmd('return');?>" /> | ||||
| 			<?php echo JHtml::_('form.token'); ?> | ||||
| 		</div> | ||||
| 		<!-- End Content --> | ||||
| 		<!-- Begin Sidebar --> | ||||
| 			<?php echo JLayoutHelper::render('joomla.edit.details', $this); ?> | ||||
| 		<!-- End Sidebar --> | ||||
| 	</div> | ||||
| </form> | ||||
| @ -0,0 +1,12 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| echo JLayoutHelper::render('joomla.edit.associations', $this); | ||||
| @ -0,0 +1,13 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| echo JLayoutHelper::render('joomla.edit.metadata', $this); | ||||
| ?> | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
| @ -0,0 +1,312 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| // Include the component HTML helpers. | ||||
| JHtml::addIncludePath(JPATH_COMPONENT . '/helpers/html'); | ||||
|  | ||||
| // Load the tooltip behavior. | ||||
| JHtml::_('behavior.tooltip'); | ||||
| JHtml::_('behavior.formvalidation'); | ||||
| JHtml::_('behavior.keepalive'); | ||||
| JHtml::_('formbehavior.chosen', 'select'); | ||||
|  | ||||
| // Create shortcut to parameters. | ||||
| $params = $this->state->get('params'); | ||||
| $params = $params->toArray(); | ||||
|  | ||||
| // This checks if the config options have ever been saved. If they haven't they will fall back to the original settings. | ||||
| $editoroptions = isset($params['show_publishing_options']); | ||||
|  | ||||
| $app = JFactory::getApplication(); | ||||
| $input = $app->input; | ||||
|  | ||||
| $assoc = isset($app->item_associations) ? $app->item_associations : 0; | ||||
|  | ||||
| if (!$editoroptions) | ||||
| { | ||||
| 	$params['show_publishing_options'] = '1'; | ||||
| 	$params['show_article_options'] = '1'; | ||||
| 	$params['show_urls_images_backend'] = '0'; | ||||
| 	$params['show_urls_images_frontend'] = '0'; | ||||
| } | ||||
|  | ||||
| // Check if the article uses configuration settings besides global. If so, use them. | ||||
| if (!empty($this->item->attribs['show_publishing_options'])) | ||||
| { | ||||
| 	$params['show_publishing_options'] = $this->item->attribs['show_publishing_options']; | ||||
| } | ||||
|  | ||||
| if (!empty($this->item->attribs['show_article_options'])) | ||||
| { | ||||
| 	$params['show_article_options'] = $this->item->attribs['show_article_options']; | ||||
| } | ||||
|  | ||||
| if (!empty($this->item->attribs['show_urls_images_backend'])) | ||||
| { | ||||
| 	$params['show_urls_images_backend'] = $this->item->attribs['show_urls_images_backend']; | ||||
| } | ||||
|  | ||||
| ?> | ||||
|  | ||||
| <script type="text/javascript"> | ||||
| 	Joomla.submitbutton = function(task) | ||||
| 	{ | ||||
| 		if (task == 'article.cancel' || document.formvalidator.isValid(document.id('item-form'))) | ||||
| 		{ | ||||
| 			<?php echo $this->form->getField('articletext')->save(); ?> | ||||
|  | ||||
| 			if (window.opener && (task == 'article.save' || task == 'article.cancel')) | ||||
| 			{ | ||||
| 				window.opener.document.closeEditWindow = self; | ||||
| 				window.opener.setTimeout('window.document.closeEditWindow.close()', 1000); | ||||
| 			} | ||||
|  | ||||
| 		Joomla.submitform(task, document.getElementById('item-form')); | ||||
| 		} | ||||
| 	} | ||||
| </script> | ||||
| <div class="container-popup"> | ||||
|  | ||||
| <div class="pull-right"> | ||||
| 	<button class="btn btn-primary" type="button" onclick="Joomla.submitbutton('article.apply');"><?php echo JText::_('JTOOLBAR_APPLY') ?></button> | ||||
| 	<button class="btn btn-primary" type="button" onclick="Joomla.submitbutton('article.save');"><?php echo JText::_('JTOOLBAR_SAVE') ?></button> | ||||
| 	<button class="btn" type="button" onclick="Joomla.submitbutton('article.cancel');"><?php echo JText::_('JCANCEL') ?></button> | ||||
| </div> | ||||
|  | ||||
| <div class="clearfix"> </div> | ||||
| <hr class="hr-condensed" /> | ||||
|  | ||||
| <form action="<?php echo JRoute::_('index.php?option=com_content&layout=modal&tmpl=component&id='.(int) $this->item->id); ?>" method="post" name="adminForm" id="item-form" class="form-validate"> | ||||
| 	<div class="row-fluid"> | ||||
| 		<!-- Begin Content --> | ||||
| 		<div class="span10 form-horizontal"> | ||||
| 			<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'general')); ?> | ||||
|  | ||||
| 				<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'general', JText::_('COM_CONTENT_ARTICLE_DETAILS', true)); ?> | ||||
| 					<fieldset class="adminform"> | ||||
| 						<div class="control-group form-inline"> | ||||
| 							<?php echo $this->form->getLabel('title'); ?> <?php echo $this->form->getInput('title'); ?> <?php echo $this->form->getLabel('catid'); ?> <?php echo $this->form->getInput('catid'); ?> | ||||
| 						</div> | ||||
| 						<?php echo $this->form->getInput('articletext'); ?> | ||||
| 					</fieldset> | ||||
| 					<?php | ||||
| 						// The url and images fields only show if the configuration is set to allow them. This is for legacy reasons. | ||||
| 					?> | ||||
| 					<?php if ($params['show_urls_images_backend']) : ?> | ||||
| 						<div class="row-fluid"> | ||||
| 							<div class="span6"> | ||||
| 								<h4><?php echo JText::_('COM_CONTENT_FIELDSET_URLS_AND_IMAGES');?></h4> | ||||
| 								<div class="control-group"> | ||||
| 									<?php echo $this->form->getLabel('images'); ?> | ||||
| 									<div class="controls"> | ||||
| 										<?php echo $this->form->getInput('images'); ?> | ||||
| 									</div> | ||||
| 								</div> | ||||
| 								<?php foreach ($this->form->getGroup('images') as $field) : ?> | ||||
| 									<div class="control-group"> | ||||
| 										<?php if (!$field->hidden) : ?> | ||||
| 											<?php echo $field->label; ?> | ||||
| 										<?php endif; ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $field->input; ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 								<?php endforeach; ?> | ||||
| 							</div> | ||||
| 							<div class="span6"> | ||||
| 								<?php foreach ($this->form->getGroup('urls') as $field) : ?> | ||||
| 									<div class="control-group"> | ||||
| 										<?php if (!$field->hidden) : ?> | ||||
| 												<?php echo $field->label; ?> | ||||
| 										<?php endif; ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $field->input; ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 								<?php endforeach; ?> | ||||
| 							</div> | ||||
| 						</div> | ||||
| 					<?php endif; ?> | ||||
| 				<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
|  | ||||
| 				<?php // Do not show the publishing options if the edit form is configured not to. ?> | ||||
| 					<?php  if ($params['show_publishing_options'] || ( $params['show_publishing_options'] = '' && !empty($editoroptions)) ) : ?> | ||||
| 						<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'publishing', JText::_('COM_CONTENT_FIELDSET_PUBLISHING', true)); ?> | ||||
| 							<div class="row-fluid"> | ||||
| 								<div class="span6"> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('alias'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('alias'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<div class="control-label"> | ||||
| 											<?php echo $this->form->getLabel('id'); ?> | ||||
| 										</div> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('id'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('created_by'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('created_by'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('created_by_alias'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('created_by_alias'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('created'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('created'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 								</div> | ||||
| 								<div class="span6"> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('publish_up'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('publish_up'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<div class="control-group"> | ||||
| 										<?php echo $this->form->getLabel('publish_down'); ?> | ||||
| 										<div class="controls"> | ||||
| 											<?php echo $this->form->getInput('publish_down'); ?> | ||||
| 										</div> | ||||
| 									</div> | ||||
| 									<?php if ($this->item->modified_by) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $this->form->getLabel('modified_by'); ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('modified_by'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $this->form->getLabel('modified'); ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('modified'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endif; ?> | ||||
|  | ||||
| 									<?php if ($this->item->version) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $this->form->getLabel('version'); ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('version'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endif; ?> | ||||
|  | ||||
| 									<?php if ($this->item->hits) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<div class="control-label"> | ||||
| 												<?php echo $this->form->getLabel('hits'); ?> | ||||
| 											</div> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $this->form->getInput('hits'); ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endif; ?> | ||||
| 								</div> | ||||
| 							</div> | ||||
| 						<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 					<?php  endif; ?> | ||||
|  | ||||
| 					<?php if ($params['show_article_options'] || (( $params['show_article_options'] == '' && !empty($editoroptions) ))) : ?> | ||||
| 						<?php $fieldSets = $this->form->getFieldsets('attribs'); ?> | ||||
| 						<?php foreach ($fieldSets as $name => $fieldSet) : ?> | ||||
|  | ||||
| 							<?php if ($name != 'editorConfig' && $name != 'basic-limited') : ?> | ||||
| 								<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'attrib-' . $name, JText::_($fieldSet->label, true)); ?> | ||||
| 							<?php endif; ?> | ||||
|  | ||||
| 							<?php // If the parameter says to show the article options or if the parameters have never been set, we will show the article options.?> | ||||
| 							<?php if ($params['show_article_options'] || (( $params['show_article_options'] == '' && !empty($editoroptions) ))) : ?> | ||||
| 								<?php // Go through all the fieldsets except the configuration and basic-limited, which are handled separately below.?> | ||||
| 								<?php if ($name != 'editorConfig' && $name != 'basic-limited') : ?> | ||||
| 									<?php if (isset($fieldSet->description) && trim($fieldSet->description)) : ?> | ||||
| 										<p class="tip"><?php echo $this->escape(JText::_($fieldSet->description));?></p> | ||||
| 									<?php endif; ?> | ||||
| 									<?php foreach ($this->form->getFieldset($name) as $field) : ?> | ||||
| 										<div class="control-group"> | ||||
| 											<?php echo $field->label; ?> | ||||
| 											<div class="controls"> | ||||
| 												<?php echo $field->input; ?> | ||||
| 											</div> | ||||
| 										</div> | ||||
| 									<?php endforeach; ?> | ||||
| 								<?php endif; ?> | ||||
| 							<?php // If we are not showing the options we need to use the hidden fields so the values are not lost.?> | ||||
| 							<?php elseif ($name == 'basic-limited'): | ||||
| 								foreach ($this->form->getFieldset('basic-limited') as $field) : | ||||
| 									echo $field->input; | ||||
| 								endforeach; | ||||
| 							endif;?> | ||||
|  | ||||
| 							<?php if ($name != 'editorConfig' && $name != 'basic-limited') : ?> | ||||
| 								<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 							<?php endif; ?> | ||||
|  | ||||
| 						<?php endforeach; ?> | ||||
| 					<?php endif; ?> | ||||
|  | ||||
| 					<?php // We need to make a separate space for the configuration | ||||
| 						// so that those fields always show to those wih permissions | ||||
| 					?> | ||||
| 					<?php if ($this->canDo->get('core.admin')):  ?> | ||||
| 						<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'editor', JText::_('COM_CONTENT_SLIDER_EDITOR_CONFIG', true)); ?> | ||||
| 							<?php foreach ($this->form->getFieldset('editorConfig') as $field) : ?> | ||||
| 								<div class="control-group"> | ||||
| 									<?php echo $field->label; ?> | ||||
| 									<div class="controls"> | ||||
| 										<?php echo $field->input; ?> | ||||
| 									</div> | ||||
| 								</div> | ||||
| 							<?php endforeach; ?> | ||||
| 						<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 					<?php endif ?> | ||||
|  | ||||
| 					<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'metadata', JText::_('JGLOBAL_FIELDSET_METADATA_OPTIONS', true)); ?> | ||||
| 							<?php echo $this->loadTemplate('metadata'); ?> | ||||
| 					<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
|  | ||||
| 					<?php if ($this->canDo->get('core.admin')) : ?> | ||||
| 						<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'permissions', JText::_('COM_CONTENT_FIELDSET_RULES', true)); ?> | ||||
| 							<fieldset> | ||||
| 								<?php echo $this->form->getInput('rules'); ?> | ||||
| 							</fieldset> | ||||
| 						<?php echo JHtml::_('bootstrap.endTab'); ?> | ||||
| 					<?php endif; ?> | ||||
|  | ||||
| 			<?php echo JHtml::_('bootstrap.endTabSet'); ?> | ||||
|  | ||||
| 			<div class="hidden"> | ||||
| 				<?php echo $this->loadTemplate('associations'); ?> | ||||
| 			</div> | ||||
|  | ||||
| 			<input type="hidden" name="task" value="" /> | ||||
| 			<input type="hidden" name="return" value="<?php echo $input->getCmd('return');?>" /> | ||||
| 			<?php echo JHtml::_('form.token'); ?> | ||||
| 		</div> | ||||
| 		<!-- End Content --> | ||||
| 		<!-- Begin Sidebar --> | ||||
| 			<?php echo JLayoutHelper::render('joomla.edit.details', $this); ?> | ||||
| 		<!-- End Sidebar --> | ||||
| 	</div> | ||||
| </form> | ||||
| </div> | ||||
| @ -0,0 +1,12 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| echo JLayoutHelper::render('joomla.edit.associations', $this); | ||||
| @ -0,0 +1,13 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| echo JLayoutHelper::render('joomla.edit.metadata', $this); | ||||
| ?> | ||||
| @ -0,0 +1,56 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| $script  = 'function insertPagebreak() {'."\n\t"; | ||||
| // Get the pagebreak title | ||||
| $script .= 'var title = document.getElementById("title").value;'."\n\t"; | ||||
| $script .= 'if (title != \'\') {'."\n\t\t"; | ||||
| $script .= 'title = "title=\""+title+"\" ";'."\n\t"; | ||||
| $script .= '}'."\n\t"; | ||||
| // Get the pagebreak toc alias -- not inserting for now | ||||
| // don't know which attribute to use... | ||||
| $script .= 'var alt = document.getElementById("alt").value;'."\n\t"; | ||||
| $script .= 'if (alt != \'\') {'."\n\t\t"; | ||||
| $script .= 'alt = "alt=\""+alt+"\" ";'."\n\t"; | ||||
| $script .= '}'."\n\t"; | ||||
| $script .= 'var tag = "<hr class=\"system-pagebreak\" "+title+" "+alt+"/>";'."\n\t"; | ||||
| $script .= 'window.parent.jInsertEditorText(tag, \''.$this->eName.'\');'."\n\t"; | ||||
| $script .= 'window.parent.SqueezeBox.close();'."\n\t"; | ||||
| $script .= 'return false;'."\n"; | ||||
| $script .= '}'."\n"; | ||||
|  | ||||
| JFactory::getDocument()->addScriptDeclaration($script); | ||||
| ?> | ||||
| 		<form> | ||||
| 		<table width="100%" align="center"> | ||||
| 			<tr width="40%"> | ||||
| 				<td class="key" align="right"> | ||||
| 					<label for="title"> | ||||
| 						<?php echo JText::_('COM_CONTENT_PAGEBREAK_TITLE'); ?> | ||||
| 					</label> | ||||
| 				</td> | ||||
| 				<td> | ||||
| 					<input type="text" id="title" name="title" /> | ||||
| 				</td> | ||||
| 			</tr> | ||||
| 			<tr width="60%"> | ||||
| 				<td class="key" align="right"> | ||||
| 					<label for="alias"> | ||||
| 						<?php echo JText::_('COM_CONTENT_PAGEBREAK_TOC'); ?> | ||||
| 					</label> | ||||
| 				</td> | ||||
| 				<td> | ||||
| 					<input type="text" id="alt" name="alt" /> | ||||
| 				</td> | ||||
| 			</tr> | ||||
| 		</table> | ||||
| 		</form> | ||||
| 		<button onclick="insertPagebreak();"><?php echo JText::_('COM_CONTENT_PAGEBREAK_INSERT_BUTTON'); ?></button> | ||||
							
								
								
									
										122
									
								
								administrator/components/com_content/views/article/view.html.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										122
									
								
								administrator/components/com_content/views/article/view.html.php
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,122 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * View to edit an article. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class ContentViewArticle extends JViewLegacy | ||||
| { | ||||
| 	protected $form; | ||||
|  | ||||
| 	protected $item; | ||||
|  | ||||
| 	protected $state; | ||||
|  | ||||
| 	/** | ||||
| 	 * Display the view | ||||
| 	 */ | ||||
| 	public function display($tpl = null) | ||||
| 	{ | ||||
| 		if ($this->getLayout() == 'pagebreak') | ||||
| 		{ | ||||
| 			// TODO: This is really dogy - should change this one day. | ||||
| 			$eName    = JRequest::getVar('e_name'); | ||||
| 			$eName    = preg_replace('#[^A-Z0-9\-\_\[\]]#i', '', $eName); | ||||
| 			$document = JFactory::getDocument(); | ||||
| 			$document->setTitle(JText::_('COM_CONTENT_PAGEBREAK_DOC_TITLE')); | ||||
| 			$this->eName = &$eName; | ||||
| 			parent::display($tpl); | ||||
| 			return; | ||||
| 		} | ||||
|  | ||||
| 		$this->form		= $this->get('Form'); | ||||
| 		$this->item		= $this->get('Item'); | ||||
| 		$this->state	= $this->get('State'); | ||||
| 		$this->canDo	= ContentHelper::getActions($this->state->get('filter.category_id')); | ||||
|  | ||||
| 		// Check for errors. | ||||
| 		if (count($errors = $this->get('Errors'))) | ||||
| 		{ | ||||
| 			JError::raiseError(500, implode("\n", $errors)); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		if ($this->getLayout() == 'modal') | ||||
| 		{ | ||||
| 			$this->form->setFieldAttribute('language', 'readonly', 'true'); | ||||
| 			$this->form->setFieldAttribute('catid', 'readonly', 'true'); | ||||
| 		} | ||||
|  | ||||
| 		$this->addToolbar(); | ||||
| 		parent::display($tpl); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Add the page title and toolbar. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function addToolbar() | ||||
| 	{ | ||||
| 		JFactory::getApplication()->input->set('hidemainmenu', true); | ||||
| 		$user		= JFactory::getUser(); | ||||
| 		$userId		= $user->get('id'); | ||||
| 		$isNew		= ($this->item->id == 0); | ||||
| 		$checkedOut	= !($this->item->checked_out == 0 || $this->item->checked_out == $userId); | ||||
| 		$canDo		= ContentHelper::getActions($this->state->get('filter.category_id'), $this->item->id); | ||||
| 		JToolbarHelper::title(JText::_('COM_CONTENT_PAGE_'.($checkedOut ? 'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' : 'EDIT_ARTICLE'))), 'article-add.png'); | ||||
|  | ||||
| 		// Built the actions for new and existing records. | ||||
|  | ||||
| 		// For new records, check the create permission. | ||||
| 		if ($isNew && (count($user->getAuthorisedCategories('com_content', 'core.create')) > 0)) | ||||
| 		{ | ||||
| 			JToolbarHelper::apply('article.apply'); | ||||
| 			JToolbarHelper::save('article.save'); | ||||
| 			JToolbarHelper::save2new('article.save2new'); | ||||
| 			JToolbarHelper::cancel('article.cancel'); | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			// Can't save the record if it's checked out. | ||||
| 			if (!$checkedOut) | ||||
| 			{ | ||||
| 				// Since it's an existing record, check the edit permission, or fall back to edit own if the owner. | ||||
| 				if ($canDo->get('core.edit') || ($canDo->get('core.edit.own') && $this->item->created_by == $userId)) | ||||
| 				{ | ||||
| 					JToolbarHelper::apply('article.apply'); | ||||
| 					JToolbarHelper::save('article.save'); | ||||
|  | ||||
| 					// We can save this record, but check the create permission to see if we can return to make a new one. | ||||
| 					if ($canDo->get('core.create')) | ||||
| 					{ | ||||
| 						JToolbarHelper::save2new('article.save2new'); | ||||
| 					} | ||||
| 				} | ||||
| 			} | ||||
|  | ||||
| 			// If checked out, we can still save | ||||
| 			if ($canDo->get('core.create')) | ||||
| 			{ | ||||
| 				JToolbarHelper::save2copy('article.save2copy'); | ||||
| 			} | ||||
|  | ||||
| 			JToolbarHelper::cancel('article.cancel', 'JTOOLBAR_CLOSE'); | ||||
| 		} | ||||
|  | ||||
| 		JToolbarHelper::divider(); | ||||
| 		JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER_EDIT'); | ||||
| 	} | ||||
| } | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
| @ -0,0 +1,283 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); | ||||
|  | ||||
| JHtml::_('bootstrap.tooltip'); | ||||
| JHtml::_('behavior.multiselect'); | ||||
| JHtml::_('dropdown.init'); | ||||
| JHtml::_('formbehavior.chosen', 'select'); | ||||
|  | ||||
| $app		= JFactory::getApplication(); | ||||
| $user		= JFactory::getUser(); | ||||
| $userId		= $user->get('id'); | ||||
| $listOrder	= $this->escape($this->state->get('list.ordering')); | ||||
| $listDirn	= $this->escape($this->state->get('list.direction')); | ||||
| $archived	= $this->state->get('filter.published') == 2 ? true : false; | ||||
| $trashed	= $this->state->get('filter.published') == -2 ? true : false; | ||||
| $saveOrder	= $listOrder == 'a.ordering'; | ||||
| if ($saveOrder) | ||||
| { | ||||
| 	$saveOrderingUrl = 'index.php?option=com_content&task=articles.saveOrderAjax&tmpl=component'; | ||||
| 	JHtml::_('sortablelist.sortable', 'articleList', 'adminForm', strtolower($listDirn), $saveOrderingUrl); | ||||
| } | ||||
|  | ||||
| $sortFields = $this->getSortFields(); | ||||
| $assoc		= isset($app->item_associations) ? $app->item_associations : 0; | ||||
| ?> | ||||
| <script type="text/javascript"> | ||||
| 	Joomla.orderTable = function() | ||||
| 	{ | ||||
| 		table = document.getElementById("sortTable"); | ||||
| 		direction = document.getElementById("directionTable"); | ||||
| 		order = table.options[table.selectedIndex].value; | ||||
| 		if (order != '<?php echo $listOrder; ?>') | ||||
| 		{ | ||||
| 			dirn = 'asc'; | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			dirn = direction.options[direction.selectedIndex].value; | ||||
| 		} | ||||
| 		Joomla.tableOrdering(order, dirn, ''); | ||||
| 	} | ||||
| </script> | ||||
|  | ||||
| <form action="<?php echo JRoute::_('index.php?option=com_content&view=articles'); ?>" method="post" name="adminForm" id="adminForm"> | ||||
| <?php if (!empty( $this->sidebar)) : ?> | ||||
| 	<div id="j-sidebar-container" class="span2"> | ||||
| 		<?php echo $this->sidebar; ?> | ||||
| 	</div> | ||||
| 	<div id="j-main-container" class="span10"> | ||||
| <?php else : ?> | ||||
| 	<div id="j-main-container"> | ||||
| <?php endif;?> | ||||
| 		<div id="filter-bar" class="btn-toolbar"> | ||||
| 			<div class="filter-search btn-group pull-left"> | ||||
| 				<label for="filter_search" class="element-invisible"><?php echo JText::_('COM_CONTENT_FILTER_SEARCH_DESC'); ?></label> | ||||
| 				<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_FILTER_SEARCH_DESC'); ?>" /> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-left hidden-phone"> | ||||
| 				<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button> | ||||
| 				<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-right hidden-phone"> | ||||
| 				<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label> | ||||
| 				<?php echo $this->pagination->getLimitBox(); ?> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-right hidden-phone"> | ||||
| 				<label for="directionTable" class="element-invisible"><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></label> | ||||
| 				<select name="directionTable" id="directionTable" class="input-medium" onchange="Joomla.orderTable()"> | ||||
| 					<option value=""><?php echo JText::_('JFIELD_ORDERING_DESC'); ?></option> | ||||
| 					<option value="asc" <?php if ($listDirn == 'asc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_ASCENDING'); ?></option> | ||||
| 					<option value="desc" <?php if ($listDirn == 'desc') echo 'selected="selected"'; ?>><?php echo JText::_('JGLOBAL_ORDER_DESCENDING');  ?></option> | ||||
| 				</select> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-right"> | ||||
| 				<label for="sortTable" class="element-invisible"><?php echo JText::_('JGLOBAL_SORT_BY'); ?></label> | ||||
| 				<select name="sortTable" id="sortTable" class="input-medium" onchange="Joomla.orderTable()"> | ||||
| 					<option value=""><?php echo JText::_('JGLOBAL_SORT_BY');?></option> | ||||
| 					<?php echo JHtml::_('select.options', $sortFields, 'value', 'text', $listOrder); ?> | ||||
| 				</select> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="clearfix"> </div> | ||||
|  | ||||
| 		<table class="table table-striped" id="articleList"> | ||||
| 			<thead> | ||||
| 				<tr> | ||||
| 					<th width="1%" class="nowrap center hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', '<i class="icon-menu-2"></i>', 'a.ordering', $listDirn, $listOrder, null, 'asc', 'JGRID_HEADING_ORDERING'); ?> | ||||
| 					</th> | ||||
| 					<th width="1%" class="hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.checkall'); ?> | ||||
| 					</th> | ||||
| 					<th width="1%" style="min-width:55px" class="nowrap center"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="10%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort',  'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 				<?php if ($assoc) : ?> | ||||
| 					<th width="5%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'COM_CONTENT_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 				<?php endif;?> | ||||
| 					<th width="10%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort',  'JAUTHOR', 'a.created_by', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="5%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="10%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JDATE', 'a.created', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="10%"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGLOBAL_HITS', 'a.hits', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="1%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 				</tr> | ||||
| 			</thead> | ||||
| 			<tbody> | ||||
| 			<?php foreach ($this->items as $i => $item) : | ||||
| 				$item->max_ordering = 0; //?? | ||||
| 				$ordering   = ($listOrder == 'a.ordering'); | ||||
| 				$canCreate  = $user->authorise('core.create',     'com_content.category.'.$item->catid); | ||||
| 				$canEdit    = $user->authorise('core.edit',       'com_content.article.'.$item->id); | ||||
| 				$canCheckin = $user->authorise('core.manage',     'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0; | ||||
| 				$canEditOwn = $user->authorise('core.edit.own',   'com_content.article.'.$item->id) && $item->created_by == $userId; | ||||
| 				$canChange  = $user->authorise('core.edit.state', 'com_content.article.'.$item->id) && $canCheckin; | ||||
| 				?> | ||||
| 				<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid; ?>"> | ||||
| 					<td class="order nowrap center hidden-phone"> | ||||
| 						<?php | ||||
| 						$iconClass = ''; | ||||
| 						if (!$canChange) | ||||
| 						{ | ||||
| 							$iconClass = ' inactive'; | ||||
| 						} | ||||
| 						elseif (!$saveOrder) | ||||
| 						{ | ||||
| 							$iconClass = ' inactive tip-top hasTooltip" title="' . JHtml::tooltipText('JORDERINGDISABLED'); | ||||
| 						} | ||||
| 						?> | ||||
| 						<span class="sortable-handler<?php echo $iconClass ?>"> | ||||
| 							<i class="icon-menu"></i> | ||||
| 						</span> | ||||
| 						<?php if ($canChange && $saveOrder) : ?> | ||||
| 							<input type="text" style="display:none" name="order[]" size="5" value="<?php echo $item->ordering; ?>" class="width-20 text-area-order " /> | ||||
| 						<?php endif; ?> | ||||
| 					</td> | ||||
| 					<td class="center hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.id', $i, $item->id); ?> | ||||
| 					</td> | ||||
| 					<td class="center"> | ||||
| 						<div class="btn-group"> | ||||
| 							<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?> | ||||
| 							<?php echo JHtml::_('contentadministrator.featured', $item->featured, $i, $canChange); ?> | ||||
| 						</div> | ||||
| 					</td> | ||||
| 					<td class="nowrap has-context"> | ||||
| 						<div class="pull-left"> | ||||
| 							<?php if ($item->checked_out) : ?> | ||||
| 								<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'articles.', $canCheckin); ?> | ||||
| 							<?php endif; ?> | ||||
| 							<?php if ($item->language == '*'):?> | ||||
| 								<?php $language = JText::alt('JALL', 'language'); ?> | ||||
| 							<?php else:?> | ||||
| 								<?php $language = $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> | ||||
| 							<?php endif;?> | ||||
| 							<?php if ($canEdit || $canEditOwn) : ?> | ||||
| 								<a href="<?php echo JRoute::_('index.php?option=com_content&task=article.edit&id=' . $item->id); ?>" title="<?php echo JText::_('JACTION_EDIT'); ?>"> | ||||
| 									<?php echo $this->escape($item->title); ?></a> | ||||
| 							<?php else : ?> | ||||
| 								<span title="<?php echo JText::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span> | ||||
| 							<?php endif; ?> | ||||
| 							<div class="small"> | ||||
| 								<?php echo JText::_('JCATEGORY') . ": " . $this->escape($item->category_title); ?> | ||||
| 							</div> | ||||
| 						</div> | ||||
| 						<div class="pull-left"> | ||||
| 							<?php | ||||
| 								// Create dropdown items | ||||
| 								JHtml::_('dropdown.edit', $item->id, 'article.'); | ||||
| 								JHtml::_('dropdown.divider'); | ||||
| 								if ($item->state) : | ||||
| 									JHtml::_('dropdown.unpublish', 'cb' . $i, 'articles.'); | ||||
| 								else : | ||||
| 									JHtml::_('dropdown.publish', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								if ($item->featured) : | ||||
| 									JHtml::_('dropdown.unfeatured', 'cb' . $i, 'articles.'); | ||||
| 								else : | ||||
| 									JHtml::_('dropdown.featured', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								JHtml::_('dropdown.divider'); | ||||
|  | ||||
| 								if ($archived) : | ||||
| 									JHtml::_('dropdown.unarchive', 'cb' . $i, 'articles.'); | ||||
| 								else : | ||||
| 									JHtml::_('dropdown.archive', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								if ($item->checked_out) : | ||||
| 									JHtml::_('dropdown.checkin', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								if ($trashed) : | ||||
| 									JHtml::_('dropdown.untrash', 'cb' . $i, 'articles.'); | ||||
| 								else : | ||||
| 									JHtml::_('dropdown.trash', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								// Render dropdown list | ||||
| 								echo JHtml::_('dropdown.render'); | ||||
| 								?> | ||||
| 						</div> | ||||
| 					</td> | ||||
| 					<td class="small hidden-phone"> | ||||
| 						<?php echo $this->escape($item->access_level); ?> | ||||
| 					</td> | ||||
| 					<?php if ($assoc) : ?> | ||||
| 					<td class="hidden-phone"> | ||||
| 						<?php if ($item->association) : ?> | ||||
| 							<?php echo JHtml::_('contentadministrator.association', $item->id); ?> | ||||
| 						<?php endif; ?> | ||||
| 					</td> | ||||
| 					<?php endif;?> | ||||
| 					<td class="small hidden-phone"> | ||||
| 						<?php if ($item->created_by_alias) : ?> | ||||
| 							<a href="<?php echo JRoute::_('index.php?option=com_users&task=user.edit&id='.(int) $item->created_by); ?>" title="<?php echo JText::_('JAUTHOR'); ?>"> | ||||
| 							<?php echo $this->escape($item->author_name); ?></a> | ||||
| 							<p class="smallsub"> <?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->created_by_alias)); ?></p> | ||||
| 						<?php else : ?> | ||||
| 							<a href="<?php echo JRoute::_('index.php?option=com_users&task=user.edit&id='.(int) $item->created_by); ?>" title="<?php echo JText::_('JAUTHOR'); ?>"> | ||||
| 							<?php echo $this->escape($item->author_name); ?></a> | ||||
| 						<?php endif; ?> | ||||
| 					</td> | ||||
| 					<td class="small hidden-phone"> | ||||
| 						<?php if ($item->language == '*'):?> | ||||
| 							<?php echo JText::alt('JALL', 'language'); ?> | ||||
| 						<?php else:?> | ||||
| 							<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> | ||||
| 						<?php endif;?> | ||||
| 					</td> | ||||
| 					<td class="nowrap small hidden-phone"> | ||||
| 						<?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?> | ||||
| 					</td> | ||||
| 					<td class="center"> | ||||
| 						<?php echo (int) $item->hits; ?> | ||||
| 					</td> | ||||
| 					<td class="center hidden-phone"> | ||||
| 						<?php echo (int) $item->id; ?> | ||||
| 					</td> | ||||
| 				</tr> | ||||
| 				<?php endforeach; ?> | ||||
| 			</tbody> | ||||
| 		</table> | ||||
| 		<?php echo $this->pagination->getListFooter(); ?> | ||||
| 		<?php //Load the batch processing form. ?> | ||||
| 		<?php echo $this->loadTemplate('batch'); ?> | ||||
|  | ||||
| 		<input type="hidden" name="task" value="" /> | ||||
| 		<input type="hidden" name="boxchecked" value="0" /> | ||||
| 		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" /> | ||||
| 		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" /> | ||||
| 		<?php echo JHtml::_('form.token'); ?> | ||||
| 	</div> | ||||
| </form> | ||||
| @ -0,0 +1,52 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| $published = $this->state->get('filter.published'); | ||||
| ?> | ||||
| <div class="modal hide fade" id="collapseModal"> | ||||
| 	<div class="modal-header"> | ||||
| 		<button type="button" role="presentation" class="close" data-dismiss="modal">x</button> | ||||
| 		<h3><?php echo JText::_('COM_CONTENT_BATCH_OPTIONS');?></h3> | ||||
| 	</div> | ||||
| 	<div class="modal-body"> | ||||
| 		<p><?php echo JText::_('COM_CONTENT_BATCH_TIP'); ?></p> | ||||
| 		<div class="control-group"> | ||||
| 			<div class="controls"> | ||||
| 				<?php echo JHtml::_('batch.access');?> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="control-group"> | ||||
| 			<div class="controls"> | ||||
| 				<?php echo JHtml::_('batch.tag');?> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="control-group"> | ||||
| 			<div class="controls"> | ||||
| 				<?php echo JHtml::_('batch.language'); ?> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<?php if ($published >= 0) : ?> | ||||
| 		<div class="control-group"> | ||||
| 			<div class="controls"> | ||||
| 				<?php echo JHtml::_('batch.item', 'com_content');?> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<?php endif; ?> | ||||
| 	</div> | ||||
| 	<div class="modal-footer"> | ||||
| 		<button class="btn" type="button" onclick="document.id('batch-category-id').value='';document.id('batch-access').value='';document.id('batch-language-id').value='';document.id('batch-tag-id)').value=''" data-dismiss="modal"> | ||||
| 			<?php echo JText::_('JCANCEL'); ?> | ||||
| 		</button> | ||||
| 		<button class="btn btn-primary" type="submit" onclick="Joomla.submitbutton('article.batch');"> | ||||
| 			<?php echo JText::_('JGLOBAL_BATCH_PROCESS'); ?> | ||||
| 		</button> | ||||
| 	</div> | ||||
| </div> | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
| @ -0,0 +1,167 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| $app = JFactory::getApplication(); | ||||
|  | ||||
| if ($app->isSite()) | ||||
| { | ||||
| 	JSession::checkToken('get') or die(JText::_('JINVALID_TOKEN')); | ||||
| } | ||||
|  | ||||
| require_once JPATH_ROOT . '/components/com_content/helpers/route.php'; | ||||
|  | ||||
| JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); | ||||
| JHtml::_('bootstrap.tooltip'); | ||||
|  | ||||
| $function  = $app->input->getCmd('function', 'jSelectArticle'); | ||||
| $listOrder = $this->escape($this->state->get('list.ordering')); | ||||
| $listDirn  = $this->escape($this->state->get('list.direction')); | ||||
| ?> | ||||
| <form action="<?php echo JRoute::_('index.php?option=com_content&view=articles&layout=modal&tmpl=component&function='.$function.'&'.JSession::getFormToken().'=1');?>" method="post" name="adminForm" id="adminForm" class="form-inline"> | ||||
| 	<fieldset class="filter clearfix"> | ||||
| 		<div class="btn-toolbar"> | ||||
| 			<div class="btn-group pull-left"> | ||||
| 				<label for="filter_search"> | ||||
| 					<?php echo JText::_('JSEARCH_FILTER_LABEL'); ?> | ||||
| 				</label> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-left"> | ||||
| 				<input type="text" name="filter_search" id="filter_search" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" size="30" title="<?php echo JText::_('COM_CONTENT_FILTER_SEARCH_DESC'); ?>" /> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-left"> | ||||
| 				<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>" data-placement="bottom"> | ||||
| 					<span class="icon-search"></span><?php echo ' ' . JText::_('JSEARCH_FILTER_SUBMIT'); ?></button> | ||||
| 				<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" data-placement="bottom" onclick="document.id('filter_search').value='';this.form.submit();"> | ||||
| 					<span class="icon-remove"></span><?php echo ' ' . JText::_('JSEARCH_FILTER_CLEAR'); ?></button> | ||||
| 			</div> | ||||
| 			<div class="clearfix"></div> | ||||
| 		</div> | ||||
| 		<hr class="hr-condensed" /> | ||||
| 		<div class="filters pull-left"> | ||||
| 			<select name="filter_access" class="input-medium" onchange="this.form.submit()"> | ||||
| 				<option value=""><?php echo JText::_('JOPTION_SELECT_ACCESS');?></option> | ||||
| 				<?php echo JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access'));?> | ||||
| 			</select> | ||||
|  | ||||
| 			<select name="filter_published" class="input-medium" onchange="this.form.submit()"> | ||||
| 				<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option> | ||||
| 				<?php echo JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true);?> | ||||
| 			</select> | ||||
|  | ||||
| 			<?php if ($this->state->get('filter.forcedLanguage')) : ?> | ||||
| 			<select name="filter_category_id" class="input-medium" onchange="this.form.submit()"> | ||||
| 				<option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY');?></option> | ||||
| 				<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_content', array('filter.language' => array('*', $this->state->get('filter.forcedLanguage')))), 'value', 'text', $this->state->get('filter.category_id'));?> | ||||
| 			</select> | ||||
| 			<input type="hidden" name="forcedLanguage" value="<?php echo $this->escape($this->state->get('filter.forcedLanguage')); ?>" /> | ||||
| 			<input type="hidden" name="filter_language" value="<?php echo $this->escape($this->state->get('filter.language')); ?>" /> | ||||
| 			<?php else : ?> | ||||
| 			<select name="filter_category_id" class="input-medium" onchange="this.form.submit()"> | ||||
| 				<option value=""><?php echo JText::_('JOPTION_SELECT_CATEGORY');?></option> | ||||
| 				<?php echo JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id'));?> | ||||
| 			</select> | ||||
| 			<select name="filter_language" class="input-medium" onchange="this.form.submit()"> | ||||
| 				<option value=""><?php echo JText::_('JOPTION_SELECT_LANGUAGE');?></option> | ||||
| 				<?php echo JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language'));?> | ||||
| 			</select> | ||||
| 			<?php endif; ?> | ||||
| 		</div> | ||||
| 	</fieldset> | ||||
|  | ||||
| 	<table class="table table-striped table-condensed"> | ||||
| 		<thead> | ||||
| 			<tr> | ||||
| 				<th class="title"> | ||||
| 					<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> | ||||
| 				</th> | ||||
| 				<th width="15%" class="center nowrap"> | ||||
| 					<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'access_level', $listDirn, $listOrder); ?> | ||||
| 				</th> | ||||
| 				<th width="15%" class="center nowrap"> | ||||
| 					<?php echo JHtml::_('grid.sort', 'JCATEGORY', 'a.catid', $listDirn, $listOrder); ?> | ||||
| 				</th> | ||||
| 				<th width="5%" class="center nowrap"> | ||||
| 					<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?> | ||||
| 				</th> | ||||
| 				<th width="5%" class="center nowrap"> | ||||
| 					<?php echo JHtml::_('grid.sort', 'JDATE', 'a.created', $listDirn, $listOrder); ?> | ||||
| 				</th> | ||||
| 				<th width="1%" class="center nowrap"> | ||||
| 					<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> | ||||
| 				</th> | ||||
| 			</tr> | ||||
| 		</thead> | ||||
| 		<tfoot> | ||||
| 			<tr> | ||||
| 				<td colspan="15"> | ||||
| 					<?php echo $this->pagination->getListFooter(); ?> | ||||
| 				</td> | ||||
| 			</tr> | ||||
| 		</tfoot> | ||||
| 		<tbody> | ||||
| 		<?php foreach ($this->items as $i => $item) : ?> | ||||
| 			<?php if ($item->language && JLanguageMultilang::isEnabled()) | ||||
| 			{ | ||||
| 				$tag = strlen($item->language); | ||||
| 				if ($tag == 5) | ||||
| 				{ | ||||
| 					$lang = substr($item->language, 0, 2); | ||||
| 				} | ||||
| 				elseif ($tag == 6) | ||||
| 				{ | ||||
| 					$lang = substr($item->language, 0, 3); | ||||
| 				} | ||||
| 				else { | ||||
| 					$lang = ""; | ||||
| 				} | ||||
| 			} | ||||
| 			elseif (!JLanguageMultilang::isEnabled()) | ||||
| 			{ | ||||
| 				$lang = ""; | ||||
| 			} | ||||
| 			?> | ||||
| 			<tr class="row<?php echo $i % 2; ?>"> | ||||
| 				<td> | ||||
| 					<a href="javascript:void(0)" onclick="if (window.parent) window.parent.<?php echo $this->escape($function);?>('<?php echo $item->id; ?>', '<?php echo $this->escape(addslashes($item->title)); ?>', '<?php echo $this->escape($item->catid); ?>', null, '<?php echo $this->escape(ContentHelperRoute::getArticleRoute($item->id, $item->catid, $item->language)); ?>', '<?php echo $this->escape($lang); ?>', null);"> | ||||
| 						<?php echo $this->escape($item->title); ?></a> | ||||
| 				</td> | ||||
| 				<td class="center"> | ||||
| 					<?php echo $this->escape($item->access_level); ?> | ||||
| 				</td> | ||||
| 				<td class="center"> | ||||
| 					<?php echo $this->escape($item->category_title); ?> | ||||
| 				</td> | ||||
| 				<td class="center"> | ||||
| 					<?php if ($item->language == '*'):?> | ||||
| 						<?php echo JText::alt('JALL', 'language'); ?> | ||||
| 					<?php else:?> | ||||
| 						<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> | ||||
| 					<?php endif;?> | ||||
| 				</td> | ||||
| 				<td class="center nowrap"> | ||||
| 					<?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?> | ||||
| 				</td> | ||||
| 				<td class="center"> | ||||
| 					<?php echo (int) $item->id; ?> | ||||
| 				</td> | ||||
| 			</tr> | ||||
| 			<?php endforeach; ?> | ||||
| 		</tbody> | ||||
| 	</table> | ||||
|  | ||||
| 	<div> | ||||
| 		<input type="hidden" name="task" value="" /> | ||||
| 		<input type="hidden" name="boxchecked" value="0" /> | ||||
| 		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" /> | ||||
| 		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" /> | ||||
| 		<?php echo JHtml::_('form.token'); ?> | ||||
| 	</div> | ||||
| </form> | ||||
| @ -0,0 +1,206 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * View class for a list of articles. | ||||
|  * | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * @since       1.6 | ||||
|  */ | ||||
| class ContentViewArticles extends JViewLegacy | ||||
| { | ||||
| 	protected $items; | ||||
|  | ||||
| 	protected $pagination; | ||||
|  | ||||
| 	protected $state; | ||||
|  | ||||
| 	/** | ||||
| 	 * Display the view | ||||
| 	 * | ||||
| 	 * @return  void | ||||
| 	 */ | ||||
| 	public function display($tpl = null) | ||||
| 	{ | ||||
| 		if ($this->getLayout() !== 'modal') | ||||
| 		{ | ||||
| 			ContentHelper::addSubmenu('articles'); | ||||
| 		} | ||||
|  | ||||
| 		$this->items		= $this->get('Items'); | ||||
| 		$this->pagination	= $this->get('Pagination'); | ||||
| 		$this->state		= $this->get('State'); | ||||
| 		$this->authors		= $this->get('Authors'); | ||||
|  | ||||
| 		// Check for errors. | ||||
| 		if (count($errors = $this->get('Errors'))) | ||||
| 		{ | ||||
| 			JError::raiseError(500, implode("\n", $errors)); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		// Levels filter. | ||||
| 		$options	= array(); | ||||
| 		$options[]	= JHtml::_('select.option', '1', JText::_('J1')); | ||||
| 		$options[]	= JHtml::_('select.option', '2', JText::_('J2')); | ||||
| 		$options[]	= JHtml::_('select.option', '3', JText::_('J3')); | ||||
| 		$options[]	= JHtml::_('select.option', '4', JText::_('J4')); | ||||
| 		$options[]	= JHtml::_('select.option', '5', JText::_('J5')); | ||||
| 		$options[]	= JHtml::_('select.option', '6', JText::_('J6')); | ||||
| 		$options[]	= JHtml::_('select.option', '7', JText::_('J7')); | ||||
| 		$options[]	= JHtml::_('select.option', '8', JText::_('J8')); | ||||
| 		$options[]	= JHtml::_('select.option', '9', JText::_('J9')); | ||||
| 		$options[]	= JHtml::_('select.option', '10', JText::_('J10')); | ||||
|  | ||||
| 		$this->f_levels = $options; | ||||
|  | ||||
| 		// We don't need toolbar in the modal window. | ||||
| 		if ($this->getLayout() !== 'modal') | ||||
| 		{ | ||||
| 			$this->addToolbar(); | ||||
| 			$this->sidebar = JHtmlSidebar::render(); | ||||
| 		} | ||||
|  | ||||
| 		parent::display($tpl); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Add the page title and toolbar. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function addToolbar() | ||||
| 	{ | ||||
| 		$canDo = ContentHelper::getActions($this->state->get('filter.category_id')); | ||||
| 		$user  = JFactory::getUser(); | ||||
|  | ||||
| 		// Get the toolbar object instance | ||||
| 		$bar = JToolBar::getInstance('toolbar'); | ||||
|  | ||||
| 		JToolbarHelper::title(JText::_('COM_CONTENT_ARTICLES_TITLE'), 'article.png'); | ||||
|  | ||||
| 		if ($canDo->get('core.create') || (count($user->getAuthorisedCategories('com_content', 'core.create'))) > 0 ) | ||||
| 		{ | ||||
| 			JToolbarHelper::addNew('article.add'); | ||||
| 		} | ||||
|  | ||||
| 		if (($canDo->get('core.edit')) || ($canDo->get('core.edit.own'))) | ||||
| 		{ | ||||
| 			JToolbarHelper::editList('article.edit'); | ||||
| 		} | ||||
|  | ||||
| 		if ($canDo->get('core.edit.state')) | ||||
| 		{ | ||||
| 			JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); | ||||
| 			JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); | ||||
| 			JToolbarHelper::custom('articles.featured', 'featured.png', 'featured_f2.png', 'JFEATURED', true); | ||||
| 			JToolbarHelper::archiveList('articles.archive'); | ||||
| 			JToolbarHelper::checkin('articles.checkin'); | ||||
| 		} | ||||
|  | ||||
| 		if ($this->state->get('filter.published') == -2 && $canDo->get('core.delete')) | ||||
| 		{ | ||||
| 			JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); | ||||
| 		} | ||||
| 		elseif ($canDo->get('core.edit.state')) | ||||
| 		{ | ||||
| 			JToolbarHelper::trash('articles.trash'); | ||||
| 		} | ||||
|  | ||||
| 		// Add a batch button | ||||
| 		if ($user->authorise('core.create', 'com_content') && $user->authorise('core.edit', 'com_content') && $user->authorise('core.edit.state', 'com_content')) | ||||
| 		{ | ||||
| 			JHtml::_('bootstrap.modal', 'collapseModal'); | ||||
| 			$title = JText::_('JTOOLBAR_BATCH'); | ||||
|  | ||||
| 			// Instantiate a new JLayoutFile instance and render the batch button | ||||
| 			$layout = new JLayoutFile('joomla.toolbar.batch'); | ||||
|  | ||||
| 			$dhtml = $layout->render(array('title' => $title)); | ||||
| 			$bar->appendButton('Custom', $dhtml, 'batch'); | ||||
| 		} | ||||
|  | ||||
| 		if ($canDo->get('core.admin')) | ||||
| 		{ | ||||
| 			JToolbarHelper::preferences('com_content'); | ||||
| 		} | ||||
|  | ||||
| 		JToolbarHelper::help('JHELP_CONTENT_ARTICLE_MANAGER'); | ||||
|  | ||||
| 		JHtmlSidebar::setAction('index.php?option=com_content&view=articles'); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_PUBLISHED'), | ||||
| 			'filter_published', | ||||
| 			JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_CATEGORY'), | ||||
| 			'filter_category_id', | ||||
| 			JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_MAX_LEVELS'), | ||||
| 			'filter_level', | ||||
| 			JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_ACCESS'), | ||||
| 			'filter_access', | ||||
| 			JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_AUTHOR'), | ||||
| 			'filter_author_id', | ||||
| 			JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_LANGUAGE'), | ||||
| 			'filter_language', | ||||
| 			JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 		JText::_('JOPTION_SELECT_TAG'), | ||||
| 		'filter_tag', | ||||
| 		JHtml::_('select.options', JHtml::_('tag.options', true, true), 'value', 'text', $this->state->get('filter.tag')) | ||||
| 		); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Returns an array of fields the table can be sorted by | ||||
| 	 * | ||||
| 	 * @return  array  Array containing the field name to sort by as the key and display text as value | ||||
| 	 * | ||||
| 	 * @since   3.0 | ||||
| 	 */ | ||||
| 	protected function getSortFields() | ||||
| 	{ | ||||
| 		return array( | ||||
| 			'a.ordering' => JText::_('JGRID_HEADING_ORDERING'), | ||||
| 			'a.state' => JText::_('JSTATUS'), | ||||
| 			'a.title' => JText::_('JGLOBAL_TITLE'), | ||||
| 			'category_title' => JText::_('JCATEGORY'), | ||||
| 			'access_level' => JText::_('JGRID_HEADING_ACCESS'), | ||||
| 			'a.created_by' => JText::_('JAUTHOR'), | ||||
| 			'language' => JText::_('JGRID_HEADING_LANGUAGE'), | ||||
| 			'a.created' => JText::_('JDATE'), | ||||
| 			'a.id' => JText::_('JGRID_HEADING_ID'), | ||||
| 			'a.featured' => JText::_('JFEATURED') | ||||
| 		); | ||||
| 	} | ||||
| } | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
| @ -0,0 +1,223 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html'); | ||||
|  | ||||
| JHtml::_('bootstrap.tooltip'); | ||||
| JHtml::_('behavior.multiselect'); | ||||
| JHtml::_('dropdown.init'); | ||||
| JHtml::_('formbehavior.chosen', 'select'); | ||||
|  | ||||
| $user		= JFactory::getUser(); | ||||
| $userId		= $user->get('id'); | ||||
| $listOrder	= $this->escape($this->state->get('list.ordering')); | ||||
| $listDirn	= $this->escape($this->state->get('list.direction')); | ||||
| $canOrder	= $user->authorise('core.edit.state', 'com_content.article'); | ||||
| $archived	= $this->state->get('filter.published') == 2 ? true : false; | ||||
| $trashed	= $this->state->get('filter.published') == -2 ? true : false; | ||||
| $saveOrder	= $listOrder == 'fp.ordering'; | ||||
| ?> | ||||
|  | ||||
| <form action="<?php echo JRoute::_('index.php?option=com_content&view=featured'); ?>" method="post" name="adminForm" id="adminForm"> | ||||
| <?php if (!empty( $this->sidebar)) : ?> | ||||
| 	<div id="j-sidebar-container" class="span2"> | ||||
| 		<?php echo $this->sidebar; ?> | ||||
| 	</div> | ||||
| 	<div id="j-main-container" class="span10"> | ||||
| <?php else : ?> | ||||
| 	<div id="j-main-container"> | ||||
| <?php endif;?> | ||||
| 		<div id="filter-bar" class="btn-toolbar"> | ||||
| 			<div class="filter-search btn-group pull-left"> | ||||
| 				<label for="filter_search" class="element-invisible"><?php echo JText::_('COM_CONTENT_FILTER_SEARCH_DESC'); ?></label> | ||||
| 				<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_CONTENT_FILTER_SEARCH_DESC'); ?>" /> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-left hidden-phone"> | ||||
| 				<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button> | ||||
| 				<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button> | ||||
| 			</div> | ||||
| 			<div class="btn-group pull-right hidden-phone"> | ||||
| 				<label for="limit" class="element-invisible"><?php echo JText::_('JFIELD_PLG_SEARCH_SEARCHLIMIT_DESC'); ?></label> | ||||
| 				<?php echo $this->pagination->getLimitBox(); ?> | ||||
| 			</div> | ||||
| 		</div> | ||||
| 		<div class="clearfix"> </div> | ||||
|  | ||||
| 		<table class="table table-striped" id="articleList"> | ||||
| 			<thead> | ||||
| 				<tr> | ||||
| 					<th width="1%" class="hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.checkall'); ?> | ||||
| 					</th> | ||||
| 					<th width="1%" style="min-width:55px" class="nowrap center"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JSTATUS', 'a.state', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGLOBAL_TITLE', 'a.title', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="10%" class="nowrap"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ORDERING', 'fp.ordering', $listDirn, $listOrder); ?> | ||||
| 						<?php if ($canOrder && $saveOrder) :?> | ||||
| 							<?php echo JHtml::_('grid.order', $this->items, 'filesave.png', 'featured.saveorder'); ?> | ||||
| 						<?php endif; ?> | ||||
| 					</th> | ||||
| 					<th width="10%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ACCESS', 'a.access', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="10%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JAUTHOR', 'a.created_by', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="5%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_LANGUAGE', 'language', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="10%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JDATE', 'a.created', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 					<th width="1%" class="nowrap hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.sort', 'JGRID_HEADING_ID', 'a.id', $listDirn, $listOrder); ?> | ||||
| 					</th> | ||||
| 				</tr> | ||||
| 			</thead> | ||||
| 			<tfoot> | ||||
| 				<tr> | ||||
| 					<td colspan="8"> | ||||
| 						<?php echo $this->pagination->getListFooter(); ?> | ||||
| 					</td> | ||||
| 				</tr> | ||||
| 			</tfoot> | ||||
| 			<tbody> | ||||
| 			<?php $count = count($this->items); ?> | ||||
| 			<?php foreach ($this->items as $i => $item) : | ||||
| 				$item->max_ordering = 0; | ||||
| 				$ordering	= ($listOrder == 'fp.ordering'); | ||||
| 				$assetId	= 'com_content.article.'.$item->id; | ||||
| 				$canCreate	= $user->authorise('core.create',     'com_content.category.'.$item->catid); | ||||
| 				$canEdit	= $user->authorise('core.edit',       'com_content.article.'.$item->id); | ||||
| 				$canCheckin	= $user->authorise('core.manage',     'com_checkin') || $item->checked_out == $userId || $item->checked_out == 0; | ||||
| 				$canChange	= $user->authorise('core.edit.state', 'com_content.article.'.$item->id) && $canCheckin; | ||||
| 				?> | ||||
| 				<tr class="row<?php echo $i % 2; ?>" sortable-group-id="<?php echo $item->catid; ?>"> | ||||
| 					<td class="center hidden-phone"> | ||||
| 						<?php echo JHtml::_('grid.id', $i, $item->id); ?> | ||||
| 					</td> | ||||
| 					<td class="center"> | ||||
| 							<?php echo JHtml::_('jgrid.published', $item->state, $i, 'articles.', $canChange, 'cb', $item->publish_up, $item->publish_down); ?> | ||||
| 					</td> | ||||
| 					<td class="nowrap has-context"> | ||||
| 						<div class="pull-left"> | ||||
| 							<?php if ($item->checked_out) : ?> | ||||
| 								<?php echo JHtml::_('jgrid.checkedout', $i, $item->editor, $item->checked_out_time, 'articles.', $canCheckin); ?> | ||||
| 							<?php endif; ?> | ||||
| 							<?php if ($item->language == '*') : ?> | ||||
| 								<?php $language = JText::alt('JALL', 'language'); ?> | ||||
| 							<?php else : ?> | ||||
| 								<?php $language = $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> | ||||
| 							<?php endif; ?> | ||||
| 							<?php if ($canEdit) : ?> | ||||
| 								<a href="<?php echo JRoute::_('index.php?option=com_content&task=article.edit&return=featured&id=' . $item->id);?>" title="<?php echo JText::_('JACTION_EDIT'); ?>"> | ||||
| 									<?php echo $this->escape($item->title); ?></a> | ||||
| 							<?php else : ?> | ||||
| 								<span title="<?php echo JText::sprintf('JFIELD_ALIAS_LABEL', $this->escape($item->alias)); ?>"><?php echo $this->escape($item->title); ?></span> | ||||
| 							<?php endif; ?> | ||||
| 							<div class="small"> | ||||
| 								<?php echo JText::_('JCATEGORY') . ": " . $this->escape($item->category_title); ?> | ||||
| 							</div> | ||||
| 						</div> | ||||
| 						<div class="pull-left"> | ||||
| 							<?php | ||||
| 								// Create dropdown items | ||||
| 								JHtml::_('dropdown.edit', $item->id, 'article.', 'index.php?option=com_content&return=featured'); | ||||
| 								JHtml::_('dropdown.divider'); | ||||
| 								if ($item->state) : | ||||
| 									JHtml::_('dropdown.unpublish', 'cb' . $i, 'articles.'); | ||||
| 								else : | ||||
| 									JHtml::_('dropdown.publish', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								JHtml::_('dropdown.divider'); | ||||
|  | ||||
| 								if ($archived) : | ||||
| 									JHtml::_('dropdown.unarchive', 'cb' . $i, 'articles.'); | ||||
| 								else : | ||||
| 									JHtml::_('dropdown.archive', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								if ($item->checked_out) : | ||||
| 									JHtml::_('dropdown.checkin', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								if ($trashed) : | ||||
| 									JHtml::_('dropdown.untrash', 'cb' . $i, 'articles.'); | ||||
| 								else : | ||||
| 									JHtml::_('dropdown.trash', 'cb' . $i, 'articles.'); | ||||
| 								endif; | ||||
|  | ||||
| 								// Render dropdown list | ||||
| 								echo JHtml::_('dropdown.render'); | ||||
| 							?> | ||||
| 						</div> | ||||
| 					</td> | ||||
| 					<td class="order"> | ||||
| 						<?php if ($canChange) : ?> | ||||
| 							<div class="input-prepend"> | ||||
| 							<?php if ($saveOrder) :?> | ||||
| 								<?php if ($listDirn == 'asc') : ?> | ||||
| 									<span class="add-on"><?php echo $this->pagination->orderUpIcon($i, true, 'featured.orderup', 'JLIB_HTML_MOVE_UP', $ordering); ?></span> | ||||
| 									<span class="add-on"><?php echo $this->pagination->orderDownIcon($i, $count, true, 'featured.orderdown', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span> | ||||
| 								<?php elseif ($listDirn == 'desc') : ?> | ||||
| 									<span class="add-on"><?php echo $this->pagination->orderUpIcon($i, true, 'featured.orderdown', 'JLIB_HTML_MOVE_UP', $ordering); ?></span> | ||||
| 									<span class="add-on"><?php echo $this->pagination->orderDownIcon($i, $count, true, 'featured.orderup', 'JLIB_HTML_MOVE_DOWN', $ordering); ?></span> | ||||
| 								<?php endif; ?> | ||||
| 							<?php endif; ?> | ||||
| 							<?php $disabled = $saveOrder ? '' : 'disabled="disabled"'; ?> | ||||
| 						 	<input type="text" name="order[]" size="5" value="<?php echo $item->ordering;?>" <?php echo $disabled ?> class="width-20 text-area-order" /> | ||||
| 						 </div> | ||||
| 						<?php else : ?> | ||||
| 							<?php echo $item->ordering; ?> | ||||
| 						<?php endif; ?> | ||||
| 					</td> | ||||
| 					<td class="small hidden-phone"> | ||||
| 						<?php echo $this->escape($item->access_level); ?> | ||||
| 					</td> | ||||
| 					<td class="small hidden-phone"> | ||||
| 						<?php if ($item->created_by_alias) : ?> | ||||
| 							<?php echo $this->escape($item->author_name); ?> | ||||
| 							<p class="smallsub"> <?php echo JText::sprintf('JGLOBAL_LIST_ALIAS', $this->escape($item->created_by_alias)); ?></p> | ||||
| 						<?php else : ?> | ||||
| 							<?php echo $this->escape($item->author_name); ?> | ||||
| 						<?php endif; ?> | ||||
| 					</td> | ||||
| 					<td class="small hidden-phone"> | ||||
| 						<?php if ($item->language == '*'):?> | ||||
| 							<?php echo JText::alt('JALL', 'language'); ?> | ||||
| 						<?php else:?> | ||||
| 							<?php echo $item->language_title ? $this->escape($item->language_title) : JText::_('JUNDEFINED'); ?> | ||||
| 						<?php endif;?> | ||||
| 					</td> | ||||
| 					<td class="nowrap small hidden-phone"> | ||||
| 						<?php echo JHtml::_('date', $item->created, JText::_('DATE_FORMAT_LC4')); ?> | ||||
| 					</td> | ||||
| 					<td class="center hidden-phone"> | ||||
| 						<?php echo (int) $item->id; ?> | ||||
| 					</td> | ||||
| 				</tr> | ||||
| 				<?php endforeach; ?> | ||||
| 			</tbody> | ||||
| 		</table> | ||||
|  | ||||
| 		<input type="hidden" name="task" value="" /> | ||||
| 		<input type="hidden" name="featured" value="1" /> | ||||
| 		<input type="hidden" name="boxchecked" value="0" /> | ||||
| 		<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" /> | ||||
| 		<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" /> | ||||
| 		<?php echo JHtml::_('form.token'); ?> | ||||
| 	</div> | ||||
| </form> | ||||
| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
| @ -0,0 +1,167 @@ | ||||
| <?php | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  * | ||||
|  * @copyright   Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved. | ||||
|  * @license     GNU General Public License version 2 or later; see LICENSE.txt | ||||
|  */ | ||||
|  | ||||
| defined('_JEXEC') or die; | ||||
|  | ||||
| /** | ||||
|  * @package     Joomla.Administrator | ||||
|  * @subpackage  com_content | ||||
|  */ | ||||
| class ContentViewFeatured extends JViewLegacy | ||||
| { | ||||
| 	protected $items; | ||||
|  | ||||
| 	protected $pagination; | ||||
|  | ||||
| 	protected $state; | ||||
|  | ||||
| 	/** | ||||
| 	 * Display the view | ||||
| 	 */ | ||||
| 	public function display($tpl = null) | ||||
| 	{ | ||||
| 		ContentHelper::addSubmenu('featured'); | ||||
|  | ||||
| 		$this->items      = $this->get('Items'); | ||||
| 		$this->pagination = $this->get('Pagination'); | ||||
| 		$this->state      = $this->get('State'); | ||||
| 		$this->authors    = $this->get('Authors'); | ||||
|  | ||||
| 		// Check for errors. | ||||
| 		if (count($errors = $this->get('Errors'))) | ||||
| 		{ | ||||
| 			JError::raiseError(500, implode("\n", $errors)); | ||||
| 			return false; | ||||
| 		} | ||||
|  | ||||
| 		// Levels filter. | ||||
| 		$options	= array(); | ||||
| 		$options[]	= JHtml::_('select.option', '1', JText::_('J1')); | ||||
| 		$options[]	= JHtml::_('select.option', '2', JText::_('J2')); | ||||
| 		$options[]	= JHtml::_('select.option', '3', JText::_('J3')); | ||||
| 		$options[]	= JHtml::_('select.option', '4', JText::_('J4')); | ||||
| 		$options[]	= JHtml::_('select.option', '5', JText::_('J5')); | ||||
| 		$options[]	= JHtml::_('select.option', '6', JText::_('J6')); | ||||
| 		$options[]	= JHtml::_('select.option', '7', JText::_('J7')); | ||||
| 		$options[]	= JHtml::_('select.option', '8', JText::_('J8')); | ||||
| 		$options[]	= JHtml::_('select.option', '9', JText::_('J9')); | ||||
| 		$options[]	= JHtml::_('select.option', '10', JText::_('J10')); | ||||
|  | ||||
| 		$this->f_levels = $options; | ||||
|  | ||||
| 		$this->addToolbar(); | ||||
| 		$this->sidebar = JHtmlSidebar::render(); | ||||
| 		parent::display($tpl); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Add the page title and toolbar. | ||||
| 	 * | ||||
| 	 * @since   1.6 | ||||
| 	 */ | ||||
| 	protected function addToolbar() | ||||
| 	{ | ||||
| 		$state	= $this->get('State'); | ||||
| 		$canDo	= ContentHelper::getActions($this->state->get('filter.category_id')); | ||||
|  | ||||
| 		JToolbarHelper::title(JText::_('COM_CONTENT_FEATURED_TITLE'), 'featured.png'); | ||||
|  | ||||
| 		if ($canDo->get('core.create')) | ||||
| 		{ | ||||
| 			JToolbarHelper::addNew('article.add'); | ||||
| 		} | ||||
| 		if ($canDo->get('core.edit')) | ||||
| 		{ | ||||
| 			JToolbarHelper::editList('article.edit'); | ||||
| 		} | ||||
|  | ||||
| 		if ($canDo->get('core.edit.state')) | ||||
| 		{ | ||||
| 			JToolbarHelper::publish('articles.publish', 'JTOOLBAR_PUBLISH', true); | ||||
| 			JToolbarHelper::unpublish('articles.unpublish', 'JTOOLBAR_UNPUBLISH', true); | ||||
| 			JToolbarHelper::custom('featured.delete', 'remove.png', 'remove_f2.png', 'JTOOLBAR_REMOVE', true); | ||||
| 			JToolbarHelper::archiveList('articles.archive'); | ||||
| 			JToolbarHelper::checkin('articles.checkin'); | ||||
| 		} | ||||
|  | ||||
| 		if ($state->get('filter.published') == -2 && $canDo->get('core.delete')) | ||||
| 		{ | ||||
| 			JToolbarHelper::deleteList('', 'articles.delete', 'JTOOLBAR_EMPTY_TRASH'); | ||||
| 		} elseif ($canDo->get('core.edit.state')) | ||||
| 		{ | ||||
| 			JToolbarHelper::trash('articles.trash'); | ||||
| 		} | ||||
|  | ||||
| 		if ($canDo->get('core.admin')) | ||||
| 		{ | ||||
| 			JToolbarHelper::preferences('com_content'); | ||||
| 		} | ||||
| 		JToolbarHelper::help('JHELP_CONTENT_FEATURED_ARTICLES'); | ||||
|  | ||||
| 		JHtmlSidebar::setAction('index.php?option=com_content&view=featured'); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_PUBLISHED'), | ||||
| 			'filter_published', | ||||
| 			JHtml::_('select.options', JHtml::_('jgrid.publishedOptions'), 'value', 'text', $this->state->get('filter.published'), true) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_CATEGORY'), | ||||
| 			'filter_category_id', | ||||
| 			JHtml::_('select.options', JHtml::_('category.options', 'com_content'), 'value', 'text', $this->state->get('filter.category_id')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_MAX_LEVELS'), | ||||
| 			'filter_level', | ||||
| 			JHtml::_('select.options', $this->f_levels, 'value', 'text', $this->state->get('filter.level')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_ACCESS'), | ||||
| 			'filter_access', | ||||
| 			JHtml::_('select.options', JHtml::_('access.assetgroups'), 'value', 'text', $this->state->get('filter.access')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_AUTHOR'), | ||||
| 			'filter_author_id', | ||||
| 			JHtml::_('select.options', $this->authors, 'value', 'text', $this->state->get('filter.author_id')) | ||||
| 		); | ||||
|  | ||||
| 		JHtmlSidebar::addFilter( | ||||
| 			JText::_('JOPTION_SELECT_LANGUAGE'), | ||||
| 			'filter_language', | ||||
| 			JHtml::_('select.options', JHtml::_('contentlanguage.existing', true, true), 'value', 'text', $this->state->get('filter.language')) | ||||
| 		); | ||||
| 	} | ||||
|  | ||||
| 	/** | ||||
| 	 * Returns an array of fields the table can be sorted by | ||||
| 	 * | ||||
| 	 * @return  array  Array containing the field name to sort by as the key and display text as value | ||||
| 	 * | ||||
| 	 * @since   3.0 | ||||
| 	 */ | ||||
| 	protected function getSortFields() | ||||
| 	{ | ||||
| 		return array( | ||||
| 			'fp.ordering' => JText::_('JGRID_HEADING_ORDERING'), | ||||
| 			'a.state' => JText::_('JSTATUS'), | ||||
| 			'a.title' => JText::_('JGLOBAL_TITLE'), | ||||
| 			'category_title' => JText::_('JCATEGORY'), | ||||
| 			'access_level' => JText::_('JGRID_HEADING_ACCESS'), | ||||
| 			'a.created_by' => JText::_('JAUTHOR'), | ||||
| 			'language' => JText::_('JGRID_HEADING_LANGUAGE'), | ||||
| 			'a.created' => JText::_('JDATE'), | ||||
| 			'a.id' => JText::_('JGRID_HEADING_ID') | ||||
| 		); | ||||
| 	} | ||||
| } | ||||
							
								
								
									
										1
									
								
								administrator/components/com_content/views/index.html
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								administrator/components/com_content/views/index.html
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1 @@ | ||||
| <!DOCTYPE html><title></title> | ||||
		Reference in New Issue
	
	Block a user
	 alazhar
					alazhar