ADBLOCK_MSG
Joomla 3: Redirect to same page after successful loginPublished: Tuesday, 21 July 2020 03:18 Written by Ogri Hits: 13161
On the site, authorization occurs through the mod_login module. In the module settings, the option Login Redirection Page is set to Default. After entering the correct username and password, however, Joomla redirects to a variety of places, depending on which extension owns the currently active page. Sometimes it redirects to the site root, other time to a category blog. It's inconvenient. When a user exits (redirection option is also Default), the page does not change, everything is good.
I had to dig around and find a place in the code where the redirect is implemented. It was found not in the authorization module, but in the com_userscomponent. Namely, in the file components\com_users\controllers\user.php. And a small change in its code resolved the issue.
The login() function has been modified. Here is the original one:
public function login() { $this->checkToken('post'); ...................... $app->redirect(JRoute::_($app->getUserState('users.login.form.return'), false)); }
And now look at the changed one.
public function login() { $this->checkToken('post'); ...................... //comment out default redirect // $app->redirect(JRoute::_($app->getUserState('users.login.form.return'), false)); //redirect to the same page $return = $input->get('return', '', 'BASE64'); $return = base64_decode($return); $app->redirect(JRoute::_($return, false)); }
As you can see, the last line is commented out and three new lines have been added instead. The logic is taken from the next function, logout().
It is unclear what prevents the developers from fixing this discrepancy. Perhaps it, like many others, will be fixed in Joomla 4.
Add new comment
Joomla: how to add your own language constants or override existing onesPublished: Saturday, 30 December 2017 16:11 Written by Ogri Hits: 24970
The issue in the title not so rarely arises before the owners of Joomla sites. Now you need to add your own text, now to change the clumsy or uninformative (and quite often - full of mistakes) text compiled by the developers of third-party extensions. There is a fairly intelligible interface for overriding the constants in the Language Manager of the site's administrative section (Solution 2), and one can actually be content with it. But if you, like me, are interested in thoroughly understanding the language structure of Joomla, then this article is for you.
In the article about replacing the outdated captcha of JComments component with reCAPTCHA v2 (NO CAPTCHA) from Google, changes in the component code are described. Herewith, since this new captcha does not require entering the alphanumeric code from the image, it was also necessary to replace the error message.. The original English message was loaded from the language file of the component by a constant:
ERROR_CAPTCHA="Please enter security code displayed in the image!"
The new text, in full accordance with Google's, should be this: "Please verify you're not a robot!".
In terms of solving this seemingly simple task, I will try to sort out all the details of working with language constants. We will consider alternative solutions and state the logic of choosing the final one.
Solution 1. At the template level
Before we go directly to captcha, let's make a short tour into the theory and review the structure of language folders and the format of language file names.
Joomla: Integrate reCAPTCHA v2 (NO CAPTCHA) into JCommentsPublished: Thursday, 30 November 2017 23:29 Written by Ogri Hits: 83771
Briefly about the events that led me to the idea of the subject. I originally used kcaptcha
- the native captcha of the JComments
component. At some point, I turned this captcha off as it has annoyed commentators. Immediately a lot of spam started to appear in the comments. I started using CleanTalk
- a nominally paid (just $9 a year) plug-in that protects from spambots not only comments, but also login/registration, contacts and forms of many third-party extensions. Spam has ceased, but recently spammers began posting garbage comments, disguised as normal ones and even containing article headers in their text. CleanTalk
cannot filter them out yet. 4-5 such "comments" began to arrive every day - not very critical, and they can be easily deleted right from notifications in the mail. But still I wanted to find a compromise solution to the problem - a captcha which will block the spam not catched by CleanTalk
but at the same time not irritating potential commentators.
NO CAPTCHA reCAPTCHA
from Google (or just reCAPTCHA v2.0
) fits perfectly. Starting with Joomla 3.4, the second version is included in the reCAPTCHA
plugin that comes with the CMS. At the time of this writing, almost two years have passed since that release, but JComments
developers still do not support this plugin in their component. This does not deprecate its merits - JComments
was and remains the best free solution for comments on Joomla-site. Moreover, it's quite easy to integrate the subject into the comments on your own. To do this, you need to perform a number of simple actions.
Unified filtering of mod_jcomments_latest module's outputPublished: Saturday, 25 June 2016 15:33 Written by Ogri Hits: 28351
In the introduction to the guide on filtering content by articles, categories and components, I mentioned that to selectively bind the latest comments module to particular pages, it is required to create a certain number of copies of this module. On a site that is quite branched in structure and subject matter, and especially if the site is multilingual, this number can reach dozens. Each copy has its own settings specified in the Module Manager. If you need to change any parameters in all or even a few copies of the module, you will have to work painstakingly and tediously in the admin section opening a page of each copy and making manual changes. You can, of course, combine comments on several related topics into a single module, But is it not better to find a flexible solution that allows you to accurately filter out comments on each topic or even a subtopic, while at the same time reducing the number of copies of the module to a minimum, or even to a single one? It seems to me that I found such a solution, and this solution is based on the knowledge of the structure of application pages internal links generated by the Joomla engine.
As you know, Joomla modules are linked to menu items. In the case of mod_jcomments_latest, a binding to components is also introduced. There is also additional filtering by categories, but exclusively for the case when ONLY com_content is selected in the list of components. Accordingly, you need a separate copy of the module for each category of the basic Joomla component, as well as for each additional application. Within the copy, you can combine the com_content categories or a number of components. It is not possible to merge, for example, comments to categories and comments to applications other than com_content, into a single block. My method allows to distinguish between comments to categories and individual articles of com_content and at the same time - comments in other components and their structural elements; and all that - within the single copy of the module. Let me explain the principle of such a flexible filtration in detail and with examples.
Post an illustrated Joomla-site article on Facebook using OG-tagsPublished: Thursday, 17 September 2015 16:23 Written by Ogri Hits: 14926
Some time ago I created a number of articles about embedding of Social Media Buttons in a site running Joomla 2.5. After switching to 3.x (at the moment of writing this site works at 3.4.4), I continued keeping buttons of share42 in pages of my articles, they were integrated using the same methodology and up to certain moment everything was working well. But recently when sharing in some social networks I ran across some bugs. For example, earlier when trying to share on Facebook I had an option to choose one of the pictures available on the page. Now this option no longer exists, the picture was being chosen by Facebook script at random. I had to investigate changes in Zuckerberg's policy and adjust accordingly. This article is devoted to those investigations.
But first I updated script from share42 and found out it was dated May 2014. At that time I was still using October 2013 version. Script was changed to the fresher one but issue remained. In the JavaScript code I found an event triggered by clicking on FB button which opens the "Share" window. I figured out that the sharer.php service is called. Before its calling, a query string is generated, and this query string consists of several parameters: url, title, summary (description)
and the images[]
array. The last parameter–array was forming picture choice in a dialogue.
Facebook has changed set of parameters for sharer.php. All links apart from the link to the shared page were dismissed. The current processing of the button click event should look like this:
Joomla: Content filtering by articles, categories and componentsPublished: Friday, 27 June 2014 13:35 Written by Ogri Hits: 11458
In gides about binding of Social Media Buttons and Breadcrumbs to certain pages of a Joomla-based website, only filtering by articles was considered. But what if you want to bind a module or other extension, and in general - any piece of code to the selected categories, components and their specific pages, or even to all listed at once? You may say that the modules are already linked to menu items, and in case of using more advanced module manager (eg, Advanced Module Manager) - even to categories, articles, users, components, etc. This is true; but to output module with different settings on the corresponding pages, you will have to create its multiple copies, linked to these pages. For example, on this website the Recent Comments module displays a list of comments made to articles of only those categories and components whose pages output this instance of module. Since the structure of the site is quite extensive, and besides, the site is multilingual, number of copies of the module exceeds 10. It's pretty inconvenient.
The proposed solution is intended to provide a flexible and contextual content output based on specified criteria. Coding knowledge is desirable, but I will try to give exact recommendations for its implementation, which will allow less qualified Joomla users to also utilize this methodology. In addition, in a separate article I have described the structure of internal links within Joomla site, which is designed to facilitate the understanding of the algorithm. Let's do it!
The structure of internal links within Joomla sitePublished: Saturday, 14 June 2014 14:00 Written by Ogri Hits: 14340
Recently I wrote and implemented several functions that allow you to filter the pages output of the website running CMS Joomla version 2.5 and later. Before sharing them with the public, I will touch on the subject posed in the title of this article, as the principle of formation of internal links to Joomla application pages will help to better understand their algorithms.
A bit of theory
Applications for the CMS Joomla are being developed as components. Components are responsible for the pages output. A link to each page is generated in the respective component in the standard URI format:
http://[site name]/index.php?[query string]
The query string is a sequence of key=value
pairs separated by an ampersand. Keys' values just determine the output of each page. URI of pages are generated in accordance with the structure of the component. Currently we are not interested in the mechanism of these links formation, but the result for each page or group of pages of the application will be important. Knowing how to identify keys and their values, you can flexibly operate on the output of the page content.
Using of menu item aliases in JoomlaPublished: Tuesday, 03 December 2013 23:05 Written by Ogri Hits: 13384
In a previous article I described the process of transferring content from source site to destination site and integration it as a separate section into the destination site structure. Component J2XML accomplished the task well enough. I would rate it "excellent", but, as noted later in that article, its functionality does not include the transfer and integration of menu structure. However, it did not take long to manually reproduce it on the site-receiver. But when I started to bind menu items to the corresponding elements of content, I have encountered with a certain problem. It is in the process of solving I got acquainted for the first time in my practice with the option placed in the title of this article.
Let me describe the problem. The source site has several menus. The need is to place them at the destination site in the same form - as separate modules, but since the new content is conceived to be a separate section, all sub-sections must include the name and alias of the parent section - in the URL and the breadcrumbs. But the menus, corresponding to the sub-sections, should remain the root level menus. However, if the second condition is satisfied then the first one is not. This is where the option of choosing menu item type as an alias of another menu item became helpful.
The logic of the problem appearance becomes clear when I will illustrate it with particular example. For greater clarity, I will replace narrow subject of my site with more popular one - namely cars. I hope that ladies forgive me for the theme, usually more interesting for gents )).
Joomla: Merge two sites into one using component J2XMLPublished: Thursday, 28 November 2013 14:23 Written by Ogri Hits: 32585
Not long ago I had another site in addition to this one. For some reason I decided to join that second site to this site as a separate section. Besides, that other site appeared even earlier and had several hundred articles, divided into a dozen of categories, as well as about fifty registered users. There was not less info on this site by the time. Objective: to transfer content to another site so as to create a unified structure.
I found an excellent component J2XML, created just for such a task. It's free and has flexible settings. It exports related structure of articles, categories and users from a donor site and integrates it into the structure of an acceptor site. It can also transfer pictures in articles as well as WebLinks. The transfer, as its name implies, is carried out through XML-files. The goal of this article is detailed examination of settings and functionality of the component J2XML.
Photoshop: Processing photos of paintings for online galleryPublished: Thursday, 10 October 2013 23:50 Written by Ogri Hits: 12050
As I noted in an article about editing of animated GIFs, I am not an expert on Photoshop. However, having examined some image processing scenarios I successfully use them. For example, when I opened galleries of two nearest and dearest to me young artists here on the site, I had attended to the method submitted in the headline of the article. Will describe the problem more clearly.
Initially: there is a photograph of a painting. In its original form, it does not suitable for posting on the website:
Expected result:
Sequence of operations allowing you to transform former into the latter is being put to the agenda today. Screenshots are clickable.
Custom 404 error page in Joomla 2.5Published: Tuesday, 27 August 2013 23:57 Written by Ogri Hits: 39334
Subject in the headline of this article had been seemingly described and discussed in the web many times. Nevertheless, as it often happens, the information in each source is incomplete. The overall picture is composed of disparate information, and some particular glitches which I encountered are not covered at all - at least I have not found such coverage and came up with my own solutions. Therefore, the purpose of this article (and all others) - to bring together information from different online sources, to structure it, supplement with my own experience and pass into judgement of the Internet community.
Joomla 2.5: Remove breadcrumbs from specific pagesPublished: Tuesday, 27 August 2013 23:38 Written by Ogri Hits: 24409
Breadcrumbs, also known as site navigator, is useful Joomla module. And, as every module, it can be linked to all or only certain menu items. It is also possible to unlink this module from all or specific items. Many Joomla website owners wish to hide navigator on the home page, since it contains only one item "Home" with no link and does not incurs thus any functional load. Perhaps the site structure also provides other pages on which, for whatever reasons, it makes sense to hide navigator. The most typical example is a custom 404 error page, which, as I emphasize in the corresponding article dedicated to the rules of its creation and configuration, should fit into a site template, but at the same time to be by itself. Navigator on page 404 is not only unnecessary, but also ideologically harmful. We will consider this particular page as a special case, which describes the general principle of unlinking breadcrumbs from certain article.
Social Media Buttons in Joomla 2.5. Selective placementPublished: Monday, 26 August 2013 18:24 Written by Ogri Hits: 10469
While writing an article about the customization of page 404, I raised the issue of how to get rid of unwanted items in a page interface. Another article is devoted to the selective hiding of the breadcrumbs module. I also came to the conclusion not to display social buttons on page 404. There are other cases where it's worth to hide social media icons on certain pages, or vice versa - to display them only on some. Arranging articles of this series, I just faced a similar need: some button panels are displayed for illustration only in the relevant articles. So I decided to add this topic to the series.
Social Media Buttons in Joomla 2.5. Share42 floating vertical panelPublished: Saturday, 04 May 2013 18:14 Written by Ogri Hits: 21068
In previous articles you learned how to insert a horizontal bar of social buttons into the article body. We now consider the option to hang vertical "floating" buttons panel to have it at any site page. The same service share42.com will help in this. Generate the panel template same way as in case of horizontal option, but the type of panel with icons choose this time - vertical "sticky".
Social Media Buttons in Joomla 2.5. Share42 horizontal panelPublished: Friday, 03 May 2013 17:55 Written by Ogri Hits: 13571
After localizing files and places where scripts of social button panels are inserted in their code, let's move on to the question of where to get the script. There are many services that can generate such a code in accordance with the needs of webmasters. Consider one of them.
There is a pretty nice solution called Share42 which allows both to just insert a horizontal bar in the article body or to hang vertical "floating" panel. In the second case buttons will be present on every page, and it will be discussed in the next article. Now we focus on the first version.
Social Media Buttons in Joomla 2.5Published: Tuesday, 30 April 2013 22:37 Written by Ogri Hits: 32827
As I promised in one of articles from series "Migrating from Joomla 1.5 to Joomla 2.5", I will elaborate on integration of social networks share buttons to Joomla 2.5 website.
Migrating from Joomla 1.5 to Joomla 2.5. EpiloguePublished: Monday, 15 April 2013 17:17 Written by Ogri Hits: 11670
The series of articles which this afterword accomplishes does not claim the complete guide to migration of website on Joomla 1.5 to Joomla 2.5. It does not cover transfer of such powerful and popular tools like K2, components of forums, online stores, galleries and heaps of other extensions. The question of the multilingual site transfer was not broght up either. Many issues were considered rather superficially. On top of that this guide is outdated - as, indeed, any information instantly becomes obsolete in the rapid progress of digital technology. It is - on the one hand.
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-2. Template, editor, and other extensionsPublished: Monday, 15 April 2013 16:59 Written by Ogri Hits: 57212
As usual at the beginning - the appeals for reading introduction and for not forgeting about backup!
Template
As we know, Joomla 1.5 uses templates based on table layout, which is now obsolete. Starting from 1.6 templates use the technology of div layout. Therefore, the installation of templates designed for 1.5 to newer versions is impossible by definition - they are just incompatible. Hence, there are several options:
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-1. Transferring jDownloads and jCommentsPublished: Friday, 05 April 2013 15:20 Written by Ogri Hits: 148981
In the first part we have hard, but worthy moved our menus, categories, articles and other content to the new site with preserving the structure. We now consider how to restore the customary set of extensions. Let's start with a separate examination of two very popular components. jDownloads and jComments are considered nearly the best each in its own sphere of application, a great many of Joomla users take advantage of them. In addition, both are free and have been translated into many languages. There is an obvious desire to transfer the entire set of comments and downloads to the new site. Detailed review of reliable and proven methods of migration jDownloads and jComments from Joomla 1.5 to Joomla 2.5 is the goal of this article.
Migrating from Joomla 1.5 to Joomla 2.5. Part 1. Transferring contentPublished: Saturday, 09 March 2013 20:06 Written by Ogri Hits: 38193
Attention! Before you read this article and follow the instructions outlined therein, be sure to read the Introduction!
I took advantage of a known component jUpgrade. At that time, it was the latest version 2.5.2. I've been keeping to use it, although at the time of this writing, they have already released 3.0 PRO, radically different from 2.5.2. I tried it, but abandoned after a couple of failed attempts to run. Functionality of the previous one still suits me, at least for the options that I have used. Why I refused to transfer third-party extensions with the same utility, I tried to justify in the introduction. And the couple of bugs that came across on the road do not bother, if you know the easy ways to get around them. What is all about - it will be clear from the following description.
Latest News
-
Tuesday, 21 July 2020 03:18
Joomla 3: Redirect to same page after successful login -
Saturday, 30 December 2017 16:11
Joomla: how to add your own language constants or override existing ones -
Thursday, 30 November 2017 23:27
Joomla: Integrate reCAPTCHA v2 (NO CAPTCHA) into JComments -
Saturday, 25 June 2016 15:33
Unified filtering of mod_jcomments_latest module's output -
Thursday, 17 September 2015 16:23
Post an illustrated Joomla-site article on Facebook using OG-tags
Articles Most Read
-
148981
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-1. Transferring jDownloads and jComments -
83771
Joomla: Integrate reCAPTCHA v2 (NO CAPTCHA) into JComments -
57212
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-2. Template, editor, and other extensions -
40163
Editing animated GIF-images in Photoshop CS3 -
39334
Custom 404 error page in Joomla 2.5
Login
Guest Column
Recent comments
-
Custom 404 error page in Joomla 2.5
-
Roseann
02.11.2020 08:17
Noot spamming but wanted to say this is hugely useful!
-
Roseann
02.11.2020 08:17
-
Joomla: Integrate reCAPTCHA v2 (NO CAPTCHA) into JComments
-
PG SLOT
13.01.2021 09:21
Hey! I could have sworn I've been to this site before but after browsing through some of the post ...
-
Nidia
12.12.2020 08:04
HELP. I can't write a comment without it hanging.
-
Launa
17.11.2020 15:13
I can agree with the accuracy of this as I work in a related sector. Interesting cheers for sharing.
-
JD sports vouchers
04.10.2020 03:12
Happy to pay for something like this, or donate witth paypal even
-
PG SLOT
13.01.2021 09:21
-
Joomla: how to add your own language constants or override existing ones
-
Vouchersort
29.10.2020 11:33
Is this a free template that you are using as I really love it. As a website desugner myself I hope that ...
-
Vouchersort
29.10.2020 11:33
-
Migrating from Joomla 1.5 to Joomla 2.5. Epilogue
-
Dewitt
11.02.2021 06:17
HELP. I can't write a comment without the page freezing.
-
Dewitt
11.02.2021 06:17
-
Migrating from Joomla 1.5 to Joomla 2.5. Part 2-1. Transferring jDownloads and jComments
-
Francine
14.12.2020 08:49
I cant stomach this person so sorry x
-
Vouchersort
30.10.2020 15:43
Once again, great resource for us newbs.
-
Francine
14.12.2020 08:49
-
Unified filtering of mod_jcomments_latest module's output
-
Фильмы 2022 онлайн
03.12.2021 21:37
This web site definitely has all of the info I wanted about this subject and didn't know who to ask.
-
Фильмы 2022 онлайн
03.12.2021 21:37