Joomla

Create a Joomla! Article Programmatically

牧云@^-^@ 提交于 2020-01-09 07:06:10
问题 I have created my own component. When I add a new record to my component, I also want it to create a new article in joomla (i.e. using com_content). I found this on stack overflow Programmatically adding an article to Joomla which explains how to do it. The code makes sense, and looks like it will work. The problem is that once methods start being called that are contained in com_content, all the relative URLs in com_content break down and joomla throws an error. Does anyone know a way to

Create a Joomla! Article Programmatically

╄→尐↘猪︶ㄣ 提交于 2020-01-09 07:06:10
问题 I have created my own component. When I add a new record to my component, I also want it to create a new article in joomla (i.e. using com_content). I found this on stack overflow Programmatically adding an article to Joomla which explains how to do it. The code makes sense, and looks like it will work. The problem is that once methods start being called that are contained in com_content, all the relative URLs in com_content break down and joomla throws an error. Does anyone know a way to

Create a Joomla! Article Programmatically

◇◆丶佛笑我妖孽 提交于 2020-01-09 07:05:59
问题 I have created my own component. When I add a new record to my component, I also want it to create a new article in joomla (i.e. using com_content). I found this on stack overflow Programmatically adding an article to Joomla which explains how to do it. The code makes sense, and looks like it will work. The problem is that once methods start being called that are contained in com_content, all the relative URLs in com_content break down and joomla throws an error. Does anyone know a way to

Why can't I add or edit Joomla articles after Global Check In

北城余情 提交于 2020-01-07 08:28:46
问题 I'm using Joomla 3.8 to manage our community website (on the side pro bono). Everything was going well until I noticed an article with a padlock icon in the administration. I applied Global Check In, which unlocked the article. But now I find that I am unable to add or edit articles. Please see screenshot below: The website is running on PHP version 5.6.31, with web server Apache. How do I fix the problem? Is there any code I need to tweek? 回答1: This is how I determined the source of the

using JParameter in Joomla

 ̄綄美尐妖づ 提交于 2020-01-07 06:15:45
问题 I'm thinking of using JParams to store the last visited date of a certain page in a Joomla 1.7.1 site. So in the code I'm doing something like: $last_run = $params->get('last_visit', '2000-01-01'); // set last_run to current run time $params->set('last_visit', $now); The problem is obviously that the newly set value for last_visit doesn't get stored, though it does get set. Is there some way to store the params, without going through a DB query? Thanks 回答1: Here's an example solution of your

set iframe in article in joomla

你。 提交于 2020-01-07 05:10:24
问题 I am new in joomla. I am using joomla 1.5.26. I have created one article and try to place an iframe in that article in html mode. But when I try to save its becoming blank. How to solve this issue. Please help me. Thanks in advance. 回答1: I think it's happened because of text filtering. To prevent Joomla from stripping HTML from your content see below (Note: Be careful while settings in production server): Go to the Article Manager. Select ” Options ” (the button on the top right). Under Text

Href link with OnClick event

孤者浪人 提交于 2020-01-07 04:57:08
问题 i am having a link like below where on click of that twitter , i need to open the twitter page with the message given in $markme_ddesc but instead when i click on the link , it simply moves to twitter.com without opening in a new window and with the message.. <a style="text-decoration:none;" href="http://www.twitter.com" onclick="window.open(\'http://twitter.com/home/?status=\'+encodeURIComponent(location.href)+\'-'.$markme_ddesc.'\');return false;"> Why so? how to resolve this?? Please help

How to return the user_id from the Joomla-Framework on insert/update a (new) user

三世轮回 提交于 2020-01-07 03:46:11
问题 I try to insert/update a new user to a joomla page from an external script. The following code works very well. However I'll need the user_id of the added or updated user but the script returns just "useractivate". The Joomla Forum/Documentation (https://github.com/joomla/joomla-cms/issues/9644) suggests to use $db->insertid(); But I was not able to get this work. Up to now I tried this: $db = JFactory::getDbo(); var_dup($db->insertid()); and get the result: 0 User Creation <?php define( '

Fatal error: require_once(): Failed opening required

不打扰是莪最后的温柔 提交于 2020-01-07 02:43:46
问题 This is the first time I upload a site - http://indianrestaurantmumbai.com/ , I have added everything necessary to my folder (I think), and it gives me this error message: Warning: require_once(/home/ecoconst/public_html/IndianRestaurantMumbai.com/includes/defines.php): failed to open stream: No such file or directory in /home/ecoconst/public_html/IndianRestaurantMumbai.com/index.php on line 21 Fatal error: require_once(): Failed opening required '/home/ecoconst/public_html

Migrated Joomla Site shows Table doesn't exist

寵の児 提交于 2020-01-07 02:30:36
问题 I have a joomla 2.5 site created locally on my machine, that I've migrated to a vps running nginx, php and mysql. Here is what i did in order: 1. Uploaded all the joomla files in the public_html 2. Changed all the files permission to 644 and all the folders to 755 3. Imported the database.sql to mysql using these commands: --> mysql> create database databasename; --> mysql> GRANT ALL PRIVILEGES ON databasename.* TO username@localhost IDENTIFIED BY 'password'; --> mysql> flush privileges; -->