EllisLab Community Forums 0 Copyright (c) 2013 ExpressionEngine tag:ellislab.com,2013:05:24 upcoming events tag:ellislab.com,2013:forums/viewthread/.235643 2013-05-24T14:39:03Z 0 Mr. R. Balboa Hi Guys,
I would like to display upcoming events say “events next week”. The date range would be current-time to current-time+7days. Lets says start_date is the date channel field that holds the date value.How would i represent that with a channel:entries tag

{exp:channel:entries channel="events" orderby="start_date" limit="5"}
{title}
{
/exp:channel:entries}

...how would I amend this to achieve showing the 5 next events in the coming week 

 

Thanks

 

 

]]>
Basic Navbar template for Expressionengine tag:ellislab.com,2013:forums/viewthread/.235642 2013-05-24T14:34:30Z 0 SimonLove2009 Hi

I’m not clear on how to implement site navigation. I’ve chunked the site up into templates including a navbar template. when I put <a > tags into the navbar template, how do I set it up to load the correct page content when the link is clicked?

What’s the most basic, simple method of doing this easily?

Cheers

Si

]]>
Conditional relationships tag:ellislab.com,2013:forums/viewthread/.235638 2013-05-24T11:25:57Z 2013-05-24T11:29:27Z sheferd I’m having trouble figuring this one out.
I have a div which holds some related entries, but I don’t want this div to display if there are no related entries.

I’m thinking this should be pretty simple and I’ve missed something, but the relationship field just isn’t accepting a conditional… bug?

Here is an example of what I’m trying to achive:

{if child_pages}
<div>
<
ul>
{child_pages}
<li><a href="{path=">{child_pages:_title}</a></li>
{/child_pages}
</ul>
</
div>
{/if} 

Basically I am unable to remove the div and ul if there are no “child_pages” resulting in an un-semantic empty div and ul

Any suggestions?

Cheers

[edit]
Ignore the anchor in my example for some reason it keeps being changed from what I actually have in there when I try to edit it.

]]>
{exp:channel:entries} progressive loading with AJAX tag:ellislab.com,2013:forums/viewthread/.235637 2013-05-24T10:47:32Z 0 maxi Hello, the number of entries on the website is increasing so I would like to introduce a “Load more…” kind of button to have the user load them in batches.

How does that work with the {exp:channel:entries} tag?

Thanks!

]]>
MySQL Data - Membership Spam tag:ellislab.com,2013:forums/viewthread/.235641 2013-05-24T13:45:56Z 0 Stevereno I am unable to update from v1 to v2.6.1 and I think it is caused by the over 102,021 membership files.

Get “Message: unserialize(): Error at offset 0 of 12 bytes” during the update, see my post here http://ellislab.com/forums/viewthread/235575/

I need to Export some data out - flatten the data and import back in the data I need to keep.

These data tables are from 1.6.8

exp_member_data
exp_member_homepage
exp_members

Each have 102,021

What other tables do I need to clear to remove all associations?

I don’t think I can update until I clean out the spam.

]]>
Form Validation - Array Count tag:ellislab.com,2013:forums/viewthread/.235633 2013-05-24T09:43:50Z 0 bloodsavi Hi, I’m fairly new to CodeIgniter and I’m having an issue with the form validation library. What I’m trying to accomplish is, There are 10 types of Electronic Gadgets and a user is allowed to select minimum of 1 and a maximum of 4. These are checkboxes. In native PHP I could simply do this by

$selected_items_count $_POST['gadget'];
if ( 
count$selected_items_count) >= && count$selected_items_count) <= {
....

But then again, I’m using CodeIgniter smile I want to use the form validation library to accomplish this. I tried creating a callback function but each element in the $_POST[“gadget”] is getting passed to it separately and not as the array itself. Can someone kindly help me out !

Thanks a lot in advance.

]]>
Member group permissions keep getting reset tag:ellislab.com,2013:forums/viewthread/.235606 2013-05-23T10:13:49Z 0 Linedup Hi

We have channel that we allow guests to post to via Safecracker - all works fine. However it would appear that every so often the permissions to post to the channel get reset to “NO” via the CMS, though we have not been anywhere near these options in the admin panel.

It looks like a wee bug in EE and I was wondering if anyone else had ever experienced this and if so - are there any fixes please?

Many thanks

Jonathan

]]>
Checking lock date tag:ellislab.com,2013:forums/viewthread/.235640 2013-05-24T13:15:10Z 0 xtremer360 For some reason the test to see if if the current_time variable is bigger or smaller than the time to login is not right for some reason. I’m not sure what I’m missing. The lock_date property of the $user_data object stands for the exact datetime that the user made its last failed login attempt. So its always continuing on with the code and by passing with the rest of the submit function.

I thought about switching the great than sign in the if statement when comparing the two times but with those two I didn’t think it would make sense.

$current_time now();
$current_gmt_human_format unix_to_human($current_timeTRUE'us');

/* Get user data from post username value */
$user_data $this->users_model->get_by('username'$post_username);

if (
count($user_data) > 0)
{
    
/* User was found in database */

    
if ($user_data->lock_date !== '0000-00-00 00:00:00')
    
{
        
/* User is locked out */

        /* How long the user must wait to login */
        
$wait_time 60 15;

        
/* Time user is able to login */
        
$time_to_login human_to_unix($user_data->lock_date) + $wait_time

        
//echo 'current time is...' . $current_time;
        //echo '<br>';
        //echo 'time to login is...' . $time_to_login;
        //die();

        
if ($current_time $time_to_login)
        
{
        }
    }

As per the request here is the data I have.

current readable format is...2013-05-23 08:03:44 PM
current time is
...1369353824
user lock out
...1369310405
wait time is
...900
time to login is
...1369311305 

 

]]>
[Updated] Plugin: Custom Member data, forum usage, and category name translation tag:ellislab.com,2007:forums/viewthread/.58197 2007-08-08T21:03:17Z 2013-05-23T18:29:19Z BlackHelix I’ve updated my Va_custom_member plugin to version 2.0, with major new functionality. 

      The Va_custom_member Plugin has three main functions.  First, it outputs the contents of one custom member data field—useful for including inside a weblog:entries tag, for instance. Or a forum template….
     
      Second, It also allows for dynamically selecting categories based on the contents of member custom data.   
     
      Third, it will translate a category name into a category id.  Useful for weblog entry tags.

To install:  expand the download and drop the file in your system/plugin folder.  It’s now available for use.  You can read the instructions in your admin page/ utilities page and then the plugin manager. 
Full instructions are in the plugin page once installed. 

Here’s a summary of what this plugin does:

1) First usage

This plugin allows the contents of a member’s custom data field to be output.  In a single tag, not a tag pair.  This can be anywhere, in any template.  That’s right, you can use this in a forum template, too.  Ever wish you could output each poster’s custom field on their post?  You can now.  I’ve included explicit instructions on how to do that as well. 

2)
This plugin allows you to dynamically select a category based on an equivalent custom member field.  In other words, each member’s custom data can control what category your weblog entries field runs. 

Consider the value of a category.  It’s useful, for sure… but how can you tie a category to each member dynamically?  With this function, you can, say, get a list of teams as a category.  For instance, lets say you have a weblog that has team news for every NFL team.  You can create a category, with each NFL team as a separate category.  You can ALSO create the exact same list for a drop-down in the member profile field, as a custom member data field.  Members can then select the team they are a fan of.  With this function, you can then in your weblog entries tag dynamically assign the category you want displayed based on what team the member chose in their custom member field. 
     
      Example: Your site has news about professional American football.  You’ve set up a category group with the names of each professional football team as it’s own category.  You also set up a custom member field that is a drop down list; each line of the list is the same name as the category you’ve chosen.  One member of your site is a fan of the football team Chicago Bears.  They have selected the Bears in their member custom profile data.  In your weblog, you have a category for each team name.  You have a story for the Bears.  With this function, when your member that’s a Bears fan visits this template with this weblog entries, this plugin will generate the category that corresponds to the Bears, based on the members custom data.  The category is only the Bears, and the weblog tag only shows the Bears category.  The next member is a New York Giants fan, and THEY have a category that corresponds to the New York Giants.
     
      This opens up lots of possibilities, clearly.
     
3)

Third usage: Category name to category ID translation (thanks, Lisa, for the suggestion!)

Your weblog entries tags have to have a category ID to govern category displays, right?  Which sucks if you are using category URL names, but on one page you want this to be different.  This plugin also will translate your category name into a category ID for the weblog entries tag.  It also means you can use any segment of your URL as the category name… or even if the category name feature is turned off, you can still use it sporadically with this plugin.  Can be useful sometimes. 

I hope this plugin is useful—I think it opens up a powerful set of possibilities for category and member data synchronization, plus forum customization.  It’s my first plugin, so I hope I’ve done things right… and let me know, please, of the no doubt numerous errors there are in here.  Thanks!

Edit: Added a EE 2 version.  Completely untested for the moment, it will no doubt be updated.
And it’s updated some

]]>
Gmail - CI 2.1.0 tag:ellislab.com,2013:forums/viewthread/.235318 2013-05-11T23:36:00Z 2013-05-12T07:01:31Z other-side Hey i did have a load here and go to post but it wont allow that much data i guess,

anyhow i am using xampp win 8 with no mail server


supposedly you can get someone to sign up to your site and get gmail to send from that account,

well i cant get it to work, i have been here from 9pm till now 4.30am trying to figure it out, i have found alot of answers from this site and others, and still failed, i have a test page wich just send a hello message and it works i get email from Gmail site account to the hotmail one, but when i try to sign up to my site i get error,

any help would be good, i dont want to double post so once i get a reply i will post the codes (if this site lets me this time.)

error message

The following SMTP error was encountered: 10061 No connection could be made because the target machine actively refused it.


New Error

The following SMTP error was encountered: 0 php_network_getaddresses: getaddrinfo failed: No such host is known.
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:
Unable to send data: AUTH LOGIN
Failed to send AUTH LOGIN command. Error:
Unable to send data: MAIL FROM:

as i said when doing it on same port and SMTP setting but with a .php file wich once clicked send out an email from gmail to my hotmail account, that works fine

]]>