7
votes
Accepted
Allowing Registered Users To Edit Only Specific JDatabase records?
You are making this way too difficult. Joomla provides you with a feature called ACL that allows just that. For each record, Joomla will create an extra line in the #__assets table.
What you need ...
5
votes
Accepted
How custom module chrome works?
So, modules.php is the way templates get to define (override?) chrome styles if you like. You've probably read about them in the Understanding Overrides article on Joomla Doc's
Without any code, I'm ...
5
votes
Accepted
Calling model's method from view works, but not from controller
You don't do $model->get('Locations'). The correct syntax is to just call the method name: $model->getLocations().
Using the ->get('Locations') syntax is only valid in a view (because get() ...
5
votes
Accepted
Selecting data from multiple JDatabase tables?
To check for a value in multiple tables that do not have a relationship you are going to need either to make multiple queries, 1 for each table, or better make a UNION query.
Now, Joomla has the UNION ...
4
votes
"echo" title article before read more
If you have selected category blog view and you need to print the article just after the intro text, try to override the following template:
/templates/yourtemplate/html/com_conetnt/category/blog_item....
4
votes
Backend module does not run jQuery / JavaScript script?
Your code has several errors, here's a couple:
js.js
You can't load scripts using <script> inside a .js file
You shouldn't need to load jQuery at all, it's included in Joomla (and it's usually ...
3
votes
Accepted
Jform POST issues
When you submit a form using the standard admin style of Joomla, this will create a POST request to the server. The server will then process the task of the form (which is usually 'save' or something ...
3
votes
Calling model's method from view works, but not from controller
There is very little background on what else is in the component.
You really need to check for database exceptions. See: How to do SQL exception / error handling compatible with 2.5 and 3.x?
I see ...
3
votes
How to restrict user registration based on user group
For restricting registration as per user-group you need to use #_user_usergroup_map table for checking number of users in a particular group.
SELECT *
FROM #_user_usergroup_map
WHERE group_id = '...
3
votes
Accepted
View Users Front End - php code
Along with @Tim Wilkinson's answer, I would also use up to date coding standards for doing your database query like so:
$db = JFactory::getDbo();
$query = $db->getQuery(true)
->select($db-...
3
votes
View Users Front End - php code
Try this,
echo $row->id.'|'.$row->username.'|'.$row->email.'<br>';
3
votes
Joomla User Password Reset from an External (Standalone) Script
Curl expects the vars in simple key=> value form, then http encoded. So you need to set:
$vars = 'jform[email]='.urlencode($emailadr).'&'.urlencode($token).'=1';
Note, no " for the field value ...
3
votes
Accepted
Paginated links on items generated using a custom search module does not work
I think I see the issue with the search module form destination url. The form action attribute needs the option and view parameters. I see you added them as hidden field at the end of the form, ...
3
votes
Joomla adding field
The button on your site displays the URL http://nanyangacademics.techiequickie.com/index.php/processrequest as an Iframe in the modal window. You have to find out where that page is generated. It's ...
3
votes
Accepted
Custom profile plugin fields not showing
There are two mistakes in your code.
1) The following piece of code is broken, I guess two lines got overwritten.
$form->setFieldAttribute('dob', 'description', $form->...
3
votes
Accepted
Content Plugin 'loads' multiple times on Category Page
Right, so the function executes 15 times and you have 14 articles assigned to a category.
If you open the following file:
components\com_content\views\article\view.html.php
you see the event ...
2
votes
Initializing JHttpTransportCurl class
Just to have a valid answer.
The problem was in $options - it is an array, but JHttpTransportCurl constructor require JRegistry instance. So
$options = array();
should be changed to
$options = ...
2
votes
Rogue text output on my Search Page: "onContentSearch"
I had the same problem couldn't find solution on other websites, so fixed it myself.
In my case solution was to remove onContentSearch on first line in the file:
public_html/plugins/search/...
2
votes
Rogue text output on my Search Page: "onContentSearch"
It seems that onContentSearch is written in echo or print_r , you can search the string in code to detect it in search plugin or component used on your site, can check the article content if any is ...
2
votes
Strange Issue - Adsense Appearing/Disappearing
I know there can be many reasons why google adds are not showing in a website. You might want to check the Google Help for this:
One common reason is that there are no adds that meet specific criteria ...
2
votes
Accepted
Only articles with article anywhere are accessible
No sure what happened but updating to Joomla 3.3.3 solve it:
I could reproduce under J3.3.3, the same error I had under J3.3.1 by modifying the module chrome file (\templates\mytemplate\html\module....
2
votes
Only articles with article anywhere are accessible
I would suggest
a) Contact Peter from NoNumber, he's very good at responding to questions in his support forum.
b) Uninstall and reinstall. We found that NoNumber couldn't go from 2.5 to 3 without ...
2
votes
Saving JTable (in Component) fails when called from a module
I think you have to include the paths both for model and table:
JModelLegacy::addIncludePath(JPATH_SITE . '/components/com_main/models', 'ByteitBookingModel');
$modelTU = JModelLegacy::getInstance('...
2
votes
Set cookie in from joomla plugin
First of all you could first try to fit this code in your template. If may give you more flexibility there.
onAfterRender does not seem right for me to fiddle the content and to set cookies / read ...
2
votes
Custom Component - JInput Isn't Getting the Form Input
A couple of things. First, verify this is a bug by using the deprecated but still working JRequest to get the file data. I've had to resort to using this method myself recently for a file upload ...
2
votes
Adjust Position of Text with CSS
You can use the following CSS:
.flex-caption {
height: auto;
width: 100%;
margin-bottom: 0;
padding: 10px 0;
}
This will extend the caption box to the full width and position it at ...
2
votes
How to trace source of open <div> in Joomla template
The Category Blog view is (by default) generated by the files components\com_content\views\category\tmpl\blog.php (layout for the blog page) and components\com_content\views\category\tmpl\blog_item....
2
votes
Session variable in joomla 2.5 external file
Your App initialization is not exactly the same than Joomla! CMS. Any minor difference can cause a condition to create a new session, instead of the reusing the original session.
Instead of trying to ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
fix-my-code × 74joomla-3.x × 32
php × 11
component × 8
plugin × 8
joomla-2.5 × 6
module × 6
development × 6
templates × 5
javascript × 5
css × 5
jquery × 4
jdatabase × 3
mvc × 3
joomla-3.4 × 2
joomla-api × 2
database × 2
menu × 2
session × 2
bootstrap × 2
upgrade × 2
jinput × 2
t3-framework × 2
articles × 1
mysql × 1