Joomla article permissions, show alternative text for user without access - joomla

I am trying to get an article to show some text like "You do not have permission to view this article" when a user doesn't have the correct access level.
Currently the article just shows no content if the user doesn't have the right permissions. how would I go about showing content for a user who doesn't have access?

Joomla's normal behaviour for any resource that a user doesn't have viewing permissions for is to display a message. e.g. this is the default message in Joomla 2.5 in the default template:
and this a Joomla 3.2 example:
If you're seeing a page with nothing in the content area then (as #Elin suggests) it's likely that your template doesn't have a message block. Specifically your looking for a line like this in you templates index.php code:
<jdoc:include type="message" />
When Joomla renders the page it replaces this jdoc tag with any system messages such as the not authorised one.
If you don't like the wording of the message you can over-ride the language key JERROR_ALERTNOAUTHOR using the Extensions->Language Manager->Language Overrides feature, just remember to select "Site" before creating a new over-ride as this is a front-end message.

Related

Joomla Submit article redirect to homepage

I have site that user can submit an article in frontend . I have create menu submit article, but when i click it , it redirect to homepage.
Thank you
The guidelines are here: Joomla : How to create an article from the front end.
Go through below:
Your menu item should not have access to only special members if you are submitting content as registered member. In short, you should maintain the access level of the page.
There can be some other cases, for which you must need to post the screenshot if any error message shown on the screen to debug. As you know there are many settings, custom code, and tweaks that Joomla CMS allows to implement.
To change the redirection when submitting an article I found it useful to do the following:
Associate the form that enables you to create an article from the frontend to a menu, and then edit the corresponding element of the menu, on the options tab, select the redirection after submission category to where you want it to redirect and that's it. Hope it helps anyone!

Translation Not Working from Magento Admin

I have a situation where in the actions I trigger from Admin website do not translate my content. I have custom modules in magento and one of them is responsible for sending out emails. The email contents are to be translate according to the locale of the store. While everything works fine when done automatically. But when I trigger this sending of emails from the admin panel the translations aren't working.
For example, my code uses the magento magic method,
__("Text to be translated")
and when the corresponding text is translated in my website. But when I trigger an action from the admin, the same content is not translated.
My translate.csv is currently located in,
app
design
frontend
MyModule
default
locale
country
translate.csv
Any help will be appreciated.

Joomla 2.5 redirect to requested page after login

In joomla 2.5 user's are taken to predefined page after they have logged-in.
But i need to redirect users to the previous page after they have logged-in, i have tried to search for it every where but i am unable find proper solution explaining what core file i need to modify ?
All you need is an article with a little piece of javascript to browse the history of the user and call the page before the login form. Redirect the user on it on log in.
If you have a menue item (User/Login Form), there is, on the right hand side of the screen, a tab called Basic Options. The first field is called "Login Redirect". Put the article's URL there.
If you use the module: Again in the tab "Basic Options", you can redirect to Any menue item you want, so set a menue item (it has not to be actually showing up somewher) for the article

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

Change Joomla's 'Login to Readmore' url from login page to register page?

I have a blog page on Joomla which shows 'register to read more' link after each articles intro text.
Clicking this brings the user to a login page, with no 'register' option.
How would I change this to bring a user to the register page instead, and preferably revert the user back to the article after login? I have a login box on the register page so it allows the user to choose either login or register.
If you're using Joomla 2.5 and you don't see a link saying something like "Don't have an account?" then you have User Registration turned off.
Go to the Users menu and select User Manager and then click on the Options icon in the toolbar. Under the Component tab set the first option Allow User Registration to Yes.
Save you changes and then click on one of the "Register to read moreā€¦" links and you should now see the extra "Don't have an account?"
If you want more than the basic Joomla! options for site access then you may want to look at the Joomla! Extensions Directory (JED) and the section on Site Access

Resources