Nickolas

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • in reply to: Cross-selling or cross-referencing of events #1043122
    Nickolas
    Participant

    Greetings

    Related Events does sometime show up another recurrence of the same event for another date/venue, but not always, making the process of navigating through a series of event a little hard.
    Ex: we have a series of identical events at different date and different venue. Should the one we were interested in be cancelled or simple is full, it would be beneficial to the user to be suggested other occurrence of that event that are still available.

    Perhaps it should first suggest event with same title, then goes back to its regular “related” query?

    I might resort to coding a little “ul/li” list of “related event” in the case of my recurring events.
    EDIT: Just occurred to me that I cannot resort to that kind of listing and expect linking to other event, since at the point where I can actually generate that list, I don’t have any PostID yet, because those aren’t imported and created as event…
    My best bet would now be to edit my single-event.php template and add a special query for “event with same title” in order to generate such listing… I’ll check that solution out, maybe I’ll find what I’m looking for!

    Regards

    • This reply was modified 10 years, 4 months ago by Nickolas.
    in reply to: Long content on event description, but still allow HTML #1043115
    Nickolas
    Participant

    Greetings

    Thanks for the short code, it did the trick of letting HTML through while still cutting short some of the longer description.

    Regards

    in reply to: Long content on event description, but still allow HTML #1039768
    Nickolas
    Participant

    Greetings

    Sadly, the update didn’t fix much. Now, long description are truncated, which is intended, but no HTML is displayed. The image that was in the description also disappeared.

    You can see for yourself on the demo link provided earlier.

    Regards

    in reply to: Long content on event description, but still allow HTML #1039218
    Nickolas
    Participant

    Greetings

    The solution josh provided does changes a few things when the “hover” description is displayed: it doesn’t let the allowed HTML tags through. That in itself, is what “breaks” my custom functionality.

    1. The “customized” HTML is added during the importing process (done via a WP All Import job using all Event Calendar Meta tags available). I have a PHP file that generates the XML for the import, based on what info it queries back from the “main” event database. It also checks for events with multiple showings, spiting a single event into all of its showings. So an event with 5 different showings (be it at the same venues or not) would generate 5 different events on my event calendar. This is what you see on the Demo page I gave you.

    It also does additional checking on each showing of an event, marking it “full” or “cancelled” if needed (along with other stuff, such as boxoffice links for purchasing of ticket, etc). It does that by adding the following code at the beginning of the description HTML (a canceled event in this case) :
    <strong class="stamp">Événement annulé</strong>
    My CSS does the rest as far as displaying it goes.

    The Description is then imported as HTML directly into “the content” of the event.

    2. I confirm.
    Using “wp_trim_words” (with 55 as a limit) removes the HTML around the words which affects the display later down the road.
    Using the default “wp_trim_excerpt” let all the allowed HTML tags through, but it also makes for some very long description! 🙂

    3. Yes, that “ÉVÉNEMENT COMPLET” is displayed when a showing is “complete”. That is the custom HTML I’m referring to. The case you show in the screenshot (december 12th) simply has this as its full content:

    <strong class="stamp">Événement complet</strong><img class="event-img" src="http://media.lavitrinesaguenay.com/image/1449666249573.jpg" alt="" align="left" /> Bande de fous, genre écrivains, qui jouent avec les mots, tentent de les prononcer et ne savent pas les écrire.
    Entrée libre, libre, libre

    You see the first “strong” bits at the begining is what I use to display the stamp-ish look in red. At the very end, if there is a boxoffice link (it would be parsed in during the XML generation process), it would be shown as such:
    <br /><strong>Admission :</strong> <a href="dummydomain.com/to/tickets" target="_blank" class="tribe-events-button">boxoffice link</a>
    Funny thing is that “a” HTML tag would display the standard button right in the hover, enabling people to purchase tickets via that url right away.

    Hopefully I clarified everything!
    Let me know if you need further information or direct file access.

    Best regards

    • This reply was modified 10 years, 4 months ago by Nickolas.
    in reply to: Long content on event description, but still allow HTML #1038904
    Nickolas
    Participant

    This reply is private.

    in reply to: Event with multiple showings #1037719
    Nickolas
    Participant

    Thanks for your help.
    In my case, you are right, having multiple events at multiple venues might be the better option then trying to use the recurring functionality. I’ll do that. 🙂

    Best regards

    in reply to: Customised Date and Time format display in List Widget #1026373
    Nickolas
    Participant

    You are right, changing those “General WordPress Settings” did change the output format of the date/time.

    I was also able to change the date-time seperator ” @ ” for a ” à ” inside the Display Preferences of the plugin.

    Thanks for your help!

    PS: Yes, I’m aware of the Pro-Version more complete capability, I’m using it on other projects. But I wanted to test out the free version first and see if it was enough for the client’s need. Thanks!

    • This reply was modified 10 years, 5 months ago by Nickolas. Reason: Added clarification
    • This reply was modified 10 years, 5 months ago by Nickolas. Reason: Typos
    in reply to: Customised Date and Time format display in List Widget #1025428
    Nickolas
    Participant

    This reply is private.

    in reply to: Auto Deleting past events #1012549
    Nickolas
    Participant

    Oh, I didn’t know that…

    So I tried it, and it only enable complete data cleanup, not specific date-related clean up (ex: delete all events that are more then past 2 months old).

    Perhaps in a later version it could provide a “cron type” url to remove old events on a daily basis… until then, I’ll just keep them all. Maybe I’ll do a manual cleanup once a year, no biggie.

    Edit: Bulk Delete’s (WordPress.org link) Pro Version (their website link) provide the functionality of scheduling the removal of custom post type (so “tribe_event” in my case) that are older then X days.
    I’ll submit this workaround to the client… he’ll do the buying this time! 😀

    • This reply was modified 10 years, 6 months ago by Nickolas. Reason: Added Bulk Delete reference
    Nickolas
    Participant

    If anyone else has an idea here’s my “page-event.php” complete code (that file is the default event template file).

    It works perfectly for Event and Calendar display. When it comes to Venues though, the_title() returns the first event’s title from the loop instead of the venue’s title (same goes for the_ID()…).

    <?php
    /*
    Template Name: Event Page
    Simplistic Page template, everything is in the Single-event.php template (/tribe-events/single-event.php)
    */
    get_header();
    
    $is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
    
    while ( have_posts() ) : the_post(); 
    
    $content = apply_filters( 'the_content', get_the_content() );
    $content = str_replace( ']]>', ']]>', $content );
    ?>
    
    <div id="main-content">
    	<div class="title-container"><h1 class="tribe-events-single-event-title summary entry-title">
    <?php 
    	if( tribe_is_month() || tribe_is_week() || tribe_is_day() || tribe_is_map() ||  tribe_is_past() || tribe_is_upcoming() ) {
    		$title = "Calendrier des événements";
    	} elseif ( get_query_var('post_type') === 'tribe_venue') {
    		// Single Venue
    	 	$title = "Description du lieu";
    	}else {
    	 	$title = get_the_title();
    	}
    	echo $title;
    ?></h1></div>
    	<div class="container">
    		<div id="content-area" class="clearfix">
    			<div id="left-area">
    				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    
    				<?php echo $content; ?>
        
    				</article> <!-- .et_pb_post -->
    			</div> <!-- #left-area -->
    
    			<?php get_sidebar();?>
    		</div> <!-- #content-area -->
    	</div> <!-- .container -->
    
    </div> <!-- #main-content -->
    
    <?php  endwhile;
    
    get_footer(); ?>
    Nickolas
    Participant

    Greetings

    So the detection itself does work, but it doesn’t display the_title() in there properly… It’s as if the listing showed after the venue’s description was taking priority into that loop and showed the first event’s title instead. However, when there is no “next events” for this venue, the title does properly display the Venue’s name!

    I don’t want to put more time into this, so I’ll just work around and hardcode a generic title (ie: “Description of the venue”) and keep the venue’s name displayed into the inside part of the “page-event.php”.

    I think I could always store the wp_query and make a special one just to get the title right, but for such project it would just feel a little… overkill. hehe.

    Thanks anyway!

    Edit: I was too curious anyway, so I did some additional testing. In my current setup, the Venue’s Post ID is not queryable until AFTER the_content(); loop is completed (so, only once I reach my the_sidebar(); call)… Definitely an issue with loops here…

    • This reply was modified 10 years, 6 months ago by Nickolas.
    in reply to: Auto Deleting past events #1012524
    Nickolas
    Participant

    Well, I’m already using The Events Calendar and all the code and integration is pretty much completed… I’d prefer to stick with what’s working properly instead of diving into some plugin I don’t even know. 😀

    Perhaps there is some plugin to “auto-delete” custom post type directly based on the “post creation’s date”? I’ll make a search tomorrow and let you know what I come up with.

    Regards

    Nickolas
    Participant

    Greetings

    I just tested the TRIBE_MODIFY_GLOBAL_TITLE fix. I put it in my “page-event.php” template file (did nothing noticable), and also into a functions.php of my theme (broke the display of the title – that was fixed in my previous thread – by removing it altogether).

    Still stuck here.

    What are the conditionals for single-tribe-venue? I put this little code inside the while loop to make a test, but it doesn’t seems to know the type of content it is about to display…

    while ( have_posts() ) : the_post(); 
    
    if( tribe_is_venue()) {	
    	$venue_id = get_the_ID();
    	echo "test";
    } 
    in reply to: the_title not displaying within page.php #1010952
    Nickolas
    Participant

    Writing the above post made me think of a possible work around.

    Since it appears “the_content();” is what populates “the_title();” function/content, why not simply use “get_the_content();” within “page-event.php” theme’s template file BEFORE you actually use “the_title();” function? You can simply store the content returned by the function into a variable for later use, but your title (and its function) will be populated already… That’s a lot of “content” word! 😀

    See my “page-event.php” file (that is based from page.php from my theme’s file)

    <?php
    /*
    Template Name: Event Page
    Simplistic Page template, everything else is in the Single-event.php template (/tribe-events/single-event.php)
    The main goal of this file is to load the_title BEFORE the event's information
    */
    get_header();
    
    $is_page_builder_used = et_pb_is_pagebuilder_used( get_the_ID() );
    
    while ( have_posts() ) : the_post(); 
    
    /* FIX
     * Important in order to keep the output consistent with the_content's normal output
     * Took from https://codex.wordpress.org/Function_Reference/the_content#Alternative_Usage
     */
    $content = apply_filters( 'the_content', get_the_content() );
    $content = str_replace( ']]>', ']]>', $content );
    ?>
    
    <div id="main-content">
    	<div class="title-container"><h1 class="tribe-events-single-event-title summary entry-title"><?php the_title(); ?></h1></div>
    	<div class="container">
    		<div id="content-area" class="clearfix">
    			<div id="left-area">
    				<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
                    
    				<?php 
    				// FIX : Use echo $content; instead of the_content();
    				echo $content; 
    				?>
        
    				</article> <!-- .et_pb_post -->
    			</div> <!-- #left-area -->
    
    			<?php get_sidebar(); ?>
    		</div> <!-- #content-area -->
    	</div> <!-- .container -->
    
    </div> <!-- #main-content -->
    
    <?php  endwhile;
    
    get_footer(); ?>

    It did fix my issue, so I can have the_title within my “page-event.php” theme’s template! Perhaps this could be clarified in docs somewhere? That the_title() is unusable before the the_content() function is called?

    Thanks for the help nonetheless… brainstorming together worked out well. 🙂

    • This reply was modified 10 years, 7 months ago by Nickolas.
    in reply to: the_title not displaying within page.php #1010947
    Nickolas
    Participant

    Alright, so I did a test under the theme Twenty-Fourteen (to rule out Divi) mimicing my theme’s title positioning and the title still do not show when called within the “page.php” (or page-event.php) theme’s template file BEFORE “the_content()”.

    When using Default Event template (Settings > Display > Events template), the title shows (as it actually does if I call the_title() AFTER having called the_content()…) but there I lose all the surrounding design of the page.php template.

    So I’m figuring that “the_title()” returns NULL until the function the_content() – which seems to “launch” the single-event page – is called.

    Is there a way to display the_title() BEFORE my single-event.php file gets brought in (through the_content()…)?

Viewing 15 posts - 1 through 15 (of 18 total)