Joomla

Joomla! Custom form logs the user out on submission

余生颓废 提交于 2020-01-16 08:00:10
问题 I have the following php embedded into a Joomla! article, using the Sorcerer plugin; <?php $user = JFactory::getUser(); $username = $user->username; $user_id = $user->id; if (isset($_GET['action'])){ date_default_timezone_set('Europe/London'); $user= JFactory::getUser(); $username=$user->username; $user_id=$user->id; $date_now=date('m/d/Y H:i:s'); $db =& JFactory::getDBO(); $insert_sql= "INSERT INTO KOSRequest (user_id,created,IGN,LKL,KOSReason,Status) VALUES (".$user_id.",'".$date_now."','".

How to make file permissions and file ownership stick?

拜拜、爱过 提交于 2020-01-15 09:24:38
问题 I'm trying to figure out how I would go about setting permissions (and ownership) that will just stick for a directory and its recursive contents, when creating new files or folders. I'm using the XAMPP bundle under Ubuntu, which provides me with Apache (among other services). By default Apache using XAMPP is configured to run under user daemon and group daemon . I use the setgid bit to propagate the daemon group to newly created files and directories. I also use ACL because when a component

Where does Joomla store article images?

烂漫一生 提交于 2020-01-15 07:34:10
问题 Where in the Joomla directory can I look to find images stored in articles? 回答1: By default images uploaded are stored in the %root%/images directory, however, images may be stored in subdirectories of the images folder. The native editor and Joomla Content Editor (JCE, a commonly used editor for Joomla!) will only allow you to insert images from the images folder and subfolders into articles. It is possible to insert images from elsewhere in the %root% folder by directly editing the img tag

PHP returning references - '&' necessary in caller?

大兔子大兔子 提交于 2020-01-15 07:28:06
问题 I'm using joomla and i have read through the API and I noticed the JFactory class having functions return a reference to the object but the examples I have gathered from the internet do not use the & when using the functions. Say for example the Jfactory::getSession() which returns a reference to the global session. the documentation shows that its defined as function &getSession(params){code} - clearly defining a reference return. however, in this example, they call it as $session = JFactory

How to display a message on joomla homepage only?

◇◆丶佛笑我妖孽 提交于 2020-01-15 06:11:53
问题 How can I display a message only on the homepage of joomla? I am interested in displaying it on site.com and not site.com/index.php/page or anything else then site.com. I have tested the following: <?php $app = JFactory::getApplication(); $menu = $app->getMenu(); $lang = JFactory::getLanguage(); if ($menu->getActive() == $menu->getDefault($lang->getTag())) : ?>this is the homepage <?php endif; ?> and this <?php $menu = & JSite::getMenu(); if ($menu->getActive() == $menu->getDefault()) { echo

joomla 3 - how to disable front end login component?

戏子无情 提交于 2020-01-14 14:57:08
问题 I have searched and disabled joomla login module which hides login form in sidebar. But if I put index.php/component/users URL in address bar it still displays login form. Is there any way to hide this login form ? 回答1: You can prevent that by custom rewrite rules in .htaccess file. # Return 403 Forbidden header and show the content of the root homepage RewriteRule index.php/component/users index.php [F] or try creating hidden menu item (stacked in menu that doesn't have module so it's not

How to get MySQL server working after OSX Yosemite upgrade?

╄→гoц情女王★ 提交于 2020-01-14 10:37:32
问题 After I upgraded my Mac from Mavericks OSX to Yosemite, my local Apache and MySQL server setup did not work anymore. Thanks to Apache localhost/~username/ not working I just got the Apache server working but my Joomla application now indicates it can't access the MySQL database; neither can the Phpmyadmin tool. How to fix this? I've seen instructions for installing MySQL for Yosemite (https://www.computersnyou.com/3376/setup-apache-php-mysql-macosx-10-10-yosemite/) but I'm not sure whether

Can I embed a masonry jquery template into my joomla website?

|▌冷眼眸甩不掉的悲伤 提交于 2020-01-14 06:31:30
问题 I want to create a video gallery using Masonry on my website but I'm having difficulty. I'm using Joomla as my CMS and already have a template im using from rocket themes but on one of my pages I want to have a list of videos (which I'll update) for people to watch. I want to make it visually appealing and masonry caught my eye but I fail to understand how to get it up and running. How does Jquery work with Joomla, if it does at all? 回答1: The masonry plugin let you define a grid with images

where are articles stored in joomla?

笑着哭i 提交于 2020-01-13 16:26:15
问题 Sorry, this can be a newbie question. I am going in Article Manager section of admin and I do see some articles but I want to know which is the table which stores these articles ? I simply see a lot of tables in DB but I am not able to guess which ones store the content from article manager. Thanks. 回答1: jos_content is the table that holds the article. jos_ is a place holder for your actual database table prefix - which might be jos_ but isn't necessarily. 回答2: If you using K2 extension for

where are articles stored in joomla?

我只是一个虾纸丫 提交于 2020-01-13 16:26:15
问题 Sorry, this can be a newbie question. I am going in Article Manager section of admin and I do see some articles but I want to know which is the table which stores these articles ? I simply see a lot of tables in DB but I am not able to guess which ones store the content from article manager. Thanks. 回答1: jos_content is the table that holds the article. jos_ is a place holder for your actual database table prefix - which might be jos_ but isn't necessarily. 回答2: If you using K2 extension for