texts: cycle thru each parent category and show 3 entries from each category

texts:
I am looking to cycle thru all the parent categories of a category group, show three random entries (from the products channel) from each category, then go to the next category in the group.

I'd share some code, but I don't even know where to start.

My final code that works:

{exp:channel:categories
    style="linear"
    category_group="2"
    parent_only="yes"
}

{category_name}

    {exp:channel:entries
        channel="products"
        category="{category_id}"
        limit="3"
        orderby="title"
        sort="random"
        status="open|featured"
        cache="yes"
        refresh="5"
        disable="category_fields|member_data|pagination"
    }

{title}

    {/exp:channel:entries}
{/exp:channel:categories}


texts:
Implementing the solution found on Bring Matrix Data Editing to the Front-End
I've a matrix field that contains a P&T Dropdown field type

<select name="role_level[row_new_0][col_id_46]">
{options:role_level}
<option value="{option_value}"{selected}>{option_name}</option>
{/options:role_level}
</select>

This doesn't work (no options output), the author of the post adviced to hard-code the options

<select name="level_matrix[row_new_0][col_id_46]">
<option value="">Choose Level</option>
<option value="Entry Level">Entry Level</option>
<option value="Experienced">Experienced</option>
<option value="Manager">Manager</option>
<option value="Executive">Executive</option>
</select>

How can i make the selected option remain "selected"? (will be doing this on many other fields)

Thanks


texts:
How can I make the categories a select box?

Thanks


texts: Simple Search provide Status Dynamically

texts:
I have a simple search form that I would like to submit a status dynamically, is there any way to do this, right now I am using javascript to submit the form and depending on what status options are toggled i would like to limit the status fields it searches.

If I cannot change the available status's on submission, can I restrict the status on the results page something like this?

{exp:search:search_results status="closed|draft"}

I can always use the template to not display status's on the results page, but I would prefer not to loop over 10 status's for every result.


texts:
Is it possible to order search results by two fields? I have two price fields - price & sale_price and ideally need to order by both fields. Can this be done using the custom filters?

{exp:low_search:filters query='{segment_3}' result_page='products/results'}
    <select name="orderby_sort">
        <option value="">
            Order by
        </option>
        <option value="{low_search:url orderby_sort='price|asc'}"{if '{low_search_orderby_sort}' == 'price|asc'} selected{/if}>
            Price (Low to High)
        </option>
        <option value="{low_search:url orderby_sort='price|desc'}"{if '{low_search_orderby_sort}' == 'price|desc'} selected{/if}>
            Price (High to Low)
        </option>
    </select>
{/exp:low_search:filters}


texts: exp:entries search parameter not working when disable="custom_fields"

texts:
I am trying to create a Google sitemap. On some of my channels I need to only output URLs that match a certain criteria based on custom fields. If I use the search parameter it works fine... except if I am using the diable="custom_fields" parameter. If that parameter is in then the search parameter is ignored completely. Seems like a bug to me since I can disable categories yet use the categories parameter just fine. So how can I get around this? I can't really enable custom fields since I will be running through all the pages in my site and that would slow things down quite a bit. Any ideas?

I was thinking of using a conditional inside the exp:entries tag... but with custom_fields disabled, I wouldn't have anything to test against.


texts: Modifying / Removing a text link makes button inactive

texts:
I'm trying to modify this piece of code in my template so that I can remove the text that says to "download a module" but when I do, it breaks the "quiz button" link / makes the button inactive. Anyone have any input on how I can resolve this issue? It seems like the two are connected somehow, but I need to modify just one of them, the download module link. TIA!

{embed="Includes/header"}

{exp:channel:entries channel="CE_Courses" limit="1"}

    {embed="Sidebars/education" id="205" }

{title}

Course information written by: {presenter}

    {course_body}

<? $quizlink = "{quiz_link}"; ?>

{if course_type =="Video"}

<?
$mod = "{module_notes}";
?>

{/if}

{/exp:channel:entries}

<? $i = 0; ?>

  {exp:channel:entries channel="course_chapters" sort="asc" orderby="chapter_number" related_categories_mode="yes"  limit="100" custom_fields="yes"  }

{title}

    {chapter}

{if absolute_count == total_results}
<a class="btn" href="<? echo $quizlink; ?>" target="_blank" >Take the Quiz
{if:else}
Next

{/if}

<? $i++; ?>

{/exp:channel:entries}

    </div

    {embed="Includes/footer"}

How to Buy

Veterinarian Sign Up

Why Putney Generics


texts:
I always seem to run into some problems with conditionals. The code in question is this:

{categories}
{if category_id != "305|325"}

Index version 1

{/if}

{if category_id == "305|325"}

Index version 2

{/if}
{/categories}

At the moment, it is always returning version 1 of the index, even when the category of the entry matches 305 or 325.


texts: Matrix 2.5.3 and Safecracker file 2.1 (EE 2.5.3) not playing nicely

texts:
Ok, where to start. Firstly, I should say that there are similar topics to these, but I have my own unique set of problems, so I decided to post a new question.

Some background: This was an EE1 site which has been upgraded to EE 2.5.3 which i didn't do, and I'm now trying to fix the problems.
Of the many fields in the 'products' channel, one already created was a matrix field with one column, using safecracker file within it, for product images. This is the bit which isn't working correctly.

To start with, when loading a publish page with existing data (admin area) I get the following error appear at the top of the page;

Severity: Notice
Message: Undefined index: safecracker_upload_dir
Filename: safecracker_file/ft.safecracker_file.php
Line Number: 567

The images within the matrix field seem to be appearing, so I'm not sure why this error message is appearing.
I've had a look at ft.safecracker_file.php and can see that the undefined index is that of the settings array - I assume it's pulling settings from the safecracker extension.
However, I have no idea how to set this, as there doesn't seem to be such an option in safecracker settings?

The problem part 2;

On the front end, when outputting the matrix tag pair - and then the matrix tag within it, I was initially having the problem of it not getting the image path.
If I prefix {filedir_6} (product images dir) manually to the image path in the matrix data table, I then get the path to appear.
Maybe someone could tell me whether this is a hangover from the EE1 upgrade?

Any and all help appreciated. Many thanks.


texts: Assets 2.3.2 Lib file - Causes PHP error

texts:
After updating to the latest versions of the Assets extension for Expression Engine. When I am logged in as a Super Admin I get the following PHP error, I don't get this error when logged in as a different user.

A PHP Error was encountered

Severity: Notice

Message: Undefined offset: 0

Filename: libraries/Assets_lib.php

Line Number: 814

This is caused by this following line of code in the Library file (line 814):

  if (!(count($full_folder_list) == 1 && $full_folder_list[0] ==
  ":any:"))

Is there a fix for this line, I am not sure what:

  $full_folder_list[0] == ":any:"

means but this is the part that causing the error.

I am looking for a fix for this?

I am using Expression Engine 2.7.2

Assets Version 2.3.2

PHP Version 5.3

Thanks!


texts:
I have a small real estate site and would like to be able to send clients a results shortcut containing specific entries.  Is it possible to  search for multiple entries by entry ID (eg. 54,230,34) with Low Search?

Thanks.


texts:
I am having trouble with categories, hopefully someone can help!

My site has 3 main locations (Eastern, Central, Western) and in each main location there are individual store locations. I am planning to separate each main location by categories. The locator also needs to have the "Search" functionality at all times.

Once you click on a main location you are taken to a page with a list of stores in that location.

Is there a way to hard code in the category (eg. category="7") anywhere that can limit the category on that template.

Below I've kind of made a hack, which is triggering the initial search for the main location, which is hiding the values of the search. This is working for me, but I feel like i should hard code in category="7" or something. What i've done feels wrong.

{exp:gmap:search
    channel="locations"
    latitude_field="location_lat"
    longitude_field="location_lng"
    geocode_field="location"
    distance_field="distance_max"
    cache_post="false"
    return="/map/western"}

            Distance
            <select name="distance_max">
                <option value="" &#123;if="" !distance_max="" ||="" distance_max="=" ""}selected="selected" &#123;="" if}="">Any</option>
            </select>

                <input type="checkbox" name="categories[]" value="6" checked="chcked" ="">

            <button type="submit">Western</button>

{/exp:gmap:search}

Let me know!

Thanks,
funkefied


texts: Require SSL connection for checkout and order tags problem

texts:
EE v2.4

Store v1.6.1

Toggling the "Require SSL connection for checkout and order tags" setting doesn't do anything. There are Checkout Tags, but those pages do not get redirected to HTTPS. I can manually enter the URL with the HTTPS protocol without issue.

Thanks in advance for your help.


texts:
how to get the sort number in relationship tag?
the sort number is store in "order" in exp_relationships.
I need it to sort my data. but have no idea how to retrieve it.


texts:
I have a long page with 5 anchor tags. The pull down menu is /boxoffice/season#1,  /boxoffice/season#2,  /boxoffice/season#3, etc.

However when I go to the menu and click on the link it works for about one second and then it pops back up to the top of the page.

I can see the URL change in the address bar from  /boxoffice/season#1 to just boxoffice/season. It auto removes the #1.

Is this an EE thing for some other conflict. Looking for some ideas.


texts: Is there a way for me to export a custom column order when choosing CSV? I have one form with 27 fields of information that would be much easier to follow with a unique order. I would prefer to do the reorder on the export side for my clients needs. Solutions that use a Macro in Excel aren't ideal for this particular situation.


texts: Rewrites for removing index.php stopped working

texts:
After moving from one server to another the .htaccess-rewrites for removing the index.php stopped working.
Old server: PHP 5.3.27 / Apache 2.4.3
New server: PHP 5.6.6 / Apache 2.4.12

There is an index.php in the root-directory and the following .htaccess-directives

RewriteEngine On
RewriteBase /
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php?/$1 [L]

There is a subfolder called /foo with an index.php and the following .htaccess-directives

RewriteEngine On

# -- Removes index.php
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /foo/index.php?/$1 [L]

Now on the new server, whatever I do and whatever I change the index.php in the root-folder is executed. Even if I directly call the URL /foo/index.php I end up with index.php being run.

Unfortunately the hoster is not being helpful at all. Any ideas?


texts: Why is my custom fieldtype in a matrix cell not receiving data?

texts:
I've created a custom fieldtype for "links" which have three input fields (URL, label and target). It works very well and I've now added the only required method to the class in Matrix which is display_cell() (according to the documentation).

My field displays fine, but when I save the entry and edit it again, no data is present in my field.

If I add save_cell() to my class and return some debug data, it is saved to the entry and displayed, but if I just return the data that it is supposed to receive in the method params, I get nothing.

I can, however, force the data to save by fetching it from the post array, as shown here:

function save_cell($data)
{
    return json_encode(ee()->input->post($this->settings['field_name']));
}

Obviously, I don't want to do this but $data is always empty! Any ideas why?

Thanks,
Mat

UPDATE: I've answered this below


texts: Exp:resso Store 2.x doesn't force/retain Last Name from single billing_name field for Authorize.net AIM

texts:
Not sure if this was addressed before but when I was using Store 1.6 with Authorize.net if a person failed to put a last name they would get an error.

After upgrading to Store 2.x it was necessary to split the billing_name form field into separate First and Last name fields.

I don't recall if this was because the last name was simply no longer required somehow (so no error with just one word submitted) or it if was somehow slipping through, but it just made more sense to use First/Last names separately now that they're split in the Order itself.

At the time this was a pretty big problem for us as we really needed the customers' last names. Several people were able to purchase with providing only a first name. I am not sure if this problem exists for other gateways and the transition from 1.6.x to 2.x.

edit for clarity:

In Store 1.6.x w/ Authorize.net:

One billing name field, last name is required with only require="billing_name", user gets an error if submitting checkout form without a second name ( {error:payment_method} would read The Last Name field is required. which to me suggests it's from the gateway.)

In Store 2.x w/ Authorize.net:

One billing name field, order goes through with only one name despite being same form with require="billing_name...". Last name is no longer required.

We didn't change anything on our merchant account. What went wrong? Was Store 1.6.x's error really from Authorize.net? If so, why doesn't it appear in Store 2.x? If not, why did it disappear in Store 2.x without any notice in the docs?


texts: Is there a way to configure Store so that it redirects the customer to the checkout page upon adding an item to a shopping cart?


texts: I have installed the forum and created a custom child forum that I could modify. I got it all setup when someone is logged in but if a user logs out everything in the  tags goes away. While logged in everything is fine, I couldn't find any if statements where the user needed to be logged on to show the CSS. Is it calling a different theme when the user logs out?


texts:
I need to export some CT order/customer data from a live site to a staging site (updated EE and add-ons), is there a reliable way to do this?

Live site running EE v2.9.3 and CT v2.70
Staging site running EE v2.11.3 and CT v2.71

Import/Export of EE data seems to be generally a bit of pain from what I have read elsewhere.


texts:
I'm using multi site manager to duplicate a site but when I create the site all the grid field types data are missing.

I used the option to duplicate channel and channel entries when creating the new site and other fields have copied correctly.

I'm using ExpressionEngine 2.9.2 and Multiple Site Manager 2.1.7.

Is there a issue with MSM and the grid field type?


texts:
I would like to show inline errors on my composer form in Freeform. I tried the template code mentioned at https://expressionengine.stackexchange.com/a/25346/961 which is:

    {composer:field_output}

    {!-- composer:field_name will parse first to the field's name --}
    {if freeform:error:{composer:field_name}}
        {freeform:error:{composer:field_name}}
    {/if}

but it's giving me the 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 ‘:’ (MISC); expected RD in on line 28.

If I remove the inline error code then it works ok but obviously doesn't show the inline errors.

The full composer template is as follows:

{composer:page}
    {composer:rows}

        {composer:columns}

                {if composer:field_total == 0}

                {/if}
            {composer:fields}
                {if composer:field_label}
                    {if composer:field_type == 'nonfield_captcha'}
                        {if freeform:captcha}

                            {composer:field_label}

                        {/if}
                    {if:else}

                            {composer:field_label}{if composer:field_required}*{/if}

                    {/if}
                {/if}
                {if composer:field_output}
                    {if composer:field_type == 'nonfield_title'}

{composer:field_output}

                    {if:elseif composer:field_type == 'nonfield_paragraph'}
                        {composer:field_output}
                    {if:elseif composer:field_type == 'nonfield_captcha'}
                        {if freeform:captcha}
                                {freeform:captcha}

                                <input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
                        {/if}
                    {if:else}

                        {composer:field_output}
                            {!-- composer:field_name will parse first to the field's name --}
                            {if freeform:error:{composer:field_name}}
                                {freeform:error:{composer:field_name}}
                            {/if}

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

        {/composer:columns}

    {/composer:rows}
{/composer:page}


texts: I have a client that needs an expression engine site updated in order to install an add-on. Does he have to buy it all over again? If not, His relationship with his previous developer isn't good so he doesn't have the login info for Ellis labs.  Would he be able to use a license number or something? I went to ask Ellis labs, but you have to pay for the privilege of speaking to someone there.


texts: What's the best practice for rendering a high number of entries with exp:channel:entries?

texts:
I'm running into memory issues with a page that lists lots (hundreds, eventually 1000+) of little news items that consist of a title, date, and sometimes brief description. These are each channel entries, and I've taken the following steps to reduce memory usage and speed up page rendering:

utilize the {exp:channel:entries} disable parameter (disable="categories|category_fields|member_data|pagination")
cache the entire page output with CE Cache ({exp:ce_cache:it id="page" seconds="3600"})
maintain a relatively high PHP memory limit (256MB)
avoid rendering any more complex fields (Playa, Matrix, etc.), which are this case part of the entries but not used on the page

I also attempted to temporarily boost PHP's memory using ini_set('memory_limit', '1024M') before the exp:channel:entries call in the template, then ini_set('memory_limit', '256M') after, but this doesn't work. (Never tried this in a template, so I'm not surprised anyway.)

Are there any common practices or alternate approaches that would be appropriate here?

Or, is this just a nonsensical goal that's forcing a no-win outcome?


texts: How do you set all channels to have revisions? Especially on a big MSM site, this takes a lifetime!


texts: This is a fairly straight forward question... Does preload_replace not work in stash:embed templates?  In my embed templates, I tend to set a bunch of preload replace variables for things like channel name and custom field prefix so that if i ever have to change something, one change in the first couple of lines runs through the template and replaces al such instances.  But when i try that in a stash:embed template, the preload replace items just render as plain text in the template.  Is there a way to get them to work, or is this simply an unavoidable parse order issue?


texts:
I am using the following query to check if an entry in the channel images table has any categories marked 'private'.

{exp:query sql="SELECT * FROM exp_channel_images WHERE entry_id = '{entry_id}'
 AND category = 'private' "}
 {if no_results} 0 images {/if}
{/exp:query}

The {if no_results} output does not work. Can anyone suggest another way I can do this?
Thanks


texts: expressionengine (expresso): How to implement existing webhooks

texts:
Hi I am really new to expressionengine and I'm currently using a module for store called expresso. Now I want to use their webhooks to update some functionalities before adding item to cart. Now, my problem is I don't know how to implement it.

I know I have to do this:

public function existing_webhook_name()
{
    //do php here..
}

but where should I place that function? Can I place it anywhere? I mean including in the templates? or there should be a file dedicated to webhooks in expressionengine.

Please help. Thanks!


texts: Move Expresso Store's promotions back to the channel entries

texts:
I've updated from Store 1.6 to 2.3. My client is very unhappy with how the "sale price" has moved from the rest of the store information. It is in it's own "promotions" tab now, which makes sense but unfortunately I have to change it.

Has anyone tried moving the "discount sales" back into the channel entries? I've been screwing around to try and pull in the data but I'm having no luck.

Thanks!


texts:
I can't understand how to made URL structure for page
For eg

http://site.com/template_group/temlate1/template2/template3

http://site.com/services/cleaning/reviews/best

In admin panel, at template group services
we have 4 templates

index
cleaning
reviews
best

Every template have url

http://site.com/services/index/

http://site.com/services/cleaning/

http://site.com/services/reviews/

http://site.com/services/best/

I need to display some templates like this

http://site.com/services/cleaning/reviews/

or

http://site.com/services/cleaning/reviews/best/


texts: Adding wrapper markup at intervals within loops (entries, matrix, playa, etc)

texts:
I've seen this question get asked a few times, sometimes in different contexts or within different questions pertaining to particular add-ons, but I'm looking for a general solution that can be applied broadly.

With the various frameworks - Zurb Foundation being one of my favorites - or even if you roll your own, there is often a "wrapper" class that plays a role in positioning and sizing of the container elements inside it - such as your columns.

If my three columns are each an entry and I have six entries to display, how do I group my entries into threes with the wrapper class around them with a single loop (entries, matrix or playa)?


texts: Remove .php extension from index.php. where .htaccess file is to be located?

texts:
I have code in .htaccess file

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f

RewriteRule ^([^.]+)$ $1.php [NC,L]

My directory like..

www/careers/index.php

And i have putten .htaccess file in www/careers directory

But it's not working..

i think it's not working only at localhost...

Please help me my thing is true or i have done some mistake in code...or directory??


texts:
Like, say if you require 10 entries in your Channel limit but there is only 4. Is there a way of filling in these 'spaces' with alternate text or html?

I've found a plugin called Filler which does exactly this but it doesn't work in my case as I'm filtering the results through a couple of custom field searches via another plugin.

Anyone had to address something like this? Or any suggestions of another way to get alternate content into a channel entries loop as described above? Would use an if conditional but that won't work so is basically a way of faking an entry or entries that's needed.


texts: Is there a plugin or setting in EE6 that can randomize filename of uploaded files?

texts:
I'm looking for a way to randomize filename of uploaded files. I've noticed in the documentation; specifically in the Legacy Reference -> File Upload Class there is a preference setting for encrypting filename.
A bit surprised there is no setting for this feature out of the box.


texts:
I'm using:

{field:my-field-name}

to display my file upload form in Channel Forms to allow the user to upload a file.

I want to be able to change the filename and append their user ID to it but can't figure out how...the EE documentation doesn't provide any clues either.

Any thoughts?

Thanks,
Dan


texts: Deleting order does not re-adjust inventory

texts:
I have my products set to 'Limit Stock' and have entered stock amounts. I have processed a few test orders and then deleted them. After doing so, I noticed that the stock counts do not re-adjust accordingly -- i.e. they do not return to their previous counts.

Does deleting an order not re-adjust the inventory accordingly? I really hope this is not the case.


texts: Using a conditional within {exp:stash:set_list}... how?

texts:
I am sure there is an easy fix for this: just I'm unable to find it...

I have this simple code structure that puts values from a Low_Reorder set into a stash list.  It works just fine.

{exp:stash:set_list name="process" parse_tags="yes"}
    {exp:low_reorder:entries set="training_courses" disable="categories|member_data|pagination" parse="inward"}
         {stash:title}{title}{/stash:title}
         {stash:resource_hero_image}{resource_hero_image:url}{/stash:resource_hero_image}
         {stash:url_title}{url_title}{/stash:url_title}
     {/exp:low_reorder:entries}
{/exp:stash:set_list}

However, when I now add a conditional within the Low_Reorder, I get no output at all.  Vis:

{exp:stash:set_list name="process" parse_tags="yes"}
    {exp:low_reorder:entries set="training_courses" disable="categories|member_data|pagination" parse="inward"}
    {if segment_2 != url_title}
         {stash:title}{title}{/stash:title}
         {stash:resource_hero_image}{resource_hero_image:url}{/stash:resource_hero_image}
         {stash:url_title}{url_title}{/stash:url_title}
     {/if}
     {/exp:low_reorder:entries}
{/exp:stash:set_list}

The only change is adding the conditional - and if you remove the {stash} structure this code works flawlessly.

So the issue is to do with the {if} statement - I'm guessing that it is not being processed within the {stash} terms.

So I tried adding parse_conditionals="yes" to the set_list tag, and then adding parse_depth="3" - (so the opening stash tag eventually became {exp:stash:set_list name="process" parse_tags="yes" parse_conditionals="yes" parse_depth="3"} but these changes didn't help at all.

Can anyone help me with whatever the correct thing to do here is?

Thanks in advance for whatever help you can provide.


texts: Getting reverse related entries via Playa

texts:
I have a channel called "products" which contains a Playa field called "chemistry-group". This field allows a relationship between a product and one or more chemistries. For instance, "Copper Iodide" is related to the "Copper" and "Iodine" chemistry groups. No problems there.

For the sake of administration, the playa field needs to exist in the product channel.

What I need to do is create a page for each chemistry that will look in the products channel and list any products where a relationship exists.

I could do this with reverse_related_entries but since each product can be in more than one group I'm unable to use the native relationship field (as this only allows a single relationship - or have I gone nuts here?).

I'm having trouble getting my head around setting this up, can anyone help?


texts:
If you have a Facebook-Page you know the «problem»: Users post their comments to the facebook-link instead of commenting on your own page. that itself is not the «problem» — the «problem» is, that this way only a fraction of your pages readers acctually see (and could interact with) the comment, while commenting on your own page let everyone be able to see the comment.

There a various pages out there which fetch the comments from «Likers» on Facebook to a Story/Link and include them into the comment-flow on their own page.

Is there a module or a technique (I don't know PHP), to include Comments from Facebook back into ExpressionEngines comments module? (not only «show» but actually include/import into the db)


texts: In the control panel, is there a way to make an entry field required if another entry field is selected?

texts:
EE v2.11.1
Entry Type v1.1.4

I'm using Entry Types to show/hide fields based on a selection. What I would like to do is show the fields and make some of them required if the admin user selects Yes on Entry Type pill button. Currently, if I set fields to required and the Entry Type pill button has not been set to "Yes", the entry will not publish, because the hidden fields are required.

Ideally, I would like to use the CP CSS & JS add-on to add required classes to certain fields based on the value of the Entry Type pill button. Is this even possible? If not, has anyone run into this before? If so, could you please share how solved it?


texts:
We've just launched our EE2 based website and are now experiencing an odd problem:
In the control-panel it is no longer possible to save any changes to the sites content entries (or create new ones). When pressing 'Submit' or 'Save Revision' the edit-form is displayed again (containing the changed content).

Everything else on the site and control-panel work as expected, including changing settings and templates.

I activated all possible debug mechanisms (EE-Log, Debug Preference:1 (I am Super Admin), apache-log, Output-Profiler & Template-Debugging), but nothing shows up.
The SQL-Trace doesn't even contain an update statement for the channel tables and I manually tested, that the application user is permitted to access/update those tables.
I've also tried changing the "Process form data in Secure Mode" and "Deny Duplicate Data" optional without noticeable effect.

Any ideas where to look for the problem or any other options to try?

Thank you!

Best Regards,

Jan


texts: Atom/RSS feed outputting all versions of entries

texts:
I'm currently working on an Atom feed (was previously RSS) that outputs 10 recent entries from the blog. That is working fine and looks great in most readers. However on both feedly and theoldreader.com both pull up any changes that have been made to the entries, resulting in "repeats". This doesn't happen in the XML itself, nor in browsers (FF and Chrome).

I've attached the feed code in hopes that someone can point me in the right direction with this one. Is it possible that the feed is cached on theoldreader?

Running EE v2.5.5 and upgrading is not an option at the moment.

{exp:debug_suppressor}
{preload_replace:master_channel_name="blog"}
{preload_replace:atom_feed_location="rss/index"}

{exp:rss:feed channel="blog"}
<?xml version="1.0" encoding="{encoding}"?>
  <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="{channel_language}">

    <title type="text">Company Blog</title>
    <subtitle type="text">subtitle</subtitle>
    <link rel="alternate" type="text/html" href="{channel_url}" />
    <link rel="self" type="application/atom+xml" href="{path='{atom_feed_location}'}" />
    <updated>{gmt_edit_date format='%Y-%m-%dT%H:%i:%sZ'}</updated>
    <logo>http://www..org/files/images/general/-logo.png</logo>
    <icon>http://www..org/css/images/img-footer-logo.png</icon>
    <rights>Copyright (c) {gmt_date format="%Y"} Company</rights>
    <generator uri="http://expressionengine.com/" version="{version}">ExpressionEngine</generator>
    <id>http://company.org/</id>

    {exp:channel:entries channel="blog" limit="10" dynamic_start="on" disable="member_data|pagination"}
    <entry>
      <title>{exp:xml_encode}{title}{/exp:xml_encode}</title>
      <link rel="alternate" type="text/html" href="{url_title_path=blog/entry}?utm_source=rss&amp;utm_medium=rss-feed" />
        <id>{site_url}blog/entry/{entry_id}</id>
        <published>{gmt_entry_date format="{DATE_ATOM}"}</published>
        <updated>{gmt_edit_date format="{DATE_ATOM}"}</updated>
        <author>
              <name>author</name>
              <email>blog@company.org</email>
        </author>
        {categories}
          <category term="{exp:xml_encode}{category_name}{/exp:xml_encode}"/>
        {/categories}

        <content type="html">
            <![CDATA[
            {if blog_image}

            {/if}
            {exp:xml_encode protect_entities="yes"}
            {blog_summary}
            {/exp:xml_encode}
            ]]>
        </content>

    </entry>
    {/exp:channel:entries}
  </feed>
{/exp:rss:feed}


texts: How do I include the Category URL Title in the Channel Entry link

texts:
I am pulling a series of entries from a Channel that has about a dozen categories. I need to be able to direct each entry's "read more" link to a template group that bears the same name as the category_url_title. I have reviewed the entries here and the ee documentation, but I can't figure out how to pull that information in using the channel entries tag.

Ideally I would like to do something like this:

{exp:channel:entries channel="features"}
  {summary} read more"
{/exp:channel:entries}

What is the correct way to "pull" the category from the entry and reference it there?

Thanks.


texts: can not retrieve values from cache in custom module

texts:
I am building a module and I set the cache in the form function, which will be retrieved in the insert_new_email function.

I can retrieve the cached data in the form function, but I can not in the insert_new_email function.

Below is the class I use for my mod.email_blast.php file

class email_blast {

    public $return_data;

    /**
     * Constructor
     */
    public function __construct()
    {
        $this->EE =& get_instance();
        $this->EE->load->library('session');
        if (!class_exists('MCAPI'))
        {
            require PATH_THIRD.'email_blast/libraries/MCAPI.php';
        }
    }

    // ----------------------------------------------------------------

    public function form() {
        $service = $this->EE->TMPL->fetch_param('service', false);
        $api_key = $this->EE->TMPL->fetch_param('api_key', false);
        $list_id = $this->EE->TMPL->fetch_param('list_id', false);

        if($api_key == FALSE || $list_id == FALSE) {
            return "You are missing parameter(s)";
        }

        $this->EE->session->set_cache('email_blast', 'api_key', $api_key);
        $this->EE->session->set_cache('email_blast', 'list_id', $list_id);
        $this->EE->session->set_cache('email_blast', 'service', $service);

        // Build an array to hold the form's hidden fields
        $hidden_fields = array(
            'ACT'       => ee()->functions->fetch_action_id('Email_blast', 'insert_new_email'),
            'RET'       => ee()->functions->fetch_current_uri(),
            'API_KEY'   => $this->EE->session->cache('email_blast', 'api_key')
        );

        // Build an array with the form data
        $form_data = array(
            "id" => $this->EE->TMPL->form_id,
            "class" => $this->EE->TMPL->form_class,
            "hidden_fields" => $hidden_fields,
        );

        // Fetch contents of the tag pair, ie, the form contents
        $tagdata = $this->EE->TMPL->tagdata;

        $form = $this->EE->functions->form_declaration($form_data) .
            $tagdata . "</form>";

        return $form;
    }

    function insert_new_email()
    {
        $email = ee()->input->get_post('email');
        $email = trim(strip_tags($email));
        $api_key = $this->EE->session->cache('email_blast', 'api_key');
        $api = new MCAPI($api_key);
        $merge_vars = array ("OPTINIP" => $_SERVER['REMOTE_ADDR']);
        $list_id = $this->EE->session->cache('email_blast', 'list_id');
        $result = $api->listSubscribe($list_id, $email, $merge_vars, 'html', 'false', 'true', 'false', 'true');

        $data = array(
            'title'     => 'Mailing list',
            'heading'   => 'Thank you',
            'content'   => $list_id,
            'link'      => array($_POST['RET'], 'Site name here'),
            'email'     => $email,
        );

        ee()->output->show_message($data);
    }
}


texts:
I posted this question a while ago under a different user - I can't comment on that one, so I'm reposting. Hope that's OK!

I'm having a problem with exp-resso whereby my client is receiving payment for orders made on the site but the orders are not appearing in the 'Orders' section of the store - they are remaining as 'Incomplete'

The first port of call would be the payment gateway, as it appears not to be flagging payment. However, the problem is appearing with both PayPal Express AND the Barclaycard EPDQ gateways.

Any pointers?

EDIT
Apparently users are getting redirected to the order confirmation page as expected, but there is no order confirmation ail generated, and the order remains at 'incomplete'

Using EE 2.53 and Store 1.6.4


texts: What are the implications of Disabling XSS clean?

texts: We're having a few strange problems where by .doc and .pdf files are failing to upload via freeform forms, yet this seems an intermittent issue with tests using the same file. I've noticed this issue can be resolved by disabling XSS clean in the file upload field preferences but would like to know what are the implications of Disabling XSS clean? And if this would create a vulnerability and open our site up to an attack?


texts: Unable to change sites in cp - logs out admin

texts:
EE 2.8.1 with MSM (4 sites)

We've duplicated our production site to a development local environment. Same server configuration, with the exception of some path info. Production server and site is running fine, but we're redesigning the site, and don't want to work on production.

So, on our DEV side:

Each of the sites (subdomains) work and I can view each of the subdomains from a 'visitor' view which tells me all looks good from the outside world, and I can log in to the default_site.

However, when I attempt to change to one of the other sites in CP, it logs me out and redirects to the admin login form.

At this point, I am unable to login, as it throws no error in the logs, and simply redisplays the login screen.

Cleared browser cache/cookies, and I can login to the main site, but not access any other sites through CP.

I've read through several different listings and posts here, and on the EE dev forum. I've tried all the $config tricks and tickles, to no avail.

Checked all the paths to make sure they're correct in index.php/admin.php
In the exp_sites table, I've even checked all the serialized data to verify all is good there for each of the sites.

I'm fairly new to EE, and understand 2.8.1 and MSM are having some issues. If anyone has found other helpful things to look at, or poke, I would appreciate the responses!

UPDATE:

EE 2.8.1 with MSM Sites 2.1.5

Despite all attempts to track down the issue, I am still unable to change sites within CP. When the redirect occurs, it sends back to login screen, and without clearing my browser cache/cookies, it will not allow admin to login.

I can login to the main site (after flushing browser cookies) and can do everything in the main site.

Perhaps it is an issue with 2.1.5 MSM and 2.81 EE?

/system/expressionengine/config/config.php:

$config['app_version']                  = '281';
$config['license_number']               = "xxx-xxxx-xxxx-xxxx";
$config['multiple_sites_enabled']       = "y";
$config['index_page']                   = "";
$config['debug']                        = '1';
$config['cp_url']                       = http://url.tomycontrolpanel.net/admin.php';
$config['is_system_on']                 = "y";
$config['disable_csrf_protection']      = "y";
$config['cookie_domain']                = ".mydevdomain.com";
$config['cookie_httponly']              = "";
$config['cookie_path']                  = "";
$config['cookie_prefix']                = "";
$config['admin_session_type']           = "s";
$config['user_session_type']            = "c";
$config['require_ip_for_login']         = "n";
$config['secure_forms']                 = "n";
$config['cp_session_ttl']               = 14400;
$config['user_session_ttl']             = 3600;

With this config I am able to login to my default site CP, but I get logged out when changing to any site within my list of sites.

Update->Updated:
With MSM, be sure you have correctly set $assign_to_config variables in your index.php file for main site:

 $assign_to_config['site_name']  = 'site_short_name';
 $assign_to_config['cp_url'] = 'webURL_to_control_panel';
 $assign_to_config['site_url'] = 'webURL_To_website';


texts:
I’ve a redactee’s channel field named “messaggio” and this is my code inside the safecracker form

<label>Scrivi la tua richiesta*</label>
{field:messaggio}

But the result is only a simple textarea and not Redactee
How can i resolve it?
Thanks


texts: Pagination won’t work on dynamic URLS that have 2 segments

texts:
I’m building a site that has the following URI structures:

domain.com/case-studies - this page loads ALL case studies and pagination works fine as there is only one segment.

domain.com/case-studies/residential - this uses seg2cat on category_2 to load the case studies for residential. If there are more than 6, I click the next page and get the URI domain.com/case-studies/residential/P6

This TOTALLY breaks the page and I get “Error, The page your requested was not found”

Here is the pagination code I’m using:

{exp:channel:entries channel="case_study" category="{segment_2_category_id}” orderby=”date” sort=”desc” paginate=”bottom” limit=”6” dynamic=”yes”}

{paginate}
 {if previous_page}
← Older
 {/if} {if next_page}
Newer →
 {/if}
  {/paginate}

I’m totally stuck, can anyone help at all?


texts: Expresso Store, set tax rate at beginning of shopping

texts: I am working on a project where the client would like the customer to select a region before adding to cart. The region has a tax_rate associated with it but is NOT dependant in IP or where the customer is located. Once of the selections is Dealer which offers a discount. How can I complete this. Please note, this is to be selected before anything else happens.


texts: Wygwam3.21 not initializing - ckeditor error: TypeError: u is undefined

texts:
I am finding wygwam 3.2.1 is not playing ball with EE 2.7.2 - by this i mean it's not even initializing, instead, (through console) I find I am getting a javascript error for ckeditor.js "TypeError: u is undefined"

It is a fresh install of both EE & Wygwam (and Matrix 2.5.8)

any guidance would be greatly appreciated.


texts: Expresso-Store Email Template - more than 1 BCC address?

texts: Can I add more than one bcc email address to the Expresso-Store Email Template? In case I can, should i use comma between the address'?


texts: Does Expresso Store's Australia Post Shipping Module handle International Postage

texts:
A client wishes to sell from Australia to the rest of the world.

Will the Australia Post Shipping Module handle this?

Or is there a better method..?


texts: include author as searchable field in simple search

texts: I'm trying to allow the author of an entry to be searchable using expression engine's simple search form. Is this possible?


texts: ExpressionEngine over SSL - HTACCESS ISSUE

texts:
I have a problem with my EE installation. When I try to browse any page (other than the homepage) over SSL i get a 404 error. The whole site works fine over HTTP. Its only when accessing via HTTPS this issue occurs.

My HTACCESS file looks like:

<IfModule mod_rewrite.c>
RewriteEngine On
# Removes index.php
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /index.php/$1 [L]
# If 404s, "No Input File" or every URL returns the same thing
# make it /index.php?/$1 above (add the question mark)
</IfModule>

I've tried adding the ? in as per the comment on the last couple of rows, but to no avail.

I think the problem is my HTACCESS file, in particular the section that removes the index.php from the URL. If i add the index.php back into the URL then all my pages do work again under SSL.

For example:

https://mysite.com/store/checkout **does not work**
https://mysite.com/index.php?/store/checkout **DOES work**

I'm not enough of an htaccess expert to know how to resolve this. Any advise much appreciated.


texts:
Trying to build a simple event filtering system with categories (Seg2Cat) and dates. This is my current approach (which does not work):

{exp:low_events:entries channel="events_submitted|events_internal" category="{last_segment_category_id}" date="{last_segment}" dynamic="no" parse="inward"}

I did manually place a date in the parameter which also did not work.

{exp:low_events:entries channel="events_submitted|events_internal" category="{last_segment_category_id}" date="2014-06" dynamic="no" parse="inward"}

Ideally, I'd like to be able to achieve these results with just the one tag:

http://URL.dev/events/category/arts/2014-06/ (Doesn't Work)
http://URL.dev/events/category/arts (Works)
http://URL.dev/events/2014-06/ (Works)

Is it possible for them to play together? Or should I rethink the approach? Perhaps use Low Search?


texts: CSV upload in Google Maps for ExpressionEngine - PHP error: Filename cannot be empty

texts:
I'm trying to upload a csv file in Google Maps for ExpressionEngine (Objective HTML) and get the output below. On my local installation it imports fine but on the live server I get this error. I can otherwise upload csv files within EE, e.g. within the Assets module. What could prevent the upload within the Google Maps module? I'm testing with a small file with 2 entries and a header row.

A PHP Error was encountered

Severity: Warning

Message: file_get_contents(): Filename cannot be empty

Filename: libraries/Gmap_import.php

Line Number: 634

A PHP Error was encountered

Severity: Warning

Message: file_put_contents(): Filename cannot be empty

Filename: libraries/Gmap_import.php

Line Number: 636

can not load csv file

I'm using Google Maps for EE 3.3.8 on EE 2.10.1


texts:
Is it possible to get an entry's grandparent? For example I have:

Entry A

Entry B

Entry C

Entry C is a child of Entry B, and Entry B is a child of Entry A. How can I get the {title} of Entry A in the midst of a channel entries loop for Entry C? I'm on EE 2.6.1 and Playa 4.4.2.

SOLUTION

Here's what worked:

{exp:channel:entries channel="pages"}
    {exp:playa:parents var_prefix="father" limit="1"}
        {father:exp:playa:parents var_prefix="grandpa" limit=1}
            {grandpa:title}
        {/father:exp:playa:parents}
    {/exp:playa:parents}
{/exp:channel:entries}


texts: Member management for EE 3 and Cartthrob 3

texts:
I am upgrading a EE 2 site with Carthrob to EE 3 with Cartthrob 3.  I had been using FreeMember to handle registration, logins, password resets and the like.
I see that FreeMember has yet to be ported to EE 3 by DevDemon.  I also see that they have acquired Zoo Visitor and updated it for EE 3.
In Cartthrob 3's documentation they say:

Add-ons for member management
In addition to using EE's built in member module, CartThrob is also compatible with Solspace User, Zoo Visitor, and our own product Profile:Edit. When Profile:Edit is installed CartThrob will can save customer data to your member channel entries automatically, in similar fashion to how it works with EE's member system.

Today, Cartthrob tech support responded to my question if DevDemon Visitor (and/or the new Zeal Smart Members) works with the current version of Carthrob by saying this:

If Zeal and DevDemon Visitor use the standard ExpressionEngine member extension hooks, as Profile:Edit does, they should work properly with CartThrob. However, we haven't evaluated them to see; if there's a way to trial Visitor I'd definitely suggest that.
Unfortunately Profile:Edit hasn't been updated for EE3 yet, and we don't have a timeline for doing it (and may not). So it's definitely worth looking at the other options!

I am wondering if anyone knows if DevDemon Visitor uses the standard member extension hooks?
Also, given that Cartthrob's documentation says that it is compatible with Zoo Visitor, am I right to guess that DevDemon Visitor is compatable with Cartthrob 3?


texts:
Hoping someone can help as this has been driving me crazy for 2 days now...

For some reason I just can't get this to work in a template:

{stash:embed:layouts:product}

When I view the page it simply shows that code above. I'm using EE 2.9.2 and Stash 2.6.5.

I have the following structure;

EE templates from file:
/_templates/base/_pages.group/product.html (which contains the above embed)

Stash templates:
/_templates/base/_stash/layouts/product.html

In my site's index.php I have the following;

// Stash
$assign_to_config['stash_file_basepath'] = $_SERVER['DOCUMENT_ROOT'].'/../_templates/base/_stash/';
$assign_to_config['stash_file_sync'] = ('ENV' == 'prod') ? FALSE : TRUE; // set to FALSE for production
$assign_to_config['stash_file_extensions'] = array('html', 'md', 'css', 'js', 'rss', 'xml');
$assign_to_config['stash_static_basepath'] = $_SERVER['DOCUMENT_ROOT'].'/../public_base/static/';

I can't figure out what is going on. The stash tags just doesn't seem to parse/process and I have this setup exactly the same on another site. Stash looks to be working as it is setting the stash cookie.

I would be really grateful if anyone can help.


texts:
EE 2.9.0

I'm attempting to set up a template route for a new section of the site I'm working on. However when I do I get the error: Template Route Already in use

I've set up a route for the blog/single template which works /blog/{blog-post:alpha_dash}

However when I try to set one of up for about/single /about/news/{news-post:alpha_dash} The CP highlights both the blog and about/single template and says Route Already in use. Also won't let me set segment required on the about route.

When I refresh the page the blog route is there, but the about route is gone. See attached screenshot.


texts: Google Maps for ExpressionEngine: Marker/Infobox click area

texts:
I have a map that shows around 70 markers using the Google Maps for ExpressionEngine add-on.

I originally set it up using clustering but this stopped working at some point so I reverted back to showing individual markers.

I have it setup to show just one marker if multiple entries exist with the same postcode, but the problem comes when there are two markers very close to each other.

In this situation, it's impossible to click on the second marker without zooming in really close. This appears to be caused by the click area around the marker being larger than the marker image itself and therefore covering the marker behind.

Does anyone have a good solution to either 1) Allow more accurate selection of markers or 2) Get clustering working correctly?

Thanks in advance,

Tom


texts: Solspace Calendar ICS not working on Android

texts:
For some reason I'm running into an issue with adding ICS calendar's to android devices. Three different phones were used and in every case the file can't be added. Two of them say it's not sure what file it is and asks what to do, the other says download failed. It is working on iOS devices and computers.

This is a link to one of the generated ICS.

This is what I'm using to generate the individual event ICS files:

{exp:calendar:icalendar event_id="{segment_3}" dynamic="off"}{/exp:calendar:icalendar}

Am I missing something obvious?


texts: Displaying Channel Form based on member group, number of entries/channel within a date range

texts:
I am trying to run a conditional which displays a "can't post" message if the member of a group_id 1 had previously posted 2 entries in a channel. Otherwise, it displays a channel form to post an entry.

If the member belongs to group_id 2, he/she can't post more than 5 entries. Less than 5 entries, displays the channel form.

{if logged_in}
{exp:member:custom_profile_data member_id="{logged_in_member_id}"}

{exp:channel:entries
    channel="news"
    author_id="CURRENT_USER"
    dynamic="no"
    start_on="-1 months"
    stop_before="now"
    disable="pagination"
    status="not closed"
    parse="inward"
}
{if logged_in_group_id == 1}
    {if absolute_count < 2 }
{if:else}
    {if absolute_count < 5 }
{/if}
        Display the channel form
    {if:else}
        Throw an error message!
    {/if}

{/exp:channel:entries}
{/exp:member:custom_profile_data}
{/if}

Any pointers?


texts: If statement based on length of Channel Field

texts:
Is it possible to create an {if} statement based on the character length of a channel field? Something along the lines of this:

Lets say I have the channel field - {title} and I want to add a class to the parent
 if the character length of the title is larger than 10. Something along these lines...

{if "{title_length}" >= "10"}

{title}

{if:else}

{title}

{/if}

How would I go about doing this with EE?

I hope this is clear. Thanks in advance.

Ryan


texts: getting the Matrix rows of a Playa entry

texts:
I have the following Stash variable list to get the related author of an article

{exp:stash:set_list name="my_list" parse_tags="yes" parse_depth="2"}
    {exp:playa:children var_prefix="children" entry_id="{entry_id}"}

        {stash:author_name}{children:title}{/stash:author_name}
        {stash:author_bio}{children:profile_bio}{/stash:author_bio}
        {stash:item_entry_id}{children:entry_id}{/stash:item_entry_id}

    {exp:stash:set_list:nested name="related_entries" context="{children:entry_id}" parse_tags="yes"}
        {!-- Matrix tag pair --}
        {profile_social_media}
            {stash:related_title}{url}{/stash:related_title}
        {/profile_social_media}
    {/exp:stash:set_list:nested}

    {/exp:playa:children}
{/exp:stash:set_list}

but struggling to then get the social media profiles contained within a Matrix field for that related author.

Then in the wrapper we have

 {exp:stash:get_list name="my_list"}

{author_name} (item {count} of {absolute_results})

    {author_bio}

    {exp:stash:get_list:nested name="related_entries" context="{item_entry_id}" prefix="nested"}

                {related_title} (Related item {nested:count} of {nested:absolute_results})

        {/exp:stash:get_list:nested}

{/exp:stash:get_list}

Author name and bio are fine, just not the Matrix rows.


texts: Unable to retrieve entries created with Channel Form

texts:
I'm allowing users to create entries from the front end using Channel Form.

I can see those entries in the Control Panel. However they are not appearing when I try and retrieve the entries using the standard {exp:channel:entries} tag.

Anyone experienced that before? Any ideas why its happening?


texts: Adding class to a field within a channel form

texts:
{label:skills}:

    {field:skills}

I am trying to add a class to the field skills. Cant find any documentation on adding a class to this field. Im sure its a simple fix, anyone got the solution?

Thanks


texts: Search's no_result_page works only sometimes

texts:
I have this Simple Search Form in my site that looks like this (simplified for the problem's purpose):

{exp:search:simple_form channel="news" name="recherche" no_result_page="s/e" result_page="s" results="32" search_in="everywhere" status="open" where="any"}
    <input type="search" id="search" name="keywords" placeholder="Search" autocomplete="on" maxlength="35" value="{exp:search:keywords}">
    <input type="submit">
{/exp:search:simple_form}

When I search for something that I know doesn't exist, such as "askjdakjsbfkub", I get redirected to the "s/e" template correctly, displaying an appropriate "no results" message.

However, when I enter a different term that I know still doesn't exist, such as "test", I get redirected to the ugly, god-forsaken default message (pardon my french, literally):

Can somebody explain that weird behavior? Better yet, anyone has a solution for this one?


texts: Using Transcribe for EE, can I fall back to the default language where no translation exists?

texts: Im using Transcribe 1.6.1 on EE 2.9 – is it possible to fall back to the default language where no translation is provided?


texts:
I have a simple plugin that runs a query and returns a single value.

{exp:company_id id='{segment_3}'}

This outputs a number such as 5081

If I do this:

{preload_replace:cid="{exp:company_id id='{segment_3}'}"}

{cid}

It works as well.

If I drop either {cid} or {exp:company_id id='{segment_3}'} into a query

    {exp:query sql="select field_id_10 as facebook, field_id_11 as twitter, field_id_13 as linkedin, field_id_15 as youtube from exp_channel_data where field_id_4 = '{exp:company_id id='{segment_3}'}'" parse="inward"}

Either using parse inward or not ... or using the preload or plugin the value in debugging shows : M00o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr

I am a bit stumped at this point.  Any pointers would be much appreciated.

Updated:

Taking Advice Below I got this to work both ways:
    {exp:company_id id="123456"}{/exp:company_id} and
    {exp:company_id}{segment_3}{/exp:company_id}

var $return_data;

function company_id()
{
    $this->EE =& get_instance();
    $tagdata = $this->EE->TMPL->tagdata;
    $id = ($this->EE->TMPL->fetch_param('id')) ? $this->EE->TMPL->fetch_param('id') : $this->EE->TMPL->tagdata ;

    $id = $this->_get_id($id);
    $this->return_data = $id;
}

function _get_id($id)
{
    // Query
    $this->results = $this->EE->db->query('SELECT company_id FROM '.$this->EE->db->dbprefix('jobs').' WHERE job_id = '.$id.' LIMIT 1');

    if($this->results->num_rows() == 0) :
        if($this->errors == 'false') :
            return null;
        else :
            return null;
        endif;
    else :
        return $this->results->row('company_id');
    endif;
}


texts:
Is it possible to assign a single user to multiple member groups / is there a module that does this?

I currently have several member groups, but they're not mutually exclusive. A La, "some dogs are black, but not all black things are dogs"

Currently I would have to setup something like the following:

Group A only
Group B only
Group C only
Group A + B
Group A + C
Group B + C
Group A + B + C

Is there a more efficient route forward?

Thanks in advance,

J


texts:
I have a client in a situation where they need to provide physical CSV files on-disk for various and sundry reasons. The CSV would need to be populated with data fetched from the DB.

Now, I can totally prepare a custom template that would result in a CSV-formatted response via HTTP, but how do I save that response to disk? (EDIT: Is there perhaps some way to use a caching method of some sort to write the output to disk?)

In case it helps clarify things, the situation is a client who uses a fulfillment center for hosting and managing their non-EE shop. They now want to move to Expresso Store for the shop, but still use the fulfillment center to manage things. The fulfillment center wants to continue working with their own system of order management, but they can set up their system to fetch via FTP nightly updates in the form of CSV files to update their system with the latest orders from the Expresso Store.


texts: "File" fieldtype missing when trying to add a new channel field

texts: My "File" fieldtype is missing when trying to add a new channel field after installing file module and safecracker. - I have tried uninstalling the both modules, but the field type has not come back. I have tried clearing all my caches but nothing is making it return. All previous file field types have disappeared too. ?


texts: Get child_ids for parent and top pages in Structure

texts:
I need to check the child IDs for a parent or top page in a conditional. However, Structure natively only provides {structure:child_ids} and {structure:child_ids_for:XX} globals. How can I rig up {structure:child_ids_for:top} and/or {structure:child_ids_for:parent} functionality?

(Question first posed this question on Twitter.)


texts: Display Wordpress blog entries inside Expression Engine template?

texts:
I have a prospective client whose current site is a combination of HTML pages and a Wordpress news blog. The blog has hundreds of entries and the client wants to leave that in WP rather then attempt to import to EE. Importing would mean a massive amount of tedious manual transfering of data.

So the question is - is it possible to run an EE site that incorporates a WP blog? Can WP run in a subdomain then somehow display WP posts inside an EE template?

I know this is not ideal but this is what they want.


texts: Seeking clarity regarding Control Panel auto-logouts

texts:
The internal rules regarding how long users can stay logged into the CP have undergone numerous changes in the last few version of EE (mainly 2.7.x onward I think). Various config overrides were introduced and then removed again, and the Docs make reference to some changes that are not listed in the change log. So I'm getting a bit lost in what is current and what is not. Specifically:

We used to have cp_session_ttl and user_session_ttl available. Now the documentation mentions that they have been replaced in v2.8, apparently with expire_session_on_browser_close (see: documentation). But the change log for 2.8 makes no mention of expire_session_on_browser_close, in fact as far as I can see it doesn't appear anywhere on the change log page. And this expire_session_on_browser_close config setting does not seem to do quite the same job as the two variables in any case.

And there is also the matter that apparently there was a setting hardcoded into the system to log people out after being idle for a certain amount of time, which was unaffected by either of the two (now deprecated?) config variables.

So my question is: as of the current version (2.9.2) what is the method to control how long a user can stay logged into the CP before being booted out? Is it even possible?

(I'm particularly interested because I keep most of my config variables in a separate file (as per Focus Labs masterConfig system) so the system upgrades of EE don't necessarily remove/rewrite deprecated variables as they might otherwise do if all my config settings were inside the system folder).


texts: Cartthrob order subtotal:plus_tax includes tax on products that aren't taxable

texts:
I have a cart set up to add 20% VAT to products. We then have a field that enables the user to set a product as non-taxable.

When you order one of these products, everything goes through as expected with the order confirmation showing the line item without tax, and the order tax and grand total in the summary are all incorrect. However the subtotal is not - it adds tax when it shouldn't.

Example:

Product price = £15.42, not taxable.

Subtotal = £18.50
Shipping = £0.00
(Incl. tax)= £0.00
Total = £15.42

This is with the following code:

{exp:cartthrob:submitted_order_info}
    Subtotal: {order_subtotal:plus_tax}

    Shipping: {order_shipping:plus_tax}

    (Incl. tax): {order_tax}

    Total: {order_total}
{/exp:cartthrob:submitted_order_info}

I've tried removing :plus_tax but then the output is incorrect for any products that DO have tax on them.

This only seems to affect the subtotal and order_shipping in the submitted_order_info tag, both of which fine all the way through the basket.

EE is 2.7.2, CT Pro 2.4


texts:
Using Solspace Calendar, Is there any way to correctly display multiple calendars on one page? I am using the cal tag and the direct copy of solspace code gives me a single calendar on the page. When I use the following tag below I get very bizarre errors.

The current month is shown, and the following 6 months, with month names in place. The day numbers from next month onward are not listed, but are all dots, even though the right number of days are shown. The next month's days don't start on the correct day either.

Its like the tags are counting the correct months and number of days, just not rendering them in the correct grid and without the numbers in anything but this month.

Surely you can show more than one month on a page? Is this a bug? If not, does this mean I have to make 6 calls to this very expensive tag to get the 6 cals to show on a page? Is there an alternative?

   {exp:calendar:cal calendar_id="3" date_range_start="today" show_months="6"}
       {display_each_month}

{date format="%F %Y"}

                {display_each_day_of_week}
                {day_of_week_one}
                {/display_each_day_of_week}

             {display_each_week}

                {display_each_day}
                 0}has_events{/if}">

                   {if day_in_current_month}
                     {if day_event_total}{/if}
                       {day}
                     {if day_event_total}{/if}
                   {if:else}
                        &middot;
                   {/if}

                {/display_each_day}

             {/display_each_week}

       {/display_each_month}
   {/exp:calendar:cal}


texts: Outputting a relationship field inside a grid field

texts:
So I have a grid field with two columns, one of which is a Wygwam field, the other a relationship field. I want to list all the rows in the grid, outputting the Wygwam field as the text, and surrounding it in a link to the relationship field only if a related entry has been selected. Not all rows will have related entries selected. Something like this:

    {my-grid-field}

            {my-grid-field:my-relationship-field}
                {if '{my-grid-field:my-relationship-field:total_results}' > '0'}
                    {my-grid-field:my-wygwam-field}
                {if:else}
                    {my-grid-field:my-wygwam-field}
                {/if}
            {/my-grid-field:my-relationship-field}

    {/my-grid-field}

That code outputs a numbered list but only displays items where the conditional is true. The other items are blank. So if the first and fifth items have related entries, the list looks like this:

1 [Wygwam field with correct link around it]
2
3
4
5 [Wygwam field with correct link around it]


texts:
I am building a website in EE which has menu and menu items . For example, I create a menu called Events which has items called Local Events, International Events etc.  The Events, local events, international events are pages which I create using pages module.
       What I have done is, I created a "Pages" channel. I also created a relationship field from where one can selected the parent page. But the problem is when I when select the drop down it also shows parent+child pages, that is the international, local events pages also in the relation drop down.  I just want the main pages to be shown in the relation drop down.
       Can some suggest a solution, how it can be done. Or should I have to create 2 channel, Main pages channel and sub-pages channel ??


texts: Combining categories within channel tag category parameter

texts:
This is my code:

{embed="jobs-opportunities/.main_job_list" cats="14&85|14&240"}

You'll see I'm trying to list entries that are either from 1 set of categories or another. I feel the above should work but it doesn't. It doesn't work when I put it into the channel entries tag either, rather than an embed.

Does anyone know if this is possible?

Thanks,
Julie


texts: New installation of EE: Can I import entries from another installation and keep the entry_ids the same?

texts:
So I have an old, bloated installation of EE with way too many addons etc, etc. I'd like to get a clean installation up and running and import all the old entries into the new setup, keeping the entry_ids the same (for at least one channel anyway).

What steps would I need to take to import the old channel data and keep the entry_ids the same?


texts: Unable to remove index.php under VM environment

texts:
I'm having issues removing index.php from the URLs even though mod_rewrite is enabled. My htaccess code:

<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ /index.php/$1 [L]
    # If 404s, "No Input File" or every URL returns the same thing
    # Use instead of above: RewriteRule ^(.*)$ /index.php?/$1 [L]
</IfModule>


texts: CartThrob Issue with item_options:input:my_option and certain characters

texts:
Haven't been able to get a reply from the guys at CartThrob since November, so hopefully someone here can help out.

We have the following in our add to cart form:

{if cf_products_stampinglimit}

   Stamping:
   {item_options:input:stamping type="text" value=""}
   Character limit: {cf_products_stampinglimit}. If you're ordering more than one charm, separate each stamp with a comma.

{/if}

While it works well 99% of the time, I’ve recently discovered that if a customer types something like “a + b” in the field, then the email shows up blank or with this error message:

Parse error: syntax error, unexpected T_STRING in /my/path/to/system/expressionengine/libraries/Functions.php(680) : eval()'d code on line 94

The field is filled out just fine in the order entry though (i.e., it gets saved just fine). Here’s the code snippet for that piece in the email template:

{if "{item:stamping}"}Stamping: {item:stamping}
{/if}

I’ve tested this extensively and the email appears normally unless it has something like “x + x”. Any idea on how to fix this?

Running EE 2.5.2 and CartThrob 2.1.5.

Update: We've since upgraded to EE 2.5.5 and CT 2.2.9 and now, instead of getting a blank email, this error is sent instead:

Parse error: syntax error, unexpected '" != "' (T_CONSTANT_ENCAPSED_STRING) in /path/to/system/expressionengine/libraries/Functions.php(683) : eval()'d code on line 81

Additionally, this is the case for various characters: + & ;


texts: Expresso Store: Can a promo code discount be applied BEFORE taxes are applied?

texts: can a promo code percentage  discount be applied BEFORE taxes are applied in Expresso Store?


texts: How to use FreeForm Pro or EE Extension Hooks

texts:
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:

Contact Us

    To send us a message, please fill out the form below.
    We’ll get back to you shortly!

{exp:freeform:form
    form_name="contact"
    return="contact_us/thank_you"
}

    {freeform:all_form_fields}

{freeform:field_label}

{freeform:field_output}

    {/freeform:all_form_fields}

    {if freeform:captcha}

Please enter the word you see in the image below:

{freeform:captcha}

        <input type="text" name="captcha" style="width:140px;" />

    {/if}

{freeform:submit}

    {if freeform:no_results}

            Specified form was not found. Please make sure you have
            specified the correct short name of the form in the
            form_name parameter.

    {/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.


texts: Use array values in expressionengine template

texts:
SUMMARY: I need to access an element in an array that is passed to a template from a module and test for it's existence.

I have a function in a module that looks like this:

function subscriptions(){
  $subscriptions = array('sub1'=>array(...unimportant data...),
                         'sub4'=>array(...unimportant data...)
                        );
  $data['subscriptions'] = $subscriptions;
  $output = $this->EE->TMPL->parse_variables_row($this->EE->TMPL->tagdata, $data);
  return $output;
}

and a template that looks like

{exp:my_module:subscriptions}
  {if subscriptions:sub4}User is subscribed to sub4{/if}
{/exp:my_module:subscriptions}

but that doesn't seem to work. I want to display certain things based upon what subscriptions a user has. This is not just to iterate through and print out subscriptions.

I also tried

<?php if($subscriptions['sub4']){ echo 'User is subcribed to sub4' } ?>

and it says subscriptions isn't set.


texts: With EE 2.7 can you use a channel form on the front end to create new categories?  Can't quite figure this out.


texts:
how can I conditionally output rows of an matrix, if there are any? Eg:

{if matrixfield}

Also check

    {matrixfield}
        {title}

    {/matrixfield}
{/if}

Thanks!


texts: Pull through entries that are not in playa

texts:
Is it possible with the playa field to pull through entries that aren't selected.

The idea is, I want to be able to pull through the entries that are selected and give them a tick icon, and then also pull through the entries that have been left out and give them a cross icon. So that I can easily display to the user what's included in a particular entry and what is not.


texts:
I am using Profile:Edit to register new members, then using Postmaster to trigger emails when they have registered and been approved.

I am currently having a problem with Postmaster when I use the "screen_name" field when registering in Profile:Edit. I receive this error.

Error

Mandrill Service - Error: The requested URL returned error: 500 Internal Server Error
history.go(-1);”]« Back

Even though I am getting this error, the member still registered to the site, but the Postmaster email is not triggered. But if I remove screen_name in the registration form the member is registered and an email is triggered.

I have right now username, screen name, and email all as the email address of the registered member, and would like to add some uniqueness to screen_name.

Has anyone come into an error like this using postmaster?


texts:
The last few years we have been working for most of the time on responsive designed websites, and every time we are using ExpressionEngine and Wygwam module, we get complains from our clients regarding the automatic adding the inline css of the width + height when they add an image.

I've looked at this:
Stopping WYGWAM from assigning dimensions to images

and this:
https://stackoverflow.com/questions/2051896/ckeditor-prevent-adding-image-dimensions-as-a-css-style

But have not had any success to implemented with the latest Wygwam and it is annoying to doing hacks and have to renew it every time we update the module.

In one of the articles I've read, it says that I can add some code to config.js (where ever that is on the latest Wygwam):

config.disallowedContent = 'img{width,height}';

and that would solve the problem.

Can this be added as a default feature on future Wygwam releases, or a feature when we install Wygwam?

Thanks


texts: Disallowed Key Characters in CP - only one user

texts:
I've got an EE 2.8.1 site where one user cannot access a specific channel.  He gets the message "Disallowed Key Characters".  It only happens for this single user.
Highlights:

Only happens for the one user
User is part of a member group and no one else in the member group has the issue
I've walked him through clearing all of his cache, cookies, history, everything.  switched from his ISPs DNS to Google helped flused his local DNS hoping to clear everything out, all with no success.
Tried multiple browsers and two machines.
We are using Zoo Flexible Admin, and it happens when he clicks a link we setup to directly create an entry for a specified channel (again though, others use that same menu with no issues)
I administer about 50 EE installs and I've always been able to fix this by clearing cache, cookines, or permission issue.  None of those seem to work this time.

any ideas?  thanks

UPDATES based on comments below:
 - while navigating the control panel, I only get this while on his machines.  I can log in as the user just fine

- offending url is : http://www.domainname.com/system/admin.php?/cp/content_publish/entry_form?channel_id=1

- htaccess:

#secure .htaccess file
<Files .htaccess>
  order allow,deny
  deny from all
</Files>

# EE 404 page for missing pages
ErrorDocument 404 /index.php/site/404

#Block Access to directories with no index file
Options -Indexes

# Simple 404 for missing files
<FilesMatch "(\.jpe?g|gif|png|bmp|css|js|flv)$">
  ErrorDocument 404 "File Not Found"
</FilesMatch>

# Although highly unlikely, your host may have +FollowSymLinks enabled at the root level, yet disallow its addition in .htaccess; in which case, adding +FollowSymLinks will break your setup (probably a 500 error), so just remove it, and your rules should work fine.
#Options +FollowSymlinks
RewriteEngine On
RewriteBase /

RewriteCond %{THE_REQUEST} ^GET
RewriteCond %{THE_REQUEST} ^[^/]*/index\.php [NC]
RewriteRule ^index\.php(.+) $1 [R=301,L]

# Add the www
RewriteCond %{HTTP_HOST} ^domainname\.com
RewriteRule ^(.*)$ http://www.domainname.com/$1 [R=permanent,L]

#Removes index.php from ExpressionEngine URLs
RewriteCond $1 !\.(gif|jpe?g|png)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]

#RewriteCond %{HTTP_HOST} ^(blog|news).domain.com$ [NC]
#RewriteRule ^$ %1/ [L]


texts:
I launched a site last week with two forms that are getting lots of spam. The strange thing is that they're not getting the usual viagra message but instead they're totally blank.

I've set the forms up in the same way as lots of other client's websites and don't have problems with any others.

I can't work out how these are getting through as I have jQuery validation on the form that doesn't let a user submit an empty field. I also have Snaptcha installed and set to medium to try to stop this, but still they're getting through.

The other strange thing is that I added some IP addresses to the EE blacklist module yesterday and still they come through.

The IP's I added were:

31.28.170.*
62.149.10.*
62.149.15.*

But have since received blank messages from IP's including:

62.149.10.11
62.149.15.142

Here's a link to one of the forms: https://workshoprecruitment.co.uk/jobs/resources

Any ideas how these blank submissions are getting through or suggestions on stopping it?

Any ideas welcome,

Thanks in advance,

Tom


texts:
Searching in 3rd party add-ons, there do not seem to be many that work with Expression Engine 3. In fact, there are almost none that list as compatible. Can I use add-ons listed as compatible with EE 2 in EE 3?

Should I not use EE 3 and instead use EE 2 if I need add-ons?


texts:
I get this error after upgrading to EE 2.10.1

  Fatal error: Call to undefined function EllisLab\ExpressionEngine\Library\Mime\finfo_open() in
  /home/foo/bar/EllisLab/ExpressionEngine/Library/Mime/MimeType.php on
  line 117

I can't upload files through the CP or synchronise in file manager.

I've tried adding fileinfo.so to extension in php.ini as suggsted here https://stackoverflow.com/questions/3579072/php-fileinfo-is-undefined-function but it didn't do anything, just got the same error message.


texts: Can File Manager sort or filter by file size?

texts: I'd like to review big files, either by sorting or filtering. Is there any way to do this in EE's File Manager? Using EE 5.3.2.


texts: Creating repeat orders in Cartthrob - Tips/Practices

texts:
Just wondering if anyone has any experience with creating repeat orders in Cartthrob and cares to share how they achieved this (or any obvious gotchas). I ask because there doesn't appear to be anything in Cartthrob's docs with points to this functionality, so I want to make sure it's actually achievable.

To clarify what I'm trying to achieve: I have products in a number of channels (about 4 channels) which the customer can add to their basket and purchase. If they choose to create an account (or are signed in) they can then view previous orders. What I would like the customer to be able to do is view a previous order and then be able to rebuild their basket from this previous order. From the basket they would be able to do the usual stuff like change the quantity and delete individual items.


texts: How does the ExpressionEngine software registration screen and banner work?

texts:
I've just updated an old EE 2.5.5 site to run EE 2.9.0.

The site runs successfully after the update however in the control panel I am now seeing the Software Registration banner.

I've followed the link to the software registration page which asks for the license holder email and the license number which I have entered and submitted but the banner will not go away.

Is the "license holder email" the EllisLab account email address? (that is the one I have entered)

Also, I am using NSM Config Bootstrap which may(?) have something to do with this but I am not sure.

In the system/expressionengine/config/config.php file, I do see the lines for $config['license_number'] and $config['license_contact'] having been added and updated with the correct values that I have entered.

Any ideas would be much appreciated.


texts: how to parse segment_3 in tag stash:embed:

texts:
This is my setup.
My URL my-site/index.php/group/template-x

Template-x must call two different pieces of code.
I want that to happen by using the third segment, which shall be NL or BE. So my-site/index.php/group/template-x/NL or my-site/index.php/group/template-x/BE.

The two pieces of code are stored as Stash Templates. The names are consumenten-NL.html and consumenten-BE.html. I can show the code by calling them hard coded,
like {stash:embed:registration:consumenten-NL} but I want to use segment_3 dynamically.

In template-x I can grab segment-3.

{exp:stash:set name="segment-3"}{segment_3}{/exp:stash:set}

and show it in the template

{exp:stash:get name="segment-3"}

Now calling the embeds in template-x:, I do not seem to be able to do this:

{stash:embed:registration:consumenten-{exp:stash:get name="segment-3"}}

gives

error
Stash: the file "../stash_templates/registration/consumenten-M40o93H7pQ09L8X1t49cHY01Z5j4TT91fGfr.html" was not found.

I tried several other methods, but the documentation is too high for me, so I ask for a little assistance here.
Much appreciated.

Thanks.


texts: disable "update cart" button and reenable when a user changes the quantity?

texts:
I know it's not really expresso-store related, but I hope that one of you girls can share some javascript magic to make this possible.

I want the "update cart" button to be disabled until a user changes the amount on the checkout page. to give the user a better clue of what she should be doing.

any help appreciated!
cheers
stefan


texts: Unable to pick a few elements after migrating

texts:
I have recently cloned my ExpressionEngine CMS (2.3) website to a new VPS with Plesk as its control panel.

For cloning, I copied all my files and imported the database from existing website into the new VPS.

When I preview the website or change my hosts file to view the website from my VPS, I see that a few elements are not getting picked (Screenshot attached).

So, I think it is just a matter of setting the correct relative/absolute paths in the preferences, but after trying many options, it doesn't seem to work. Does anyone know where to go from here? Thanks.


texts:
I've frequently done this with success:

{if '{exp:my_plugin:my_method}'}My method returned true{/if}

Or the opposite also works:

{if '{exp:my_plugin:my_method}' == '0'}My method returned false{/if}

However, doing this for methods with dynamic parameters that also return a string instead of a boolean seems to be impossible - eg (inside of a channel entries tag):

{if '{exp:my_plugin:my_method entry_id="{entry_id}"}' == 'blah'}My method returned the word blah{/if}

Interestingly, calling the plugin outside the conditional at least once in the same template makes the conditional work as expected:

test output: {exp:my_plugin:my_method entry_id="{entry_id}"}
{if '{exp:my_plugin:my_method entry_id="{entry_id}"}' == 'blah'}My method returned the word blah{/if}

... but this is obviously far too weird and fragile to be useful!

Wondering if I'm missing something obvious or making a mistake?


texts: In a EE plugin if I construct a sql statement based on passed in parameters and use a EE->db->query($sql) call does the query function prevent SQL Injections or do I need to change my code to use some other query function to bind parameters?


texts: Channel Forms Upload Image missing directory info

texts:
I have a channel form I am trying to get working. There is a file upload which looks like this.

  Upload a picture

    Choose a file:

    <input type="file" class="form-control" name="story_image">

  <input type="hidden" name="story_image_directory" value="13">
  <input type="hidden" id="story_image_hidden_file" name="story_image_hidden_file" value="">

Image size should be no larger than 800px square and no larger than 2mb.

Then when I check the entry I see the following.

{filedir_13}tumblr_n4z1wlApId1sljr6oo1_500.jpg

I can use the {field:story_image} and the upload will work correctly, but for some reason when I strip out all the extra markup it's broken. Any thoughts?


texts: Assigning member group at same time as activating Pending member

texts:
I have a site in which each member group has (of course) a different set of viewing and posting privileges. It is also set up to place new membership requests into Pending, until manually activated by the site admin -- at which time the applicant receives an email informing them that their account is active, and the member's account moves from Pending to the default group, Member_group_X. All this is, of course, completely normal EE out-of-the-box behaviour.

What I have not found, either natively or via an add-on, is a way to assign a new account to a different (non-default) member group at the time that it is manually activated by the admin. Not having this ability risks letting the newly-activated member log-in before the admin has had a chance to move them to the correct member group, thereby exposing information that should be hidden.

Does anyone have a way of combining the 'Activate Pending members' process with the 'moving a member to a different group' process?


texts: List all entries from particular channel when being already in that channel entry

texts:
Well, I have suspected that code below will list all entries from channel creators

{exp:channel:entries channel="creators" orderby="title" sort="asc"}

{title}

{/exp:channel:entries}

but when I'm in any entry from that channel it displays only that particular entry not all from that channel.

So what is my problem?

Thanks


texts: Product Report within a time frame in CartThrob

texts:
I am trying to generate a report in CartThrob that will display individual products sold.
In the CT order manager when you click on Product Report you get a list of products and how many you have sold of each.

Problem is when you add the date range and generate the report it generates an order report and not a product report.

I want to be able to generate a report that shows how many of Product A | Product B was sold within a time frame.  NOT a report of orders.

Also the product report only shows 23 products, there does not seem to be a way to display all products or filter them at all.


texts:
When I installed the calendar plugin, the first thing I noticed was that the channels did not auto install themselves. Can I add them manually?

Also now when adding content to any channel I receive the following once I hit 'publish', `A Database Error Occurred
Error Number: 1064

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 3

SELECT channel_id FROM exp_channels WHERE

Filename: third_party/calendar/data.calendar.php

Line Number: 578`

Any thoughts?


texts: Plugin help; Cannot redeclare fatal error

texts:
I'm writing my first plugin in attempt to learn more about the backend of EE and Codeigniter. My PHP is enough to get by, but I'm no expert.

This plugin is as follows:

<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

$plugin_info = array(
    'pi_name'       => 'YouTube ID from URL',
    'pi_version'        => '0.1',
    'pi_author'     => 'Dan Grebb',
    'pi_author_url'     => 'http://dgrebb.com/',
    'pi_description'    => 'Returns a YouTube ID from a variety of youtube share link types.'
);

class Youtube_id_from_url {

    public $return_data = "";

    public function __construct($urltag = NULL)
    {
        $this->EE =& get_instance();

        if (empty($urltag))
        {
            $urltag = $this->EE->TMPL->tagdata;
        }

        function sliceurl($url) {
            $pattern =
                '%^# Match any youtube URL
                (?:https?://)?  # Optional scheme. Either http or https
                (?:www\.)?      # Optional www subdomain
                (?:             # Group host alternatives
                  youtu\.be/    # Either youtu.be,
                | youtube\.com  # or youtube.com
                  (?:           # Group path alternatives
                    /embed/     # Either /embed/
                  | /v/         # or /v/
                  | /watch\?v=  # or /watch\?v=
                  )             # End path alternatives.
                )               # End host alternatives.
                ([\w-]{10,12})  # Allow 10-12 for 11 char youtube id.
                $%x'
                ;
            $result = preg_match($pattern, $url, $matches);
            if (false !== $result) {
                return $matches[1];
            }
            return false;
        }

        $youtubeid = sliceurl($urltag);

        $this->return_data = $youtubeid;
    }
}

/* End of file pi.plugin_name.php */
/* Location: ./system/expressionengine/third_party/plugin_name/pi.plugin_name.php */

Then I have this template code

{exp:stash:set name="video-gallery"}
    {exp:query sql="SELECT cat_id FROM exp_categories WHERE cat_url_title = '{segment_2}'"}
        {exp:channel:entries
            channel="videos"
            disable="category_fields|member_data|pagination|trackbacks"
            dynamic="no"
            category="{cat_id}"
        }

                {exp:youtube_id_from_url}{video-url}{/exp:youtube_id_from_url}

{title}

        {/exp:channel:entries}
    {/exp:query}
{/exp:stash:set}

The error message is as follows:

Fatal error: Cannot redeclare sliceurl() (previously declared in /local.dev/system/expressionengine/third_party/youtube_id_from_url/pi.youtube_id_from_url.php:24) in /local.dev/system/expressionengine/third_party/youtube_id_from_url/pi.youtube_id_from_url.php on line 24

I really appreciate any help I can get. Thanks to all for such a great community!


texts: Is there a way to see what the edit history is of channel entry? I'm happy to look into the database, if needed.


texts: MSM or 'old way' - Which to choose in this scenario?

texts:
I'm about to create a new site with a 2-3 year lifespan. The new site will run off an existing EE2 installation which already runs two MSM sites. After 2-3 years, the site will be taken offline and new site with a 2-3 year lifespan will replace it.

The data model of content for the new site will be sufficiently
similar to content on MSM site1 not to warrant new channels and
fields (I feel).
In addition some content from site1 will be displayed on the new site.
MSM license allows for up to 3 sites; additional sites are purchased separately

Given this and the 2-3yr lifespan, my thinking is to create the new site using the 'old way' and not using MSM. Then display the appropriate content via a tag, custom field, or category based filter.

Is this logical? Am I missing any "gotchas"?

My other thought was to create a sufficiently generic new MSM site which I could re-purpose every 2-3 years. Is this a better option?

Edit: The 'old way' is a means of running more than one domain from an EE installation without using MSM (the Multiple Site Manager add-on for EE). It involves creating and modifying an 'index.php' file at the web root of your new domain. Prior to EE2 and MSM this was documented on the official EE wiki, but it is no longer officially supported. For exact details see, for example, this post: "Old-Style" multiple sites on one installation


texts: How would you wrap EE authentication around a custom app?

texts:
A client has an EE2 site and wants us to setup a 3rd party app but keep it private to EE members only. How would you extend EE's member sessions to provide single sign on with a 3rd party PHP app?

The app is made up of multiple PHP files and has it's own interface. So, it won't be easy to extract into a custom plugin or module.

We thought about using an iFrame to load the app into an EE page that is for members-only, but it wouldn't be hard to get the iFrame's source URL and hit it directly, bypassing the security.

Now we're considering building a custom module that provides an EE authentication API via action ID. So, we'd create a simple is_logged_in() function that is used in the custom PHP app that sends the value of the EE session cookie to our API and the custom module would determine if it's a valid session or not. If it's not a valid session, the custom app would redirect to our EE login page.

Are there any other ideas we should consider?

Assume for this exercise that the app runs on the same server as the EE site.


texts: Where in the database do I find channel_short_name

texts:
I'm trying to write a custom SQL query like this:

{exp:query sql="
    SELECT channel_short_name
    FROM what_table_is_it_in
    WHERE entry_id = '{embed:entry_id}'"
}
{channel_short_name}
{/exp:query}

It's inside an embed template with an entry_id passed in as {embed:entry_id}. I just need it to output the channel short name for that channel of that entry.

What database table is this in? I can't find it!

I'm trying to replicate the example at the very bottom of this page: http://www.solspace.com/docs/rating/entries/ except I want to get channel_short_name instead of entry title.


texts: Any way to restrict image size on upload?

texts:
I have some fields where multiple images are uploaded. These images need to be created manually to ensure they're cropped correctly, and I want to ensure that each field only accepts an image cropped to exact dimensions. I don't want to crop the images programatically.

For example, field 1 accepts an image cropped exactly to 1000px by 300px, field 2 accepts 700px by 250px, and so on.

Wondering if there's any way to have this kind of validation in Expression Engine, either with a plugin or core functionality?


texts:
Trying to get switchee to work with a regex check against a URL segment.

For example following URL check if segment 2 is numeric:

/property/123

Using:

{exp:switchee variable = "{segment_2}"}
    {case value="#[0-9]+#"}
        IS A NUMBER
    {/case}
{/exp:switchee}

However this isn't working. Any thoughts/suggestions?

Cheers

Cole


texts: Listing subfolders in an Assets fieldtype

texts:
I have a Assets fieldtype within a Matrix fieldtype column.

Is it possible to list subfolders for the uploads dir?

ATM, I only get top level folders as per the attached screenshot.

Im my Images folder, I have News and Product subfolders...I'd like these listed if possible?


texts: Assets doesn't upload files larger than 2Mb

texts:
this problem only occurs in my local MAMP PRO 2 environment.

Assets acts like it's working (I see the progress bar till the end) but then no files!

NOTE THAT On my staging/production environment it's working!

my local settings :
Assets 1.2.2
EE 2.5.3
PHP 5.3.20

in the logs when I try to upload I get this error (in apache logs)

[Wed Mar 06 19:26:41 2013] [notice] child pid 1425 exit signal Segmentation fault (11)


texts:
I would like to get the last entry of a channel from each month.
is there any way to do it with channel entry module?

like:
2015, 01 : last entry is "hello 1";
2015, 02 : last entry is "hello 2";
2015, 03 : last entry is "hell 3";

it gives me a hard time :(


texts: For each template in its Settings, we have Enable Caching? and Refresh Interval. I want to enable caching, but since my content is pretty set, want it to serve cache forever. (At least until the "clear cache" events happen or I manually flush cache.) Does leaving the Refresh Interval to blank do this? Or should I use a really high number? Using EE 4.3.4.