7

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 to do is add an asset_id field to the database table: `asset_id` INT(10) UNSIGNED NOT NULL DEFAULT '0', create a role in a component (usually in a /...


5

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 database methods, but those work only on Joomla 3.3 and later. The concept of the query you are going to need for your case should be similar to this: $query ...


5

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() is a method of the view class). This doesn't throw an error on the model, because it does also have a get method. However, it does a completely different task ...


5

@Lodder is definitely correct, but there is another syntax for those who are interested. I prefer this syntax because it saves typing the field names as many times $data = new stdClass; $input = JFactory::getApplication()->input; $data->username = $input->get('username'); $data->choice1 = $input->get('choice1'); $data->choice2 = $input->...


5

You will first need to get the values using JInput like so, $input = JFactory::getApplication()->input; $username = $input->get('username'); $choice1 = $input->get('choice1'); $choice2 = $input->get('choice2'); $choice3 = $input->get('choice3'); then for your database query, you can use the following: $db = JFactory::getDbo(); $query = $db-...


5

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 guessing you're probably experiencing a bug in your PHP, the only way for you to check that will be to turn on Joomla's Debug mode and set it's Error Reporting ...


4

It is the double quotes in the script/string. Try this: <?php $ReftaggerOut = " <script type='text/javascript'> var refTagger = { settings: { bibleVersion: ".$BibleTranslation." } }; (function(d, t) { var g = d.createElement(t), s = d.getElementsByTagName(t)[0];...


4

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.php And paste in this: $option = JRequest::getCmd('option'); $view = JRequest::getCmd('view'); if ($option=="com_content" && $view=="category"...


4

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 loaded by your template or other extensions). If not, use JHtml::_('jquery.framework'); to load it properly. This entire file looks unnecessary to me, as you'...


4

I managed to do it, so I will describe the process that I followed, in case other newbies like me have similar problems. I am on a Mac OS X, and I am using Safari, which allows me to inspect the code and modify it in real time. The process should be similar with Chrome/Firebug/Dev Tools... First, I opened the website page with the search box. Over the ...


3

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 two options here: 1. Recommended You set up your debugger in your prefered IDE and look into the code to see what it does and where is the null coming from. ...


3

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 = 'GROUP_ID'; Here replace your specific group_id value.


3

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->quoteName('*')) ->from($db->quoteName('#__users')); $db->setQuery($query); $rows = $db->loadObjectList(); foreach ($rows as $row) { ...


3

Try this, echo $row->id.'|'.$row->username.'|'.$row->email.'<br>';


3

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 similar) to save the form into the database. At the end of the save, Joomla automatically does a redirect either back to the form view or the list view (...


3

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 of the token field


3

I realize you've solved the syntax error issue, but the right way to solve this problem is to not insert javascript with PHP this way. What you should be doing is: 1) create your javascript file in media/plg_yourplugin/js/your-js-file.js 2) in PHP use JHTML library API to add the javascript file to the index.php area. Here's a blog post by @Michael on ...


3

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, but try removing those fields and adding to the JRoute url like so: <form name="books-search" action="<?php echo JRoute::_('index.php?option=com_usedbooks&...


3

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 probably a component, so look for any component with "form" in the name in your admin area under the "Components" menu. If you disable SEF urls (in Global ...


3

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->setFieldAttribute('postal_code', 'description', 'PLG_USER_PROFILE_EI_FILL_FIELD_DESC_SITE', 'profile_ei'); This should be $form->setFieldAttribute('dob', 'description'...


3

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 dispatched on line 161: $dispatcher->trigger('onContentPrepare', array ('com_content.article', &$item, &$item->params, $offset)); Then in this file: ...


2

The problem is in your view. You can use $this->get('project'), which would call the getProject() method of your model. However it doesn't allow to pass an argument. Thus in your case, you need to fetch the model first and the call the method on it: $model = $this->getModel(); $project = $model->getProject($user_id);


2

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 = new JRegistry();


2

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.php). I haven't edited this file since a least a full month before the issue happened so I can't find out what was wrong. Anyway, it's back now! EDIT: ...


2

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 problems, so we started uninstalling it and reinstalling it fresh. It shouldn't cause much in the way of problems, rather, we haven't found any yet, and we've ...


2

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('TimeUnit', 'ByteitBookingModel'); $modelTU->addTablePath(JPATH_ADMINISTRATOR . '/components/com_main/tables');


2

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 cookies. Are you sure that your plugin is actually being called? Anyway, check your browser console to see the status.


2

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 need. $file = JRequest::getVar('file_upload', null, 'files', 'array'); If that doesn't work still, simply try dumping the $_FILES['file_upload'] request ...


2

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/fieldsattachmentadvanced/fieldsattachmentadvanced.php Probably the developer put it there by mistake. :)


Only top voted, non community-wiki answers of a minimum length are eligible