11

In this case, I think building your own settings table is the way to go for sure. Using the settings column should really only be for very minor yes/no types of settings, not storing actual data. Especially when you get into supporting MSM, where you need settings for each site, it can get hairy fast. Plus, then your data is more easily searchable and ...


8

You shouldn't be declaring functions inside your __construct() method. Move sliceurl a bit further down, and call it using $this->sliceurl (since it's part of your class): class Youtube_id_from_url { public $return_data = ""; public function __construct($urltag = NULL) { $this->EE =& get_instance(); if (empty($...


8

Yes and No. Starting from v3, EE is gradually moving away from CI. This isn't happening all in one go, but as major versions progress. CI is still there, but it's all tucked in the legacy directory, along with old, non-ported libraries and such. What is EE moving to? Not another framework. So no CI, Laravel, Yii or something similar. Rather, EE will be its ...


7

Just to clarify, we definitely use a forked version of CI with security holes patched as we find them. We also apply any security patches to the public version of CodeIgniter. Don't update what's there as that would cause compatibility issues.


6

EllisLab has forked the official CodeIgniter version and are using their own internal one. I highly doubt you can replace this with the official one.


6

You can use any ee add-ons which can create url_titles from another field (for example - MX *Title Control) + somethink like low_replace to remove dot's. You can replace it on JS level, you can use Foreign Character Extension You can make your own ext. using entry_submission_start hook. If you decide to hack core: \expressionengine\helpers\EE_url_helper....


6

Yeah, that's the wrong way to go about it. You want to use the load class and use the view() method. You can even pass variables to the view that can be used programmatically. public function display_field($data) { $vars = array( 'data' => $data, 'some_var' => 'some value', 'some_array' => array( '1', ...


4

Unfortunately, it's not possible to use regular EE tags in forum templates unless you run the forums through regular templates. The down side of this approach is that it adds more processing overhead, so it’s not recommended unless users really need this capability. Since the forum can’t be cached, on very busy sites this can create some unwanted ...


4

Neither Active Record nor DB Forge have a “SHOW TABLES” function. You’d have to just do it with query(): if ($EE->db->query('SHOW TABLES LIKE `exp_mytable`')->num_rows())


4

You can do this by developing your add-on as a module rather than a plugin since only modules can use EE actions. (See the EE docs for an explanation of the difference between the types of add-on.) More info on EE actions here. Essentially, you need to develop a module to perform your desired action, then call the associated ACT URL (e.g. http://example....


4

You can make a module - like Steve advice. Use Yeoman ExpressionEngine Add-On generator to simplify developing process. On server you will need to setup cron with wget: execute cronjob every day at 3am 00 03 * * * wget http://example.com/index.php?ACT=XX&task_id=1 Or if you want something really quick and simple: Create a special template with some ...


4

EE3 does not use Codeigniter - but it is indeed hard to find the information online: if you want confirmation contact Derek Jones at EllisLabs (e.g. via EE Slack Channel - eecms.slack.com) EE3 is a major rewrite but a consequence is that it has broken a very large number (perhaps all) of EE2's add-ons and extensions. EllisLab perhaps were not so good at ...


3

From looking at the CI_Encrypt source code, I noticed that _xor_encrypt is only used when the PHP mcrypt module is not installed. I installed the PHP mcrypt module and added it to php.ini, which seems to have substantially reduced the time required to run this function. Note: I'm still having some slowness due to this module (much less than before), ...


3

That's a nasty one to debug. My advice is to let someone with a bit of codeigniter / expressionengine knowhow look at. If the addon was an extension, check if it is still referenced in the exp_extensions table. (duplicate table first as backup, then remove row with offending extension from exp_extensions table). edit: you might also be able to disable ...


3

I'm using PHPUnit, which is by far more popular in PHP-land. The full ins and outs of getting it set up are probably beyond a stack exchange answer, but assuming there are a couple things which should put you in the right direction. Testing with EE and CI in general is always an uphill battle, since they weren't really designed with testing in mind, and ...


3

The code you have should work fine. I've just run a test on a module and it loads fine in EE v2.5.3 (either in a method or in the class constructor). I've just had a quick read of the EE changelog and can't see any reference to changes there, so don't think it's version related. Are you sure it's not calling the Class and then doing something unexpected? I ...


3

There is some processing going on somewhere in your system which is taking a long time and or is pretty intensive. What addons are you using and are you doing any large image/video processing at all? That message is just saying that the process was timed out. You can try upping your execution times in your PHP config. Trying increasing max_execution_time in ...


2

For future reference, I created a new set of DB drivers (eemysqli) which are a renamed (filenames and class names) but otherwise exact copy of codeigniter/system/database/drivers/mysqli/*. I then applied the following edit to eemysqli_driver.php: --- drivers/mysqli/mysqli_driver.php 2012-11-26 15:19:21.000000000 +0000 +++ drivers/eemysqli/tcmysqli_driver....


2

Update: Ah, heh. Yes. What @AdrianMacneil says above. Didn't see the forest for the trees on that one. I've tested your plugin locally, and the only error I'm seeing is on line 43, where you're only testing for the preg_replace to return false on error, where you should also be looking for it to return "0" for no matches: if ( $return !== FALSE && ...


2

It turned out to be a server problem. The hosting company restarted Nginx and PHP and everything went back to normal. Mysterious.....


2

IMO, creating an extension would be the right way to do it. The hook to be used will be entry_submission_end, the extension setting should contain remote host, post, path - and template name or URL of file to upload. You can use CI FTP library in your add-on. Quick search does not find anything that would do even something similar - so the whole ...


2

Try setting this line in config.php to be FALSE: $config['compress_output'] = FALSE; When I see an error, I go to the line of code to see what the script is trying to do. Line 166 in the /system/codeigniter/system/core/Exceptions.php file is in the show_php_error() function so I'd suggest checking your PHP error logs to see what error is being thrown. If ...


2

CE Cache and ExpressionEngine's cache="yes" are not true caches. I hate that they advertise themselves as "caches" - they are not! They simply cache ExpressionEngine template parsing's output at a very high level, the entire PHP stack and ExpressionEngine core still needs to run. Not to mention database traffic, even for non-logged in members due to EE's ...


2

Template Routes Control your URLs by remapping URI routes to a specific template, using CodeIgniter-style routing rules. $config['template_routes'] = array( 'blog/:category' => 'site/blog-category', 'blog/:year/:pagination' => 'site/blog-yearly-archive', 'blog/:any' => 'site/blog-single', );


2

I had a similar issue recently on a VPS account – the local version worked. It ended up being a mod security setting that was preventing this from saving with the same error you mentioned. Oddly this is the first time this issue came up with ExpressionEngine, despite being an issue with other CMS before using the same provider (Liquidweb in my case.) Hope ...


2

Try changing this line: $query = ee()->db->get_where('exp_channel_titles', array('title' => $coupon_code, 'channel_id' => 8)); To this: ee()->db->where('exp_channel_titles', array('title' => $coupon_code, 'channel_id' => 8));


2

This usually happens when there is a clash between the cookies. Give clearing your browser cookies, or at least delete the EE ones a try. A good way to thwart this is to set a unique cookie prefix/domain for the site/server. you can find the cookie overrides here: https://docs.expressionengine.com/latest/general/system_configuration_overrides.html I's start ...


2

An EE configuration needs to know both the URL of the site and the local path to the webroot folder within the server you are using to operate. If you have changed servers then it is likely that the local path to the webroot folder will have changed, and as a result EE operations that rely on accessing files stored below that webroot folder (such as images) ...


1

Can you provide a bit more information to what you are doing? e.g. are you creating an add-on and calling form open? Or are you using a template tag that shows a form? The issue is (if you look at line 345 form_helper) that you/it is trying to pass an array in a $key or $val to output a form_select option="" html tag.


Only top voted, non community-wiki answers of a minimum length are eligible