Joomla

How to add string to joomla header?

有些话、适合烂在心里 提交于 2019-12-24 08:58:56
问题 I know that with JFactory::getDocument(); i can add some JS code to the header, but at the moment i need to add this kind of line <!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]--> Is there some default methods? 回答1: You can do this using Jdocument: $document=JFactory::getDocument(); $customtag='<!--[if lte IE 8]><script language="javascript" type="text/javascript" src="../excanvas.min.js"></script><![endif]--> '; $document-

Joomla 2.5 get component configuration in config.xml ALWAYS return null

。_饼干妹妹 提交于 2019-12-24 08:57:12
问题 Please help me with this I am creating a component. There is a config.xml in my component I write my custom JFormFieldUserCheck in userCheck.php I want to load parameter or field from config.xml I used $param = JComponentHelper::getParams('com_my-component'); var_dump($param); Resul is object(stdClass)#214 (0) { } But when I change com_my-component to com_content (Joomla default component). then var_dump, result is fine. Thanks in advance 回答1: I have added an excerpt from the blog entry:

Joomla - MySQL query within a loop - I guess this is bad practise

╄→尐↘猪︶ㄣ 提交于 2019-12-24 08:42:28
问题 I´m currently using this code for outputting an array of results: <?PHP $db = JFactory::getDbo(); //Start date $startdate = date('2010-05-21'); // End date $end_date = date("Y-m-d"); $arraystring = ''; while (strtotime($startdate) <= strtotime($end_date)) { $query = "SELECT * FROM table1 WHERE FROM_UNIXTIME(tm,'%Y-%m-%d') = '".$startdate."'"; $db->setQuery($query); $replyAGS = $db->query(); $my_count = $db->getNumRows(); $arraystring .= $my_count.', '; $startdate = date ("Y-m-d", strtotime("

How do I make textarea a TinyMCE in Joomla?

守給你的承諾、 提交于 2019-12-24 08:23:45
问题 I have a component and I want to make a textarea on the admin backend interface use the TinyMCE editor: How do I reference the TinyMCE that is being used by other components (instead of duplicating it) 2.) How do I hook into the page init or some place where I can let TinyMCE do it's magic (of if Joomla provides a way) Thanks 回答1: Looks like all I had to do was get an instance of JEditor and use this to render my textarea: <?php echo $this->editor->display('name_of_your_field', 'predefined

Overwriting JControllerForm save() Method to Trim POST Data Has No Effect

泄露秘密 提交于 2019-12-24 06:07:52
问题 I have a component that has a controller called MyproductControllerGeneralsetting which extends JControllerForm . Inside MyproductControllerGeneralsetting I am overwriting the save method from the parent class in order to modify $_POST data and then the overwriting method calls the parent class' save method to do the actual saving. Here's the overwritten method in MyproductControllerGeneralsetting : /** * We overwrite the saved form data and trim them to avoid spaces */ public function save(

Overwriting JControllerForm save() Method to Trim POST Data Has No Effect

心已入冬 提交于 2019-12-24 06:07:09
问题 I have a component that has a controller called MyproductControllerGeneralsetting which extends JControllerForm . Inside MyproductControllerGeneralsetting I am overwriting the save method from the parent class in order to modify $_POST data and then the overwriting method calls the parent class' save method to do the actual saving. Here's the overwritten method in MyproductControllerGeneralsetting : /** * We overwrite the saved form data and trim them to avoid spaces */ public function save(

joomla 1.5.22 on mysql 5.5

末鹿安然 提交于 2019-12-24 06:02:00
问题 I have fond some tutorials about joomla instalation on mysql 5.5, and i did everything (changed all "TYPE=MyISAM" to "ENGINE=MyISAM" in sql files in \installation\sql\mysql), and joomla 1.5.22 installed fine. But when i opened my home page http://localhost/joomla (usning xampp) i saw a lot if errors: Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\Joomla2\libraries\joomla\import.php on line 29 Strict Standards: Non-static method JLoader

joomla 1.5.22 on mysql 5.5

空扰寡人 提交于 2019-12-24 06:00:01
问题 I have fond some tutorials about joomla instalation on mysql 5.5, and i did everything (changed all "TYPE=MyISAM" to "ENGINE=MyISAM" in sql files in \installation\sql\mysql), and joomla 1.5.22 installed fine. But when i opened my home page http://localhost/joomla (usning xampp) i saw a lot if errors: Strict Standards: Non-static method JLoader::import() should not be called statically in C:\xampp\htdocs\Joomla2\libraries\joomla\import.php on line 29 Strict Standards: Non-static method JLoader

Joomla ACL integration

我们两清 提交于 2019-12-24 05:21:23
问题 Does anyone know of any way to integrate with Joomla ACL, specifically create users and log users in programatically within a custom component's controller and modules. I've scoured Google but either am asking the wrong questions, no one has documented how to do it, or it's not possible (which I don't believe!) Why you may ask?! - I am developing a single sign on application for a component that must log a user into several API's when they sign in. Unfortuanetly my client also wants this to

Joomla module or component to be render on a blank page

孤人 提交于 2019-12-24 04:29:22
问题 I have developed a Joomla module that does provides a form, processes its post data, does some calculations and displays the results. The module includes a button to print the results. I'm currently using JavaScript to open a new window, paste the relevant HTML and open the print dialog. Instead of JavaScript I would prefer to provide a separate URL for the print view and simply open that in a _blank target. This would make the application work better for people using screen readers or not