joomla1.7

joomla 1.7 user registration customization issue

痴心易碎 提交于 2019-12-11 16:36:27
问题 -> i am trying for new user registration customization. -> for that i create form and hidden variable through call function from controller. -> in controller save function i write this code but some inner function which not work in 1.7 so create problem here. function register_save() { global $mainframe; $db =& JFactory::getDBO(); // Check for request forgeries JRequest::checkToken() or jexit( 'Invalid Token' ); //clean request $post = JRequest::get( 'post' ); $post['username'] = JRequest:

JFactory,JDatabase class not found in /var/www/joomla2.5/database.php

て烟熏妆下的殇ゞ 提交于 2019-12-11 15:47:36
问题 I am trying to make connection to my data base but i am getting error JFactory class not found /var/www/joomla2.5/database.php my code is $db= JFactory::getDBO(); I have also tried to make database connection externally but then iam getting the error JDatabase class not found <?php $option = array(); //prevent problems $option['driver'] = 'mysql'; $option['host'] = 'localhost'; $option['user'] = 'xxxx'; $option['password'] = 'xxxx'; $option['database'] = 'xxxx'; $option['prefix'] = 'cdri_';

Significance of a using colon in Joomla URL

随声附和 提交于 2019-12-11 11:57:10
问题 I need to know, if joomla gives any significance to a colon in within component or view? Is there something in this naming convention? 回答1: The colon is only used in the 'id' parameter to separate the numeric id from the slug used for SEF URLs. With view & component names you should not use any colons. Eg: Non-sef URL - /index.php?option=com_content&view=article&id=45:my-article-title Sef URL - /my-article-title.html Also when actually using the id, you should only use the numeric part, which

how to insert data into database at joomla article

为君一笑 提交于 2019-12-11 03:41:21
问题 I am beginner in joomla development. I know PHP, MySql. But I want to insert data into database (phpmyadmin) in joomla. how to do it in a joomla article. Thanks 回答1: You can run insert query in joomla in this way. $db =& JFactory::getDBO(); $query = "INSERT INTO '#__example_table' ('name','email','username') VALUES ('John Smith','johnsmith@domain.example','johnsmith')"; $db->setQuery($query); $db->query(); 回答2: Another way of insert query. $db = JFactory::getDBO(); $query = $db->getQuery(true

Joomla: Write and call a helper function in a component

*爱你&永不变心* 提交于 2019-12-11 03:12:45
问题 Fledgling Joomla / PHP developer, hitting a wall understanding how to do this. Everything I found searching has been for older versions of Joomla or other frameworks and so it's all confusing the first time around. I want to have a helper function that I can call from anywhere in my component. Basically it takes a userID input and returns their full name, let's say hair color and height. Here's the function: function get_profile_info($userID) { $db =& JFactory::getDBO(); $query = $db-

joomla add view into another view

早过忘川 提交于 2019-12-10 22:05:51
问题 Im using joomla MVC and I want to build a form that has different tabs which are different sections of the form with inputs in it. There are some tabs that are common to other forms that I need to include. I would like to be able to load this common content from a separate file or view so i dont have duplicate code, plus is easier when I need to do a change to the form so I dont have to do it in all the forms. It's like displaying a view inside another view. Is there a way to accomplish this?

How can I change the Joomla administrator URL By PHP - No plugins

▼魔方 西西 提交于 2019-12-10 18:44:35
问题 Since I'm new to Joomla I would like to know whether there is a way to change the administrator URL by using PHP rather than using a plugin or extensions. As far as I see using a 3rd party component is risky. I really don't want to use 3rd party extensions at all in mysite. How can I get it done? By default Joomla administrator URL is yoursitename/administrator. changing constants in /includes/defines.php and /administrator/includes/defines.php does not work . Thanks 回答1: referring this post

How do you add fields to com_content in Joomla! with a plugin and store the data in its own table?

↘锁芯ラ 提交于 2019-12-10 10:33:38
问题 I'm running Joomla 1.7 and I know that it has the ability to add custom form fields to components with a plugin. There is a sample plugin located at: /plugins/user/profile This plugin allows you to put custom form fields on the user profile front end and back end and these fields are stored in a custom table. I created a similar plugin for user profiles and it worked perfectly. However, when I go to create a plugin like this for com_content, I am met with a problem. this is what my XML file

Joomla article page: code to check published or not

非 Y 不嫁゛ 提交于 2019-12-07 14:26:50
问题 I'm looking for php code in article page to check if the article is published or not. I tried this one, but it false. if($listing['Listing']['published']==1){ } Could anyone give me some hint? Thanks a lot PS: Joomla 1.7.3, JReviews 2.3(using Joomla default content structure) 回答1: Try this: jimport('joomla.database.table'); $article_id = [place here the article Id]; $article =& JTable::getInstance("content"); $article->load($article_id); echo $article->get("state"); you can find more info

How do you add fields to com_content in Joomla! with a plugin and store the data in its own table?

感情迁移 提交于 2019-12-06 10:38:01
I'm running Joomla 1.7 and I know that it has the ability to add custom form fields to components with a plugin. There is a sample plugin located at: /plugins/user/profile This plugin allows you to put custom form fields on the user profile front end and back end and these fields are stored in a custom table. I created a similar plugin for user profiles and it worked perfectly. However, when I go to create a plugin like this for com_content, I am met with a problem. this is what my XML file looks like: <?xml version="1.0" encoding="utf-8"?> <form> <fields name="additionalinfo"> <fieldset name=