title: Limit entries for each category

text:
# Question
Title: Limit entries for each category
I have this tag which pulls entries from all categories:

```
{exp:channel:entries channel="foto" category="1|2|3" limit="15" }
   //content
{/exp:channel:entries}

```

Is it possible to pull 15 entries per category? So it would result in 45 entries in total?

I want to shuffle it afterwards therfore I don't want to call this tag three times.

# Answer
> 1 votes
If you create a category group with your three categories, you can set the `category_group` param on your entries loop. This will pull a rounded, even amount of entries from each category in the group. In an example where you have three categories in `category_group` 1:

```
{exp:channel:entries
    channel="catburgers"
    category_group="1"
    limit="9"
    orderby="random"}

    {!-- This will output, in random order, 9 entries from the category group, 3 from each category --}

    {title} - Catburger

{/exp:channel:entries}

```

---
Tags: categories, templates
---


title: first paragraph entry

text:
# Question
Title: first paragraph entry
In EE2.9 (can go up) is it possible to target the first paragraph of text in a channel entry? I want to add a class only to this first paragraph for a CSS3 drop cap to the text.

Thanks in advance for any help on this.

Justin

# Answer
> 0 votes
It really depends on what your output field is. Is it a text area? A rich text area? WYGWAM field? Answer that question and I can hone in. But here is an example CSS selector:

```
.channel-entries .field-id-666 p:first-of-type {

    /* your CSS rules go here */

}

```

Note that I don't actually know the class names off the top of my head, but a `:first-of-type` selector sounds like your answer.

Also note this isn't an EE related question really, but it's *just* close enough to not flag :P

---
Tags: ee2, channel-entries
---


# Question
Title: Module development: Any reasons creating catch-all action is a bad idea?
When developing a website in EE, I often create custom modules to accomplish some task, such as processing a custom form, etc. I started creating 'actions' for each form, but this grew inconvenient during development, because I would have to uninstall/reinstall, or write some 'update' code, to incorporate new action\_ids (or manually add them to the exp\_actions table.

My current workaround is, for any new module, to create one catch-all 'action'. So if my module was called 'Module', my action would be called 'module\_do'. In my mod.module.php file, I would declare that function like so:

```
function mailchimp_api_do(){

    $function = $this->EE->input->get_post('function',TRUE);

    $accepted_functions = array(
        'do_that_one_thing_you_do',
        'do_that_other_thing_you_do'
    );

    if(in_array($function,$accepted_functions)){
        //call that function
        $this->$function();
    }

}

```

That way, I could code up my forms to post to a URL like, for instance:

* `/?ACT=##&function=do_that_one_thing_you_do`
* `/?ACT=##&function=do_that_other_thing_you_do`

But if I used a function not in my `$accepted_function` array, like:

* `/?ACT=##&function=do_something_you_dont_do`

Nothing would happen.

So, as I build out my site, I could add new actions, sort of, by just adding to that `$accepted_functions` array, and using `&function=my_new_function` in my URLs...

This has worked nicely for me, and I haven't yet developed any modules that are out in the wild for others to use. My question is, is this a bad practice, or are there any reasons this is bad form, or unsecure?

Thanks!

# Answer
> 3 votes
It's really your choice here. I imagine that this framework is best for smaller addons. One point of access is always slightly frowned upon; because it creates a SPOF in your addon.

Trust me, I totally get the *code-install-test-uninstall-ad.nauseam* development path of EE modules, I'm sick of it too. However, I've found, that paying more careful attention to the stage 1 planning of a larger module usually allows me to get all of my ACTion IDs in order on first install. Of course, the occasional product requires I add one extra because of misstep, but I'm mostly over those days.

From a security standpoint, not accounting for module architecture, EE is safe. It hasn't ever had a major security vulnerability. I can imagine, since you're taking direct GET strings that literally look like a vulnerability point:

```
http://www.main-domain.com/index.php?ACT=1&function=HOLY_CRAP_IM_EXECUTING_THIS_FUNCTION

```

You might get some people trying to exploit you there, but still, as long CSRF protection is running, you should be safe. But still, obfuscation is a good part of security, it deturs many lazy/half-assed people, as well as aids in passing automated security audits.

**Edit: expanding edition** Another issue with not obfuscating this type of GET query is that it allows an attacker to analyze the flow of your addon. For example...

```
.../index.php?ACT=1&function=start_of_addon_functionality&param1=a&param2=b
.../index.php?ACT=1&function=middle_of_addon_functionality&param1=a&param2=b
.../index.php?ACT=1&function=end_of_addon_functionality&param1=a&param2=b

```

Seeing this flow, it's possible for an attacker to try and hit your addon's second or third process function before hitting the first one, creating erroneous data input or straight-up fatal errors. And it can only get worse. Most likely harmless, but it always depends on what your addon actually does.

If your usage tends to be more form submittall, then just going with POST over HTTPS (SSL connections encrypt about everything, including headers and post data) would protect you.

tl:dr; You should be fine, but I wouldn't necessarily go that route. But there are situations where it's might be more appropriate or safe (private, intranet site for employees, etc).

**Edit** Might I add that going with your method, you're missing a debug path. You should definitely add something like:

```
// after you check if your `function` GET param is actually a function in your function array

$this->return_data = array (
    'code'      => "404",
    'message'   => "Function not found"
);

ee()->output->send_ajax_response($this->return_data);

```

**Edit** One more, just for fun, if you put a module like this out in the wild with that GET setup, just for shits and giggles, see if people try it as an attack vector!

```
// goes just before my last code block
ee()->load->library('logger');

ee()->logger->developer(__METHOD__ . ":" . __LINE__ . ": 404 function call: " . $_SERVER['REMOTE_ADDR'] . " : " . $function);

```

---
Tags: module, security, bestpractice
---


title: Forum Subscribe - Multiple Boards

text:
# Question
Title: Forum Subscribe - Multiple Boards
Forum subscribe is only displaying my first board, I have another board but for some reason it does not output the forums for that one.

Anyone know how i can target the second board?

# Answer
If you add `board="board_name"` it should pull from the appropriate board.
> 0 votes

---
Tags: devdemon, forum, discussion
---


# Question
Title: Can 'Omnipay: Braintree' accept Paypal too?
Could anyone tell me if the 'Omnipay: Braintree’ gateway has the ability to accept Paypal too please? Not really sure what I’m looking for in the repo: https://github.com/thephpleague/omnipay-braintree)

We're specifically looking to use it with Expresso Store.

# Answer
> 0 votes
Braintree is not a first party payment gateway and I have never used it so I can't say for sure but from a quick look through the gateway files on GitHub I do not see anything that would support how Braintree adds PayPal support from their API guidelines.

Having said that you could easily add it if you are are comfortable with PHP or you can use the built in PayPal Express gateway along with the Braintree gateway to allow checkout with either PayPal or Braintree. If you were to go the Store route you would need to use the add `{field:payment_method}` to your template to allow the user to select either Braintree or PayPal. Or if you were looking to customize it a bit more you could roll your html something like this:

```
How would you like to pay for your order?
<label><input type="radio" name="payment_method" value="manual"> Cheque / Bank Deposit</label>
<label><input type="radio" name="payment_method" value="paypal"> Paypal</label>
<label><input type="radio" name="payment_method" value="authorize_net"> Credit Card</label>

<!-- optionally you could use javascript to display a credit card form here when necessary -->

```

Full documentation for the template tags is here and setting up payment methods is here

---
Tags: expresso-store, payment-gateway
---


# Question
Title: Solspace composer template if field_type = file
I want to change the output of the standard file upload field with something similar to "Whipping File Inputs Into Shape with Bootstrap 3". I am using the following conditional in my Solspace Freeform Pro composer template in an attempt to change the output for file upload field types:

```
{composer:fields}
{if composer:field_output}
                    {if composer:field_type == 'nonfield_captcha'}
                        {if freeform:captcha}
                                {freeform:captcha}<br />
                                <input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
                        {/if}

                     {if:elseif composer:field_type == 'file'}

                          <span class="btn btn-default btn-file">
                              Browse {composer:field_output}
                          </span>

                    {if:else}

                        {composer:field_output}

                    {/if}
                {/if}
{/composer:fields}

```

The if:elseif field type "file" statement doesn't seem to work in the template and has no effect in the output when the form is rendered:

```
{if:elseif composer:field_type == "file"}
    <span class="btn btn-default btn-file">
      Browse {composer:field_output}
    </span>
{if:else}
....

```

To check if there is something wrong with my statement, I changed "file" to "text". The conditional then worked and wrapped all text inputs in the `<span>` mark-up. So the conditional statement itself appears to work correctly - just not for field\_type "file" though.

If there some special statement/conditional that I'm missing to be able to control the output of field\_type = "file"?

**Version Info:**

ExpressionEngine: 2.10.1
Freeform Pro: 4.2.3

# Answer
I don't know Composer **at all**...

This would be comment if it weren't going to be so long.

OK, so let's debug. I'm not sure if this is a production template. If so, holy crap-a-rolla, make a duplicate of the template in question, and set it to only-view-able by Super Admins. Work with that template and leave production alone. If this template is totally in dev-mode, ignore most of this paragraph. The next important part is to set PHP parsing on `output` for this template.

Next, let's see what we're getting from `{composer:field_type}`.

```
{composer:fields}
    {if composer:field_output}
        <?php
        var_dump('{composer:field_type}');
        ?>
    {/if}
{/composer:fields}

```

What is the outcome of that `var_dump()` for the fields that you expect to be `{composer:field_type}` as `"file"` ?

I've run into many issues where the EE parsing engine ends up outputting a weird value for something like a string like `file` ... it sometimes ends up as a a string with (made up example):

```
string(15) "file"

```

Something seem wrong there `:P` ? Are there 15 characters in the string `file`?

Report back and I'll apply some more sleuthing if I can help.
> 1 votes

---
Tags: solspace-freeform, solspace, file-uploads, fieldtype, composer-template
---


# Question
Title: Character number limiter on Wygwam field
I've been using MD Character Count on a text field to force users to keep the size of a summary field short and concise. But I want to switch it to a Wygwam field so the method of adding links is the same as the Wygwam body field. I've looked at Limitee as well but it doesn't do Wygwam fields. I know I can limit the amount of text on output in the template but I need the author to now when they have hit the limit.

# Answer
Old question but just implemented this using the latest WYGWAM (v3.3.3)

Grab the Wordcount plugin and the Notification Plugin for CK Editor, and put them into your `/themes/third_party/wygwam/lib/ckeditor/plugins` folder.

Create a new WYGWAM editor configuration with the `extraPlugins` option selected in 'Advanced Settings'. Enter `wordcount` in there and save/update the configuration.

To configure those settings, you'll need to add the following to your `/themes/third_party/wygwam/lib/ckeditor/config.js` (inside the \`editorConfig' function).

```
config.wordcount = {

    // Whether or not you want to show the Paragraphs Count
    showParagraphs: true,

    // Whether or not you want to show the Word Count
    showWordCount: true,

    // Whether or not you want to show the Char Count
    showCharCount: true,

    // Whether or not you want to count Spaces as Chars
    countSpacesAsChars: false,

    // Whether or not to include Html chars in the Char Count
    countHTML: false,

    // Maximum allowed Word Count, -1 is default for unlimited
    maxWordCount: -1,

    // Maximum allowed Char Count, -1 is default for unlimited
    maxCharCount: -1
};

```

Et Voila.
> 1 votes

# Answer
I've actually created an addon which adds a similar feature to Wygwam. I've uploaded this to https://github.com/ignetic/ee-wygwam-plugins which I hope you find useful.

It has 'doksoft\_stat' plugin already placed within the wygwam\_plugins theme folder, though you might want to look at the 'wordcount' plugin (simply remove the dot from the folder name to enable it). While these don't limit the number of words/characters, it does the next best thing to display the stats.

Do let me know if this works for you or if you find any issues with it.

All the best...
> 0 votes

---
Tags: wygwam
---


# Question
Title: Dev Demon Form - Missing Data.(MISSING_FORM_DATA)
I've recently moved a site to a new sever and I'm getting a strange error message on the forms page. The site is using EE 2.5.5 and Dev Demon forms 3.1.2. When I try and submit a form I get the following message:

**The form you submitted contained the following errors**

Missing Data.(MISSING\_FORM\_DATA)

# Answer
Welp, the second part is clear; something is either old or out-of-date. I just checked a EE 2.5.5 install, and the `exp_security_hashes` table definitely doesn't have that column, nor any of those columns, in it's table conformation. In 2.5.5, that table looks like this:

```
Field           - Type
------------------------------------
hash_id         - int(10) unsigned
date            - int(10) unsigned
session_id      - varchar(40)
hash            - varchar(40)

```

What is that third-party folder? `/third-party/forms/`? Is that DevDemon Forms? And did you update anything recently? If it was working before, it still should, but I have noticed some of DevDemon's stuff out of date, but that is usually only a concern if you upgraded EE. I would triple check the settings for that addon, as well as all of your site settings. Make sure you check in your `/system/expressionengine/config/config.php` file as well as your `index.php` file for any possible `$config` overrides that exists somewhere.

Another big trip up: what's your new environment like? Did you jump a bunch of subversions in PHP?
> 1 votes

---
Tags: devdemon, devdemon-forms
---


# Question
Title: Solspace Freeform Pro change default values of checkboxes from "y,n" to "Yes,No"?
I'm trying to get these checkbox fields to match outputs with some other fields I have that have "Yes" and "No" outputs. Any way to change these? Thanks!

Here's some more details... I have a large multipage form that users fill out and submit. After submission it takes the user to a page with a summary of all the information provided in the form. I have some Checkbox fields on the form as well as some Radio buttons. The Radio buttons I can give a value. I have given values of "Yes" and "No". The checkboxes have built-in values of "y,n". I would like to be consistent with the values displayed, and would like the "y,n" values of the checkboxes to be "Yes, No" instead. Thanks for your help!

EE 2.9.3 Freeform Pro 4.2.2

Here's some template code...

This is a checkbox...

```
                {freeform:field:email_invoice} Email invoice instead of sending via USPS?<br />
                {if freeform:error:email_invoice}
                    <span class="error">{freeform:error:email_invoice}. Please type "NA" if not applicable.</span>
                {/if}

```

This is a radio button...

```
                {freeform:field:controlled_substance wrapper_open="" wrapper_close="" row_wrapper_open="" row_wrapper_close="<br />" label_wrapper_open="" label_wrapper_close="" }
                {if freeform:error:controlled_substance}
                    <span class="error">{freeform:error:controlled_substance}</span>
                {/if}

```

When displaying it after submission I'm using this code...

checkbox...

```
                <tr><td>
                Email invoice?: </td><td><strong>{freeform:field:email_invoice}</strong>
                </td></tr>

```

radio button...

```
                <tr><td class="first">
                Controlled substance?: </td><td><strong>{freeform:field:controlled_substance}</strong>
                </td></tr>

```

# Answer
Well, it's possible you could just modify this file:

```
/third-party/freeform/default_fields/freeform_ft.checkbox.php

```

But that seems like a bad decision, and it wouldn't retroactively fix any already-stored form submissions.

I don't know what state you're at in development, but regardless, a simple fix for this is a dual comparison.

```
{if field_1 == "y" && field_2 == "Yes"}

    // fields are both set to yet

{if:elseif field_1 == "n" && field_2 =="No"}

    // fields are both set to no

{if:else}

    // our fields don't match value intent

{/if}

```

I assume by match you mean equality comparison in value intent ('y','Y','yes','YES', etc whatever value with the same intent as "yes"). If you could expand on what you're trying to do, I can better help you.
> 0 votes

---
Tags: solspace-freeform, solspace, checkbox
---


# Question
Title: Trying to modify default pagination settings within public profile templates
Specifically, when a member is logged into their front-end profile templates, and you're viewing the messages in the inbox-folder. The pagination displays only 5 entries per page.

I've tried modifying some parameters in both of the following files:

* system/codeigniter/system/libraries/Pagination.php
* system/expressionengine/libraries/EE\_Pagination.php

But nothing seems to modify the results in any way. I also wouldn't mind just disabling the pagination altogether, since I use a fancy plugin for it anyways (mix\_it\_up).

# Answer
To win, you must smell the prey, feel the kill...

Really, though, you need to trace backwards through the internals of EE to actually find the core code you need to modify. In `/system/expressionengine/libraries/Messages.php:87`

```
var $per_page           = 5;                // Messages on a Folder's Page

```

But I never recommend modifying core code. But I'm not sure you have much other choice. If I were you, I'd throw together a quick extension, and `var_dump($this); die();` on this hook and see if you can just modify that value without modifying core code.

https://ellislab.com/expressionengine/user-guide/development/extension\_hooks/module/member/index.html

It really depends on your laziness factor for this task.
> 0 votes

---
Tags: pagination
---


# Question
Title: Larger thumbnails in Channel Images Tile view?
I did a CSS hack (that Brad recommended) to make the thumbnails in the entry screen larger. I'm wondering if there's a similar hack I can make to make the thumbs in the Tile view larger?

Thanks!

# Answer
Have you tried the config over option of:

$config\['ci\_image\_preview\_size'\] = '50px';

There is a list of config override options in our ci\_config.php.

Located in /third\_party/channel\_images/config.

You have to add it to your main config.php file for the system.
> 0 votes

---
Tags: devdemon, channel-images
---


# Question
Title: Channel Images: possible way to let client switch from Tile to Table view?
I'd like to be able to allow a client to switch the Channel Images channel entry screen from Table to Tile, but I don't want the client to actually have access to the field settings (to keep things simple).

Is there a way to do this?

# Answer
> 0 votes
Currently you can not do this. All field specific features have to be set in the channel field settings. Sorry about that!

---
Tags: devdemon, channel-images
---


# Question
Title: Force cache update Wygwam / Change timestamp
I was finally able to update Wygwam to the latest version (3.3.3).

One user has contacted me to tell me he only saw gray fields instead of the normal Wygwam fields.

I told him to empty his brower's cache, which worked. I would like to force to update the cache for Wygwam for all users so they don't have to do a thing. (And don't contact me because they are panicking ;) )

I tried placing CKEDITOR.timestamp = '1.0'; in config.js, but than I get an error in the console: illegal character.

Can someone tell me how to force updating the cache in Wygwam?

# Answer
> 0 votes
I found where to add a timestamp.

After this code on line 530 in helper.php:

```
self::include_theme_js('lib/ckeditor/ckeditor.js');

```

Place this line of code:

```
self::insert_js('CKEDITOR.timestamp="1.0";');

```

The files config.js, styles.js and \[your-language\].js are now loaded with the new timestamp. But changed code in config.js will not load in the browser. So if anyone has ideas on this, please let me know.

---
Tags: pixelandtonic, wygwam, cache, ckeditor
---


# Question
Title: What's the correct syntax for setting up memcached caching driver in EE 2.8+ with socket?
In EE 2.8 and above, you can select 'Memcached' as your 'Caching Driver' under "Admin" =\> "General Configuration".

I am using one of Nexcess' "ExpressionEngine optimized" hosting plans, which lists "Memcached Back-End" as one of their features. I wanted to enable this, so I contacted their support folks. They set up a socket to use memcache.

However, when I select 'Memcached' as my caching driver, EE displays the error message "Cannot connect to Memcached, using File driver instead".

What is the correct syntax for my config file to get this to work?

# Answer
> 2 votes
I'm glad you asked!

```
$config['cache_driver'] = 'memcached';
$config['memcached'] = array(
  array(
    'host' => '/var/tmp/memcached.sock',
    'port' => 0,
    'weight' => 1,
  )
);

```

Adding that to your config.php should do the trick, assuming you list the correct socket location and port.

(this is me answering my own question, because I searched and searched and couldn't find this info anywhere.)

---
Tags: config, caching, config-overrides
---


title: How to Export EE v 1.6.7 pages

text:
# Question
Title: How to Export EE v 1.6.7 pages
Here at work we're using EE v.1.6.7 and will be moving to a new proprietary CMS, I'm looking for a way to export the individual pages to a spreadsheet - the new web company we will be working with have asked for our existing pages to be in an excel ss...is this even possible??? I am not an Expression Engine expert. Please speak slowly and clearly to me. ;) Thanks.

# Answer
> 0 votes
Yes, it's possible. On the assumption that yours is a standard EE install, you can export the data from the database by running specific SQL queries to pull the data out in the format they want (table joins required). I suggest that you get the new web company to clarify what Excel column headers they want, to enable you(?) to construct the query to format the data. Then export the results in CSV format.

# Answer
> 0 votes
I don't believe there's any need to use any add-ons for this or resort to SQL queries.

You can just create new EE templates with exp:weblog:entries calls that produce output that can be saved in .CSV format (which can be opened in Excel).

If you update your question with some more details on what fields you have in EE and what you need in Excel I can update this answer with more complete details.

---
Tags: export
---


title: Using Custom Themes

text:
# Question
Title: Using Custom Themes
Just getting starting with EE. I have a custom HTML5 theme I've been designing and would like to upload it to EE.

Can anyone please point me in the right direction?

Any great free tutorials would be helpful as well.

Thanks!!

# Answer
> 2 votes
EE doesn't really have themes per se. You'd need to manually build out your content types and templates using the EE templating language.

If you're looking on how to build for the first time, look no further than http://www.train-ee.com/courseware/books/detail/building-an-expressionengine-2-site-small-business/ or https://mijingo.com/products/screencasts/expressionengine-tutorial/ \- both excellent EE learning resources.

Hope this helps.

# Answer
> -2 votes
I've found some great free info & tutorials: From DaBrook: https://www.youtube.com/playlist?list=PL7D18703E2B770DA0 and from http://viminteractive.com/blog/a\_newbies\_guide\_to\_expressionengine\_development/

---
Tags: themes, custom
---


# Question
Title: Is there a way to target the Field Content Type in Freeform Pro?
Just wondering if there is a way to target this?

I've got an field in freeform that the field type is set to text and the field content type set to email.

In the front end I'm wishing to target this field specifically.

The same way you can do this : composer:field\_type == 'nonfield\_title'.

Cant see anything about it in the documentation.

# Answer
Sorry, that isn't possible (as you mentioned, `field_type` is available, but not field *content* type). I would suggest submitting this as a Feature Request under the specific add-on category. It'll also give other users the option to vote up the feature request, and help us prioritize features to add in upcoming versions of this add-on. :) http://support.solspace.com/support/discussions
> 0 votes

---
Tags: solspace-freeform, solspace
---


# Question
Title: Adding new functionality to Live site while keep members
I have a live(Production) site, in which new users are signing up every day.

Meanwhile, I have a local version of this site on which I've built lots of new functionality. If I were to push the local DB live, then the newer members would be deleted.

Is there a way to import the new members into my Local site and then deploy?

Or would it be easier to migrate the new features into my Live site. I am trying to avoid doing this manually.

# Answer
> 0 votes
Well, first, how much **new** functionality is there? You've already made a mistake if we're talking about multiple new addons and many different database tables. Just take it piecemeal; migrate one new feature in at a time. First, create and import the relevant database tables, then copy your addons over. After a complete production backup, try and go live with the new feature.

Ad nauseam. And if you have members tables full of new members in production, just don't copy over that data. And as usually kids, **back it up before you try anything**.

If you want a better answer, you'll have to be a lot more specific by what `new functionality` means in this context.

# Answer
> 0 votes
This question has been asked many times and the best answer can be found here.

This is typical of many CMS's, where you should only be creating content on the live database. New add-ons etc should ideally be installed on live before you start utilising their functionality in templates, etc.

You should really be utilising external templates, so changes to these are stored in the database and therefore easily updated.

Even copying specific tables is risky if you have associated view tracking, editors on live, commenting, etc.

If you copy live members into your local, then on deployment, copy the local database to live, there's every chance that the live data could have been updated in the time it took you to copy it down, deploy and copy it up. It will also risk the live site being unavailable during the whole deployment.

---
Tags: database
---


# Question
Title: How to change Archive link url in Exrpession Engine
Expression engine archive is showing link in this manner eg.

```
    {exp:channel:month_links channel="news" limit="50"}
    {month}, {year}<br>
    {/exp:channel:month_links}

```

`http://www.example.com/news/archives/2015/09`

how to change it like in this way

`http://www.example.com/news/archives/2015/9`

# Answer
> 0 votes
This is unfortunately not possible with ExpressionEngine's default `month_links` functionality.

Your options are:

```
{month} - Month, long format: September

{month_num} - Month, numeric: 09

{month_short} - Month, short format: Sep

```

EE archive\_month\_links documentation

Hope this helps you.

---
Tags: php, codeigniter
---


# Question
Title: User upload of multiple image files to channel entry via channel form
I'm trying to set up a front-end file upload form, in which the user uploads (max 2) image files to a channel entry.

I've seen reference to DevDemon's Channel Images as being the likely candidate to enable this functionality, but I can't find any reference material on the DevDemon site or anywhere that indicates how to accomplish this within EE Channel Form.

Does anyone have something they can point me at? Or know where I can find a tutorial / reference file or something?

Thanks in advance.

# Answer
Channel Images does exactly this. You can set a max amount of images to be uploaded. And also resize the images on the fly.
> 0 votes

---
Tags: devdemon, channel-images
---


# Question
Title: Migrating existing field data to Channel Videos – anyone out there tried this?
I'm looking to programatically migrate about 400 instances of "Video Player" field data to Channel Videos. All I have to work with is the Youtube/Vimeo video URLs. Wondering if anybody has attempted to do this or knows a clever way it could be done?

(Initial research has me thinking I could leverage *ajax.channel\_videos* or an ACT url and write a script that sequences calls to the APIs using an existing hook.)

# Answer
I've got an answer, but it's not exactly a solution: Don't.

Channel Videos maintains its own separate table in the database, with all sorts of metadata pulled from the video. From a future maintenance point of view, keeping things as a simple stored URL in a text field would be better... I've learned that less is more when it comes to DB structure.

I'd love to see someone create a fieldtype that has the ease-of-use of Channel Video's backend searching interface, but the DB simplicity of a plain text field storing a URL.
> 1 votes

---
Tags: devdemon, video, channel-videos
---


# Question
Title: Force a newline in rendered html markup (source formatting)?
seems like a silly question but I cannot seem to find an answer and I'm wondering if I'm not just phrasing it incorrectly or using the wrong terms...

I simply want to force a newline within a loop returning content:

```
  <ul>
  {exp:channel:entries channel="duh"}
    <li><a href="{site_url}{url_title}/">{title}</a></li>
  {/exp:channel:entries}
  </ul>

```

so that the output will change from:

```
  <ul>
    <li><a href="/link-1/">link-1</a></li><li><a href="/link-2/">link-2</a></li><li><a href="/link-3/">link-3</a></li>[etc]
  </ul>

```

to:

```
  <ul>
    <li><a href="/link-1/">link-1</a></li>
    <li><a href="/link-2/">link-2</a></li>
    <li><a href="/link-3/">link-3</a></li>
    [etc]
  </ul>

```

it must be something simple that I'm missing, but I cannot find any references to making it happen in the EE docs or various searches here and elsewhere.

I thought it might be something obvious like adding a `{\n}` or `{NEWLINE}` into the mix, but no luck as of yet finding something that works.

little help please?

# Answer
> 1 votes
TBH, your code output is a result of your code format.

Turn this:

```
<ul>
{exp:channel:entries channel="duh"}
    <li><a href="{site_url}{url_title}/">{title}</a></li>
{/exp:channel:entries}
</ul>

```

into this:

```
<ul>
{exp:channel:entries channel="duh"}
    <li>
        <a href="{site_url}{url_title}/">
            {title}
        </a>
    </li>
{/exp:channel:entries}
</ul>

```

And all your troubles will go away. In my experience, this style of HTML/Template formatting makes for, by far, the easiest debugging during development. It also makes development itself much easier to handle, and templates much easier to read amongst developers. Once you're in production, all of your HTML should be minified anyways, but even if it isn't, a thousand carriage returns in a template aren't going to hurt your load time noticeably.

**Edit**

Oooo, yeah, you can't do anything about that one, to my knowledge. There is a method, however, you will hate it with a passion. Turn PHP on output for any particular template aaaaand:

```
<ul>
{exp:channel:entries channel="duh"}
    <li>
        <a href="{site_url}{url_title}/">
            {title}
        </a>
    </li>
    <?php echo "\r\n"; ?>
{/exp:channel:entries}
</ul>

```

That'll do it. The problem is that the core entries module trims and removes new lines after each loop, essentially screwing you. On PHP set to output, however, this will result in a PHP stage after the template parsing stage, so you get this:

```
<ul>
    ...
    <li>
        <a href="www.site.com/url-title">
            This entry's title!
        </a>
    </li><?php echo "\r\n"; ?><li>
        <a href="www.site.com/url-title">
            This next entry's title!
        </a>
    </li>
    ...
</ul>

```

which then gets its PHP evaled, and the result is something like this:

```
<ul>
    ...
    <li>
        <a href="www.site.com/url-title">
            This entry's title!
        </a>
    </li>
<li>
        <a href="www.site.com/url-title">
            This next entry's title!
        </a>
    </li>
    ...
</ul>

```

You can't really win too much with that last line. Unless someone else knows a secret method (other than core hacking).

---
Tags: html, formatting
---


title: Freeform AJAX not returning JSON

text:
# Question
Title: Freeform AJAX not returning JSON
I'm using a freeform with ajax but the response comes back as index.php?ACT=11 and not JSON and therefore I can't manipulate the response. How can I have freeform return JSON instead?

Freeform looks like this:

```
{exp:freeform:form
form_name="contact_me"
required="first_name|last_name|email|user_message"
recipients="no"
inline_errors="yes"
admin_notify="you@me.com"
notify_admin="yes"
admin_notification_template="contact_form"
form:id="contact-form"
}

```

My ajaxForm code looks like this:

```
$(document).ready(function() {
$('#contact-form').ajaxForm({
    target: '#form-response',
    success: function() {
                    //$('.formText').hide();
        $('#form-response').fadeIn('slow');
    }
});
});

```

# Answer
I was having the same issue, JSON data doesn't return when you have inline\_errors="yes", try to remove inline\_error attribute from your form.
> 0 votes

---
Tags: solspace-freeform, ajax
---


# Question
Title: Getting channel TITLE tag value in Freeform Pro Composer hidden input field
I have created a Freeform field called **title\_tag** and have set the type to "hidden". In the field config settings, when selecting "Hidden Field" as the type, the field options allows you to set the Default Incoming Data:

> Allowed data are ExpressionEngine tags and brackets and special fields. All HTML will be removed from this setting.

As my form is a field type in my channel, I have set the default value to `{title}`

I have then added the field to my form:

However, the Title of the channel entry is not pulling through:

I'm assuming it's something simple that I've missed but can't seem to identify what I've done wrong and why the `{title}` tag isn't pulling in the Title as the value for the hidden input when it clearly says in the Field Options that this can be done.

**VERSION DETAILS:**

ExpressionEngine: 2.10.1
Freeform Pro: 4.2.3

# Answer
> 2 votes
Do you have anything in the URL that allows you to find the channel entry using `{exp:channel:entries}`? If so, you could use this and use the `{exp:channel:entries}` inside the hidden field to retrieve the entry title that is loading your Composer Freeform form.

For example, if you have your channel entry's ID in segment\_3, you could put the following as the value of your Freeform hidden field:

```
{exp:channel:entries entry_id="{segment_3}" dynamic="no"}{title}{/exp:channel:entries}

```

There's no other way for Composer to "figure out" it's coming from a channel entry custom field (i.e. `{title}` on its own won't be enough).

---
Tags: solspace-freeform, solspace, composer, composer-template
---


# Question
Title: Is this loop possible (EE2) ? I have attached an image what i need exactly. Any help is going to be appreciated. :)
{exp:channel:entries dynamic="no" limit="1" category="2" sort="asc" entry\_id="16"}

```
<li>Show Category title of category2

    {exp:channel:entries dynamic="no" limit="1" category="2" sort="asc" }

    <li>Show subactegory title of category2

        {exp:channel:entries dynamic="no" limit="1" category="2" sort="asc"}

                <li> [![Sub category entries][1]][1]<li>

        {/exp:channel:entries}

    <li>

    {/exp:channel:entries}

</li>

```

{/exp:channel:entries}

# Answer
No, it is not possible to use the entries tag within the entries tag. Also you should avoid calling the channel entries tag multiple times because it is quite an heavy operation. You should use either an embed or Stash. Stash is a better option to speed up page loading.

An example of an embed (I haven't tested if you will get the desired results. This example should get you started though):

```
<ul>
    {exp:channel:entries dynamic="no" limit="1" category="2" sort="asc" entry_id="16"}

    <li>Show Category title of category2

        {embed="[folder-name]/[template-name]"}

    </li>
    {/exp:channel:entries}
</ul>

```

Put this in the embed template:

```
{exp:channel:entries dynamic="no" category="2" sort="asc" }
{if count == 1}
<li>Show subactegory title of category2
{/if}
<li> [![Sub category entries][1]][1]<li>
{if count == total_results}
</li>
{/if}
{/exp:channel:entries}

```
> 0 votes

---
Tags: ee, loop
---


# Question
Title: filter output with a loop: if {entry_id} not in array
Within a loop, I need to output different info according to whether an entry is in an array of id's or not.

I currently get the id's from a query on the matrix table.

So I need something like this:

```
{exp:channel:entries channel="article"}

{if entry_id not in (ids)}
    //some output
{if: else}
    //some other output
{/if}

{/exp:channel:entries}

```

I can't use stash, and I can't figure how to do this with PHP/embedded templates/query tag, I think the parse order is a problem.

Here is the query I use to get the entries to filter on:

```
SELECT entry_id FROM exp_channel_titles
WHERE entry_id in
(SELECT `child_entry_id` FROM (`exp_playa_relationships`)
WHERE `parent_field_id` =  '{embed:parent_field_id}'
ORDER BY `rel_order`)

```

# Answer
Are you using version 2.9+? Which is the separator?

Let's pretend you're and the separator is `,`, giving you something like `1,2,3,4,5`. Let's use the contains and the concatenation operators.

## Using Query Module

```
{exp:query sql="SELECT GROUP_CONCAT(entry_id SEPARATOR ',') AS array_of_ids FROM exp_matrix_data WHERE [...]" parse="inward"}

    {exp:channel:entries channel="article"}

    {if ",".array_of_ids."," *= ",".entry_id.","}
        //some output
    {if: else}
        //some other output
    {/if}

    {/exp:channel:entries}

{/exp:query}

```

## Using `{exp:playa:child_ids}`

```
{exp:channel:entries channel="article"}

{if ","."{exp:playa:child_ids entry_id='{embed:parent_field_id}' field_id='XXXX' delimiter=','}"."," *= ",".entry_id.","}
    //some output
{if: else}
    //some other output
{/if}

{/exp:channel:entries}

```
> 1 votes

# Answer
If your goal is separate these specific entries and output them differently, use categories. You can then have content editors easily select (from the entry\_form) entries that should be treated as such. You could have just a single category for this channel. Say it had `category_id` 10:

```
{exp:channel:entries channel="article"}

    {categories}

        {if category_id == "10"}
            // Special output, in our special group
        {if:else}
            // Regular output, not so special
        {/if}

    {/categories}

{/exp:channel:entries}

```

**Edit**

Ok, you get this info from a matrix field. How do you fetch it? Is it via a `{exp:query}` tag, or do you get it from another `{exp:channel:entries}` loop? I possibly smell a terrible PHP answer coming your way. Please continue to expand on your question with details.
> 1 votes

---
Tags: channel-entries, ifelse
---


title: Channel form not submitting

text:
# Question
Title: Channel form not submitting
I have an issue with submitting on my channel form , the form doesn't work under https but it is ok under http. Its a form to edit user profiles.

I have added secure\_action="yes" secure\_return="yes" to the channel form tag but to no avail. Note my form is stashed and its called as an stash embed which my the cause of my issue . Also currently I only have https on the user profile editing part of the site

Thanks for any help

# Answer
> 0 votes
Turns out it had to do with config path on my dev server , when applied to my production site it works ok. I have decided to apply https to the whole site too,

---
Tags: safecracker, ssl
---


title: SyntaxError on identitcal pages

text:
# Question
Title: SyntaxError on identitcal pages
I have two pages serving up the exact same static page. I get an error on the second page, but I can’t figure out why.

**No error:** jatecson.com/information

**Error:** jatecson.com/set/images

I get this error in Chrome: “Uncaught SyntaxError: Unexpected token \<”

In Safari I get another error: Did not parse stylesheet at ‘jatecson.com/set/css/main.css’ because non CSS MIME types are not allowed in strict mode.

Clicking on the error in the console takes me to line 1 of the web page:

Can anyone offer a suggestion on how to fix this?

I’m running EE 2.10.1.

# Answer
> 1 votes
... My friend, did you check your resources? You are getting an error on the second page because you are accessing your `Main.js` from **relative paths** in your template.

**jatecson.com/information** : http://jatecson.com/js/Main.js

Load that file and *yay*! We've loaded your JavaScript file.

**jatecson.com/set/images** : http://jatecson.com/set/js/Main.js

Load that file ... and... hrmmm. That doesn't seem right...

You must be loading resources with a relative path in that template, when you should be using the `{site_url}` variable to direct your resources to absolute paths.

Here is your code to load that JavaScript file:

```
<script type="text/javascript" src="js/Main.js"></script>

```

You are loading from a relative path! So when your URI is `/` (base site root), you get `http://jatecson.com/js/Main.js`. But when your URI is `/set/`, you're getting `http://jatecson.com/set/js/Main.js`. This is true of all of your resource tags. If these are ExpressionEngine parsed templates, you should use the `{site_url}` path like so:

```
<script type="text/javascript" src="{site_url}js/Main.js"></script>

```

You might need to add a `/` after `{site_url}`, depending on what it's set at.

If these aren't ExpressionEngine templates and actual flat static served files, you'll need to edit them and manually add your domain to those `src` parameters.

---
Tags: url, segments
---


title: low-seg2cat not working all of the time

text:
# Question
Title: low-seg2cat not working all of the time
My `{segment_3_category_name}` works on some pages and not on others

This page it works, it is where it says:All Bend Insensitive Fiber Products http://cohr-dev-ee01.azurewebsites.net/lasers/main/bend-insensitive-fiber

This page it does not work: http://cohr-dev-ee01.azurewebsites.net/lasers/laser/bif-780-l2-bif-rc-780-l2

It is where it says:All Products it should say All Bend Insensitive Fiber Products Cause both of these pages are part of the same category.

# Answer
> 0 votes
Make sure all your category URL titles are unique, if you have duplicates that can cause this sort of problem.

---
Tags: categories, low-seg2cat
---


title: Troubleshooting Linking External CSS

text:
# Question
Title: Troubleshooting Linking External CSS
I've attached a screenshot of the code I'm using to link to the CSS files on my server. Am I using the wrong path??

The site I'm working on is http://www.bookslibrarianslove.com/index.php/Pages

Many Thanks!

# Answer
> 1 votes
Yes, you are. And your question is almost off topic.

* EECMS variables are put between `{` and `}`. You should put variables there, not only paths. Path variables are a little different. You can study all about it on Template Language Overview;
* `public_html` is usually the folder where the website is. Everything accessible from web is inside this folder, so you need to point to its contents, not to the folder itself;
* paths initiating with `/` are followed from the domain root. They're called "root relative paths". For example, `/my-file.gif` can be accessed from anywhere on the domain;
* paths without a `/` as first character are followed starting at the folder you already are. They're the "relative paths". For example, if you are on `http://domain.com/page_1/page_23`, a path like `my-file.gif` will point to `http://domain.com/page_1/page_23/my-file.gif`. They can give you headaches;
* paths starting with protocol and domain are called "absolute paths";
* CSS can be saved as a EECMS Template and linked using `{stylesheet='template_group/css_template'}`, but you usually don't need that;

Since the CSS isn't being served by EECMS, you can point directly to it in two ways. Using a root relative path:

```
<link rel="stylesheet" href="/css/style.css" />

```

Or an absolute path:

```
<link rel="stylesheet" href="{site_url}/css/style.css" />

```

EECMS will replace the `{site_url}` variable with the setting used on URL to the root directory of your site on Control Panel. Pay attention to not have double `/` or a missing one.

# Answer
> 0 votes
Nope! , erm, I mean Yup! You have the wrong value for the `src` parameter.

```
<link rel="stylesheet" href="{site_url}css/style.css" />

```

Use that (assuming this is an ExpressionEngine parsed template). You might need to add a `/` after `{site_url}`, depending on what your site url config var is set to.

---
Tags: css
---


# Question
Title: Mega upload does not upload file and test location
I have two issues with Mega upload. I use EE 2.10.1 and Mega Upload 2.5.5.

1. I added a MU field to a channel. When I click on 'select file', nothing happens. I don't even get an error in the console. Are there known add-ons that interfere with MU or is it a problem in MU itself?
2. In the field properties you can choose an upload location and test it with the link 'test location'. When I click the link I get the error $.fancybox is undefined in my console. This is because the module tries to load fancybox from EE's core, but it doesn't exist there anymore. I solved this by adding fancybox to the themes folder and added js and css with the add\_to\_head function. Also I changed

$.fancybox.showActivity();

to

```
$.fancybox.showLoading();

```

# Answer
> 0 votes
I found out what was wrong. The url to the upload directory was not correctly set.

---
Tags: file-uploads, devdemon
---


title: Reordering Entries

text:
# Question
Title: Reordering Entries
I know this is super simple, because I have done it before. I need to reorder my entries (ex: newsletters) by dragging them into the correct order, rather than assigning a new number for each entry.

I cannot remember how I did it before! When I go to the Reorder Entries page, it doesn't do anything.

Screen shot:

# Answer
> 0 votes
The best way to control the order of entries is to use Low Reorder. It's a $35 add-on but well worth the price.

After this is installed, you can create a reorder set of your newsletter entries by going to Add Ons \> Modules \> Low Reorder.

When you want to output a reordered list, you simply replace the channel entries tag with the low reorder tag. For example replace this:

```
{exp:channel:entries channel="newsletters" disable="member_data|category_fields"}
    {!-- YOUR NEWSLETTER --}
{/exp:channel:entries}

```

With this:

```
{exp:low_reorder:entries set="newsletter_set" disable="member_data|category_fields"}
    {!-- YOUR NEWSLETTER --}
{/exp:channel:entries}

```

Notice that the channel parameter in the exp:channel:entries tag is replaced with the name of your low reorder set in the exp:low\_reorder:entries tag.

According to the documentation here: http://gotolow.com/addons/low-reorder/docs/tags all of the parameters you can use in exp:channel:entries are supported:

"The Entries tag supports all channel:entries parameters and variables. Any filters will be overridden by the given parameters, unless you set force\_set\_params to yes. The dynamic parameter is automatically set to no, if not explicitly set to yes."

# Answer
> 0 votes
Based on your screenshot, this is a permissions issue. Make sure you are logged in as SuperAdmin, then you can assign permissions to other member groups per Reorder Set.

Right now, it looks like the member group "Editor" belongs to doesn't have the permissions to reorder entries nor edit the sets themselves.

---
Tags: low-reorder
---


# Question
Title: Matrix half of the total rows, output code at N row_count
I have a matrix field where the client can add as many rows as they like.

The rows get output to a 2 column layout:

```
<div class="col1">

    <p>Matrix row 1</p>

    <p>Matrix row 2</p>

</div>
<div class="col2">

    <p>Matrix row 3</p>

    <p>Matrix row 4</p>

</div>

```

So the template code would be:

```
{matrix_field}

<div class="col1">

    <p>{matrix_data}</p>

{if row_count == (total_rows / 2)}
</div>
<div class="col2">
{/if}

{/matrix_field}

</div>

```

Of course `{if row_count == (total_rows / 2)}` doesn't exist. How can this be achieved?

# Answer
Using grid and native (2.9.2) it’s quite cool, you can now do could do:

```
{if grid_field:count == grid_field:total_results / 2}

```

In our case I wanted to create a two column set of lists :)
> 1 votes

# Answer
> {if row\_count == total\_rows / 2} is not exist

actually, is exist - from version 2.9.0. I tested it with EE v2.9.2 & Matrix 2.6

Mathematic Operators

example for your case - split to 2 columns:

```
{if (total_rows % 2 == 0 && total_rows / 2 == row_count) || (total_rows % 2 == 1 && (total_rows+1) / 2  == row_count)}
                    <hr>
{/if}

```

available mathematic operators

```
+           Addition
-           Subtraction / Negation
*           Multiplication
** and ^    Exponentiation
/           Division
%           Remainder of one number divided by another

```

For other cases where you need to calculate something u can use MX Calc add-on - it's free.
> 3 votes

# Answer
I've done that before using the simple math add-on to do the calculation of where to break the matrix rows into their respective columns. Basically just plug in the matrix total rows variable, device by two and round up if you can (so that if there is an uneven number, the first column gets the extra one) and then use a conditional to insert the closing of column one and opening of column 2 (by comparing the result of the path to the current row count), and similarly use a conditional to close the second column. I don't recall if the Simple Math add-on actually supports rounding in any particular direction though - but there's more than one math add-on for EE that you may consider.
> 2 votes

---
Tags: matrix
---


# Question
Title: Is it possible to force lowercase URLs except for pagination segments?
Is there an Apache mod\_rewrite script that will allow me to force lowercase URLs, except for a pagination segment?

For instance, I want the url https://domain.com/blog/Capitalized-Url/P10 to instead render as https://domain.com/blog/capitalized-url/P10.

# Answer
> 2 votes
I have got code used previously in .htaccess (not recently tested), but what you also have to be careful of is the filenames of other content, specifically images, etc. As both htaccess and Apache would do all URLs on the server.

As you've indicated in the question, the pagination urls don't work lowercase - the other one to watch out for is search results (I tend to use Low Search).

```
RewriteCond $1 [A-Z]
RewriteCond %{REQUEST_URI} !(\.pdf|\.jpg|\.jpeg|\.png)$ [NC]
RewriteCond %{REQUEST_URI} !/search/.* [NC]
RewriteCond !P[0-9]* [NC]
RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L]

```

Breakdown...

```
RewriteCond $1 [A-Z]

```

Does the URL contain capital letters?

```
RewriteCond %{REQUEST_URI} !(\.pdf|\.jpg|\.jpeg|\.png)$ [NC]

```

Ignore if the requested URL ends in these extensions (extend with other extensions as applicable)

```
RewriteCond %{REQUEST_URI} !/search/.* [NC]

```

Ignore if the URL is search (change to match whatever you use if relevant)

```
RewriteCond !P[0-9]* [NC]

```

Ignore if it's a paginated URL

```
RewriteRule ^/?(.*)$ /${lowercase:$1} [R=301,L]

```

Now deliver the URL as lowercase.

**EDIT**

In the original answer, I didn't clarify the use of `lowercase`. This needs to be defined in the httpd.conf, like so:

```
RewriteMap lowercase int:tolower

```

The original solution provided meant that if there's a pagination identifier in the URL it ignores it completely, which means if you had /Blog/P10, it would allow it through. Alas I couldn't find a clean way of doing it in one regx, but this is the final solution I've used:

```
# Convert all URLs except if it has Pagination!
RewriteCond %{REQUEST_URI} ^[^A-Z]*[A-Z].*
RewriteCond %{REQUEST_URI} !(\.pdf|\.jpg|\.jpeg|\.png)$ [NC]
RewriteCond %{REQUEST_URI} !/search/.* [NC]
RewriteCond %{REQUEST_URI} !\/P[0-9]* [NC]
RewriteRule ^(.+?)$ https://%{SERVER_NAME}/${lowercase:$1} [R=301,L]

# If uppercase in initial URL, leaving Pagination element
# Will not match on lowercase intial or if Pagination element missing
RewriteCond %{REQUEST_URI} !(\.pdf|\.jpg|\.jpeg|\.png)$ [NC]
RewriteCond %{REQUEST_URI} !/holidays/search/.* [NC]
RewriteRule ^((.*?[A-Z]+.*)(\/P[0-9]+)) https://%{SERVER_NAME}/${lowercase:$2}$3 [R=301,L]

```

---
Tags: apache
---


# Question
Title: How can i display the site url instead of the ip address?
I am working in a project in EE that was previously done by somebody else. The problem is that in the image source link , it is showing as:

```
<img src="http://XXX.XXX.XX.XX/images/news/image.jpg">

```

but what I want is, is that to be like this:

```
<img src="http://myexample.com/images/news/image.jpg">

```

What might be the solution?

P.S. I am using Ubuntu.

# Answer
> 1 votes
If it is an image loaded from a file upload location, adjust the the file upload preference url to be what you need. Looks like the previous developer forgot to do this when they launched the site. Search your templates and css files, it may also be hardcoded in there somewhere as well.

---
Tags: ee2, ee1, ee
---


title: Freeform pro won't send emails

text:
# Question
Title: Freeform pro won't send emails
Suddenly Freeform pro isn't sending emails to the admin or the visitor. It worked but now it doesn't for some reason.

The logs report that they are sending, but they aren't being received. I'm using the basic form module that comes with EE as well and we aren't having any issues receiving those emails.

Any ideas here?

# Answer
This could be a server issue. What's your hosting solution? Also, is this an intranet (internal network) or internet app? Also, what's it look like when you visit your Control Panel here:

```
Your Site -> Home -> Administration -> Email Configuration

```

And last, but definitely not least, have you visited https://www.spamhaus.org/ today?
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: SQL help - clear all the values of a specific field
We ran a batch import to pull in several hundred entries, but some fields got imported incorrectly. For example, all the websites imported as "link", when they should have been blank.

Can someone help me with a command to run in the SQL manager that will clear all the values of a custom field?

EE2.10.1, Channel ID 9, Field ID 60

Thanks!

# Answer
This'll do it. However, as always... **back up your exp\_channel\_data table** before doing anything, especially if you're not a developer or DB admin.

```
UPDATE exp_channel_data
    SET field_id_60 = ""
    WHERE channel_id = "9";

```
> 0 votes

---
Tags: query, sql
---


# Question
Title: Freeform Email Notification Variables Fail to Parse
Having trouble getting Freeform to parse variable names in email notification templates. Some are working and some are not. I've tried creating new fields, duplicating fields that are working, etc. Any advice?

Looks like a very similar issue to those reported by Todd:

FreeForm Pro Notifications

Freeform Pro Hidden Fields and Notifications

# Answer
> 1 votes
When you first create a form in the backend, you must specify whether you want a "Composer" form or not.

If you choose "Composer" you can still set up your form templates outside of Composer BUT any field that you reference MUST be added to your composer layout or that field will not be available in your email notification templates.

---
Tags: solspace-freeform, solspace
---


title: Help Installing ee 3.0.0 (beta)

text:
# Question
Title: Help Installing ee 3.0.0 (beta)
I've looked around in the documentation and on the forums for help with this, but to no avail. I'm having trouble figuring out how to install the new public beta for ee. The current install information for v2x does not seem to coincide with the new file structure for 3.0.0.

I have uploaded ee to my server but cannot figure out which files I should change permissions for?

I appreciate the help!

# Answer
> 0 votes
It's really quite simple...

First, create a new folder in your web root (or use your webroot) and extract the contents of the `ExpressionEngine3.0.0-beta.zip` file there. Ex:

```
/your_web_root/ee3/

```

Then, simply visit

```
http://www.your-domain.com/ee3/admin.php

```

To begin the installation process. It looks different, but it's exactly the same. It will warn you if:

1. Your `config.php` file isn't writable (666).
2. Your `cache` folder isn't writable (777).
3. Your `database.php` file isn't configured (haven't added DB creds to it).
4. Basically, nothing else, unless your server doesn't pass basic tests for compatibility.

Really, it's almost the exact same installation as EE2.x.

# Answer
> 0 votes
Alright. I figured it out. I needed to go to admin.php in my browser, rather than the front page.

---
Tags: ee
---


# Question
Title: How to use FreeForm Pro or EE Extension Hooks
I am a .NET/Java developer so I'm not very familiar with PHP although I have dabbled with it in the past and am a total noob with Expression Engine. I am working on a project at work along side our front-end site developer who is using EE to build a membership site. We are using FreeForm Pro to create 2 or 3 user forms.

The first is a simple form asking for first name, last name and email address. When the user supplies this information and clicks the submit button we want to be able to verify the person's existence in a table that was not created by the installation of the FreeForm module. At the moment I copied the basic form code example from FreeForm documentation pages and pasted it to a Template in EE:

```
<h3>Contact Us</h3>
<p>
    To send us a message, please fill out the form below.
    We’ll get back to you shortly!
</p>

{exp:freeform:form
    form_name="contact"
    return="contact_us/thank_you"
}
    <dl>
    {freeform:all_form_fields}
        <dt><label>{freeform:field_label}</label></dt>
        <dd>{freeform:field_output}</dd>
    {/freeform:all_form_fields}
    </dl>
    {if freeform:captcha}
        <p>Please enter the word you see in the image below:</p>
        <p>{freeform:captcha}<br />
        <input type="text" name="captcha" style="width:140px;" /></p>
    {/if}
    <p>{freeform:submit}</p>
    {if freeform:no_results}
        <p>
            Specified form was not found. Please make sure you have
            specified the correct short name of the form in the
            <b>form_name</b> parameter.
        </p>
    {/if}
{/exp:freeform:form}

```

When submit button on this form is clicked the data gets saved into the table exp\_freeform\_form\_entries\_1. This is unnecessary for us but not a big deal. What we want to do is verify with a table that was not created by the FreeForm module like a membership\_staging table to determine if the person is already registered. The membership\_staging table is a table that was imported from another application.

We were thinking we could use one of the extension hooks like freeform\_module\_insert\_begin to redirect the forms functionality to do a simple query and comparison to the membership\_staging table but are have not been able to figure out how the hooks are triggered and how to use them correctly. I copy/pasted the following hook code from the FreeForm documentation into my EE Template.

```
if (ee()->extensions->active_hook('freeform_module_insert_begin') === TRUE)
{
    $field_input_data = ee()->extensions->universal_call(
        'freeform_module_insert_begin',
        $field_input_data,
        $entry_id,
        $form_id,
        $this
    );

    if (ee()->extensions->end_script === TRUE)
    {
        return;
    }
}

```

I am not sure if this piece of code is being executed when the submit button is clicked and have no idea how to test if it is. I have scoured the internet for the past week looking for tutorials or examples of how to utilize hooks in an EE template but only find tutorials and example on how to build extensions and none of them talk about hooks and how to use them.

I would greatly appreciate it if someone could assist me in filling in the blank.

# Answer
You need to write what's called an extension.

https://ellislab.com/expressionengine/user-guide/development/extensions.html

Basically, an extension fires when a given hook goes by, you can do your check in the aux table there, and then return to the form submission.

The Freeform docs show what hooks are available to work with.
> 0 votes

# Answer
Here we go...

So you have your first form (taking first name, last name, and email address). It's a FreeForm form, displayed on the **client side**, with rendered template code you've shown. When a user fills in the data and submits, it sends a POST request to what is called and Action ID (ACTid), which is a sort of API portal between the client and the ExpressionEngine `(custom)?` module. Here's an example ACT address:

```
https://www.domains-rock.com/?ACT=666

```

When a module is properly installed, there is a DB table (generally called `exp_action`) that gets inserted rows that create an association between an ACTion ID and a module's class method. For FreeForm, it would have a table row that associated ACTion ID `666` with the method that handles the form submission. That method then has a code hook in it. The engine looks at that hook and looks at the `exp_extensions` table to see if any installed extensions want to run their own class's methods inside of the code in the FreeForm submission method.

```
> i submit form
> FeeForm EE addon receives it
> starts processing it, but starts off with the insert_begin hook
>  - your extension hooks to that, so it takes over code control here
>  -  -  you get passed form info, whatever, into your extension method
>  -  -  you modify it and return it, or return false if invalid, whatever
>  - your extension ends, return form submission control to FreeForm
> FreeForm finishes up with the submission process.

```
> 0 votes

---
Tags: solspace-freeform, add-on, extension, ee
---


# Question
Title: Nested conditionals break within low_search:results tag
ee v2.9.2 low search v4.4.0

The code below is generating an error:

> You have an invalid conditional in your template. Please review your conditionals for an unclosed string, invalid operators, a missing }, or a missing {/if}.
>
> Parser State: Unexpected end of Template “image-database/results” on line 93; expected ENDIF tag for opening on line 91.

Removing the {low\_search:results} tags, the error goes away.

Removing the {if no\_results} conditional, the error goes away.

Removing the {if count ==1} conditional, the error goes away.

Removing the {if category\_is\_parent == 0} conditional, the error goes away.

Removing the {nsm\_categories:archive tags}, the error remains.

```
{exp:low_search:results
    query="{segment_3}"
    collection="image-gallery"
    paginate="bottom"
    limit="28"
    orderby_sort="low_search_collection:image-gallery"
    require_all="category"
    }
    {if no_results}
        {exp:nsm_categories:archive
            enable=""
            category_group="8" depth="2"
            start_at_category="58"
            style="linear"
            }
            {if count ==  1}abc{/if}
                {if category_is_parent != 0}
                    {category_name}
                {/if}
                {if category_is_parent == 0}
                    {if count ==  1}yes{if:else}no{/if}
                {/if}
            {if count == total_results}xyz{/if}
        {/exp:nsm_categories:archive}
    {/if}
{/exp:low_search:results}

```

I am convinced the issue with Low Search but I am not an expert.

Any help is appreciated!

# Answer
Actually, I doubt this is a Low Search issue.

If the problem persists if you change the `exp:low_search:results` tag to a `exp:channel:entries` tag, then the issue is definitely not related to LS. Can you check if this is the case?

You can also try and use `{if low_search_no_results}` rather than `{if no_results}`, to see if that makes a difference. It's probably due to unexpected nesting that the error is thrown.

You can even try and move the code inside the no\_results conditional into an embed and see if it works that way.

Side note: you're targeting a single collection, so using `orderby_sort="low_search_collection:image-gallery"` is not necessary. You can safely remove that parameter.
> 0 votes

---
Tags: low-search
---


title: Multi-site simple search not working

text:
# Question
Title: Multi-site simple search not working
I am new to expression engine and setup multiple sites using MSM. All the sites having simple search form to search across the channels. When i search with the master site the search working perfectly, But when i search through the sites other than master it redirects me to no result page.

```
{exp:search:simple_form
    channel="news|business|travel"
    result_page="search/results"
    no_result_page="search/no_results"
    search_in="everywhere"}

    <input type="text" name="keywords" id="search" value="" class="form-control input-sm" placeholder="Search" required />

    <button type="submit" id="submit" name="submit" class="btn btn-default btn-sm">
        <i class="fa fa-search"></i>
    </button>

{/exp:search:simple_form}

```

# Answer
> 0 votes
Try setting which site you want to search in, otherwise it will only search the current site. If it can't find those channels, you get no results.

```
channel="site_name:news|site_name:business|site_name:travel"

```

MSM is nice. But when you want to pull data from one site into another, you need to specify where the data comes from.

---
Tags: search, multi-site-manager
---


title: Charge 1.9.8 Error After Install?

text:
# Question
Title: Charge 1.9.8 Error After Install?
I just installed the latest version of Charge on my 2.10.1 ExpressionEngine site and now I'm seeing the following error:

Parse error: syntax error, unexpected ')' in /wwwroot/system/expressionengine/third\_party/charge/mcp.charge.php on line 800

Anyone else having this issue?

# Answer
This was corrected in the 1.9.9 release. Problem solved.
> 1 votes

---
Tags: charge
---


title: Images in rich text area

text:
# Question
Title: Images in rich text area
In the ee control panel I have a textarea(rich text) that I use for writing some news articles. These articles include some images in them and I continually have to write the HTML for inserting images. Is there a way to instead of having to write the HTML myself, adding I.E a button next to the "link" button to insert an image?

I'm new to ee so an easy solution is preferred.

# Answer
> 2 votes
The easiest solution would be to use an addon custom field type that is better suited to your needs. This is the one I use:

https://devot-ee.com/add-ons/wygwam

It gives you more of a WYSIWYG-style field input, and is much easier to work with for someone looking to avoid code for whatever reason. There is a few others like Wygwam, so I recommend poking around the devot-ee.com site. It's a major hub of ExpressionEngine addons.

Installing addons is generally the same for most addons, but there is no official guide; the addon should come with instructions. But if you have trouble, comment on my answer and I'll write up some instructions.

---
Tags: ee2, image, richtext
---


# Question
Title: MSM Second Site not registering logged_in variable?
I've been working on a few sites for a client. The first of which can log in and have the session variable as well as a the {logged\_in} tag read just fine.

The second, it doesn't matter how I log in (CP successfully logs in, for example, or through freemember or even EE's native membership form), it doesn't seem to read the {if logged\_in} tag. The session variable is also blank.

Config files are lined up as explained in the MSM guide, and data can be written to the DB through channel forms, but I can't for the life of me figure out why I can't get the login state. It's driving me nuts.

I've gone as far as stripping down to the following code to test, and still nothing:

```
{if logged_in}
    <?php
        $user_data = ee()->session->userdata("member_id");
        echo "UD: ".print_r($user_data,1);
    ?>
    YOU ARE LOGGED IN<Br><br>
    DEBUG<BR>
    Email: {email}<br>
    GR ID: {group_id}<Br>
    ID: {member_id}<br>
    Name: {username}<br>
    LIMID: {logged_in_member_id}

{/if}
{if logged_out}
    YOU AREN'T LOGGED IN
{/if}

```

Any ideas where to start looking for a solution?

Vince.

# Answer
> 0 votes
You rockin' PHP on input our output for that template? Try just turning it off as well. Next, what EE version you running? Also, can you give me the output of this (when PHP is set to output for that template):

```
<?php
$a = "{member_id}";
$b = "{logged_in}";
var_dump($a);
echo "<br/><br/>";
var_dump($b);
?>

```

# Answer
> 0 votes
check that you are actually logged into site #2

did you login at site1.com/admin.php or site2.com/admin.php?

# Answer
> 0 votes
Check you have different variables set under the cookie domain under cookie settings for each msm site...

---
Tags: multi-site-manager, login
---


title: Cartthrob - Presales questions

text:
# Question
Title: Cartthrob - Presales questions
I have just sent this to the CT team but am open to as much advice as possible so thought id put it out here too. Is this type of Q even allowed on here?

**Q:** I am just reading the docs trying to decide which route to go down for a online food delivery system.

It needs to integrate with a POS (Revel Systems). In the docs it says to contact CT as may be able to offer with information on integrating with POS's

> "If you would like to integrate CartThrob with a Warehouse system, Point of Sale system, ERP, or other post-order process, please contact us for a consultation and we can give you an overview of what is possible. Though every ERP system requires a unique integration, we have a set of scaffolding for creating ERP integrations that offers a push-pull API for sending and receiving data in a secure manner using ExpressionEngine's built in user authentication. Our scaffolding system offers you local integration using command line applications or via publicly accessible web services."

The API that Revel Systems (POS) uses is Django Tasty Pie (REST) (https://django-tastypie.readthedocs.org/en/latest/).

SO, I will need to using a webservice to sync inventory, order history and mainly to push orders to their system.

Without going into too much detail could you answer the below Q's?

* Do you know if the synchronisation will be possible with CT/webservice?
* They are accepting Cash on Delivery ONLY (Its a food delivery service), would I be able to push new website orders to their POS?
* What would be the best method to keep the inventory up-to-date on a regular basis whilst being linked to their POS?
* What format would CT need to receive the data to keep it synced? CSV/Webservice?

Thanks!!

# Answer
> 1 votes
This sounds pretty good that their POS (is it just a POS? Not an ERP too?) has a rest API. That means that in the grand scheme of things it should be a nice job to push and pull data.

There are a few ways to do things, but essentially, Cartthrob has hooks for most major events through the order process. You can simply fire off data to their API to inform them of orders/inventory etc and they can do something similar by posting info on inventory updates to EE which can be consumed easily enough.

There will be questions about inventory updates that could clash (someone has item in cart, you update inventory from the POS, item no longer exists online etc) but all in all, a very doable project with CT.

Best format would be json one assumes if you will be using web services to throw data around. I guess you could use a CSV, but, not sure you would want to.

John

---
Tags: cartthrob, json, api
---


# Question
Title: How do I restore the deleted promo codes to discounts in Store v2?
So I made the upgrade to v2 and none of the v1 promo codes were migrated to the 'discounts' table. Inspecting the db, I can see them all still there in exp\_store\_promo\_codes, but the exp\_store\_discounts table is empty.

Should they have all migrated? If not, how can I repopulate the discounts table? The schema is different, with different field names, so it's not a simply 1-to-1 mapping.

# Answer
> 0 votes
I know nothing about Expresso Store, but I assume they *should* have migrated that info as well. The first thing you can try is to revert to the old version (you made a complete DB and file backup, no?), and re-upgrade. If that isn't an option, I would start by making a new promo, and look at the new `exp_store_discounts` table. Take an example promo from the old table, and use that data to create the new discount. From their, you can probably map out what needs to be copied over and where.

A real bungle here would probably be to forget to map **Primary Keys** together. Your PK from your old table needs to be the PK in the new table for there to be any chance of this working. Start by copying over one after you see how the new table is filled in, and then test migrating another row yourself, and see what you get.

If that actually works for you, depending on the number of promos, I'd write a migration script to bang the job out. Hope that helps, but one last thing... did you contact the Expresso Store people?

Also, if you look at the (what I assumed is called) `upd.express_store.php` file in the addon, you can find it's upgrade scripts. There, you can search/grep for that old and new table, and see if it was actually meant to migrate data over.

Sorry that wasn't an authoritative answer, but it should get you going, and **reach out to DevDemon**, makers of Expresso Store

---
Tags: expresso-store
---


# Question
Title: Multiple ExpressionEngine sites/installs on cloud server
I have a simple question regarding the installation of multiple EE sites on a single cloud server: I have a basic LAMP stack (w/ Ubuntu 14.04) on my RackSpace server that runs several websites. The primary website is already running on EE, and I'm just wondering if I can install another instance of ExpressionEngine for a different site on the same server, without issue, assuming I create a separate MySQL database for the new site?

Thanks for any insight here.

# Answer
> 2 votes
I have no idea! Kind of...

If your RackSpace server functions essentially like a VPS or bare metal machine (just in the cloud), then you're all set! There are a couple way to go about it. I'll explain a couple of simple ways this works on a regular VPS or bare metal machine.

You have your web root and an EE installation working on it. One way to go is Multi Site Manager. This works well for multiple domains functioning from the same EE install. The instructions are relatively straight-forward.

If you want to keep these installations **completely** silo-ed, you can install a separate EE instance in a sub-folder of your web root:

```
/my-web-root/second-ee-site/

```

Then you just need to set up your VirtualHost (for Apache) settings for that new folder to match your new second-site domain, set your DNS entries for the new domain to point at your RackSpace server, and make sure you set your new EE install to have the right server paths (`/my-web-root/second-ee-site/` instead of `/my-web-root/`). I have a few EE sites that live in a sub-folder of my web-root, which is it's own EE site just like this.

If either of these methods applies to a RackSpace server... I don't know, since I don't have one. But again, if a RackSpace cloud server functions like a regular bare metal machine, just in the RackSpace cloud, you should be all set. I hope others chime in (or yourself) if I'm being particularly ignorant.

And oh, yes, you need a separate DB schema for each install. Well, you don't **need**, but trust me, you want.

---
Tags: multiple-sites, install
---


# Question
Title: Can I move the Submit button on the entry screen to the top of the window?
I've got clients who have a problem remembering to scroll down to the bottom of long entry screens to click the "submit" button on a regular entry screen.

I was thinking it would be good if I could either move the one on the bottom up to the top, or better yet, have a duplicate "submit" button at the top.

Is there an easy way to do this?

# Answer
You want an Extension rather than Accessory. There are already ones out there that will do the job, or you can tweak slightly. The one I use the most is Publish Bar.

Other options...

Control Panel CSS/JS \- create your own by injecting JS/CSS on that page.

Publish Tweeks \- might do it can't recall (been a while since I used it)

Chilli: Save for Publisher \- Does the job if you're using Publisher add-on
> 3 votes

---
Tags: control-panel
---


title: Low Events total days count

text:
# Question
Title: Low Events total days count
I might be missing it but.. is there a variable to output the total count of days the entry spans across, from start to finish?

# Answer
> 0 votes
There is the :duration modifier, but there is no modifier to output the number of days as an integer.

---
Tags: low, low-events
---


title: Database Error on Update

text:
# Question
Title: Database Error on Update
I am trying to update EE v2.4 to v2.10.1 and got a database error.

Error Number: 1060

Duplicate column name 'can\_search'

ALTER TABLE exp\_member\_groups ADD COLUMN can\_search char(1) NOT NULL default 'n'

Filename: updates/ud\_0\_00\_09.php

Line Number: 112

Not sure what to do. Any help is appreciated.

# Answer
> 0 votes
Refresh the browser to continue the upgrade. If that doesn't help contact EllisLab support.

---
Tags: database-error
---


# Question
Title: Using DevDemon Forms, skip empty fields in result email
Is it possible to have the results include only fields with results in the admin and user emails? I have a form that collects data for 3 different possible options. I want to get the data only for the option that was chosen, not all of the empty fields from the other 2 options.

# Answer
Yes!

You can create a template with the fields manually. Say you have a field called phone.

You can do:

```
{if field:phone}Phone: {field:phone}{/if}

```

Brad
> 0 votes

---
Tags: devdemon, devdemon-forms
---


# Question
Title: Can multiple Freeform recipients be set per drop-down option?
For example, can I set the following to set one chosen recipient to be sent to multiple emails?

{exp:freeform:form form\_name="request\_a\_quote" recipients="yes" recipient1="email.A@site.com|email.B@site.com" recipient2="email.C@site.com" recipient3="email.D@site.com,email.D@site.com" required="name|email|phone\_number"}

# Answer
It's not possible to send to multiple addresses when using the recipients="yes" parameter. I would recommend setting up an address that recieves the message and then automatically forwards it to all the desired recipients.

To clarify recipients1="fakefoward@domain.com" reciipients2="fakeforward2@domain.com"

Then in fakeforward@domain.com email settings have it forward to all the emails you need. Same with fakeforward2@domain.com
> 2 votes

# Answer
I don't believe this is possible out of the box. We've solved this previously by writing a Freeform hook to handle the multiple notifications. See: http://www.solspace.com/docs/freeform/extension\_hooks/
> 2 votes

# Answer
I remember looking into this a while back but ultimately did not need to implement it. I think it's not possible to do with Freeform on its own but you could accomplish it with Postmaster.

It may also be possible to do something with MX Notify Control but I would certainly look at Postmaster first as it's extremely powerful.

**Reading your question again I realised I'm not sure I understand what you're asking. Do you want the same email sent to multiple addresses or multiple emails sent to the same address?**
> 1 votes

# Answer
Here is a working exampled.

```
{exp:freeform:form
                form_name="contact"
                form:class="mwi-form"
                recipients="yes"
                recipient_user_input="yes"
                recipient_user_template="notify_contact"
                return="contact/thank-you"
            }
                <fieldset>
                    <label class="col1">
                        First & Last Name
                        <input type="text" name="first_name" value="">
                    </label>
                    <label class="col1">
                        Phone Number
                        <input type="text" name="phone" value="">
                    </label>
                    <label class="col1">
                        Your Email Address
                        <input type="text" class="require" name="email" value="">
                    </label>
                    <label class="col1">
                        Battery Outfitters Location
                        <select name="recipient_email_user">
                            <option value="PShumaker@batteryoutfitters.com">Select Location</option>
                        {exp:channel:entries channel="location" dynamic="no"}
                            <option value="{location_email}">{title}</option>
                        {/exp:channel:entries}
                        </select>
                    </label>
                    <label class="col1">
                        Message
                        <textarea name="user_message"></textarea>
                    </label>
                    <button class="btn blue" type="submit">SUBMIT</button>

                    <input type="hidden" name="spamfreeform_name" value="first_name" />
                    <input type="hidden" name="spamfreeform_email" value="email" />
                    <input type="hidden" name="spamfreeform_fields" value="user_message" />
                </fieldset>
            {/exp:freeform:form}

```

Make sure the value of the options in the recipient\_email\_user select are pipe separated email@domain.com|email@domain.com|etc...
> 0 votes

---
Tags: solspace-freeform
---


# Question
Title: Low Search: find channel entries with relationships to it?
I have a `Products` channel and an `Images` channel. The `Images` has a relationship field to `Products` (basically: a product can have 0 or more images).

Since most of my products do not have images, I'd like to showcase the products with images over the products without images. Meaning, I'd like to create a page that lists only the products that do have images, random order, and allow users to paginate through them.

**In Low Search, is there a way to get a list of products that have images?**

Products without images will still be viewable by doing a full text search or getting a list of entries based on the EE category they are associated with.

# Answer
> 1 votes
One way that's currently possible, is to use a SQL Parameter to query the entry IDs that have a relationship. The other would be to create a custom filter.

---
Tags: channel-entries, search, low-search
---


# Question
Title: How to access a custom table name that isn't prefixed with exp_
I'm developing an EE module that needs to access a non EE database table that isn't prefixed with 'exp\_'.

How would I go about doing this? In Codeigniter I can use set\_dbprefix, but that doesn't appear to be available in EE.

I'm using EE 2.73 currently.

Thanks in advance!

# Answer
> 1 votes
If I recall correctly, using the query module (and relative portion of the database class) doesn't force the prefix.

https://ellislab.com/expressionengine/user-guide/add-ons/query/

So you can use that to query any full table name:

```
$result = ee()->db->query('SELECT * FROM not_prefixed_table')->result_array();

```

You just annoyingly have to write out each query.

**Edit** Also, I'm assuming you don't have permissions to make schema and table changes to this database, because otherwise the obvious answer is just modify the table name to include the prefix.

# Answer
> 1 votes
You can set the database to be used like so:

```
$mydb = ee()->load->database('mydatabase', TRUE);

```

By setting the second parameter to TRUE the function will return the database object.

and then run a query like:

```
$query = $mydb->select('*')->from('tableName')->get();

```

UPDATE:

To set the database prefix to use in the query use:

```
ee()->db->set_dbprefix('myprefix');

```

---
Tags: add-on-development, module, database
---


# Question
Title: Is there a way to completely remove the breadcrumbs in the Control Panel?
I'm trying to make the Control Panel as stripped down as possible for clients who get confused easily. Is there a way to completely remove the breadcrumbs from the Control Panel? I see various add-ons to manage breadcrumbs, but I don't see a way to completely remove them. I'm using Zoo Admin for my custom menu, but one of my clients gets confused when they see the breadcrumbs below the menu.

# Answer
> 0 votes
Well, there's a few ways to go about it. First, the easier way, is to see if you can find a Control Panel theme that better matches what you're looking to do.

https://devot-ee.com/search/results?keywords=theme&addon\_version\_support=ee2

Search around, perhaps there's already a nice simple theme that will work for you. If not, the better answer is to create you're own theme.

https://ellislab.com/expressionengine/user-guide/development/cp\_styles/#customizing-the-control-panel-theme

And finally, the less than smart answer; just hide the control by editing a core `_shared` file. You want to edit this file `system/expressionengine/views/_shared/breadcrumps.php` and go ahead and add this HTML attribute to the div with `id="breadCrumb"`:

```
style="visibility: hidden;"

```

# Answer
> 0 votes
Install Control Panel CSS/JS add-on.

Then add the following CSS:

```
#breadCrumb { display:none; }

```

Or for slightly better result:

```
#breadCrumb { height:22px; }
#breadCrumb ol { display:none; }

```

---
Tags: control-panel, zoo
---


# Question
Title: Display other entries from same category on single-entry page
I have a single-entry page with no category information in the URL. Each entry is only assigned to one category (or, if multiple, I only need one).

The goal is to display a list of up to 5 other entries from the same channel and category.

I've been around and around this but can't figure it out. Any ideas?

# Answer
Have you given this a shot?

https://ellislab.com/expressionengine/user-guide/add-ons/channel/channel\_entries.html#related-categories-mode

It's meant specifically for single-entry pages. I think it's used something like this:

```
{exp:channel:entries url_title="{segment_2}" limit="1"}

    Our single entry page ! {title}

{/exp:channel:entries}

{exp:channel:entries related_categories_mode="yes" limit="5" channel="CHANNEL_ID"}

     Related entries!

 {/exp:channel:entries}

```

It that works for you, **please** take that inner loop out and put it in an embedded template, as it's more efficient.
> 0 votes

---
Tags: ee2, channel-entries, categories
---


title: Broken control panel navigation

text:
# Question
Title: Broken control panel navigation
I'm working on a local install of EE 2.10.1 in Windows 7 with XAMPP. Everything is cooperating, but the control panel navigation is broken - mouseing over/clicking nav items shows no drop-down. It appears my JS and CSS are all loading. Default theme. Has anyone seen this before?

# Answer
Uninstall all third party addons, especially Accessories. I literally had this happen to me the other day when I was developing a complex addon. I can't remember if it was the Extension or Accessory that was doing it (pretty sure it was the Accessory). Do them one by one so you can find out exactly who the culprit is.
> 1 votes

---
Tags: control-panel, navigation
---


# Question
Title: MX Notify Control PHP error on extension page
Using MX Notify Control 2.4.6 in a project on EE 2.9.3 . Calling the Add-ons extensions page gives a error. Server runs on PHP 5.5 or 5.6

Strict Standards: Redefining already defined constructor for class Mx\_notify\_control\_ext in /.../expressionengine/third\_party/mx\_notify\_control/ext.mx\_notify\_control.php on line 62

The extension seems to work, but the error should be. Is the code not PHP 5.5 compatible?

# Answer
I did quick update(v 2.4.7). It should remove this error.
> 2 votes

---
Tags: mx-title-control
---


# Question
Title: Does Cartthrob + Stripe only accepts dollars?
I have cartthrob and stripe set up and throughout the cart process everything says euros, the admin panel, to invoice, the order confirmation, etc. The default currency setting in Cartthrob is set to EUR as well.

When I send to stripe, it always accepts payment in dollars then converts to euro. My default currency in stripe is set to EUR, but my location is always being set as purchasing from the US in my stripe test area.

The question is, how do I allow stripe/cartthrob to make sure euro is sent as the primary currency and how do I change the default country the payment comes from?

# Answer
> 0 votes
Seems the cartthrob / stripe payment plugin has dollars hard-coded into it by default. Changing that solves the problem...

---
Tags: cartthrob, stripe
---


# Question
Title: Modify Solspace importer for email is not required
I might need to hack Importer to make it allow importing members without requiring an email. Is it even possible ?

(related to this question)

# Answer
> 1 votes
Hrmm. I think the first-party member module really depends on having an email address for an account, and really scanning through it to modify it is both a very bad practice and impractical. What I would suggest is generating dummy email addresses for your source file using a GUID for both the localpart and the domain, making it a statistical extreme that their is any collision between your fake addresses and real ones.

However, this does beg the question; How will you update these email addresses when the time comes? These are websites we're talking about, and I'm not sure but how does Importer deal with passwords? Do you have the passwords in plain text? If not, every imported user is probably going to **need** to use the EE password reset functionality, meaning they'll need a valid email address (or you go through and set temporary passwords you share with them, on a case by case request).

**Edit**

Based on your comments, your major issue is a bad data set. I'm assuming you are tasked with doing a recovery for someone, otherwise you need tell them you need valid data or no-dice. I looked, and Importer has no extension hooks in it, so if you are really stuck having to deal, just write your own import script. It won't be fun, but then you can do as I said; generate GUID@GUID.com (google GUID if you don't know what that is) for each row you import and use that as your email.

---
Tags: solspace-importer
---


title: Snippet Changes Not Being Saved

text:
# Question
Title: Snippet Changes Not Being Saved
I'm working on a site in ExpressionEngine which has been causing all sorts of problems, and we thought we had solved most of them, but now have run into a completely new issue which I can't seem to resolve.

We took this project over from another development firm, and when we try to edit any snippets that were created initially those changes are never saved, the snippets code just reverts back to its original state. We are able to create new snippets and edit those without any issues whatsoever, but can edit any of the pre-created templates from the other firm.

I have cleared the cache both through the admin section in EE, and have cleared out the cache folder in system/expressionengine/cache/, but this still does not solve the issue. I thought then that I would just edit the snippet directly in the database in order to make the changes. My changes will save in the database for those snippets, but it still does not change the code in ExpressionEngine. I have verified that any changes that I make to snippets that I have created are being stored in the database, so I'm really confused as to what could be causing the issue, and why even my changes in the database aren't being reflected in the system.

Thanks

# Answer
Have you checked to see if you have either of these addons installed?

https://devot-ee.com/add-ons/snippet-sync

https://devot-ee.com/add-ons/snippetssync

They both serve the same functionality; they hook into your snippets when you save them and save them as files (to allow snippets to be in a VCS). Then, when you load a snippet, they hook there as well, and load the snippet from that file. It basically usurps the database call and instead makes the snippets file based.
> 0 votes

---
Tags: database, snippets
---


# Question
Title: Solspace Calendar & Channel Form not showing in Firefox and Date popup not working
I created a channel form for submitting events here. It shows fine in Safari and Chrome but does not appear in Firefox. I confirmed that the channel permissions are set to allow Guest Publishers, so that is not blocking it.

In addition, the Date selection popup is not working. I added the following required stylesheet link to the template, but it does not make a difference:

```
<link href="{path=css/_ee_channel_form_css}" type="text/css" rel="stylesheet" media="screen">

```

I would appreciate another set of eyes to help spot what I may have overlooked. Several other channel forms are working correctly on the site.

# Answer
To get this working correctly I had to step back with version of jQuery I was running on that page. The calendar module comes with jQuery 1.3 referenced. I was able to get as high as jQuery 1.7.1 and have it work correctly, but if I went to the current release of 1.11.1, the calendar date selector does not work.

With regards to the calendar not working in Firefox, it was a permissions issue. I used logmein and set the group correctly and it appears fine.
> 1 votes

# Answer
I was able to get this working by updating all instance of the `live()` jQuery function in `calendar_publish.js` to use `on()` instead. The syntax is a little different, so here is what I changed:

---

Line 1913, FROM:

```
$('select[name=type]').live('change', function()

```

TO

```
$(document).on('change', 'select[name=type]', function()

```

---

Line 1948, FROM:

```
$('div.all_day input:checkbox').live('change', function()

```

TO

```
$(document).on('change', 'div.all_day input:checkbox', function()

```

---

Line 1984, FROM:

```
$('.selector .item a', $cal_fields).live('click', function()

```

TO

```
$cal_fields.on('click', '.selector .item a', function()

```

---

Line 2046, FROM:

```
$('.rule_close', $cal_fields).live('click', function(){

```

TO

```
$($cal_fields).on('click', '.rule_close', function(){

```

---

That seemed to do it! Oh, btw, this is Solspace Calendar 1.8.14
> 1 votes

---
Tags: safecracker, solspace-calendar
---


title: Error on Postmaster Parcel or Hook save

text:
# Question
Title: Error on Postmaster Parcel or Hook save
I'm working in EE v2.9.0 and Postmaster 1.5.0. Every time I save a parcel or a hook, I get the same error:

**Error**

The page you requested was not found.

The information saves, however, I need to go all the way back to the Postmaster home page to get back into the entry. Otherwise it creates a duplicate entry. Any thoughts?

Screenshot of error

# Answer
> 1 votes
What's the url of the the page that's getting the page not found error? Postmaster uses the domain you have specified in your config. This may be the problem. This is particularly true if you're using MSM.

---
Tags: error, hook, postmaster
---