joomla1.5

Easy way to get “params” from Joomla menu table

放肆的年华 提交于 2019-12-11 05:31:32
问题 I don't know too much about Joomla, but I'm trying to work with a Menu on a Joomla site. In the Database I can see a column called params in the menu table, and it has some data I need. The params column has this data: categories=446 feedLink=1 fusion_item_subtext= fusion_columns=1 fusion_customimage= splitmenu_item_subtext= page_title= show_page_title=1 pageclass_sfx= menu_image=-1 secure=0 I know I can do a mysql query, get that column and parse the value using string manipulation/regex,

Joomla 1.5 com_user and importing user plugins like Joomla 1.6 and above

左心房为你撑大大i 提交于 2019-12-10 20:35:08
问题 When accessing com_users component in Joomla 1.6 and 1.7 on front-end the application automatically imports all plugins from 'user' group. Obviously it is very useful if one doesn't want to create a component to simply pass some variables to a plugin. Ok. let's make it simplier: User gets an activation link: http://example.com/index.php?option=com_users&task=edit&emailactivation=1&u=63&d077b8106=1 and clicks it. Of course the component will omit emailactivation and other params simply

Programmatically adding an article to Joomla

安稳与你 提交于 2019-12-10 15:30:12
问题 I am very new to Joomla (frankly just started exploring the possibility of using Joomla) and need help with programmatically adding articles to Joomla backend tables (please see details below). Also along the same lines, I would like to understand how should values for the columns: parent_id lft rgt level be generated for the table jos_assets ( #__assets ) and what is their functional role (eg are they “pointers/indexes” analogous to, say, an os inode to uniquely indentify a file or are they

How can I update two tables in one query?

。_饼干妹妹 提交于 2019-12-10 12:02:21
问题 There is any way to update two tables in one query? Below is an example of my code. How can I put those two update queries in one? Thank you in advance! <?php // DATABASE UPDATE if (isset($_POST['submit']) or isset($_GET['submit'])){ // 1st QUERY $db =& JFactory::getDBO(); $query_1 = "UPDATE table_1 SET name = '".$_POST["name"]."', surename = '".$_POST["surename"]."' WHERE id=1"; $db->setQuery($query_1); $db->query(); // 2nd QUERY $db =& JFactory::getDBO(); $query_2 = "UPDATE table_2 SET team

Execute PHP script inside Joomla! cms once - geo based redirection

ぐ巨炮叔叔 提交于 2019-12-10 00:25:37
问题 Hi I'm trying to figure the best way to execute a PHP script inside Joomla! I want to redirect users if they are not from X country (already have a database and the script) I found this extension but I want to make my own stuff http://bit.ly/daenzU 1) How could I execute the script once for each visitor? Working with Cookies? 2) As I'll put the script inside Joomla! template, I'll modify templates/XXX/index.php 3) Based on 2), Joomla! loads templates/XXX/index.php each time a page loads, so I

cannot initiate mail function in joomla

跟風遠走 提交于 2019-12-08 08:32:15
问题 I am getting this error in Joomla while sending the mail. I am not getting this error every time. But some times its shows me "cannot initiate mail function". Any solution for this? 回答1: That could be any number of things, but a general list of things to check would be first, your Joomla config: Admin panel > Global Configuration > Server > Mail Settings > Mailer Make sure that's set to use the PHP mail function. If it is, try making a script called test.php and putting it in the root of your

Specified key was too long; max key length is 1000 bytes

别来无恙 提交于 2019-12-07 17:15:49
问题 importimg Joomla 1.5 database via mySQL dump but it gives error "1071 - Specified key was too long; max key length is 1000 bytes" the culrpit sql statement is: CREATE TABLE `jos_core_acl_aro` ( `id` INT( 11 ) NOT NULL AUTO_INCREMENT , `section_value` VARCHAR( 240 ) NOT NULL DEFAULT '0', `value` VARCHAR( 240 ) NOT NULL , `order_value` INT( 11 ) NOT NULL DEFAULT '0', `name` VARCHAR( 255 ) NOT NULL , `hidden` INT( 11 ) NOT NULL DEFAULT '0', PRIMARY KEY ( `id` ) , UNIQUE KEY ( `section_value` ,

Issuing a redirect from a Joomla module

本小妞迷上赌 提交于 2019-12-07 06:04:27
问题 I am not really familiar with Joomla but I have been tasked with writing a module which functionality is irrelevant to the question. One of the requirements is that if the module is loaded, it should check if the user is logged in and if not - redirect him into a specific URL. After some searching I came up with something like this, but it's obviously not a working answer: $user =& JFactory::getUser(); if (!$user->id) { include_once JPATH_COMPONENT . DIRECTORY_SEPARATOR . "controller.php"; //

Insert multiple rows using a single query

与世无争的帅哥 提交于 2019-12-06 22:38:20
问题 Can Joomla's DB object add multiple rows at once? MySQL can do this like so: INSERT INTO x (a,b) VALUES ('1', 'one'), ('2', 'two'), ('3', 'three') But can Joomla's own functions achieve the same thing in a single query? Currently I am doing a loop to insert each row (same table) in separate query. Not a good idea when dealing with tons of rows at once. 回答1: In your model you can do this: $db = $this->getDBO(); $query = " INSERT INTO x (a,b) VALUES ('1', 'one'), ('2', 'two'), ('3', 'three') ";

cannot initiate mail function in joomla

主宰稳场 提交于 2019-12-06 16:37:59
I am getting this error in Joomla while sending the mail. I am not getting this error every time. But some times its shows me "cannot initiate mail function". Any solution for this? That could be any number of things, but a general list of things to check would be first, your Joomla config: Admin panel > Global Configuration > Server > Mail Settings > Mailer Make sure that's set to use the PHP mail function. If it is, try making a script called test.php and putting it in the root of your site (where the index.php file is for Joomla). Make that file something like this: <?php $to = "you