Joomla

add language constants to Joomla component javascript

冷暖自知 提交于 2019-12-18 13:30:51
问题 My component includes a java script file: $doc->addScript("/components/com_cam/js/cam.js"); I have several client side messages that I'd like to add with language constants, i.e. <?php echo JText::_('COM_CAM_SEND_LABEL'); ?> Easy enough in your front end php code like default.php but what about messages inside cam.js ? Such as my jquery validation: messages: { cam: { required: "Enter a label", minlength: jQuery.format("At least {0} characters required!"), maxlength: jQuery.format("Maximum {0}

What is difference between conservative caching and progressive caching in joomla 2.5?

老子叫甜甜 提交于 2019-12-18 12:47:33
问题 In Global Config in joomla have 2 caching is conservative and progressive, what is difference both ? 回答1: Conservative caching is the standard type of caching. Here’s how it works: A visitor visits a page on your website. Joomla checks if there is a non-expired version of that page in its cache directory. If the cached page exists (and it’s not expired), then Joomla will serve it to the visitor – otherwise, a cached version of the page is created, and that cached version will be served to the

Custom Sessions with Joomla

余生长醉 提交于 2019-12-18 12:42:42
问题 I've trying to build Joomla into my existing website so I can use it for premium content. I've already got a custom-built authentication system that sets my own session variables. For some reason, Joomla (which is located in a different directory) doesn't want to recognize these session variables, even when adding the session_start(); line at the top of all Joomla pages. Any idea how I can get Joomla to recognize my custom session variables so I can limit the content located in Joomla to only

How to secure Joomla and prevent being hacked?

*爱你&永不变心* 提交于 2019-12-18 09:13:27
问题 I know securing any website is a very tough and broad topic to be discussed upon but i want to relate this question to my specific website which i've been working on. It was coded in php by some other programmer around 2007 and i am responsible for it's management. My problem is it's being hacked time and again. Please help me Joomla version 1.5.18(With Virtuemart) 回答1: From this guide: 8 Ways to secure Joomla and prevent being hacked! Change the default database prefix (jos_) Use a SEF

How to install component and route plugin in one package?

半世苍凉 提交于 2019-12-18 09:06:46
问题 I have created custom component and a route plugin for Joomla 1.5 to to provide SEO URLs for my component and also articles and categories which are not menu tied. Now I have to install my component and route plugin separately. Is there a way to install both in one package please? Thank you in advance! Vojtech 回答1: When any extension installed Joomla triggers an event 'com_yourcomponent_install()' to your install file, which you have mentioned in xml file. write a function com_yourcomponent

joomla database methods

落花浮王杯 提交于 2019-12-18 08:55:00
问题 How do I use in case of Joomla the mysqli bind_param how would this example should be declared using joomla Database methods? ... $statement->bind_param('s', $like); $statement->execute(); 回答1: In Joomla! 3.1, PDO/Sqlite and PDO/Oracle are supporting prepared statements, others are not implemented yet. Given using a 'preparable' connection, it would work this way: $db = JFactory::getDbo(); $query = $db->getQuery(true); $query->select('...')->where('...'); $query->bind(':s', $like); $db-

Use javascript variable in php code [duplicate]

自古美人都是妖i 提交于 2019-12-18 08:23:37
问题 This question already has answers here : How do I pass JavaScript variables to PHP? (14 answers) Closed 5 years ago . I have been working with a form submission in joomla and have a few trouble using javascript variable with php JRoute_ Here is the code snippet: function ValidateForm() { var loc = $("#locality").val(); var action = '<?php echo JRoute::_('index.php?option=com_add&view=malllists&Itemid=233&districtname='.$dit.'&loc='Pass javascript Variable Here) ;?>'; document

JOOMLA site too slow

◇◆丶佛笑我妖孽 提交于 2019-12-18 07:06:28
问题 my Joomla site is too slow. It approximately uses 8 to 10 s to load main page. I am using xampp. template protostar. PC core i7. OS windows. JOOMLA 3.15. Is it normal ?? OR any any one may please guide me how to debug this issue. 回答1: Oppz i solved it just right now. I disable Xdebug in php.ini and time reduces form 8s to 1s [XDebug] ;zend_extension= "C:\Users\arslan\Desktop\xampp-win32-1.8.1-VC9\xampp\php\ext\php_xdebug.dll" ;xdebug.remote_enable=on ;xdebug.remote_handler=dbgp ;xdebug.remote

JQuery not working on Joomla 3

拜拜、爱过 提交于 2019-12-18 06:55:27
问题 I am trying to make a simple jQuery script work under Joomla 3. Here is what my module looks now: <?php // no direct access defined('_JEXEC') or die; $doc = JFactory::getDocument(); JHtml::_('jquery.framework'); $doc->addScriptDeclaration(' $(document).ready(function () { $(".text").text("By this"); }); '); ?> <div class="text">Text should be changed...</div> I tried this snippet on a normal page and works perfectly, just I don't know why it does not want to work in Joomla. I installed the

Writing Joomla bridge - User plugin

落花浮王杯 提交于 2019-12-17 21:38:30
问题 I want to write a Joomla plugin to connect to user tables in database (one way). So on new user registration, user will be duplicated and stored also in second table (other script). This is main goal. Things like updating on password change/delete etc. can be left until later. Any ideas where I can find information helping me to write a plugin like this for Joomla 1.6? Where I can get user registration data etc? 回答1: I have written a plugin for Joomla 1.6 that takes the new registered user's