GDP
  • Member for 7 years, 9 months
  • Last seen more than a week ago
Is it possible to check if a method or function exists in the component controller?
Accepted answer
1 votes

I never figured out how to use $this, but it was pretty straightforward otherwise. This checks to see if the add method exists in the Article controller. $ToolsClass = 'ContentControllerArticle'; $...

View answer
Are there any tools or components for jLogger?
Accepted answer
4 votes

Well with the complete absence of even comments, I don't expect that too many folks will be interested. I put together a class that extends JLog by writing logs to the database instead of text files. ...

View answer
How to configurate Joomla or Apache for v1 SEF Urls?
4 votes

I managed to piece together a solution without using .htaccess, though I'm interested in a cleaner solution if somebody has one. I created a system plugin that really does nothing in the conventional ...

View answer
Incorrect Timezone in formatted output with JDate
Accepted answer
3 votes

The answer apparently lies in using ->calendar() instead of ->format() because that method has a second parameter to format locally. The below code gives me the timezone correctly in the output:...

View answer
Can I access/use Joomla's Smart Search results in my custom component?
2 votes

I'm still interested in a better answer since this solution tinkers with the core installation, but I added the below file to get what I needed, with the following examples: index.php?option=...

View answer
Joomla: How to insert $jinput to JTable::store via CLI?
2 votes

I'm not sure if I'm understanding the question or not, but here's an example of code that I routinely use from the CLI using the model for saving/creating articles in #__content, hopefully it will ...

View answer
How to retrieve active filter from a custom field form?
3 votes

Thank God for 5 year old posts and Occam's Razor. The Custom Field has direct access to the form that I was trying to get to!!!! No need to load a model, helper, or otherwise. $MyField1 = $this->...

View answer
How to properly get an array from jInput?
3 votes

I misread or misunderstood the documentation of $jinput->getArray(). I understood this to return a subset of the input variables, as specified in an array of the variables you're interested in. ...

View answer
Combine custom First Name field and Last Name field into 'Name' in Users table
1 votes

I might be off with this, but your first name field definition is still "name", so its only capturing the "first" part and storing it. Presumably, it's saving the "second" part as the last name. I ...

View answer
Delete items of database via CLI
Accepted answer
4 votes

It's been awhile since I've done this, but as I recall putting this within doExecute should do what you want. $basePath = JPATH_ADMINISTRATOR.'/components/com_content'; require_once $basePath.'/...

View answer
User Login History
4 votes

Joomla only stores the last login. You'd have to write a very simple user plugin that writes the login event somewhere, which is what that plugin seems to do.

View answer
Integrating extensive static HTML "site" into a Joomla website
3 votes

Assuming you know PHP, there are a number of tools to assist you, but here are the general steps you'd use to get your static content into a Joomla database. In short, each page you import will be an ...

View answer
How to set a component's param dynamically?
Accepted answer
16 votes

Many of our component's parameters depend on external conditions, so we need to periodically change them with some overnight processing. Here's the code we use (adapted for use with com_content). // ...

View answer
Change "Show page heading" param for every menu item
Accepted answer
6 votes

I believe you'll need to use SQL statements such as below. But be CAREFUL - BACKUP THE TABLE FIRST to be sure that you can restore it if there are more considerations than you've realized at this ...

View answer
Using PHP in Joomla 2.5, is there a decent way to create groups without going through the menu or SQL?
1 votes

This code is actually for Joomla 3.x, and I skipped v2.5, so can't be sure that it will work, but if not, perhaps it will give you a starting point to find the v2.5 equivalent: $basePath = ...

View answer
using ajax inside a component without using com_ajax?
Accepted answer
1 votes

There are quite a number of ways to call AJAX without com_ajax. Look at What Is The Proper Way To Make An AJAX Call to understand and choose a method, and then apply your search logic accordingly.

View answer
Is it possible to add attributes in Virtuemart 3?
Accepted answer
0 votes

I'm reasonably sure that the newer VM uses Custom Fields to create Product Attributes. I haven't done it myself with VM3, but How to create the VM custom fields walks through it pretty well.

View answer
How can I temporarily change the article ID of a menu item within PHP?
1 votes

Apparently the hooks I need aren't there, so here's the code I used to get it working: $menu = $app->getMenu(); $menuitem = $menu->getItem(100); $querystring = str_ireplace('index.php?','',$...

View answer
Hide homepage when user is logged in
Accepted answer
6 votes

I've used Nomad in the past - instead of redirecting, it's a system plugin that actually overrides the default home page and replaces it with your choice of locations based on User Groups.

View answer
Joomla Video JWPlayer
2 votes

Posters (and most settings) for JW Player are HIGHLY dependant on the version of the player, and the method with which you are using it. I've spent literally hundreds of hours working with it, and ...

View answer
How to automatically log in a user after they've clicked the confirm registration link?
3 votes

I'm not real familiar with Chronoforms anymore, but if you can get this code in there somewhere, the user should be logged in: $credentials = Array('username' => 'MyUsername', 'password' => '...

View answer
Booking extension with hourly bookings
Accepted answer
2 votes

I have the same requirement and use "Event Booking". The demo doesn't show it well, but think of each of your reservable time periods as an Event. You can then create recurring events for whatever ...

View answer
Template—Extension record not found in database
2 votes

Sounds to me like you might have copied a template, and not installed it - that worked in earlier versions of Joomla, but not so in later versions. Check this to be sure you covered all the bases. ...

View answer
How to Create a Foreach Loop that Returns Users In a Specific Usergroup
Accepted answer
3 votes

To answer the actual question, this code will give you a listbox of UserIDs and Names. Retrieving all the extra data would then just be a SQL select statement $myGroupID = 2; //Your User Group to ...

View answer
Child XML for joomla parameters
1 votes

Because you did not use any known template frameworks, I'd be very very surprised if anyone will be able to give you a direct answer to your question. I googled a few, and found Using a Joomla ...

View answer
How to use 1 administrator account for multiple sites?
2 votes

I think what you need is your own Authentication Plugin. The example given shows authentication being done against the user table, but you could just as easily check if the password is equal to ...

View answer
How can I turn off Front-End editing of articles without changing Content Permissions?
Accepted answer
2 votes

A Content Plugin can accomplish this. To prevent F/E editing for articles this works: public function onContentBeforeDisplay($context, &$article, $params, $page=0) { if( $context == '...

View answer
How do I restrict the editing of a Tab to certain user group but not it's accessability?
1 votes

I assume you're referring to the fields within a tab, not the Tab itself, so you can modify the attributes of the form fields in it's model. // One method that can be used to determine if they CAN ...

View answer
Maximum execution time of 30 seconds exceeded
2 votes

As David said in the comment, you'll need to increase your execution time (see this question/answer). Once done, you should be able to run the Administrator and turn on Joomla Debugging. With that ...

View answer
Joomla logout When browser close
1 votes

This is not tried/tested, so the best implementation is up for debate, but you could load this javascript in your template so that it is included on all pages. When the window closes, it will POST to ...

View answer