joomla2.5

How to use cookies from a component?

十年热恋 提交于 2019-12-03 07:05:23
How can I use cookies in a Joomla component? setcookie( JUtility::getHash('JLOGIN_REMEMBER'), false, time() - 86400, '/' ); Can anybody describe how this works? // Get input cookie object $inputCookie = JFactory::getApplication()->input->cookie; // Get cookie data $value = $inputCookie->get($name = 'myCookie', $defaultValue = null); // Check that cookie exists $cookieExists = ($value !== null); // Set cookie data $inputCookie->set($name = 'myCookie', $value = '123', $expire = 0); // Remove cookie $inputCookie->set('myCookie', null, time() - 1); Some rules about $expire value its a Unix

Add Custom Button to Joomla's Article Editor (TinyMCE)

痴心易碎 提交于 2019-12-03 05:56:52
I'm trying to insert an additional button in Joomla's article editor. It's using the default TinyMCE plug in Extended mode. As you'll already know there are 4 buttons underneath the editor (Article, Image, Page Break and Read More). What I'd like to do is insert a 5th button. (I did attach a image button SO said I can't post as need a minimum of 10 rep points.) I have tried copying the Page Break Button plugin and renaming it etc, then re-installing it as a new plugin, but all that does it cause errors with TinyMCE and no button appears. Question : How do I insert the button? I've continued my

Joomla Database - How to use LIMIT in getQuery?

两盒软妹~` 提交于 2019-12-02 22:27:43
I want to build the below query using joomla inbuilt database class. SELECT * FROM table_name ORDER BY id DESC LIMIT 1 This is the query I have built up to now. $db =& JFactory::getDBO(); $query = $db->getQuery(true); $query->select($db->nameQuote('*')); $query->from($db->nameQuote(TABLE_PREFIX.'table_name')); $db->setQuery($query); $rows = $db->loadObjectList(); I don't know how to add the limit(LIMIT 1) to the query. Can someone please tell me how to do it? Thanks Older than Joomla 3.0 $db = JFactory::getDBO(); $query = $db->getQuery(true); $query->select('*') ->from($db->nameQuote('#__table

Joomla 2.5 super administrator can't edit front end

主宰稳场 提交于 2019-12-02 18:44:50
问题 I m login in the frontend with a super-administrator user (only super-admin box tips on the backend user parameters), but there isn't any little editing icon displayed near articles. Is there a trick somewhere in the backend that could block frontend edition? Thanks! 回答1: Here's what I did to resolve. I replaced the folder "article" in my custom template /templates/templatename/html/com_content/article I copy/pasted the original "article" files from one of Joomla's templates that come with

Remove component part from sef url, menu item not completely

丶灬走出姿态 提交于 2019-12-02 17:23:34
问题 I've built a custom component for joomla 2.5. Now i wanted to implement sef urls. So I started to create the router.php file. I was almost successfull. The only thing I want to change is removing the component name link. Here is what I have got: http://host.tld/component/componentname/ If I create a menu item with an alias, the sef url looks like this: http://host.tld/alias This is the actual scheme I want to have, but it is only shown when I clicked the menuitem from the menu. If I am at the

Joomla's modal window removing id and class names

二次信任 提交于 2019-12-02 13:38:09
问题 I have a form in a module that I want to appear in a modal window. Depending on the id the window may be blank, or if it does show any content all classes and ids are removed, so I can't validate or style the form. Truncated Code: ... <div id="feedback"> <div class="feedbackinner"> <!-- form module --> <div id="contact-wrapper"> <!--form elements with ids and classes--> </div> <!-- end module --> </div><!-- end .feedbackinner --> </div><!-- end #feedback --> This triggers the modal window

JFactory failing to import

我只是一个虾纸丫 提交于 2019-12-02 12:44:43
I am trying to make a login system for an android application that works in with my 2.5 Joomla website. I am trying to do this by making a Joomla plugin which the android application sends post data to a php file which that then authenticates the user to see if the credentials are correct or not for the login. I have been trying to get this working all afternoon but it seems all my attempts of importing JFactory are failing. I have the below code which bugs out at the first mention of JFactory. My attempt of importing it is not working either. <?php //needed to be commented out otherwise the

How to Install and use joomla rest api step by step

淺唱寂寞╮ 提交于 2019-12-02 09:54:37
问题 Please help, I Want to use REST api in joomla 2.5 !! I searched a lot and spend many days in Github and techjoomla. I didn't get it how to install API extension or Plugin and use that... Even I didn't find any proper documentation to use API. And from where to install It.... Can anyone please explain me step by step how to install API plugin with proper link to download them and proper documentation to use it please... 回答1: You mentioned that you are using Joomla 2.5 (which is no longer

Error 500 on Joomla 2.5.8 : JHtml: :jquery not supported. File not found

穿精又带淫゛_ 提交于 2019-12-02 04:54:11
问题 I am using Joomla 2.5.8 . Actually after i install a new theme this error occurred "JHtml: :jquery not supported. File not found" . Since i am new on Joomla i was unable to figure out. I even tried out Joomla Jquery Library plugins but non helped. Please help me to sort it out. This is the Debug info: 1 JSite->render() JROOT/index.php:48 2 JDocumentHTML->parse() JROOT/includes/application.php:259 3 JDocumentHTML->_fetchTemplate() JROOT/libraries/joomla/document/html/html.php:414 4

How to Install and use joomla rest api step by step

南笙酒味 提交于 2019-12-02 03:22:30
Please help, I Want to use REST api in joomla 2.5 !! I searched a lot and spend many days in Github and techjoomla. I didn't get it how to install API extension or Plugin and use that... Even I didn't find any proper documentation to use API. And from where to install It.... Can anyone please explain me step by step how to install API plugin with proper link to download them and proper documentation to use it please... You mentioned that you are using Joomla 2.5 (which is no longer actively developed or supported). If it is possible for you to upgrade / migrate to Joomla 3.4.x, your options