Joomla 3.x - How to create article from frontend which is by default "featured" and "published"? - joomla

I am using Joomla 3.4 and want to provide group of users with possibility to create article (I need it to be by default PUBLISHED and FEATURED) but when they create new article it is NOT PUBLISHED and NOT FEATURED (users do not have possibility to change this setting in the fronted).
I am using standard joomla component - create article - when users are logged in they can add an article but than I have to login into admin modul and set "featured" and "published" when article is created.
I have tried to change
/joomla/administrator/components/com_content/models/forms/article.xml
AND
/joomla/components/com_content/models/forms/article.xml
I have set default=1 (featured=YES) but it does not work for me. Moreover in the article.xml article should be by default published but it is not.

add this:
if(!isset($data['state']))
$data['state']=1;
if(!isset($data['featured']))
$data['featured']=1;
to /joomla/administrator/components/com_content/models/article.php on save function.for example:
public function save($data)
{
if(!isset($data['state']))
$data['state']=1;
if(!isset($data['featured']))
$data['featured']=1;

Actually, setting Featured to default=1 in /joomla/components/com_content/models/forms/article.xml saved my day. All new articles are featured now by default.
This file is regularly overwritten by Joomla upgrades, so the correct override file has to be copied to:
/templates/system/forms/com_content/article.xml

Related

Filter courses on Moodle 2.7

I am wondering if there is any plugin available for Moodle 2.7 which allows admin to add some attributes to courses and create a widget to filter the courses by thoses attributes.
For example, we would like to allow users to filter courses by their price, content, dates etc.
Thanks in advance
The block gnuwings provided will actually solve your issue when configured within Moodle correctly.
What you should do afterwards, is enable the 'My Moodle' page for every user. To find this setting, you should use the search function for the site admin.
My Moodle allows you to place blocks in the center of the screen, so you can edit the default My Moodle page to show this block. I would personally recommend turning the feature that allows students to edit their own My Moodle page off, as this will make it harder for you to manage this page in the future (without modifications to the database).
To edit the default 'My' page, in Moodle 2.7, go to site administration, appearance, default my page.
To enable this view by default, go to site administration -> appearance -> navigation, and update the value of 'Default home page for users'.

Changing the edit form in Joomla 3.x for specific article category

I have a bunch of articles in a Joomla 3.1 site that all live under a single category.
I'm creating a specific editor group for each article, ie a small group of users will have edit permissions for 1 article.
I'd like to do something so that when an article that is within the prescribed category (not all articles) is edited, the user (editor) sees a short block of text at the top of the edit page.
Is that possible within Joomla or would I have to edit the PHP file that creates the form?
You could accomplish this using a tool like content templater. http://extensions.joomla.org/extensions/core-enhancements/coding-a-scripts-integration/code-snippets/7152

Auto enable published article from registered users in joomla 2.5

I have created a site where registered users can publish articles.
Is there a way to make the articles they publish be enabled automatically without me, as administrator, have to check if there are new articles submitted.
EDIT 1: Found a solution by setting the mysql default value of state to 1 from 0. But, is this a good way?
The ability to publish is controlled by the edit.state permission. You would want to give edit.state allow for registered for either all of content or just for specific categories they are allowed to publish in.

How to select theme based on URL in Orchard CMS

Suppose, I have a site named test.com and it has a selected theme of-course. Now I have other tenant site named alpha.test.com for which a theme is used also.
But I want to select the theme for the alpha.test.com from codes where orchard used to select theme. How it is? Please help.
My another question is how to select different theme for different controller or actions in Orchard CMS.
Just implement your own IThemeSelector and use a higher priority than the default one. Do not alter the existing one like has been suggested.
I think these links may help you:
https://orchard.codeplex.com/discussions/359115
http://weblogs.asp.net/bleroy/dynamically-switching-the-theme-in-orchard
There are no tables containing installed themes in Orchard but Themes_ThemeSiteSettingsPartRecord table is used to store the record for current theme only. If we want to select multiple/another theme based on URL then
Ans1 & Ans2: Specify the currentThemeName variable with desired installed theme Name in GetTheme method of SiteThemeSelector class located in Orchard.Themes/Services. If you want to apply different theme based on URL then set currentThemeName inside logic and URL may retrieved from context.HttpContext.Request.

Joomla administration user level

In my website project, three people are assigned to write new articles for the website. They write their own articleS and cannot view their fellows' articles. We have one supervisor who is supposed to view, edit, and manage all articles.
Can Joomla! or any free extension make this possible?
The core Joomla install does NOT do what you have requested but by adding a component called JUGA, you can easily configure exactly what you want.
http://extensions.joomla.org/extensions/access-a-security/backend-a-full-access-control/2587

Resources