Forum Replies Created

Viewing 15 replies - 166 through 180 (of 191 total)
  • Hi, I got another issue with the combination of those plugins.

    If you try this search: https://www.dentfix.ro/?s=dentist+copil

    you get this error:

    Catchable fatal error: Object of class WP_Error could not be converted to string in /home/dentfixr/public_html/wp-content/plugins/sitepress-multilingual-cms/sitepress.class.php on line 3514

    But all is OK when doing this search: https://www.dentfix.ro/?s=dentist+copil&lang=en

    so I am not the author of Relevanssi, sorry if I sounded misleading

    Apparently there are more filters available (relevanssi_where looks promising), see the plugin FAQ https://www.ads-software.com/extend/plugins/relevanssi/faq/

    I just found this plugin and started to experiment with it…

    Nice. I just read this plugin offers a filter hook relevanssi_hits_filter

    Maybe you can do something around that?

    Change to HTML and make sure you have no <a>link</a>, but only link as text

    Thread Starter Richard Vencu

    (@rvencu)

    in JSON mode there are four issues

    1. the resume is truncated (seems to be a bug similar to the one in the admin page
    2. diacritics are replaced with unicode codes such as \u0219
    3. I am not sure if span tags should be there
    4. the positions order is quite random…

    {"name":"","url":"http:\/\/www.dentfix.ro","experienta":{"name":"CMI. DR. Fulea Alexandrina Maria","location":"Sibiu, Romania","position":[{"title":"Medic stagiar","dates":"<span class=\"dtstart\">2003<\/span> – <span class=\"dtend\">2004<\/span>","details":"Rezolvarea de urgen\u021be stomatologice cu program de zi \u0219i de noapte."}]},"formare":{"name":"Universitatea de Medicin\u0103 \u0219i Farmacie \u201eIuliu Ha\u021bieganu\u201d","location":"Cluj-Napoca, Romania","position":[{"title":"Liceu Profil Matematic\u0103-Fizic\u0103","dates":"","details":""}]}}

    Thread Starter Richard Vencu

    (@rvencu)

    Yes, this is good. There is a small issue, since it makes all capital diacritics back in lowercase (see first and last words in first section) but it is much better this way.

    Anothe issue is that I put a gallery shortcode inside a position to display the professional awards. In text mode the shortcode is not processed, I am not sure if it should be deleted completely or replaced with something else (see second section)

    EXPERIEN?? Dentfix Pro - Bucure?ti, Romania Ac?ionar ?i medic stomatolog specialist ?n chirurgie dento-alveolar? (2007 - present) A fondat Dentfix Pro ?n anul 2007. Clinica Cranio-Maxilo-Facial? II - Cluj-Napoca, Romania Medic stomatolog rezident chirurgie dento-alveolar? (2004 - 2007) Rezolvarea de urgen?e chirurgicale cu program de zi ?i de noapte. Serviciul de Urgen?e Stomatologice (1) - Cluj Napoca, Romania Medic rezident (2004 - 2007) Rezolvarea de urgen?e stomatologice cu program de zi ?i de noapte. CMI. DR. Fulea Alexandrina Maria - Sibiu, Romania Medic stagiar () Lucr?ri stomatologice variate. Serviciul de Urgen?e Stomatologice (2) - Sibiu, Romania Medic stagiar (2003 - 2004) Rezolvarea de urgen?e stomatologice cu program de zi ?i de noapte. EDUCA?IE

    () DIPLOME Diplome educa?ie () [gallery link=\"file\" columns=\"3\" id=\"102\"]

    if it helps, see here the corrected html source (without the extra /ul tag). try to see where is the fault, this dataset is triggering it for sure:

    <ul id="sections">
    				<li class="section" id="200">
    Experien??					<ul class="organizations">
    							<li class="organization" id="206">
    								Dentfix Pro								<ul class="positions">
    								<li class="position" id="2012">
    									Ac?ionar ?i medic stomatolog specialist ?n chirurgie dento-alveolar? (<span class="dtstart">2007</span> – <span class="dtend">present</span>)								</li>								
    
    								</li>								</ul>							<li class="organization" id="207">
    								Clinica Cranio-Maxilo-Facial? II								<ul class="positions">
    								<li class="position" id="2014">
    									Medic stomatolog rezident chirurgie dento-alveolar? (<span class="dtstart">2004</span> – <span class="dtend">2007</span>)								</li>								
    
    								</li>								</ul>							<li class="organization" id="208">
    								Serviciul de Urgen?e Stomatologice (1)								<ul class="positions">
    								<li class="position" id="2051">
    									Medic rezident (<span class="dtstart">2004</span> – <span class="dtend">2007</span>)								</li>								
    
    								</li>								</ul>							<li class="organization" id="209">
    								CMI. DR. Fulea Alexandrina Maria								<ul class="positions">
    								<li class="position" id="2105">
    									Medic stagiar 								</li>								
    
    								</li>								</ul>							<li class="organization" id="210">
    								Serviciul de Urgen?e Stomatologice (2)								<ul class="positions">
    								<li class="position" id="2103">
    									Medic stagiar (<span class="dtstart">2003</span> – <span class="dtend">2004</span>)								</li>
    					</ul>					</ul>				</li>								<li class="section" id="199">
    Educa?ie					<ul class="organizations">
    							<li class="organization" id="207">
    								Clinica Cranio-Maxilo-Facial? II								<ul class="positions">
    								<li class="position" id="2107">
    									Medic rezident (<span class="dtstart">2004</span> – <span class="dtend">2007</span>)								</li>								
    
    								</li>								</ul>							<li class="organization" id="211">
    								Universitatea de Medicin? ?i Farmacie ?Iuliu Ha?ieganu”								<ul class="positions">
    								<li class="position" id="2101">
    									Student Facultatea de Stomatologie 								</li>								
    
    								</li>								</ul>							<li class="organization" id="212">
    								Colegiul Na?ional ?Gh. Lazar”								<ul class="positions">
    								<li class="position" id="2099">
    									Liceu Profil Matematic?-Fizic? 								</li>
    					</ul>					</ul>				</li>								<li class="section" id="201">
    Cursuri perfec?ionare post-universitare					<ul class="organizations">
    								<li class="position" id="2198">
    									Restaur?ri protetice realizate ?n cabinetul stomatologic 								</li>
    								<li class="position" id="2192">
    									Managementul durerii ?n zona oro-facial? 								</li>
    								<li class="position" id="2186">
    									Reconstruc?iile osoase. Estetic? 								</li>
    								<li class="position" id="2182">
    									Formation et Perfectionnement en parodontologie et implantologie 								</li>
    								<li class="position" id="2184">
    									Inova?iile ?n tratamentul implantar 								</li>
    								<li class="position" id="2178">
    									Ra?ini compozite directe – up to date 								</li>
    								<li class="position" id="2039">
    									?Endodon?ia non-chirurgical? ?i chirurgical?: noi standarde terapeutice” Prof. dr. Arnaldo Castellucci – Bucure?ti 								</li>
    								<li class="position" id="2049">
    									Radiografia dentar? conven?ional? – Principii, tehnici, actualit??i (<span class="dtstart">27.02.2010</span> – <span class="dtend">27.02.2010</span>)								</li>
    								<li class="position" id="2035">
    									?Competen?? ?n Estetica Dentar?” Ivoclar – Budapesta 								</li>
    								<li class="position" id="2041">
    									Geometria ?lefuirii bonturilor 								</li>
    								<li class="position" id="2045">
    									Metode tehnologice inovatorii ?n protetica dentar? 								</li>
    								<li class="position" id="2196">
    									Implantology. Theoretical and Practical Fast Training (Milano) (<span class="dtstart">23.05.2008</span> – <span class="dtend">24.05.2008</span>)								</li>
    								<li class="position" id="2204">
    									Zilele Universit??ii de Medicin? ?i Farmacie ?Iuliu Ha?ieganu” 								</li>
    								<li class="position" id="2194">
    									Pre-prosthetic surgery. Implantology 								</li>
    					</ul>									</li>								<li class="section" id="202">
    Congrese na?ionale ?i interna?ionale					<ul class="organizations">
    								<li class="position" id="2180">
    									Al XVI-lea congres romano-francez de stomatologie 								</li>
    								<li class="position" id="2037">
    									Al XV-lea congres romano-francez – ?Estetic ?i Func?ional ?n Medicina Dentar? Modern?” Sibiu 								</li>
    								<li class="position" id="2202">
    									Al XIV-lea congres romano-francez de stomatologie (<span class="dtstart">09.10.2008</span> – <span class="dtend">11.10.2008</span>)								</li>
    								<li class="position" id="2188">
    									Al X-lea congres romano-francez de stomatologie 								</li>
    								<li class="position" id="2190">
    									Al IX-lea congres romano-francez de stomatologie 								</li>
    								<li class="position" id="2200">
    									A ?asea reuniune stiin?ific? romano-francez? (<span class="dtstart">08.10.1998</span> – <span class="dtend">10.10.1998</span>)								</li>
    					</ul>									</li>								<li class="section" id="204">
    Organiza?ii profesionale					<ul class="organizations">
    								<li class="position" id="2025">
    									Colegiul Medicilor Denti?ti Bucure?ti (<span class="dtstart">2007</span> – <span class="dtend">present</span>)								</li>
    								<li class="position" id="2033">
    									Asocia?ia Medicilor Stomatologi cu Practic? Privat? din Romania (<span class="dtstart">2005</span> – <span class="dtend">prezent</span>)								</li>
    								<li class="position" id="2030">
    									Asocia?ia Odonto-Stomatologic? Roman?-Francez? Sibiu (<span class="dtstart">2001</span> – <span class="dtend">prezent</span>)								</li>
    					</ul>									</li>								<li class="section" id="213">
    Agend?					<ul class="organizations">
    								<li class="position" id="2129">
    									Programare online la Dr. Adina Fulea 								</li>
    					</ul>									</li>								<li class="section" id="203">
    Diplome					<ul class="organizations">
    								<li class="position" id="2673">
    									Diplome educa?ie 								</li>
    					</ul>									</li>							</ul>

    the code is quite in disorder but you should be able to arrange it in your editor

    No, it is not working either with my set of data. I tried to debug the logic but it becomes very complicated because the number of combinations between sections, organisations and positions is so big that it is very hard to discover the issue.

    I would say counting is not an elegant solution but it is safe and fast.

    forgot to mention: those lines must be replaced inside wp_resume.php file

    well, I found no other solution but to count the open ul and li and avoid closing them when the count is zero. It is working for me now:

    foreach ( wp_resume_get_sections(false) as $section ) { ?>
    	<li class="section" id="<?php echo $section->term_id; ?>">
    <?php 				$li=$li+1;
    		echo $section->name; ?>
    		<ul class="organizations">
    <?php				$ul=$ul+1;
    		$current_org='';
    		$posts = wp_resume_query( $section->slug );
    		if ( $posts->have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();
    			$organization = wp_resume_get_org( get_the_ID() );
    			if ($organization && $organization->term_id != $current_org) {
    				if ($current_org != '') {
    ?>
    					</li><?php $li=$li-1; ?>
    					</ul><?php $ul=$ul-1; ?>
    <?php 						}
    				$current_org = $organization->term_id;
    ?>
    				<li class="organization" id="<?php echo $organization->term_id; ?>">
    					<?php $li=$li+1;
    					echo $organization->name; ?>
    					<ul class="positions">
    <?php							$ul=$ul+1;
    				}  ?>
    					<li class="position" id="<?php the_ID(); ?>">
    						<?php $li=$li+1; echo the_title(); ?> <?php if ($date = wp_resume_format_date( get_the_ID() ) ) echo "($date)"; ?>
    					</li><?php $li=$li-1; ?>
    
    <?php 				endwhile; ?>
    		</ul><?php $ul=$ul-1; ?>
    <?php				endif;	 ?>
    		<?php if ( $ul>0 ) {echo '</ul>'; $ul=$ul-1;} ?>
    	<?php if ( $li>0 ) {echo '</li>'; $li=$li-1;} ?>
    	<?php } ?>

    the culprit here is one too many </ul> tags in this section of code, it gets messed with ifs and so on. Still trying to figure them out:

    <?php foreach ( wp_resume_get_sections(false) as $section ) { ?>
    				<li class="section" id="<?php echo $section->term_id; ?>">
    <?php 				echo $section->name; ?>
    					<ul class="organizations">
    <?php				$current_org='';
    					$posts = wp_resume_query( $section->slug );
    					if ( $posts->have_posts() ) : while ( $posts->have_posts() ) : $posts->the_post();
    						$organization = wp_resume_get_org( get_the_ID() );
    						if ($organization && $organization->term_id != $current_org) {
    							if ($current_org != '') {
    ?>
    									</li>
    								</ul>
    <?php 						}
    							$current_org = $organization->term_id;
    ?>
    							<li class="organization" id="<?php echo $organization->term_id; ?>">
    								<?php echo $organization->name; ?>
    								<ul class="positions">
    <?php						}  ?>
    								<li class="position" id="<?php the_ID(); ?>">
    									<?php echo the_title(); ?> <?php if ($date = wp_resume_format_date( get_the_ID() ) ) echo "($date)"; ?>
    								</li>
    <?php 				endwhile; ?>
    								</ul>
    <?php				endif;	 ?>
    					</ul>
    				</li>
    				<?php } ?>

    At some

    I have the same problem, only first 3 sections can be moved around, the following ones cannot be moved.

    How to send the screenshot?

    Thread Starter Richard Vencu

    (@rvencu)

    And a final mention: the hide_empty solution for sections with no entries does not work anymore now since a section may not be empty but for some users only.

    The solution is a little redesign of the template, by moving up the have_posts() test, resulting in something like this:

    <div class='resume'>
    	<div id='bar'>&nbsp;</div>
    	<div id='header'>
    		<h2><?php echo $options['title']; ?></h2>
    <?php 			echo $options['contact_info']; ?>
    	</div>
    <?php 		foreach ( wp_resume_get_sections() as $section) {
    		$posts = wp_resume_query( $section->slug );
    		if ( $posts->have_posts() ) {
    	?>
    	<div class="section" id="<?php echo $section->slug; ?>">
    		<div class="label"><?php echo $section->name; ?></div>
    <?php			$current_org='';
    		while ( $posts->have_posts() ) : $posts->the_post();
    		$organization = wp_resume_get_org( get_the_ID() );
    			if ($organization && $organization->term_id != $current_org) {
    				if ($current_org != '') { ?>
    		</div>
    <?php 				} $current_org = $organization->term_id; ?>
    		<div class="organization" id="<?php echo $organization->slug; ?>">
    			<div class="orgName"><?php echo $organization->name; ?></div>
    			<div class="location"><?php echo $organization->description; ?></div>
    <?php 				}  ?>
    			<div class="title"><?php echo the_title(); ?></div>
    			<div class="date"><?php echo wp_resume_format_date( get_the_ID() ); ?></div>
    			<div class="details">
    				<?php the_content(); ?>
    <?php 		if ( current_user_can( 'edit_posts' ) )
    		edit_post_link('Edit'); 	?>
    			</div><!-- .details -->
    <?php 		endwhile; 
    
    	?>
    <?php 		if ( $organization ) { ?>
    		</div><!-- .organization -->
    <?php 		} ?>
    	</div><!-- .section -->
    <?php 		} ?>
    <?php } ?>
    </div><!-- #resume -->
    Thread Starter Richard Vencu

    (@rvencu)

    First, to use the host page author ID the above function becomes:

    function wp_resume_query( $section, $author = '' ) {
    
    	if(!$author) {
    		global $authordata;
    		if( is_object($authordata) )
    			$author = $authordata->ID;
    	}
    
    	//build our query
    	$args = array(
    		'post_type' => 'wp_resume_position',
    		'orderby' => 'menu_order',
    		'order' => 'ASC',
    		'nopaging' => true,
    		'author' => $author,
    		'wp_resume_section' => $section,
    	);
    
    	//query and return
    	$query = new wp_query($args);
    	return $query;
    }

    I will work the shortcode attribute another day since this is OK for me as it is now. Any author can create it’s own resume by creating a host page with the wp resume template, add the default shortcode and start adding resume positions.

Viewing 15 replies - 166 through 180 (of 191 total)