abriel_s
Forum Replies Created
-
Until they come up with an update for the plugin, I simply input this into my header.php file, using the following:
<script type="text/javascript"> $(document).ready(function(){ $('.gllr_image_block p a[target="_blank"]').removeAttr('target'); }); </script>
Hopefully this helps! ??
Are you referring to putting the #_EVENTIMAGE{x,y} in the shortcode above?
The only way at the moment it seems the events are being read onto the page is using the following code (the majority of it being commented out, but somehow still reading in the template file, even the –> at the end of the PHP):
<!-- <?php $page = ( !empty($_REQUEST['page']) && is_numeric($_REQUEST['page']) )? $_REQUEST['page'] : 1; $args = array( 'limit' => 10, 'scope' => 'today', 'pagination' => 1 ); if (isset($_REQUEST['c'])) { $args['category'] = $_REQUEST['c']; $args['scope'] = 'future'; } $args['offset'] = $args['limit'] * ($page-1); $events = em_get_events_array($args); $size = sizeof($events)-1; echo "<table cellpadding='0' cellspacing='0' id='current-events' >"; for ($i=0;$i<$size;$i++) { echo "<tr><td class='startdate_cost_td'> <span class='start_time'>" . $events[$i][0] . "</span><br/><span class='cost'>" . $events[$i][3] . "</span></td><td class='event_image'>"; if ($events[$i][5] == '') { echo "<img src='../../../wp-includes/images/default_img.jpg' />"; } else { echo $events[$i][5]; } echo "</td><td class='event_title'>" . $events[$i][2] . "<br/><i><span class='location_name'>@". $events[$i][1] . "</span></i><br />" .$events[$i][4] . "<div id='read_more_wrapper'>" . "<img src='../../../wp-includes/images/little_pink_arrow.jpg' /><a href='" . $events[$i][8] . "' class='pink_link'>READ MORE</a></td></tr>" . "</div>"; } echo "</table>"; $last_index = count($events) - 1; echo $events[$last_index][0]; ?> --> </$size;$i++)>
The way the main page event’s should be displaying is like on the following page. Here’s a screenshot of it as well: https://docs.google.com/open?id=0B2UC67NQiW2yalhMSGxra0FFWGM
I also tried the formatting on the initial page as you said, but still has the events displaying incorrectly.
Here’s what I used in the shortcode:
[events_list format_header="<table cellpadding='0' cellspacing='0' id='current-events' >" format_footer="</table>"] <tr> <td class='startdate_cost_td'> <span class='start_time'>#_12HSTARTTIME</span><br /> <span class='cost'>#_ATT{Cost}{Free}</span> </td> <td class='event_image'>{has_image}#_EVENTIMAGE{/has_image} {no_image}<img src='../../../wp-includes/images/default_img.jpg' />{/no_image}</td> <td class='event_title'>#_EVENTNAME<br /> <i><span class='location_name'>@ #_LOCATIONNAME</span></i> <div id='read_more_wrapper'> <img src='../../../wp-includes/images/little_pink_arrow.jpg' /><a href='#_EVENTURL' class='pink_link'>READ MORE</a></div></td></tr> [/events_list]
What I meant was by the “But, still doesn’t work.” is that when I tried inputting the following shortcode after trying to first method, it still displayed the same message. I tried again to do the same thing, but still doesn’t display the events on the main page.
But, there was some code that was used to create the events table on the page. I commented out the code and this magically popped up during deletion in the main template used just on that page:
</$size;$i++)>
The original code I implemented and commented out was the following:
<?php $page = ( !empty($_REQUEST['page']) && is_numeric($_REQUEST['page']) )? $_REQUEST['page'] : 1; $args = array( 'limit' => 10, 'scope' => 'today', 'pagination' => 1 ); if (isset($_REQUEST['c'])) { $args['category'] = $_REQUEST['c']; $args['scope'] = 'future'; } $args['offset'] = $args['limit'] * ($page-1); $events = em_get_events_array($args); $size = sizeof($events)-1; echo "<table cellpadding='0' cellspacing='0' id='current-events' >"; for ($i=0;$i<$size;$i++) { echo "<tr><td class='startdate_cost_td'> <span class='start_time'>" . $events[$i][0] . "</span><br/><span class='cost'>" . $events[$i][3] . "</span></td><td class='event_image'>"; if ($events[$i][5] == '') { echo "<img src='../../../wp-includes/images/default_img.jpg' />"; } else { echo $events[$i][5]; } echo "</td><td class='event_title'>" . $events[$i][2] . "<br/><i><span class='location_name'>@". $events[$i][1] . "</span></i><br />" .$events[$i][4] . "<div id='read_more_wrapper'>" . "<img src='../../../wp-includes/images/little_pink_arrow.jpg' /><a href='" . $events[$i][8] . "' class='pink_link'>READ MORE</a></td></tr>" . "</div>"; } echo "</table>"; $last_index = count($events) - 1; echo $events[$last_index][0]; ?>
I’m wondering now, if you look on testbuzz.illinimedia.com, how now to get the events to display properly (like this events pages?
Forum: Plugins
In reply to: [WP RSS Multi Importer] Changing Excerpt Ending […] TextHi Allen,
Oh goodness! How did I not see that?! Thank you so much! This worked for me.
I figured out a CSS solution work-around for the moment, but it seems the event, being displayed as a page, causes the blog post title to also be the title of the event.
Here’s the CSS I used to get rid of the duplicated title:
#main .event .title { display: none; }
If anyone has a better solution, please let me know.
Hi,
I actually figured out after enabling/disabling the Override with Format in the Settings > Pages > Event Pages, it’s somehow the formatting of just the singles page.
But, I overrode the singles page setting, enabling whatever features I wanted and still don’t know how to disable the second showing of the event name.
@agelonwl As I mentioned before, the first snippet of code did in fact work. But, it was showing the wrong category. I figured out by looking at the em-category.php file that I simply needed to replace
category_id
withterm_id
and it worked!In case anyone else is having trouble, here is the solution:
add_filter('em_category_output_placeholder','my_em_placeholder_mod',1,3); function my_em_placeholder_mod($replace, $EM_Category, $result){ switch( $result ){ case '#_CATEGORYNEXTEVENTS': $events = EM_Events::get( array('category'=>$EM_Category->term_id, 'scope'=>'future', 'limit'=>10) ); if ( count($events) > 0 ){ $replace = get_option('dbem_category_event_list_item_header_format'); foreach($events as $event){ $replace .= $event->output(get_option('dbem_category_event_list_item_format')); } $replace .= get_option('dbem_category_event_list_item_footer_format'); } else { $replace = get_option('dbem_category_no_events_message'); } break; } return $replace; }
I couldn’t have even begun to think of a solution without you, so thank you!
Okay now I’m pasting them up in the functions.php file. The first code actually did somewhat of what I wanted. But, it’s not reading in the correct events, and only displays the first three events from today’s events.
Compare testbuzz.illinimedia.com with the Music category.
I understand that, but I want to know where I place the newly edited code (ex. Em-functions.php)?
Can you be more specific on where I should be placing the code at as well as if any code needs to be replaced? Thanks!
@agelonwi The code you provided didn’t really do anything to the pages. Here’s the following I pasted up into the categories-list.php file:
add_filter('em_category_output_placeholder','my_em_placeholder_mod',1,3); function my_em_placeholder_mod($replace, $EM_category, $result){ switch( $result ){ case '#_CATEGORYNEXTEVENTS': $events = EM_Events::get( array('category'=>$EM_Category->category_id, 'scope'=>'future', 'limit'=>3) ); if ( count($events) > 0 ){ $replace = get_option('dbem_category_event_list_item_header_format'); foreach($events as $event){ $replace .= $event->output(get_option('dbem_category_event_list_item_format')); } $replace .= get_option('dbem_category_event_list_item_footer_format'); } else { $replace = get_option('dbem_category_no_events_message'); } break; } return $replace; }
Did I miss something or put it in the wrong location?
I figured out the problem… all I did was change the coding in the template file, then going into the Events > Settings > Formatting > Events Categories and formatted the events to be how I wanted them. ??
Thank you everyone for all the help!
Forum: Fixing WordPress
In reply to: Author's Post Link Not Working on HomepageSorry for the delay, but in case anyone is confused on this problem, all I did was replace the tag with this:
<?php the_author_posts_link(); ?>
For more details, you can follow this link.
@agelonwi I apologize, but I’m currently trying to use the latest code above in the newest version of Events Manager (v5.3.2.1)
@marcus Actually, there is a developer that did customize that code I believe in the plugin core (specifically in the em-functions.php folder)
Can you tell me specifically how I would call in those arguments? It looks like it should on the very core of the page, but because the way the code was written by the developer, not sure how to fix it so the inside doesn’t spew out this to the browser with the initial image the user inputs for that event:
8:30 AM/%break%/Alice Campbell Alumni Center/%break%/"Inside India" with Larry Kanfer/%break%/Free/%break%/Art & other exhibits/%break%/"Inside India" with Larry Kanfer/%break%/Friday, December 14, 2012/%break%/854/%break%/https://testbuzz.illinimedia.com/events-3/inside-india-with-larry-kanfer-12
The screenshot, which can be seen through this link also gives you an idea as well.