Support

Home Forums Event Espresso Premium Event information not showing after More tag unless logged in

Event information not showing after More tag unless logged in

Posted: August 30, 2013 at 10:22 am

Viewing 27 reply threads


miranda rota

August 30, 2013 at 10:22 am

I would really, really appreciate help with this because I’ve reached an impasse with it. One of the Wishlist developers has looked at the site and says it is not their plugin that is causing the problem and he thinks almost certainly the solution lies in Event Espresso (although a slight chance he said it could be the theme).

We need casual site visitors to be able to read the full information for each event – we just don’t want them to be able to register for an event unless they are logged in member. But it just isn’t happening! ๐Ÿ™

I’ve got the More tag and the ‘Read More’ links working nicely on the forthcoming events …so far so good! BUT then when they click on the Read More they are told that they are not logged in. Please-o-please, what needs doing to stop this happening?? (Also, there is the same problem when they click on the event links in the sidebar widget – maybe the solution is the same for both problems?)

Your help is very much appreciated and thank you in advance

http://gator3027.hostgator.com/~yep1/forthcoming-events/


Josh

  • Support Staff

August 30, 2013 at 3:13 pm

Hi Miranda,

The registration form template was made to only display the event information to logged in users. Some folks prefer that the information to be displayed, some not.

That said, this can be modified according to you or your client’s specification. Inside the /templates/registration.php file there is a section of code that is there to check if the user is logged in or not. It looks like this:

//If enough spaces exist then show the form
//Check to see if the Members plugin is installed.
if ( function_exists('espresso_members_installed') && espresso_members_installed() == true && !is_user_logged_in() && ($member_only == 'Y' || $member_options['member_only_all'] == 'Y') ) {
    event_espresso_user_login();
} else {
    //Serve up the registration form

You can add in the event’s description by adding in one line of code:

//If enough spaces exist then show the form
//Check to see if the Members plugin is installed.
if ( function_exists('espresso_members_installed') && espresso_members_installed() == true && !is_user_logged_in() && ($member_only == 'Y' || $member_options['member_only_all'] == 'Y') ) {
  
  // Show the event description
  echo espresso_format_content($event_desc);
  // end event description

  event_espresso_user_login();
} else {
    //Serve up the registration form


miranda rota

August 30, 2013 at 3:22 pm

Josh, thank you! I’m not going to look tonight as it’s late here but am sooo glad to read your post. I’m hoping that this will also let them view the text when they click on an event in the sidebar widget?

Many thanks and have a great weekend ๐Ÿ™‚


Josh

  • Support Staff

August 30, 2013 at 4:33 pm

The links from the sidebar widget go to the same place, so yes it will work.

You have a great weekend too Miranda.


miranda rota

August 31, 2013 at 12:52 pm

Josh, I’ve implemented it and it’s nearly great …just a tweak or 2 still ๐Ÿ™‚

When I click on the Read More it brings up all the info but without any of the heading info which is: the heading, the price and the date. How can I get those to come in too – then it will be totally 5star perfect ๐Ÿ™‚

2. On this page: http://gator3027.hostgator.com/~yep1/forthcoming-events/?ee=5
at the bottom, it says the blurb about needing to be logged in to register for the event etc. …the login link goes to the wp default login page so where can I tell it to go to our ‘pretty’ login page? I’ve found code that relates to it on line 148 of member-functions.php in ee member, but don’t know what I should be putting there??

(This is the page again in case you want to check it: http://gator3027.hostgator.com/~yep1/forthcoming-events/ )

Many thanks for your time ๐Ÿ™‚


Dean

September 2, 2013 at 2:27 am

Hi,

Basically, if you use the regisatration_page_display code, you can add anything you want to what Josh has shown you, e.g. after the

echo espresso_format_content($event_desc);

add

?>
						
						
						
						
										<p class="start_date">
					<?php if ($end_date !== $start_date) { ?>
					<span class="span_event_date_label">
					<?php _e('Start Date: ', 'event_espresso'); ?>
					</span>
					<?php } else { ?>
					<span class="span_event_date_label">
					<?php _e('Date: ', 'event_espresso'); ?>
					</span>
					<?php } ?>
					<span class="span_event_date_value">
					<?php echo event_date_display($start_date, get_option('date_format')); ?>
					</span>
	<?php if ($end_date !== $start_date) : ?>
					<br/>
					<span class="span_event_date_label">
						<?php _e('End Date: ', 'event_espresso'); ?>
					</span> 
					<span class="span_event_date_value">
					<?php echo event_date_display($end_date, get_option('date_format')); ?>
					</span> 
	<?php endif; ?>
					<?php echo apply_filters('filter_hook_espresso_display_ical', $all_meta); ?>
				</p>
	<?php
				}

			// * * This section shows the registration form if it is an active event * *

				if ($display_reg_form == 'Y') {
	?>
				<p class="event_time">
	<?php
						//This block of code is used to display the times of an event in either a dropdown or text format.
						if (isset($time_selected) && $time_selected == true) {//If the customer is coming from a page where the time was preselected.
							echo event_espresso_display_selected_time($time_id); //Optional parameters start, end, default
						} else {
							//echo event_espresso_time_dropdown($event_id);
						}//End time selected
	?>
				</p>
	<?php

					// Added for seating chart addon
					$display_price_dropdown = TRUE;

					if (defined('ESPRESSO_SEATING_CHART')) {
						$seating_chart_id = seating_chart::check_event_has_seating_chart($event_id);
						if ($seating_chart_id !== FALSE) {
							$display_price_dropdown = FALSE;
						}
					}

					if ($display_price_dropdown == TRUE) {
						$price_label = '<span class="section-title">'.__('Choose an Option: ', 'event_espresso').'</span>';
						
						
						
						
					}
					?>
						
									<p class="event_time">
	<?php
						//This block of code is used to display the times of an event in either a dropdown or text format.
						if (isset($time_selected) && $time_selected == true) {//If the customer is coming from a page where the time was preselected.
							echo event_espresso_display_selected_time($time_id); //Optional parameters start, end, default
						} else {
							echo event_espresso_time_dropdown($event_id);
						}//End time selected
	?>
				</p>
	<?php

					// Added for seating chart addon
					$display_price_dropdown = TRUE;

					if (defined('ESPRESSO_SEATING_CHART')) {
						$seating_chart_id = seating_chart::check_event_has_seating_chart($event_id);
						if ($seating_chart_id !== FALSE) {
							$display_price_dropdown = FALSE;
						}
					}

					if ($display_price_dropdown == TRUE) {
						$price_label = '<span class="section-title">'.__('Choose an Option: ', 'event_espresso').'</span>';
	?>
						<p class="event_prices">
							<?php do_action( 'espresso_price_select', $event_id, array('show_label'=>TRUE, 'label'=>$price_label) );?>
						</p>
	<?php
					} else {
	?>
						<p class="event_prices">
							<?php do_action( 'espresso_seating_price_select_action', $event_id );?>
						</p>
	<?php
						// Seating chart selector
						do_action('espresso_seating_chart_select', $event_id);
							
					}						

Regarding the Pretty login/registration pages, it already goes there for me.


miranda rota

September 2, 2013 at 3:39 am

Dean, many thanks for that. It’s bought in everything except the title of the event. I had a look at the code regarding the title but can’t see where it says simply ‘to display the title’ sort of thing. What would I need to add for the title?

I take it you’re not based in america as they have a holiday today don’t they.

Many thanks for your help ๐Ÿ™‚


Dean

September 2, 2013 at 3:59 am

Ahhh sorry,

After the first ?> add this

	<h3 class="event_title ui-widget-header ui-corner-top" id="event_title-<?php echo $event_id; ?>">
		<?php echo $event_name ?> <?php echo $is_active['status'] == 'EXPIRED' ? ' - <span class="expired_event">Event Expired</span>' : ''; ?> <?php echo $is_active['status'] == 'PENDING' ? ' - <span class="expired_event">Event is Pending</span>' : ''; ?> <?php echo $is_active['status'] == 'DRAFT' ? ' - <span class="expired_event">Event is a Draft</span>' : ''; ?>
	</h3>

Nope, not America ๐Ÿ™‚ Finland so no holiday for me!


miranda rota

September 2, 2013 at 4:22 am

Thank you – it looks beautiful now! ๐Ÿ™‚

We had a Finnish family living next door to us (uk) when I was little, they were lovely.


Dean

September 2, 2013 at 4:40 am

The Finns get about, they are good to know, though not always easy to get to know ๐Ÿ™‚

Glad it’s sorted for you!


miranda rota

September 2, 2013 at 7:21 am

Dean, I’ve just noticed that it’s not completely sorted as the heading only shows when visitor is NOT logged in, but doesn’t show when the visitor IS logged in …grrrr! ๐Ÿ˜‰

What do I need to add to fix that bit please?


miranda rota

September 2, 2013 at 8:55 am

Dean, this is what I’ve just posted above but since I posted have found something else too, so posting it all here together in one comment, for clarity:

Iโ€™ve just noticed that itโ€™s not completely sorted as

1. the heading only shows when visitor is NOT logged in, but doesnโ€™t show when the visitor IS logged in

2. ditto for the ability to register – when someone is logged in, it is showing the register button on the ‘Forthcoming events’ SNIPPET BUT when they click on the ‘Read More’ link, it goes through to the full description but has NO registration button and is still telling them they need to login or register, and no register button

…double grrrr! ๐Ÿ˜‰

Many thanks for your time and patience!


miranda rota

September 3, 2013 at 6:17 am

Help needed please! I’m bumping this up as I know it looks above as though it was sorted, but it’s not! I’ve had to undo all the new code as it was impossible to register for an event, even when I’m logged in as admin!

Repeating here what the problem is:

Dean, this is what Iโ€™ve just posted above but since I posted have found something else too, so posting it all here together in one comment, for clarity:
Iโ€™ve just noticed that itโ€™s not completely sorted as
1. the heading only shows when visitor is NOT logged in, but doesnโ€™t show when the visitor IS logged in
2. ditto for the ability to register โ€“ when someone is logged in, it is showing the register button on the โ€˜Forthcoming eventsโ€™ SNIPPET BUT when they click on the โ€˜Read Moreโ€™ link, it goes through to the full description but has NO registration button and is still telling them they need to login or register, and no register button or – just no possibility for anyone to register anywhere!


Josh

  • Support Staff

September 3, 2013 at 2:28 pm

Hi Miranda,

I can suggest reverting the changes back to the way they were before, and going with the suggestion to include the description for logged out viewers here:

https://eventespresso.com/topic/event-information-not-showing-after-more-tag-unless-logged-in/#post-57421

Then add the event title just above the description.

<?php echo $event_name ?>

Other variables can be copied over from registration_page_display.php if need be to get the other information.


miranda rota

September 11, 2013 at 2:45 am

Thank you Josh, I’ve done that but just putting that in makes the heading appear but just as a line of plain text at the top, not as a heading…

So I put in the bits from ‘registration-page-display.php’ but, as said above, it then does not allow anyone to register, even if I’m logged in as admin. So somewhere in the registration-page-display.php coding that Dean has given above there must be a little piece of coding that is not letting anyone register, logged in or not.

This is the continuous loop that it’s stuck in at the moment

Many thanks for your help


Josh

  • Support Staff

September 11, 2013 at 7:44 am

Hi Miranda,

If you’re customizing the registration_page_display.php template, then that’s the wrong template.

The code changes should go into registration-display.php not registration_page_display.php. I’m sorry for not clarifying that bit.

In order to make the event title into a heading it can be wrapped in an H tag like so:

<h3><?php echo $event_name ?></h3>


miranda rota

September 11, 2013 at 3:52 pm

Hello Josh, and thank you – no, I think you had made it clear further up the thread and I had put it in the correct file!

When I put in the exact piece of code: <?php echo $event_name ?> it broke the site. I fiddled around with it a bit and when I added it like this: echo $event_name, and put it together with the other little piece you had given me to include all the text info of the event, it showed the title, but as said above it was just like the plain text.

It’s late here so will try what you suggest tomorrow.

Many thanks ๐Ÿ™‚


Josh

  • Support Staff

September 11, 2013 at 4:06 pm

In that case, it would be something like this:

echo '<h3>' . $event_name . '</h3>';

What happens is the code is already between a <?php and ?> tag, things will break if another <?php tag is added within that code block.


miranda rota

September 16, 2013 at 5:18 am

Thanks Josh, yes that worked – I’m just going to buy a support ticket now as the main problem is still there (when one IS logged in, it’s impossible to register for an event as it just keeps telling one to log in)


Tony

  • Support Staff

September 17, 2013 at 3:53 am

Hi Miranda,

I’ve emailed you regarding this and your other threads ๐Ÿ™‚


miranda rota

September 24, 2013 at 12:22 am

Hello,

This is the last major problem and it’s to do with what happens when people register to become members – the client wants each new registrant to wait to be ok-ed by admin before the new registrant is able to register for an event. As it is at present, as soon as they have registered they can actually go right in and book an event.

I thought this was a Wishlist malfunction, but their developer had a look at it and said that this change needs to effected in Event Espresso.

What do I need to do to make this work as desired please?

http://gator3027.hostgator.com/~yep1/

Many thanks for your time ๐Ÿ™‚


Tony

  • Support Staff

September 24, 2013 at 2:19 am

Hi Miranda,

Unfortunately EE doesn’t really integrate with ‘members’ in such a way that this would be possible without some heavy customisations.

It would depend on how you want this to work, for example if you would like the user to be able to register, log in, but then not be able to register onto an Event until approved you’ll need a lot of customisation work.

The other way to do it is to withhold the users password and not auto log-in when registering. So basically when someone registers they can not do anything more than they could previous (including logging in) until the admin approves, once the admin approves an email is sent to the user containing their login credentials.

The second option can be achieved using a plugin like New User Approve which does as described above although I’m unsure if it will work correctly with wishlist.


miranda rota

September 24, 2013 at 4:06 am

Tony, many thanks for that.

1.
I’ve installed it but it still does let the user in at time of registration – admin has to go in and actually click the button to stop the user getting in. Is there any simple code that would tell it to block them as they register until they’ve been approved?

2. This is what the WishList developer said – does it throw any more light onto a simple way of doing this??

Unfortunately this fall into customizing Event Espresso plugin, you can use WLM API to check if current logged in user is approved member or not. and if so then you should enable link to registration section. this need some php skill to modify Event Espresso plugin. so you would need to look into a customized solution for this.

If you work with code yourself, we have 2 available APIs that can be used to work with the WishList Member code and those are available using the link below:

http://wishlistproducts.com/api/ – (Includes list of WishList Member WordPress Hooks)

You can also check out the API Codex here:

codex.wishlistproducts.com

—–

We have also attached a file called api-helpers.zip

functions.php (contains WordPress-style functions they can call anywhere in a theme or plugin when WLM is installed)

class-api-methods.php (a class that actually does all the coding work of connecting to and interacting with the API)

These are already in WishList Member, but they’re encrypted. These are unencrypted versions so you can look through them. These don’t need to be added anywhere as they are for reference.

Note that there is also included documentation included which helps describe what can be done using these APIs.

Many thanks for your help!


Tony

  • Support Staff

September 24, 2013 at 4:53 am

Unfortunately the above was the easy option.

1. Wishlist is taking over the registrations, so that plugin is ignored. Here’s what happens on my test site when registering. http://d.pr/i/BluZ then the admin can approve/deny http://d.pr/i/tCS8.

2. This would mean wrapping the registration form within a function to check with WLM as to whether or not the user was approved. (or at a guess a certain level of membership?) unfortunately this level of customisations is not something we do under normal support.

I’m not very familiar with Wishlist but does it not have an option to pre-approve all members?


miranda rota

September 24, 2013 at 5:09 am

Tony, I think I’ve had what I’m hoping is a brainwave! ๐Ÿ™‚

I’m going to make another membership level that only has access to the registration approval page (hope that’s possible!) and then the admin can move them up to the full membership when they’ve checked them.

I’ll post here if it works ๐Ÿ˜‰


Dean

September 24, 2013 at 11:56 pm

That sounds like a good brainwave, please keep us informed!


miranda rota

September 27, 2013 at 5:10 am

No, Dean, really a pity but evidently was not a good brainwave, haha!

Wishlist support say I would have to use their api to do it. Who would know whether the customisation needs to be done from Wishlist side or EE side? …that is one of the big questions ๐Ÿ˜‰

Btw, I can’t find where the list of your ‘customisers’ can be found for EE? I can only find the premium support …do you have a list of people who are able to give the customisation code for this?

Many thanks for your input.


Dean

September 27, 2013 at 6:28 am

Well it sounded like a good idea to me!

“the client wants each new registrant to wait to be ok-ed by admin before the new registrant is able to register for an event.”

Wishlist may say differently, but to me this is a membership issue more than event related, as the person is registered with the site first before even going near events, and its that registration that you want to be able to approve.

Our list of recommended developers are here – https://eventespresso.com/developers/event-espresso-pros/

Viewing 27 reply threads

The support post ‘Event information not showing after More tag unless logged in’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso