Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [php]

PHP is a server-side scripting language designed for web development but also used as a general-purpose programming language. Joomla is based on PHP.

0
votes
0answers
468 views

Displaying submenu on hover for a top menu item

I am trying to build a submenu for a top menu item from admin side as shown in the tutorial below. https://docs.joomla.org/Creating_a_submenu After completing the list of steps, i see that my ...
1
vote
1answer
85 views

Re-using Joomla module positions not setting Bootstrap Column width correctly

I want to use 1 module position (showcase) but have duplicate modules set the bootstrap column width based on the amount of modules assigned to that position. I have written the following code: <...
0
votes
2answers
93 views

Select retrieve records with different value

I have a table with 3 columns: SubmissionId, FieldName and FieldValue. 1) SubmissionId keeps ID submission. 2) FieldName stores field name of a form. 3) FieldValue stores field value of form field. ...
0
votes
2answers
183 views

How add days to date into query joomla?

I need to run a query that selects records whose date is not within a date range. More exactly, I need the records whose date is not found among their own date and 5 days later. For example, suppose ...
1
vote
0answers
155 views

Joomla 3.5.1 - Ajax with PHP not send email

I'm having some problems with the action of an Ajax form. Here is the Javascript: <script type="text/javascript"> var $j = jQuery.noConflict(); $j(document).ready(function() { $j(...
1
vote
0answers
165 views

Why use ob_start and eval instead of using a simple include in this Joomla Plugin?

I was looking at the code of a Plugin for Joomla! CMS for a functionality I need: the possibility to run custom PHP scripts when a Joomla! Plugin/Events is fired. I wanted to learn the mechanism used ...
1
vote
1answer
37 views

How to recover the values of two columns with the same name?

I have this query: $query ->select(array('a.id', 'a.alias', 'b.category_id', 'b.item_id', 'c.id', 'c.name', 'c.alias')) ->from($db->quoteName('#__zoo_category', 'a')) ->join('...
1
vote
2answers
184 views

Joomla 3.x template creation: can I make changes in offline.php or within core files the said .php calls?

For example let's take a custom made/edited offline.php: Is it ok (I know it's possible, duh) to write HTML directly into offline.php? Or... .. do I make changes in the core files that are called ...
1
vote
3answers
220 views

How to iterate over the “params” of an item ZOO Joomla?

The item of my interest is in the __zoo_item table. My query: $query ->select($db->quoteName(array('params'))) ->from($db->quoteName('#__zoo_item')); $db->setQuery($query); $...
7
votes
2answers
918 views

What is the Joomla Execution Flow, after a request reach to index.php till the final output on the browser?

Based on this question: How Templates work and load css/js files? Website building process with Purity III Quote: .... I have to present my website tomorrow and i may get asked "where does the ...
1
vote
1answer
891 views

How Templates work and load css/js files? Website building process with Purity III

Unfortunately I can't find any info on how the purity iii template really works. I have to present my website tomorrow and I may get asked "where does the content come from?" and I can not answer ...
5
votes
3answers
8k views

How to get module parameters inside helper function and how to get params inside a custom form field type?

Part 1: How to get module parameters inside helper function? I am trying to get the same module parameters inside the helper file. class ModTestHelper { public function getFoo () { ...
4
votes
1answer
137 views

Output of modules

Every template I see has this way of outputting modules (in the index.php) <?php if ($this->countModules( 'user1' )) : ?> <jdoc:include type="modules" name="user1" style="rounded" /> &...
1
vote
2answers
168 views

Possible php time outs causing 500 server error?

I was hoping for some advice regarding what I think is a time out error? My problem is that on the first few loads my pages can fail to load and show a 500 error, but if I continue to refresh, or ...
0
votes
2answers
61 views

Add html to transactional email

I use Mandrill to send my transactional emails, so JMailer sends the data to Mandrill, Mandrill wraps it with a nice template and voila! This works fine, but several of my customers have asked if I ...
0
votes
0answers
544 views

PHP Warning: file_get_contents() in error_log

I used OSTraining's instructions to Create a Custom Joomla 404 Page with 404 Status Code in one of my J! 3.5.1 sites. However, the error_log is flooded with the following errors: [09-Jun-2016 04:05:...
0
votes
2answers
1k views

MySQLi PHP Warning

I am getting the following errors (in this order) thousands of times in my error log: [08-Jun-2016 13:11:05 America/Detroit] PHP Warning: mysqli::stat(): Couldn't fetch mysqli in {...}/libraries/...
2
votes
1answer
203 views

Trying to repair or eliminate “Written by” author field in article view

I'm trying to figure out where in the heck is the "Written by" tagline displayed at the top of each news article...basically, which css/php/whatever file holds the layout for articles and would ...
3
votes
1answer
299 views

How Can I Set The <title> Tag Using The Sourcerer Extension?

I'm trying to build a Joomla article to display a photo the user selects. I'm using the Regular Labs Sourcerer plugin to place the required PHP code into my article. I want to set various tags within ...
2
votes
1answer
57 views

Filter an IP address

I've written the following to get the user IP: private function getIpAddress() { $server = JFactory::getApplication()->input->server; if (!empty($server->get('HTTP_CLIENT_IP'))) ...
2
votes
1answer
51 views

is there any workaround for viewing different admin template according to user role

This will work like e.g. If user is having super administrator access level, then user will be redirected on the default Isis administrator template. But if user is having access of administrator ...
0
votes
1answer
277 views

Copy user data into custom table on user registration

upon creating a user in joomla i would need fields copied from jmla_users table to another jmla_new_users. jml_users - jmla_new_users with the following fields, (username,firstname,lastname,email) ...
2
votes
3answers
679 views

Ajax call returns html baggage

I have read similar questions on this site, but none that I can find matches my problem closely. I manage a joomla 3.5.1 site and I wrote a javascript that, when I press a button, sends a mail by ...
2
votes
1answer
223 views

Is it possible to insert a view of a component into an article or into the template without using plugins or iframes?

Is it possible to display a view of a component without iframe and plugin? (That is to say, if possible with a few lines of PHP and maybe SQL queries?) To be more clear: I'd like to do it directly in ...
1
vote
1answer
114 views

How do I write an install.script.php file to install multiple components, modules and plugins

I have a bunch of modules, plugins, components and media files etc that I want to install in one go to Joomla sites. I know about the XML file way of doing this. Which I have a version that works fine....
2
votes
2answers
80 views

porting data from mysql to another mysql database

Is there a way I can port data from one mysql database table and transfer it to another mysql database table. both of these mysql databases are joomla databases, and i would like to transfer ...
0
votes
1answer
415 views

Change default selection on drop down menu

I am using an extension called JTickets to manage payments in Jomsocial events, I would like to change a fields default selection from limited seats to unlimited seats, code is as follows:- $...
3
votes
1answer
356 views

Get date value with jinput

In my form I have selecting date with datetimepicker which i'm using only date picker. I need to get the selected date value to do some calculation in php through ajax. Here is my code but the ...
3
votes
1answer
349 views

Use of $_SERVER variables in custom plugin

In my Joomla application, I have functionality where I use server variables, like request_uri and query parameters for parsing url string. This function is used in many modules. So, I wanted to ...
1
vote
2answers
2k views

What does 'lft' and 'rgt' do in #__menu table?

I was trying to manually add menu item to the database. See this question, when I notice these two fields in the #__menu table. It seems to me they are auto increasing by 2. For example, if the latest ...
0
votes
2answers
84 views

unplublish article showing on frontend for every one

I am working on joomla 3.5.1 and facing a strange issue that after unpublished the article, article is visible on front end for everyone. I cleared cache and other relevant things but no effect. Only ...
-1
votes
2answers
58 views

Where does the shadow class come from? (purity iii, pricing table1)

theres this line of code: Where does the shadow att and the other css come from? I only know the box-shadow attribute. I know i simply can delete the att, but i am interested in where it comes from. ...
0
votes
2answers
3k views

403 Forbidden Access, when accessing custom html/php files directly

I am trying to open html and php pages directly, but it shows : 403 Forbidden Access to this resource on the server is denied! When I try www.mysite.com/dir/ index page shows up, error ...
3
votes
1answer
349 views

Joomla 3.5 com_ajax not found

I have update my Joomla from V3.4 to V3.5 and below error is showing. "NetworkError: 404 Component not found. - http://example.com/administrator/index.php?option=com_ajax&group=system&...
1
vote
2answers
228 views

Quotes Displayed in Database Value

So any profile data filled in within a user profile for joomla is being saved with quotes around it in the database. Does anyone know how to remove the quotes? It seems to do it even as the default ...
1
vote
2answers
101 views

Display Entry when referencing 2 Tables

Ok this is building on what I was previously working on in my last post: <?php $db = JFactory::getDBO(); $db->setQuery("SELECT `profile_value` FROM #__user_profiles WHERE `user_id`='customer_id'...
1
vote
3answers
1k views

Display a Value from a Specific DB Field

I'm trying to figure out what I've got going on here thats not working - I'm using RsTicketsPro and I'm trying to pull a specific value from their custom fields section in the database. I reached out ...
0
votes
2answers
169 views

How to create time stamp when module is published?

I'm trying to display a time stamp of when a module is published. I can display the current time stamp with PHP without problem, but that's not what I want to do. I'm sure this is simple to do I just ...
1
vote
1answer
56 views

which exception should be thrown when sanity checks fail?

Which SPL exception should be thrown when sanity checks fail? For example, if the check() function fails when saving data with JTable or a parameter check fails? I'd prefer to use something more ...
1
vote
2answers
899 views

How do I get category object from within an item's template?

This is more of a PHP question but it is also related to Joomla. In K2's category.php file, there are these lines: <?php foreach($this->links as $key=>$item): ?> <div class="...
2
votes
3answers
111 views

Is there a file that defines error messages?

I would like to catch some exceptions to inspect the error code and determine if I should re-throw it with a more user friendly message. This would probably be most beneficial with MySQL errors. Is ...
1
vote
1answer
2k views

How do i get a responsive Header Image above the nav bar in Purity III - Corporate?

I am building a website for a project i have to do and i am stuck on that problem. Good guy Joomlart hides every answer behind a paywall, so i am pretty alone. ( i didn't realize the non existent ...
0
votes
2answers
536 views

getUser() returns 0 when logged in

I've tried moving my site and my script to get the Joomla User Information is returning 0 (the guest account) despite being logged in. The only change I had to make, once moving servers, was the ...
4
votes
1answer
250 views

Question about Server Timezones and J!3.5 Extentions

Background My business website is using an appointments scheduler/shopping cart called VikAppointments so my dates/times are very important for smooth business operation. My Timezone is Central ...
5
votes
2answers
1k views

Custom Pagination: $this in “pagination_item_active” function is not in object context?

Joomla 3 I was trying to modify Joomla's pagination output. Following this documentation, I create mytemplate/html/pagination.php file and start modifying it. According to the document, I can write 4 ...
0
votes
0answers
391 views

Joomla - Custom form in default.php

I have a question about a form created in default.php (product details of virtuemart). Now my action of my form is this: form name="myform" id="jvcontact95" method="post" action="?php echo JRoute::_('...
1
vote
1answer
772 views

Passing variables between a PHP module and a PHP script

I am trying to pass some variable from a PHP module (Sourcerer) to custom PHP script using Sessions method (as posted here). The method works fine between two PHP scripts but when I tried to implement ...
1
vote
3answers
1k views

how to show article preview in admin panel?

I created a new article. I want to this article preview show only for admin not other user.How to do this? I used plugin "add menu" for this but that plugin not show my problem.
2
votes
1answer
346 views

Importing Joomla CMS to custom PHP script (outside root folder)

I am trying to import Joomla CMS to a custom PHP script by this : define( '_JEXEC', 1 ); define( 'JPATH_BASE', realpath(dirname(__FILE__).'/' )); require_once ( JPATH_BASE .'/includes/defines.php' );...
0
votes
1answer
137 views

Using jimport in ajax php file

I run a fantasy football website. My League Registration is handled through a form and mysql database. This all works well. Once I hire a manager, I want to create a Joomla user for the user. ...